Commit graph

10453 commits

Author SHA1 Message Date
unknown
9d7799e7a8 Merge knielsen@10.100.52.19:/usr/local/mysql/tmp-5.0
into  mysql.com:/data0/knielsen/tmp-5.0
2006-06-24 16:44:41 +02:00
unknown
4a9a0b9aeb Fix race condition in test case wait_timeout.
Sometimes the helper connection (that is watching for the main connection
to time out) would itself time out first, causing the test to fail.


mysql-test/t/wait_timeout.test:
  Increase connection timeout in connection wait_con so we will not loose
  the connection that is watching for the real wait_timeout to trigger.
2006-06-24 13:11:09 +02:00
unknown
907acc785d key.result:
After merge fix


mysql-test/r/key.result:
  After merge fix
2006-06-23 19:36:54 +04:00
unknown
cbc5f34c54 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/tmp_merge-5.0-opt-mysql


sql/sql_parse.cc:
  Auto merged
2006-06-23 16:09:33 +04:00
unknown
27cc02049e Merge moonbone.local:/work/tmp_merge-4.1-opt-mysql
into moonbone.local:/work/tmp_merge-5.0-opt-mysql


mysql-test/r/key.result:
  Auto merged
mysql-test/t/key.test:
  Auto merged
sql/table.cc:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
2006-06-23 14:53:41 +04:00
unknown
89e415950c Bug#11228: DESC shows arbitrary column as "PRI"
An UNIQUE KEY consisting of NOT NULL columns
  was displayed as PRIMARY KEY in "DESC t1".
  According to the code, that was intentional
  behaviour for some reasons unknown to me.
  This code was written before bitkeeper time,
  so I cannot check who and why made this.
  After discussing on dev-public, a decision
  was made to remove this code


mysql-test/r/key.result:
  Adding test case.
mysql-test/t/key.test:
  Adding test case.
sql/table.cc:
  Removing old wrong code
2006-06-23 13:19:30 +05:00
unknown
8eb00d0af7 Merge mysql.com:/opt/local/work/mysql-5.0-root
into  mysql.com:/opt/local/work/mysql-5.0-runtime
2006-06-22 21:06:09 +04:00
unknown
67fd3c4a53 A fix and a test case for Bug#15217 "Using a SP cursor on a table created
with PREPARE fails with weird error".
More generally, re-executing a stored procedure with a complex SP cursor query
could lead to a crash.

The cause of the problem was that SP cursor queries were not optimized 
properly at first execution: their parse tree belongs to sp_instr_cpush,
not sp_instr_copen, and thus the tree was tagged "EXECUTED" when the
cursor was declared, not when it was opened. This led to loss of optimization
transformations performed at first execution, as sp_instr_copen saw that the
query is already "EXECUTED" and therefore either not ran first-execution 
related blocks or wrongly rolled back the transformations caused by 
first-execution code.
The fix is to update the state of the parsed tree only when the tree is
executed, as opposed to when the instruction containing the tree is executed.
Assignment if i->state is moved to reset_lex_and_exec_core.


mysql-test/r/sp.result:
  Test results fixed (Bug#15217)
mysql-test/t/sp.test:
  Add a test case for Bug#15217
sql/sp_head.cc:
  Move assignment of stmt_arena->state to reset_lex_and_exec_core
2006-06-22 19:29:48 +04:00
unknown
5cb66b1136 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
2006-06-22 01:16:57 +04:00
unknown
d5797063e3 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-06-22 00:29:47 +04:00
unknown
822e8866c7 Fixed bug #14896.
This bug in Field_string::cmp resulted in a wrong comparison 
with keys in partial indexes over multi-byte character fields.
Given field a is declared as a varchar(16) collate utf8_unicode_ci
INDEX(a(4)) gives us an example of such an index.
  
Wrong key comparisons could lead to wrong result sets if 
the selected query execution plan used a range scan by 
a partial index over a utf8 character field.
This also caused wrong results in many other cases.


mysql-test/t/ctype_utf8.test:
  Added test cases for bug #14896.
mysql-test/r/ctype_utf8.result:
  Added test cases for bug #14896.
sql/field.cc:
  Fixed bug #14896.
  This bug in Field_string::cmp resulted in a wrong comparison 
  with keys in partial indexes over multi-byte character fields.
  Given field a is declared as a varchar(16) collate utf8_unicode_ci
  INDEX(a(4)) gives us an example of such an index.
       
  Wrong key comparisons could lead to wrong result sets if 
  the selected query execution plan used a range scan by 
  a partial index over a utf8 character field.
  This also caused wrong results in many other cases.
2006-06-22 00:29:04 +04:00
unknown
5b9d44fd86 Merge may.pils.ru:/home/svoj/devel/mysql/BUG20357/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG20357/mysql-5.0


mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
sql/opt_sum.cc:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
2006-06-21 19:41:09 +05:00
unknown
630a1ee440 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG20357/mysql-4.1
2006-06-21 19:41:08 +05:00
unknown
fa83f8baa0 added missing MYSQLTEST_VARDIR declaration 2006-06-21 16:41:07 +02:00
unknown
bf76f070dd Merge april:devel/BitKeeper/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG20357/mysql-4.1


sql/opt_sum.cc:
  Auto merged
mysql-test/r/myisam.result:
  SCCS merged
mysql-test/t/myisam.test:
  SCCS merged
2006-06-21 17:51:16 +05:00
unknown
5c0cdea623 BUG#20357 - Got error 124 from storage engine using MIN and MAX
functions in queries

Using MAX()/MIN() on table with disabled indexes (by ALTER TABLE)
results in error 124 (wrong index) from storage engine.

The problem was that optimizer use disabled index to optimize
MAX()/MIN(). Normally it must skip disabled index and perform
table scan.

This patch skips disabled indexes for min/max optimization.


mysql-test/r/myisam.result:
  Test case for BUG#20357.
mysql-test/t/myisam.test:
  Test case for BUG#20357.
sql/opt_sum.cc:
  Skip disabled/ignored indexes for min/max optimization.
2006-06-21 17:30:59 +05:00
unknown
a1ea102599 Merge knielsen@10.100.52.19:/usr/local/mysql/mysql-5.0
into  mysql.com:/data0/knielsen/mysql-5.0
2006-06-21 12:59:19 +02:00
unknown
dce98ec42d BUG#20578
Backport Valgrind suppression from mysql-5.1:

D 1.4 05/11/23 22:44:54+02:00 monty@mysql.com 5 4 12/0/154
P mysql-test/valgrind.supp
C Remove warning that may happens becasue threads dies in different order


mysql-test/valgrind.supp:
  Add suppression for Valgrind warning.
2006-06-21 12:52:59 +02:00
unknown
6d399b0c6b Merge mysql.com:/home/kgeorge/mysql/5.0/teamclean
into  mysql.com:/home/kgeorge/mysql/5.0/B18080


sql/sql_parse.cc:
  Auto merged
2006-06-21 13:06:32 +03:00
unknown
c0ff64f8f9 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/marty/MySQL/mysql-5.0
2006-06-21 12:03:08 +02:00
unknown
b92ad63f99 merge of the changes for bug #18080
mysql-test/t/insert_select.test:
  Auto merged
mysql-test/r/insert_select.result:
  manual merge
2006-06-21 13:03:06 +03:00
unknown
ea3392fb97 manual merge
mysql-test/r/view_grant.result:
  merged
mysql-test/t/view_grant.test:
  merged
2006-06-21 13:01:00 +03:00
unknown
5a3d028776 Merge mysql.com:/home/kgeorge/mysql/5.0/teamclean
into  mysql.com:/home/kgeorge/mysql/5.0/B20482


sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-06-21 12:59:34 +03:00
unknown
6c78715161 Bug #20482: failure on Create join view with sources views/tables in different
schemas
The function check_one_table_access() called to check access to tables in 
SELECT/INSERT/UPDATE was doing additional checks/modifications that don't hold
in the context of setup_tables_and_check_access().
That's why the check_one_table() was split into two : the functionality needed by
setup_tables_and_check_access() into check_single_table_access() and the rest of 
the functionality stays in check_one_table_access() that is made to call the new
check_single_table_access() function.


mysql-test/r/view_grant.result:
  Bug #20482: failure on Create join view with sources views/tables in different 
              schemas
  - test suite for the bug
mysql-test/t/view_grant.test:
  Bug #20482: failure on Create join view with sources views/tables in different 
              schemas
  - test suite for the bug
sql/mysql_priv.h:
  Bug #20482: failure on Create join view with sources views/tables in different 
              schemas
  - check_one_table_access split into 2
sql/sql_base.cc:
  Bug #20482: failure on Create join view with sources views/tables in different 
              schemas
  - the new sub-function called
sql/sql_parse.cc:
  Bug #20482: failure on Create join view with sources views/tables in different 
              schemas
  - check_one_table_access() split into two : check_single_table_access() to 
    actually check access to the table(ro) and check_one_table_access() that calls
    check_single_table_access() and checks also the tables belonging to sub selects
    or implicitly opened tables.
2006-06-21 12:12:46 +03:00
unknown
2b43555b55 Merge mysql.com:/home/marty/MySQL/mysql-5.0-backed
into  mysql.com:/home/marty/MySQL/mysql-5.0


sql/ha_ndbcluster.cc:
  Auto merged
2006-06-21 09:50:41 +02:00
unknown
aedbb330c8 Fix for Bug #19906 REPLACE doesn't update TEXT fields correctly 2006-06-21 09:36:50 +02:00
unknown
c6b67f0d15 Merge mysql.com:/usr/home/ram/work/mysql-4.1
into  mysql.com:/usr/home/ram/work/mysql-5.0


mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
mysql-test/r/func_time.result:
  SCCS merged
2006-06-21 09:16:22 +05:00
unknown
e9452db1c1 Fix for bug#19634 "Re-execution of multi-delete which involve trigger/stored
function crashes server".

Attempts to execute prepared multi-delete statement which involved trigger or
stored function caused server crashes (the same happened for such statements
included in stored procedures in cases when one tried to execute them more
than once).

The problem was caused by yet another incorrect usage of check_table_access()
routine (the latter assumes that table list which it gets as argument
corresponds to value LEX::query_tables_own_last). We solve this problem by
juggling with LEX::query_tables_own_last value when we call
check_table_access() for LEX::auxilliary_table_list (better solution is too
intrusive and should be done in 5.1).


mysql-test/r/sp-prelocking.result:
  Added test for bug#19634 "Re-execution of multi-delete which involve trigger/
  stored function crashes server".
mysql-test/t/sp-prelocking.test:
  Added test for bug#19634 "Re-execution of multi-delete which involve trigger/
  stored function crashes server".
sql/sql_parse.cc:
  To call safely check_table_access() for LEX::auxilliary_table_list we have
  to juggle with LEX::query_tables_own_last value.
2006-06-21 01:50:20 +04:00
unknown
406a7ba992 field.cc, field.h:
Additional fix for #16377 for bigendian platforms
sql_select.cc, select.result, select.test:
  After merge fix


mysql-test/t/select.test:
  After merge fix
mysql-test/r/select.result:
  After merge fix
sql/sql_select.cc:
  After merge fix
sql/field.h:
  Additional fix for #16377 for bigendian platforms
sql/field.cc:
  Additional fix for #16377 for bigendian platforms
2006-06-21 01:14:53 +04:00
unknown
5805bba62c Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
2006-06-21 01:10:59 +04:00
unknown
49042de5b2 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-06-20 23:49:33 +04:00
unknown
b6a416ff26 Manually merged
mysql-test/t/select.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
2006-06-20 23:22:51 +04:00
unknown
3e7d68b11c select.result:
Added test case for bug#18759 Incorrect string to numeric conversion.  
select.test:
  Added test case for bug#18759 Incorrect string to numeric conversion.
item_cmpfunc.cc:
  Cleanup after fix for bug#18360 removal


sql/item_cmpfunc.cc:
  Cleanup after fix for bug#18360 removal
mysql-test/t/select.test:
  Added test case for bug#18759 Incorrect string to numeric conversion.
mysql-test/r/select.result:
  Added test case for bug#18759 Incorrect string to numeric conversion.
2006-06-20 23:05:55 +04:00
unknown
4d3803f0ed Manually merged
mysql-test/r/insert_select.result:
  Auto merged
mysql-test/t/insert_select.test:
  Auto merged
2006-06-20 22:22:14 +04:00
unknown
b250722087 Applying patch from SergeyV
Fixes bug#17264, for alter table on win32 for successfull operation completion
it is used TL_WRITE(=10) lock instead of TL_WRITE_ALLOW_READ(=6), however here
in innodb handler TL_WRTIE is lifted to TL_WRITE_ALLOW_WRITE, which causes
race condition when several clients do alter table simultaneously.


mysql-test/r/lock_multi.result:
  Test case for bug#17264.
mysql-test/t/lock_multi.test:
  Test case for bug#17264
2006-06-20 13:43:13 -04:00
unknown
70a087e53d Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into sunlight.local:/home/evgen/tmp_merge-5.0-opt-mysql
2006-06-20 15:44:33 +04:00
unknown
ac2c480f26 func_time.result:
After merge fix


mysql-test/r/func_time.result:
  After merge fix
2006-06-20 15:35:54 +04:00
unknown
91a766838f Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/mysql-4.1
2006-06-20 09:35:25 +05:00
unknown
4aa5270d12 Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge


sql/ha_ndbcluster.cc:
  Auto merged
2006-06-20 00:08:12 +02:00
unknown
846c46ea4d Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-06-20 02:04:36 +04:00
unknown
495c6b13d1 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-06-20 01:56:33 +04:00
unknown
0c4182bc46 Merge
mysql-test/t/func_in.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
mysql-test/r/func_in.result:
  SCCS merged
2006-06-20 00:52:26 +04:00
unknown
028fa1e454 item_cmpfunc.cc, func_in.result, func_in.test:
Reverted fix for bug#18360


mysql-test/t/func_in.test:
  Reverted fix for bug#18360
mysql-test/r/func_in.result:
  Reverted fix for bug#18360
sql/item_cmpfunc.cc:
  Reverted fix for bug#18360
2006-06-20 00:50:09 +04:00
unknown
b7e27e80d9 Bug #18080: INSERT ... SELECT ... JOIN results in ambiguous field list error
There was an incomplete reset of the name resolution context, that caused 
INSERT ... SELECT ... JOIN statements to resolve not by joint row type calculated
for the join.
Removed the redundant re-initialization of the context, because 
mysql_insert_select_prepare() now correctly saves/restores the context.


mysql-test/r/insert_select.result:
  Bug #18080: INSERT ... SELECT ... JOIN results in ambiguous field list error
  
  - testsuite for the bug
mysql-test/t/insert_select.test:
  Bug #18080: INSERT ... SELECT ... JOIN results in ambiguous field list error
  
  - testsuite for the bug
sql/sql_parse.cc:
  Bug #18080: INSERT ... SELECT ... JOIN results in ambiguous field list error
  
  - remove an incomplete reset of the context because the mentioned function
  correctly saves/restores the context.
2006-06-19 17:34:12 +03:00
unknown
3435f614c2 Merge mysql.com:/home/alik/MySQL/devel/5.0-rt
into  mysql.com:/home/alik/MySQL/devel/5.0-tree-merged
2006-06-19 18:10:04 +04:00
unknown
74cabf4ec2 Merge mysql.com:/home/alik/MySQL/devel/5.0-tree
into  mysql.com:/home/alik/MySQL/devel/5.0-rt


mysql-test/mysql-test-run.pl:
  Auto merged
sql/sql_insert.cc:
  Auto merged
2006-06-19 16:57:46 +04:00
unknown
151fe0cfb0 Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge


mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
2006-06-19 13:30:54 +02:00
unknown
d0c58cd83c BUG#17201 Changed to other database (BUG#20531 hinders usage of 'test' database)
mysql-test/r/mysqldump.result:
  Changed to other database (BUG#20531 hinders usage of 'test' database)
mysql-test/t/mysqldump.test:
  Changed to other database (BUG#20531 hinders usage of 'test' database)
2006-06-19 13:23:13 +02:00
unknown
e2097100f8 Merge may.pils.ru:/home/svoj/devel/mysql/BUG18036/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG18036/mysql-5.0


mysql-test/r/myisam.result:
  Manual merge.
mysql-test/t/myisam.test:
  Manual merge.
sql/sql_update.cc:
  Manual merge.
2006-06-19 16:06:29 +05:00
unknown
6cf425b856 Merge mysql.com:/home/kgeorge/mysql/4.1/teamclean
into  mysql.com:/home/kgeorge/mysql/4.1/B9676
2006-06-19 13:25:28 +03:00