Commit graph

23721 commits

Author SHA1 Message Date
Davi Arnaut
53802ae6ca Bug#41465: confusing error message when comment is too long
The problem was that the server was trying to use the unknown
error format string (ER_UNKNOWN_ERROR) to print messages about
comments being too long, but the said format string does not
accept arguments and will always default to "Unknown error".

The solution is to introduce new error messages which are
specific to the error conditions so that server wants to
signal -- this also means that it's possible to translate
those messages.

mysql-test/r/strict.result:
  Update test case result.
mysql-test/t/strict.test:
  Update test case with new errors.
sql/share/errmsg.txt:
  Introduce new errors for long comments.
sql/unireg.cc:
  Use new errors.
2009-03-05 08:20:01 -03:00
Kristofer Pettersson
d40b1be906 Automerge 2009-03-06 10:52:43 +01:00
Kristofer Pettersson
ddaede8087 Bug#39843 DELETE requires write access to table in subquery in where clause
An unnecessarily restrictive lock were taken on sub-SELECTs during DELETE.

During parsing, a global structure is reused for sub-SELECTs and the attribute
keeping track of lock options were not reset properly.
This patch introduces a new attribute to keep track on the syntactical lock
option elements found in a sub-SELECT and then sets the lock options accordingly.

Now the sub-SELECTs will try to acquire a READ lock if possible
instead of a WRITE lock as inherited from the outer DELETE statement.


mysql-test/r/lock.result:
  Added test case for bug39843
mysql-test/t/lock.test:
  Added test case for bug39843
sql/sql_lex.cc:
  * Reset member variable lock_option on each new query.
sql/sql_lex.h:
  * Introduced new member variable 'lock_option' which is keeping track
    of the syntactical lock option of a (sub-)select query.
sql/sql_parse.cc:
  * Wrote comments to functions.
sql/sql_yacc.yy:
  * Introduced an attribute to keep track of syntactical lock options
    in sub-selects.
  * Made sure that the default value TL_READ_DEFAULT is at the begining
    of each subselect-rule.
2009-03-05 15:22:33 +01:00
Sergey Glukhov
326de4957a Bug#42758 INFORMATION_SCHEMA.COLUMNS is inconsistent
remove 'unsigned', 'zerofill' attributes
from DATA_TYPE column value.


mysql-test/suite/funcs_1/r/is_columns_innodb.result:
  result fix
mysql-test/suite/funcs_1/r/is_columns_memory.result:
  result fix
mysql-test/suite/funcs_1/r/is_columns_myisam.result:
  result fix
sql/sql_show.cc:
  remove 'unsigned', 'zerofill' attributes 
  from DATA_TYPE column value.
2009-03-05 15:15:47 +04:00
He Zhenxing
b4fdb8aec1 BUG#37051 Replication rules not evaluated correctly
Backporting patch to 5.0.
2009-03-05 18:10:44 +08:00
Bjorn Munch
6c2c23d341 merge 42797 2009-03-04 16:41:45 +01:00
Bernt M. Johnsen
cd5c40ecd4 Bug 43258 merged from gca 2009-03-04 15:56:13 +01:00
Bernt M. Johnsen
9f493ea98a bug#43258 prepared for push on 5.1 2009-03-04 13:45:49 +01:00
Dmitry Lenev
161b8d0b2f Fix for bug #40702 "skip_name_resolve fails sporadically on
pushbuild".

Under new MTR the server is not restarted for every test, so
threads started in the previous test case can show up in the
results of SHOW PROCESSLIST statement in this test, causing a
test failure.

Since we are not really interested in results of SHOW PROCESSLIST
in this test but rather in fact that server doesn't crash when
executing this statement this fix simply disables output of this
statement.

mysql-test/r/skip_name_resolve.result:
  Disable SHOW PROCESSLIST output to make test immune to threads
  started in previous test cases.
mysql-test/t/skip_name_resolve.test:
  Disable SHOW PROCESSLIST output to make test immune to threads
  started in previous test cases.
2009-03-04 15:33:56 +03:00
Staale Smedseng
61f905cfa1 Missing change to funcs_1.myisam_views after push of Bug#29458 2009-03-04 13:18:56 +01:00
Bjorn Munch
65074b23c2 Bug #42986 MTR2 should not allow 0 as a value for --parallel
Add sanity check that $opt_parallel > 0
2009-03-04 12:12:57 +01:00
Bjorn Munch
60dd4e8da4 Bug #43132 Pusbbuild 2 host sol10 sparc64 max is not running tests due to port unavailble
MTR gives up if wanted port not available
Try next range if set to 'auto'
Also, use next number for additional threads if explicitly set
2009-03-04 11:34:47 +01:00
Anurag Shekhar
aa13f72b90 Bug#41305 server crashes when inserting duplicate row into a merge table
This problem comes while inserting a duplicate row in merge table 
without key but the child table has a primary key. 
While forming the error message handler tries to locate the key field
which is creating this problem but as there is no key on the merge
table there is a segmentation fault.

mysql-test/r/merge.result:
  Updated results with new test for this bug.
mysql-test/t/merge.test:
  Added new test to test error generated from a key on child table 
  where merge table doesn't have any key.
storage/myisammrg/ha_myisammrg.cc:
  Added a new check to see if the value of error key is higher than 
  the number of key in merge table and if it is the error key set 
  to MAX_KEY. The error message generation routine treats MAX_KEY as 
  unknown key and doesn't tries to access this in key_info.
2009-03-04 14:48:07 +05:30
Matthias Leich
140cc614c9 Last slice of fix for Bug#42003 tests missing the disconnect of connections <> default
+ Fix for Bug#43114 wait_until_count_sessions too restrictive, random PB failures
+ Removal of a lot of other weaknesses found
+ modifications according to review
2009-03-03 21:34:18 +01:00
Bernt M. Johnsen
82c21e46f6 Merged from gca branch (bug 42711) 2009-03-02 14:26:57 +01:00
Bernt M. Johnsen
f61230131b Merged from gca branch (bug 42711) 2009-03-02 14:03:01 +01:00
Bjorn Munch
6293a2ea93 Bug #40978 Error log gets truncated during testsuite, prevents debugging
Error log gets truncated when mysqld is restarted by MTR

mysql-test/include/check-warnings.test:
  Since server doesn't have log-error, get it from env. var. set by MTR
mysql-test/lib/My/ConfigFactory.pm:
  "Hide" log-error in a comment
mysql-test/mysql-test-run.pl:
  "Hide" log-error in my.cnf by comment
  add --console to arguments on Windows
  Move .err file to var/log
2009-03-02 13:48:35 +01:00
Bernt M. Johnsen
f5d1109c11 Prepared BUG#42711 for push on 5.1 2009-03-02 11:22:38 +01:00
Bernt M. Johnsen
ef165e36d9 Prepared BUG#42711 for push 2009-03-02 11:03:13 +01:00
Leonard Zhou
b1ffa3aa41 merge 2009-03-02 13:02:13 +08:00
Leonard Zhou
63c9bb320f BUG#39526 sql_mode not retained in binary log for CREATE PROCEDURE
Set wrong sql_mode when creating a procedure. 
So that the sql_mode can't be writen into binary log correctly.
      
Restore the current session sql_mode right before generating the binlog event
when creating a procedure.

mysql-test/suite/binlog/r/binlog_sql_mode.result:
  Test result
mysql-test/suite/binlog/t/binlog_sql_mode.test:
  Test file for sql_mode testing
sql/sp.cc:
  Restore the current session sql_mode right before generating the binlog event.
2009-02-28 09:35:18 +08:00
Tatiana A. Nurnberg
fe09326edf automerge 2009-02-27 21:43:43 +01:00
Staale Smedseng
a2231e59c5 Commit after merge from 5.0-bugteam 2009-02-27 18:07:58 +02:00
Staale Smedseng
d61f114f7f Commit after merge from 5.1-bugteam 2009-02-27 18:03:32 +02:00
Georgi Kodinov
2bc070a05a merged the fix for bug 41610 to 5.1-bugteam 2009-02-27 17:07:27 +02:00
Staale Smedseng
8eb09f0149 Commit for merge and push 2009-02-27 17:06:23 +02:00
Staale Smedseng
97b68934bc Recommit for merging and pushing 2009-02-27 16:11:15 +02:00
Georgi Kodinov
15760fe9d8 Bug #41610: key_infix_len can be overwritten causing some group by queries to
return no rows

The algorithm of determining the best key for loose index scan is doing a loop
over the available indexes and selects the one that has the best cost.
It retrieves the parameters of the current index into a set of variables.
If the cost of using the current index is lower than the best cost so far it 
copies these variables into another set of variables that contain the 
information for the best index so far.
After having checked all the indexes it uses these variables (outside of the 
index loop) to create the table read plan object instance.
The was a single omission : the key_infix/key_infix_len variables were used 
outside of the loop without being preserved in the loop for the best index 
so far.
This causes these variables to get overwritten by the next index(es) checked.
Fixed by adding variables to hold the data for the current index, passing 
the new variables to the function that assigns values to them and copying 
the new variables into the existing ones when selecting a new current best 
index.
To avoid further such problems moved the declarations of the variables used 
to keep information about the current index inside the loop's compound 
statement.

mysql-test/r/group_min_max.result:
  Bug #41610: test case
mysql-test/t/group_min_max.test:
  Bug #41610: test case
sql/opt_range.cc:
  Bug #41610: copy the infix data for the current best index
2009-02-27 15:25:06 +02:00
Patrick Crews
e5a0c0281e Bug#41893: Removal of trailing space noise causing Pushbuild failure. 2009-02-27 15:00:49 +02:00
Bjorn Munch
0900851646 Bug #43256 Bug#39026 got re-surrected
Problems with use of share/mysql dir
Explicitly look for "english" language file
2009-02-27 13:07:01 +01:00
Ingo Struewing
34143e4ec7 auto-merge 2009-02-27 12:22:10 +01:00
Ingo Struewing
9573707ffa Bug#40446 - mysql-test-run --gcov is broken
Some variable values were missing and perl constructs failed.

Initialized the variables and refactored the gcov functions.


.bzrignore:
  Bug#40446 - mysql-test-run --gcov is broken
  Added gcov log files.
mysql-test/lib/mtr_gcov.pl:
  Bug#40446 - mysql-test-run --gcov is broken
  Refactored the gcov functions.
mysql-test/mysql-test-run.pl:
  Bug#40446 - mysql-test-run --gcov is broken
  Initialized gcov variables.
  Added usage information.
2009-02-27 12:20:53 +01:00
Patrick Crews
1dc084f358 merge. 2009-02-27 10:45:19 +02:00
Patrick Crews
897ea3744a merge 2009-02-27 10:43:06 +02:00
Patrick Crews
1f847d1604 Bug#41893: main.variables mysql-test fails in new variable like '%alloc%' is added.
Added ORDER BY clause to I_S query to ensure consistent order.
There were differences between 5.1 and 6.0 output.  Correcting it 5.1.
2009-02-27 10:24:57 +02:00
Patrick Crews
8726343624 Merge 5.0->5.1 2009-02-27 09:47:29 +02:00
Georgi Kodinov
ee77216803 addendum to the fix for bug #41354: fixed the error returned by SELECT * 2009-02-27 09:41:39 +02:00
Bernt M. Johnsen
4ea27a3cdf Merged from gca-branch (bug 42567) 2009-02-26 19:21:51 +01:00
Georgi Kodinov
f3c6ff1f7a null-merged the fix and kept the test for bug #41354 from 5.0-bugteam 2009-02-26 19:20:50 +02:00
Bernt M. Johnsen
2cca1991bd Prepared for push (BUG#42567) 2009-02-26 18:17:06 +01:00
Georgi Kodinov
a9d707037a Bug #41354: Access control is bypassed when all columns
of a view are selected by * wildcard

Backported a part of the fix for 36086 to 5.0

mysql-test/r/view_grant.result:
  Bug #41354: test case
mysql-test/t/view_grant.test:
  Bug #41354: test case
sql/sql_acl.cc:
  Bug #41354: return table error when no access and *
sql/sql_base.cc:
  Bug #41354: backported the check in bug 36086 to 5.0
2009-02-26 19:00:44 +02:00
Patrick Crews
afdf8a447f Bug#41893 - main.variables mysql-test fails if new variable like '%alloc%' is added.
Fixed a typo in the bug fix patch.
2009-02-26 18:00:47 +02:00
Magnus Svensson
c0248983a4 Merge 2009-02-26 11:22:13 +01:00
Patrick Crews
6877425f2f Bug#41893: main.variables mysql-test fails if new variable like '%alloc%' is added.
Started fix in 5.0 as the same issue is here.
Revising queries used given what appears to be the scope of this test to only select the manipulated variables.
Added tests for values that are / are not multiples of 1024 to test rounding / constraints.
This behavior is not currently documented (docs bug has been opened)
2009-02-26 10:57:33 +02:00
Bernt M. Johnsen
00ac598a44 Prepared for push (BUG#43110) 2009-02-25 16:53:49 +01:00
Daniel Fischer
fff57e9dfc address review comments 2009-02-25 15:00:17 +01:00
Bernt M. Johnsen
b19b8afe6c Merged from gca-branch (bug 43111) 2009-02-25 14:52:33 +01:00
Bernt M. Johnsen
a357073774 Merged from gca-branch (bug 43111) 2009-02-25 14:49:59 +01:00
Sergey Glukhov
89fbca2813 5.0-bugteam->5.1-bugteam merge 2009-02-25 16:18:24 +04:00
Bernt M. Johnsen
b253edff98 Merged from 5.0
bug#43111
2009-02-25 12:47:28 +01:00
Sergey Glukhov
5d2fc53354 Bug#40345 MySQLDump prefixes view name with database name when view references other db
print compact view name if the view belongs to the current database


mysql-test/r/information_schema_db.result:
  result fix
mysql-test/r/mysqldump.result:
  result fix
mysql-test/r/view_grant.result:
  result fix
sql/sql_show.cc:
  print compact view name if the view belongs to the current database
2009-02-25 15:44:50 +04:00
Davi Arnaut
da3c4375cf Clean up test case to not leave open connections.
mysql-test/include/handler.inc:
  Disconnect open connections once they are not being used.
2009-02-25 11:42:58 +01:00
Bernt M. Johnsen
5a6fa28226 Prepare for push of BUG#43111 2009-02-25 11:37:30 +01:00
Sergey Glukhov
2bc4ad4f1f Bug#30305 Create routine in wrong context in SHOW PRIVILEGES
Changed context of Create routine to Databases.


mysql-test/r/grant.result:
  result fix
mysql-test/r/sp.result:
  result fix
sql/sql_show.cc:
  Changed context of Create routine to Databases.
2009-02-25 14:20:20 +04:00
Georgi Kodinov
620438fdae backport the fix for bug #37191 to 5.1-bugteam 2009-02-25 12:19:29 +02:00
Bjorn Munch
e0c6aad83a Bug #43172 MTR leaves test files in /tmp after check_socket_path_length finds path too long
Faulty logic in cleanup
Put test file into tmpdir, cleanup by removing tmpdir
2009-02-25 10:32:13 +01:00
Georgi Kodinov
dc69c3439f merged bug 31060 to 5.1-bugteam 2009-02-25 11:09:41 +02:00
Patrick Crews
19ee83f02e merge. 2009-02-25 10:16:29 +02:00
Andrei Elkin
5b0721786e merging bug#37313fixes from 5.0-bt to 5.1-bt 2009-02-24 16:59:46 +02:00
Andrei Elkin
a6ac350b3a merging from 5.0-bt rep to a local branch 2009-02-24 16:35:45 +02:00
Patrick Crews
df09ddaced Bug#40178: Test main.completion_type_func does not clean up / needs to be rewritten
Revised the test to include a test of completion_type = 1 as well as making the test more readable / worthwhile
Removed the master.opt file as it was redundant / unnecessary.

mysql-test/suite/sys_vars/t/completion_type_func-master.opt:
  Removed as redundant.  Test uses include/have_innodb.inc.
2009-02-24 16:20:00 +02:00
Andrei Elkin
d091deaf89 fixing compilation warning and adding flush logs to test of bug#37313 2009-02-24 16:17:34 +02:00
Daniel Fischer
b466018cda merge 2009-02-24 14:58:18 +01:00
Daniel Fischer
aa9646c8bc include collections in dist 2009-02-24 14:54:04 +01:00
Georgi Kodinov
4b05db5cfd Bug #31060: MySQL CLI parser bug 2
There was a problem when a DELIMITER COMMAND is not the first 
command on the line. I this case an extra line feed was added
to the glob buffer and this was causing subsequent attempts 
to enter this delimiter to fail.
Fixed by not adding a new line to the glob buffer if the 
command being added is a DELIMITER

client/mysql.cc:
  Bug #31060: Don't add a new line if DELIMTER is added to
  the glob buffer
mysql-test/r/mysql.result:
  Bug #31060: test case
mysql-test/t/mysql.test:
  Bug #31060: test case
2009-02-24 15:06:28 +02:00
Georgi Kodinov
85ea3740ff Bug #31060: MySQL CLI parser bug 2
There was a problem when a DELIMITER COMMAND is not the first 
command on the line. I this case an extra line feed was added
to the glob buffer and this was causing subsequent attempts 
to enter this delimiter to fail.
Fixed by not adding a new line to the glob buffer if the 
command being added is a DELIMITER

client/mysql.cc:
  Bug #31060: Don't add a new line if DELIMTER is added to
  the glob buffer
mysql-test/r/mysql.result:
  Bug #31060: test case
mysql-test/t/mysql.test:
  Bug #31060: test case
2009-02-24 15:06:28 +02:00
Daniel Fischer
bde5f92b31 Bug#42888 for MySQL 5.1. Add collections of test runs to make it both configurable and transparent what kinds of tests we run during integration testing. Implement filter list in mysql-test-run.pl to filter out failures of experimental test cases, using a new status code "exp-fail", so we can tell regressions ("fail") from failures of test cases that are still in development ("exp-fail"). 2009-02-24 12:53:34 +01:00
Daniel Fischer
54d05087f7 bug#42888: Add collections of test runs to make it both configurable and
transparent what kinds of tests we run during integration testing.
2009-02-24 11:42:11 +01:00
Davi Arnaut
e4f4765391 Bug#41110: crash with handler command when used concurrently with alter table
Bug#41112: crash in mysql_ha_close_table/get_lock_data with alter table

The problem is that the server wasn't handling robustly failures
to re-open a table during a HANDLER .. READ statement. If the
table needed to be re-opened due to it's storage engine being
altered to one that doesn't support HANDLER, a reference (dangling
pointer) to a closed table could be left in place and accessed in
later attempts to fetch from the table using the handler. Also,
if the server failed to set a error message if the re-open
failed. These problems could lead to server crashes or hangs.

The solution is to remove any references to a closed table and
to set a error if reopening a table during a HANDLER .. READ
statement fails.

mysql-test/include/handler.inc:
  Add test case for Bug#41110 and Bug#41112
mysql-test/r/handler_innodb.result:
  Add test case result for Bug#41110 and Bug#41112
mysql-test/r/handler_myisam.result:
  Add test case result for Bug#41110 and Bug#41112
sql/sql_handler.cc:
  Remove redundant reopen check.
  Set errors even if reopening table.
  Reset TABLE_LIST::table reference when the table is closed.
2009-02-24 10:49:18 +01:00
Tatiana A. Nurnberg
7efa0aa7ca automerge 2009-02-24 08:19:45 +01:00
Tatiana A. Nurnberg
7a264c739b automerge 2009-02-24 08:06:18 +01:00
Tatiana A. Nurnberg
14a63ece37 automerge 2009-02-24 08:05:30 +01:00
Sergey Petrunia
cb6581d894 - Backport @@optimizer_switch support from 6.0
- Add support for setting it as a server commandline argument
- Add support for those switches:
  = no_index_merge
  = no_index_merge_union
  = no_index_merge_sort_union
  = no_index_merge_intersection

mysql-test/r/index_merge_myisam.result:
  Testcases for index_merge related @@optimizer_switch flags.
mysql-test/t/index_merge_myisam.test:
  Testcases for index_merge related @@optimizer_switch flags.
sql/set_var.cc:
  - Backport @@optimizer_switch support from 6.0
  - Add support for setting it as a server commandline argument
sql/sql_class.h:
  - Backport @@optimizer_switch support from 6.0
sql/sql_select.h:
  - Backport @@optimizer_switch support from 6.0
2009-02-23 19:16:48 +03:00
Alexey Kopytov
144763db0c Manual merge mysql-5.0-bugteam -> mysql-5.1-bugteam. 2009-02-23 17:16:46 +02:00
Magnus Svensson
c7d0de3706 Bug#43112 mtr.pl --embedded fails to stop cluster processes 2009-02-23 15:52:23 +01:00
Alexey Kopytov
c893a5f0e2 Automerge. 2009-02-23 14:54:43 +02:00
Alexey Kopytov
d86c8af30e Automerge. 2009-02-23 14:53:51 +02:00
Alexey Kopytov
8ae8162403 Manual merge to 5.1. 2009-02-23 14:42:31 +02:00
Alexey Kopytov
0e62c9aa63 Fix for bug #15936: "round" differs on Windows to Unix
Both of our own implementations of rint(3) were inconsistent with the
most common behavior of rint() on those platforms that have it: round
to nearest, break ties by rounding to nearest even.

Fixed by leaving just one implementation of rint() in our source tree,
and changing its behavior to match the most common native
implementations on other platforms.

configure.in:
  Added checks for fenv.h and fesetround().
include/config-win.h:
  Removed the incorrect implementation of rint() for Windows.
include/my_global.h:
  Added an rint() implementation for platforms that do not have it.
mysql-test/r/func_math.result:
  Added a test case for bug #15936.
mysql-test/t/func_math.test:
  Added a test case for bug #15936.
sql/mysqld.cc:
  Explicitly set the FPU rounding mode with fesetround().
2009-02-23 14:28:26 +02:00
Tatiana A. Nurnberg
ec3decf610 auto-merge 2009-02-23 13:14:17 +01:00
Tatiana A. Nurnberg
c1d73f3350 auto-merge 2009-02-23 12:53:04 +01:00
Leonard Zhou
8f3f7992a0 merge 2009-02-23 16:49:22 +08:00
Leonard Zhou
2b3dfbc176 merge 2009-02-23 16:29:39 +08:00
Davi Arnaut
9fc083bd9a Post-merge fix: test depends on feature not available under embedded.
mysql-test/t/query_cache_28249.test:
  Test depends on process state (not updated under embedded)
2009-02-23 09:03:31 +01:00
Leonard Zhou
61d706a4f0 Bug#40013 mixed replication: row based format could lead to stale tmp tables on the
slave.

In mixed mode, if we create a temporary table and do some update which switch to ROW format,
the format will keep in ROW format until the session ends or the table is dropped explicitly. 
When the session ends, the temp table is dropped automaticly at cleanup time.
but it checks only current binlog format and so skip insertion of DROP TABLE instructions into binlog.
So the temp table can't be dropped correctly at slave.

Our solution is that when closing temp tables at cleanup time we check both binlog format and binlog mode,
and we could write DROP TABLE instructions into binlog if current binlog format is ROW but in MIX mode.

mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result:
  Test result file.
mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test:
  Test file.
sql/sql_base.cc:
  Didn't do binloging when both current format and default format are ROW.
2009-02-23 11:26:38 +08:00
Alfranio Correia
d822ab8957 BUG#38174 secure-file-priv breaks LOAD DATA INFILE replication in statement mode
If secure-file-priv was set on slave, it became unable to execute
LOAD DATA INFILE statements sent from master using mixed or
statement-based replication.
                  
This patch fixes the issue by ignoring this security restriction
and checking if the files are created and read by the slave in the
--slave-load-tmpdir while executing the SQL Thread.
2009-02-21 09:36:07 +00:00
Mattias Jonsson
9b36597ac1 merge 2009-02-20 17:02:02 +01:00
Mattias Jonsson
e7e5443a01 Backport of patch for bug#40003 from 6.0 to 5.1,
related to the backport of the patch for bug#38719

sql/ha_partition.cc:
  bug#40003, archive does not handle dup_key.
2009-02-20 16:56:32 +01:00
Patrick Crews
fb20a7d6d0 automerge 2009-02-20 08:40:28 -05:00
Patrick Crews
11a206a37c auto merge 2009-02-20 08:37:07 -05:00
Andrei Elkin
4712e6b9b8 Bug #37313 BINLOG Contains Incorrect server id
Signed integer format specifier forced to print the binlog header with server_id
negative if the unsigned value sets the sign-bit ON.
  
Fixed with correcting the specifier to correspond to typeof(server_id) == ulong.

mysql-test/r/mysqlbinlog.result:
  results changed.
mysql-test/t/mysqlbinlog.test:
  displaying the expected unsignedly formatted server_id value, bug#37313.
sql/log_event.cc:
  Format specifier is corrected to correspond to typeof(server_id).
2009-02-20 13:55:43 +02:00
Mattias Jonsson
9eaa51099c merge of updated 51-bugteam before pushing... 2009-02-20 11:45:57 +01:00
Mattias Jonsson
330f9fb5a5 merge into an updated 5.1-bugteam. 2009-02-20 11:21:45 +01:00
Georgi Kodinov
30bb35bcda auto merge 2009-02-20 11:57:33 +02:00
Georgi Kodinov
1f6d6fa905 merged 5.0-bugteam -> 5.1-bugteam 2009-02-20 11:50:50 +02:00
Mattias Jonsson
3d156e223e pre push test result update for bug#38719
Updated with the correct error message.
2009-02-20 10:27:32 +01:00
Georgi Kodinov
a67725ac75 Bug #42419: test suite fix
Moved the test case for the bug into a separate file (and restored the 
original innodb_mysql test setup).
Used the new wait_show_condition test macro to avoid the usage of sleep

mysql-test/include/wait_show_condition.inc:
  Bug #42419: new test macro to wait for a row in SHOW to have a certain value.
mysql-test/r/innodb_bug42419.result:
  Bug #42419: test case
mysql-test/r/innodb_mysql.result:
  Bug #42419: revert to the original innodb_mysql test
mysql-test/t/innodb_bug42419.test:
  Bug #42419: test case
mysql-test/t/innodb_mysql-master.opt:
  Bug #42419: revert to the original innodb_mysql test
mysql-test/t/innodb_mysql.test:
  Bug #42419: revert to the original innodb_mysql test
2009-02-20 11:12:06 +02:00
Patrick Crews
e9b4b536f3 merge 5.0 -> 5.1
These are only 5.0's fixes being merged.
5.1 and 6.0 Unix-removals will occur in different patches.
2009-02-19 18:24:25 -05:00
Patrick Crews
cf571967ad Bug#38831: 11 test cases fail on Windows due to missing commands
Re-enabling mysqlbinlog.test on Windows - removed the use of grep/sed
2009-02-19 16:35:29 -05:00
Davi Arnaut
664bb23a30 Bug#41098: Query Cache returns wrong result with concurrent insert
The problem is that select queries executed concurrently with
a concurrent insert on a MyISAM table could be cached if the
select started after the query cache invalidation but before
the unlock of tables performed by the concurrent insert. This
race could happen because the concurrent insert was failing
to prevent cache of select queries happening at the same time.

The solution is to add a 'uncacheable' status flag to signal
that a concurrent insert is being performed on the table and
that queries executing at the same time shouldn't cache the
results.

mysql-test/r/query_cache_debug.result:
  Add test case result for Bug#41098
mysql-test/t/disabled.def:
  Re-enable test case.
mysql-test/t/query_cache_debug.test:
  Add test case for Bug#41098
sql/sql_cache.cc:
  Debug sync point for regression testing purposes.
sql/sql_insert.cc:
  Remove meaningless query cache invalidate. There is already
  a preceding invalidate for queries that started before the
  concurrent insert.
storage/myisam/ha_myisam.cc:
  Check for a active concurrent insert.
storage/myisam/mi_locking.c:
  Signal the start of a concurrent insert. Flag is zeroed once
  the state is updated back.
storage/myisam/myisamdef.h:
  Add flag to signal a active concurrent insert.
2009-02-19 18:09:35 -03:00
Serge Kozlov
8e8c5bbe7a merge 5.1 2009-02-19 23:49:45 +03:00
Patrick Crews
79300d6f7f Bug#38831: 11 test cases fail on Windows due to missing commands
Replaced Unix calls with mysql-test-run's built-in functions / SQL manipulation where possible.
Replaced error codes with error names as well.
Disabled two tests on Windows due to more complex Unix command usage
See Bug#41307, Bug#41308
2009-02-19 15:37:40 -05:00
Serge Kozlov
b86dc86ee9 Bug#41423.
1. Constant values of binlog positions replaced by seeking them in binlog/relay log.
2. Updated result file
2009-02-19 23:29:12 +03:00
Georgi Kodinov
901427b241 merged 5.0-bugteam -> 5.1-bugteam 2009-02-19 20:30:05 +02:00
Tatiana A. Nurnberg
99d1cdcb11 manual merge 2009-02-19 18:22:28 +01:00
Tatiana A. Nurnberg
4a3f5b2b20 Bug#33550: mysqldump 4.0 compatibility broken
mysqldump included character_set_client magic
that is unknown before 4.1 even when asked for
an appropriate compatibility mode.

In compatibility (3.23, 4.0) mode, we do not
output charset statements (not even in a
"comment conditional"), nor do we do magic on
the server, even if the server is sufficient
new (4.1+). Table-names will be output converted
to the charset requested by mysqldump; if such
a conversion is not possible (Ivrit -> Latin),
mysqldump will fail.
2009-02-19 17:33:28 +01:00
Georgi Kodinov
cf42f6689f merged bug 42419 to 5.0-bugteam 2009-02-19 18:26:19 +02:00
Georgi Kodinov
29476d879f Bug #42419: Server crash with "Pure virtual method called" on two concurrent
connections
The problem is that tables can enter open table cache for a thread without 
being properly cleaned up. This can happen if make_join_statistics() fails 
to read a const table because of e.g. a deadlock. It does set a member of 
TABLE structure to a value it allocates, but doesn't clean-up this setting 
on error nor does it set the rest of the members in JOIN to allow for 
automatic cleanup.
As a result when such an error occurs and the next statement depends re-uses 
the table from the open tables cache it will get it with this 
TABLE::reginfo.join_tab pointing to a memory area that's freed.
Fixed by making sure make_join_statistics() cleans up TABLE::reginfo.join_tab 
on error.

mysql-test/r/innodb_mysql.result:
  Bug #42419: test case
mysql-test/t/innodb_mysql-master.opt:
  Bug #42419: increase the timeout so it covers te conservative 
  sleep 3 in the test
mysql-test/t/innodb_mysql.test:
  Bug #42419: test case
sql/sql_select.cc:
  Bug #42419: clean up the members of TABLE on failure in 
          make_join_statisitcs()
2009-02-19 17:30:03 +02:00
Sergey Glukhov
e89fddc636 automerge 2009-02-19 18:52:49 +04:00
Sergey Glukhov
fafeaf460b 5.0-bugteam->5.1-bugteam merge 2009-02-19 17:59:00 +04:00
Sergey Glukhov
c2e23208ef Bug#37601 Cast Is Not Done On Row Comparison
In case of ROW item each compared pair does not
check if argumet collations can be aggregated and
thus appropiriate item conversion does not happen.
The fix is to add the check and convertion for ROW
pairs.


mysql-test/r/row.result:
  test result
mysql-test/t/row.test:
  test case
sql/item.cc:
  added agg_item_set_converter() function which was a part of
  agg_item_charsets() func. The only difference is that
  agg_item_set_converter() checks and converts items 
  using already known collation.
sql/item.h:
  added agg_item_set_converter() function
sql/item_cmpfunc.cc:
  In case of ROW item each compared pair does not
  check if argumet collations can be aggregated and
  thus appropiriate item conversion does not happen.
  The fix is to add the check and convertion for ROW
  pairs.
2009-02-19 17:20:44 +04:00
Mattias Jonsson
5f58510a09 Backport of test results for Bug#38719 from 6.0 to 5.1
post push fix, Bug#38719, additional test cases updated
2009-02-18 22:35:28 +01:00
Mattias Jonsson
830c42a06a Backport of bug#38719 from 6.0 to 5.1
handler::get_dup_key used the called handler for the
info call, but used table->file handler for errkey.
Fixed by using table->file->info instead.

mysql-test/r/partition_error.result:
  Bug#38719: Partitioning returns a different error code for
  a duplicate key error
  
  Added test for verification
mysql-test/t/partition_error.test:
  Bug#38719: Partitioning returns a different error code for
  a duplicate key error
  
  Added test for verification
2009-02-18 21:29:30 +01:00
Mattias Jonsson
bf442fcaae Backport of bug#36001 from 6.0 to 5.1 2009-02-18 21:22:56 +01:00
Mattias Jonsson
85cc17d3cd Bug#36001: Partitions: spelling and using some error messages
Backport from 6.0

Changed error message to show that it is partitioning
that does not support foreign keys yet.

Changed spelling from British english to American english.

mysql-test/r/partition.result:
  Bug#36001: Partitions: spelling and using some error messages
  
  Backport from 6.0
  
  Changed spelling from British english to American english.
mysql-test/r/partition_mgm_err.result:
  Bug#36001: Partitions: spelling and using some error messages
  
  Backport from 6.0
  
  Changed spelling from British english to American english.
mysql-test/t/partition.test:
  Bug#36001: Partitions: spelling and using some error messages
  
  Backport from 6.0
  
  Added test for verifying error message
sql/share/errmsg.txt:
  Bug#36001: Partitions: spelling and using some error messages
  
  Backport from 6.0
  
  Changed spelling from British english to American english.
sql/sql_table.cc:
  Bug#36001: Partitions: spelling and using some error messages
  
  Backport from 6.0
  
  Using a better error message.
2009-02-18 21:10:19 +01:00
Sergey Glukhov
d0ece331a2 5.0->bugteam->5.1-bugteam merge 2009-02-18 16:09:46 +04:00
Vladislav Vaintroub
93a5269618 merge 2009-02-18 10:31:53 +01:00
Sergey Glukhov
544fa7593b Bug#25830 SHOW TABLE STATUS behaves differently depending on table name(for 5.0 only)
replace wild_case_compare with my_wildcmp which is multibyte safe function


mysql-test/r/lowercase_utf8.result:
  test result
mysql-test/t/lowercase_utf8-master.opt:
  test case
mysql-test/t/lowercase_utf8.test:
  test case
sql/sql_show.cc:
  replace wild_case_compare with my_wildcmp which is multibyte safe function
2009-02-17 18:22:48 +04:00
Matthias Leich
fecaef26af Merge of fix for Bug 42836 into GCA tree 2009-02-16 20:43:34 +01:00
Andrei Elkin
924950b631 commenting windows disable for rpl_cross_version to relate to Bug #42879 2009-02-16 14:51:39 +02:00
Davi Arnaut
d3a10ec6ef Bug#41077: Warning contains wrong future version
Substitute all references of MySQL version "5.2" to "6.0" in
deprecation warning messages.Deprecated constructs are being
removed in the 6.0 tree.
2009-02-16 08:38:15 -03:00
Andrei Elkin
cd1960ff26 rpl_cross_version.test is disable for win till a proper fixing bug#42451 2009-02-16 10:49:51 +02:00
Alexey Kopytov
d945db1ddd Take additional precision into account 2009-02-15 14:11:50 +03:00
Alexey Kopytov
ff1e778cc5 Automerge. 2009-02-15 12:47:04 +03:00
Alexey Kopytov
65e2c68a4d Fixed PB failures on IA64 hosts introduced by the patch for bug #21205.
mysql-test/t/gis.test:
  IA64 gcc backend lacks -fno-fused-madd option, so we have to adjust results.
2009-02-15 12:26:08 +03:00
Patrick Crews
3355ebff22 automerge 2009-02-14 17:52:45 -05:00
Alexey Kopytov
1cc7fbcd4e Automerge. 2009-02-14 20:14:10 +03:00
Alexey Kopytov
4e356b1fe3 Added missing DROP TABLE to type_float.result.
mysql-test/r/type_float.result:
  Added missing DROP TABLE.
2009-02-14 20:12:14 +03:00
Alexey Kopytov
6d1dc3270b Fixed parser test failure introduced by the patch for bug #21205.
mysql-test/r/parser.result:
  Take additional precision into account.
2009-02-14 19:04:16 +03:00
Alexey Kopytov
8efeeb8bd2 Merge mysql-5.0-bugteam -> mysql-5.1-bugteam 2009-02-14 19:00:11 +03:00
Alexey Kopytov
9665fcfff3 Fixed several test failures in the funcs_1 suite introduced by the patch for bug #21205.
mysql-test/suite/funcs_1/r/memory_func_view.result:
  Take additional precision into account.
mysql-test/suite/funcs_1/r/memory_views.result:
  Take additional precision into account.
mysql-test/suite/funcs_1/r/myisam_func_view.result:
  Take additional precision into account.
mysql-test/suite/funcs_1/r/myisam_views.result:
  Take additional precision into account.
2009-02-14 18:58:07 +03:00
Alexey Kopytov
b41215add2 Fixed bdb_gis and ndb_gis test failures in PB introduced by the patch for bug #21205.
mysql-test/r/bdb_gis.result:
  Take additional precision into account.
mysql-test/r/ndb_gis.result:
  Take additional precision into account.
mysql-test/t/type_float.test:
  Added missing DROP TABLE.
2009-02-14 18:36:57 +03:00
Alexey Kopytov
d8ac91387b Merge from dev tree. 2009-02-14 12:11:32 +03:00
Alexey Kopytov
fb3e5910ec Merge from dev tree. 2009-02-14 12:09:35 +03:00
Patrick Crews
aedef27a85 BUG#32667: lowercase_table3.test reports to error log
Cleaned up SQL code in the test.
Needed to move the FLUSH TABLES statement prior to the DROP TABLE t1 to prevent a warning of
Table open on delete and a test fail.
2009-02-13 16:12:59 -05:00
Davi Arnaut
f29aa74aa1 Remove test case for bug 40264.
Dirty close tricky does not work on Windows.

mysql-test/r/query_cache_notembedded.result:
  Remove test case result.
mysql-test/t/query_cache_notembedded.test:
  Remove test case.
2009-02-13 17:26:20 -02:00
Tatiana A. Nurnberg
ce6e5950bd auto-merge 2009-02-13 19:18:01 +01:00
Matthias Leich
59c8a307fe Fix for Bug#42836 Funcs_1 storedproc and storedproc_08 tests failing 2009-02-13 19:07:56 +01:00
Tatiana A. Nurnberg
694323952a Bug#42146 - DATETIME fractional seconds parse error
Bug#38435 - LONG Microseconds cause MySQL to fail a CAST to DATETIME or DATE

Parsing of optional microsecond part in datetime did not
fail gracefully when field width was larger than the allowed
six places.

Now handles up to the correct six places, and disregards
any extra digits without messing up what we've already got.

mysql-test/r/type_datetime.result:
  show graceful handling of overly long microsecond parts
  (correct truncation).
mysql-test/t/type_datetime.test:
  show graceful handling of overly long microsecond parts
  (correct truncation).
sql-common/my_time.c:
  Special case for time-parsing: for microsecond part,
  leading zeroes are actually meaningful! Also, don't
  break the entire date on more than the allowed six
  digits in microsecond part, just truncate the extra
  digits.
2009-02-13 19:07:03 +01:00
Alexey Kopytov
a41bdfa52a Merge from team tree 2009-02-13 19:32:23 +03:00
Alexey Kopytov
dd35a152f9 Merge mysql-5.0-bugteam -> mysql-5.1-bugteam. 2009-02-13 19:20:56 +03:00
Andrei Elkin
de9da6dd32 merging from the main to a local branch 2009-02-13 18:20:36 +02:00
Alexey Kopytov
9373b1b880 Merge from dev tree. 2009-02-13 19:17:07 +03:00
Rafal Somla
bdbe393db1 Modifications to MTR and mysqltest to improve feedback from the latter when
testcase checks are made.
      
MTR spawns mysqltest to run check-testcase test before and after each testcase 
it runs. It can also run check-warnings using mysqltest. Since it happened on PB 
that these checks hanged, this patch provides additional feedback to help 
investigating such failures:
      
- mysqltest is modified to give feedback about main steps in execution of a 
testcase if run in verbose mode (including connection to the server),
     
- MTR is modified to run mysqltest in verbose mode when doing check-testcase or 
check-warnings. The diagnostic output from mysqltest is preserved so that it is 
saved upon test failure.

client/mysqltest.cc:
  Add verbose messages informing about main steps in execution of a testcase.
mysql-test/mysql-test-run.pl:
  - When doing check-testcase or check-warnings run mysqltest in verbose mode.
  - Do not delete the mysqltest's error log if errors are detected during these
2009-02-13 16:27:33 +01:00
Magnus Svensson
841145eed2 Merge 2009-02-13 14:47:01 +01:00
Matthias Leich
5d0054012d Merge actual tree -> local GCA tree, no conflicts 2009-02-13 13:55:29 +01:00
Matthias Leich
9fc536e1d3 Merge actual tree -> local GCA tree, no conflicts 2009-02-13 13:06:50 +01:00
MySQL Build Team
018624301c Added to source package the file "mysql-test/suite/bugs/combinations"
and the directory "mysql-test/suite/jp/include"
2009-02-13 10:42:27 +01:00
unknown
12f09e5ac0 Work around for bug in some versions of the File::Temp Perl module 2009-02-13 10:38:53 +01:00
Magnus Svensson
be5cc29e48 Bug#42797 mtr.pl - temporary directory are deleted when child exit's
- Since we are only using the auto cleanup in one place of mtr.pl today, disable the
autocleanup and write our own END handler that clean up the tmpdir only when the process
that created it exits.
2009-02-12 17:36:58 +01:00