Commit graph

1064 commits

Author SHA1 Message Date
He Zhenxing
f09129c6be Skip semisync test if the plugin-dir is not set to semisync plugin dir 2009-10-23 21:26:17 +08:00
He Zhenxing
7771b90295 Back porting the test case for semi-sync 2009-09-30 16:09:31 +08:00
Bjorn Munch
39fca129fb second merge from main, with adaptions 2009-09-02 23:29:11 +02:00
Bjorn Munch
588e9930b4 first merge from main 2009-09-02 18:58:17 +02:00
Mattias Jonsson
02585b608a post push fix for bug#20577 and bug#46362, disabling warnings 2009-09-01 14:53:27 +02:00
Bjorn Munch
202984236a 46996 workaruond 2009-09-01 13:38:17 +02:00
Mattias Jonsson
edb71b0cdd merge 2009-08-28 13:54:17 +02:00
Alfranio Correia
dbcfef4cf2 BUG#28976 Mixing trans and non-trans tables in one transaction results in incorrect
binlog

Mixing transactional (T) and non-transactional (N) tables on behalf of a
transaction may lead to inconsistencies among masters and slaves in STATEMENT
mode. The problem stems from the fact that although modifications done to
non-transactional tables on behalf of a transaction become immediately visible
to other connections they do not immediately get to the binary log and therefore
consistency is broken. Although there may be issues in mixing T and M tables in
STATEMENT mode, there are safe combinations that clients find useful.

In this bug, we fix the following issue. Mixing N and T tables in multi-level
(e.g. a statement that fires a trigger) or multi-table table statements (e.g.
update t1, t2...) were not handled correctly. In such cases, it was not possible
to distinguish when a T table was updated if the sequence of changes was N and T.
In a nutshell, just the flag "modified_non_trans_table" was not enough to reflect
that both a N and T tables were changed. To circumvent this issue, we check if an
engine is registered in the handler's list and changed something which means that
a T table was modified.

Check WL 2687 for a full-fledged patch that will make the use of either the MIXED or
ROW modes completely safe.
2009-08-27 00:13:03 +01:00
Mattias Jonsson
401fb7c6fb Bug#20577: Partitions: use of to_days() function leads to selection failures
Problem was that the partition containing NULL values
was pruned away, since '2001-01-01' < '2001-02-00' but
TO_DAYS('2001-02-00') is NULL.

Added the NULL partition for RANGE/LIST partitioning on TO_DAYS()
function to be scanned too.

Also fixed a bug that added ALLOW_INVALID_DATES to sql_mode
(SELECT * FROM t WHERE date_col < '1999-99-99' on a RANGE/LIST
partitioned table would add it).
2009-08-26 12:59:49 +02:00
Bjorn Munch
4994e66783 Bug #42408 Faulty regex for detecting [Warning] and [ERROR] in mysqld error log
Enabled proper pattern for Warnings and ERRORs
Added some suppressions
2009-08-25 15:56:50 +02:00
dc4b7b8943 Manual Merge 2009-08-12 13:31:56 +08:00
f5be2159fe BUG#45516 SQL thread does not use database charset properly
Replication SQL thread does not set database default charset to 
thd->variables.collation_database properly, when executing LOAD DATA binlog.
This bug can be repeated by using "LOAD DATA" command in STATEMENT mode.
        
This patch adds code to find the default character set of the current database 
then assign it to thd->db_charset when slave server begins to execute a relay log.
The test of this bug is added into rpl_loaddata_charset.test
2009-08-12 11:54:05 +08:00
Alfranio Correia
0ebf4d7e3a Post-fix for BUG#43264
Install procedure does not copy *.inc files located under the mysql-test/t directory.
Therefore, this patch moves the rpl_trigger.inc to the mysql-test/include directory.
2009-08-03 14:37:50 +01:00
Davi Arnaut
368b99a206 Bug#21704: Renaming column does not update FK definition
Remove commented-out test case. It has been moved to innodb_bug21704.test
2009-07-10 09:19:19 -03:00
Satya B
f5bec50697 Applying InnoDB snapshot 5.1-ss5488,part 4. Fixes BUG#21704
1. BUG#21704 - Renaming column does not update FK definition

2. Changes in mysql-test/include/mtr_warnings.sql so that the testcase
   for BUG#21704 doesn't fail because of the warnings generated.

Detailed revision comments:

r5488 | vasil | 2009-07-09 19:16:44 +0300 (Thu, 09 Jul 2009) | 13 lines
branches/5.1:

Fix Bug#21704 Renaming column does not update FK definition

by checking whether a column that participates in a FK definition is being
renamed and denying the ALTER in this case.

The patch was originally developed by Davi Arnaut <Davi.Arnaut@Sun.COM>:
http://lists.mysql.com/commits/77714
and was later adjusted to conform to InnoDB coding style by me (Vasil),
I also added some more comments and moved the bug specific mysql-test to
a separate file to make it more manageable and flexible.
2009-07-10 17:05:53 +05:30
Georgi Kodinov
d9e82ba86c Bug #36259 (Optimizing with ORDER BY) and bug#45828 (Optimizer won't
use partial primary key if another index can prevent filesort

The fix for bug #28404 causes the covering ordering indexes to be 
preferred unconditionally over non-covering and ref indexes.

Fixed by comparing the cost of using a covering index to the cost of
using a ref index even for covering ordering indexes.
Added an assertion to clarify the condition the local variables should
be in.
2009-07-07 15:52:34 +03:00
Luis Soares
b537158335 BUG#44270: Post-push fix
The test case added failed sporadically on PB. This is due to the
fact that the user thread in some cases is waiting for slave IO
to stop and then check the error number. Thence, sometimes the
user thread would race for the error number with IO thread.

This post push fix addresses this by replacing the wait for slave
io to stop with a wait for slave io error (as it seems it was
added in 6.0 also after patch on which this is based was
pushed). This implied backporting wait_for_slave_io_error.inc
from 6.0 also.
2009-06-26 12:05:56 +01:00
Alfranio Correia
5289e1a9e2 Post-fix for BUG#43929. 2009-06-19 12:27:24 +01:00
Alfranio Correia
ac1b464a33 BUG#43929 binlog corruption when max_binlog_cache_size is exceeded
Large transactions and statements may corrupt the binary log if the size of the
cache, which is set by the max_binlog_cache_size, is not enough to store the
the changes.

In a nutshell, to fix the bug, we save the position of the next character in the
cache before starting processing a statement. If there is a problem, we simply
restore the position thus removing any effect of the statement from the cache.
Unfortunately, to avoid corrupting the binary log, we may end up loosing changes
on non-transactional tables if they do not fit in the cache. In such cases, we
store an Incident_log_event in order to stop the slave and alert users that some
changes were not logged.

Precisely, for every non-transactional changes that do not fit into the cache,
we do the following:
  a) the statement is *not* logged
  b) an incident event is logged after committing/rolling back the transaction,
  if any. Note that if a failure happens before writing the incident event to
  the binary log, the slave will not stop and the master will not have reported
  any error.
  c) its respective statement gives an error

For transactional changes that do not fit into the cache, we do the following:
  a) the statement is *not* logged
  b) its respective statement gives an error

To work properly, this patch requires two additional things. Firstly, callers to
MYSQL_BIN_LOG::write and THD::binlog_query must handle any error returned and
take the appropriate actions such as undoing the effects of a statement. We
already changed some calls in the sql_insert.cc, sql_update.cc and sql_insert.cc
modules but the remaining calls spread all over the code should be handled in
BUG#37148. Secondly, statements must be either classified as DDL or DML because
DDLs that do not get into the cache must generate an incident event since they
cannot be rolled back.
2009-06-18 14:52:46 +01:00
Georgi Kodinov
3fe572dd06 automerge 2009-06-15 17:36:51 +03:00
Davi Arnaut
7a821d6682 Don't run funcs_1/myisam_views test case under valgrind, unless
the --big-test flag is supplied. Test is too resource intensive
under normal valgrind runs (takes more than 30min on powerful
hardware).
2009-06-09 11:36:14 -03:00
Georgi Kodinov
8d1b2df635 merged 36995 to 5.1-bugteam 2009-06-04 13:26:18 +03:00
Bjorn Munch
bec841ce5d merge from 5.1-mtr 2009-05-25 22:58:31 +02:00
Georgi Kodinov
8fb82e3fe0 Bug #44399 : crash with statement using TEXT columns, aggregates, GROUP BY, and
HAVING
            
When calculating GROUP BY the server caches some expressions. It does
that by allocating a string slot (Item_copy_string) and assigning the 
value of the expression to it. This effectively means that the result
type of the expression can be changed from whatever it was to a string.
As this substitution takes place after the compile-time result type 
calculation for IN but before the run-time type calculations, 
it causes the type calculations in the IN function done at run time 
to get unexpected results different from what was prepared at compile time.
                  
In the CASE ... WHEN ... THEN ... statement there was a similar problem
and it was solved by artificially adding a STRING argument to the set of 
types of the IN/CASE arguments at compile time, so if any of the 
arguments of the CASE function changes its type to a string it will 
still be covered by the information prepared at compile time.
2009-05-25 11:00:40 +03:00
Patrick Crews
53c09b3a46 merge 5.0-> 5.1 2009-05-22 11:24:45 -04:00
Patrick Crews
6c31d59bf4 Bug#40465 - mysqldump.test does no checking of dump or restore
Created new .test file - mysqldump_restore that does test restore from mysqldump
output for a limited number of basic cases.
Create new .inc file - mysqldump.inc - renames original table and uses mysqldump
output to recreate the table, then uses diff_tables.inc to compare the two tables.
Backported include/diff_tables.inc to facilitate this testing.
New patch incorporating review feedback prior to push.

mysqldump.test - removed redundant call to include/have_log_bin.inc (was used twice in the test!)
2009-05-22 10:38:17 -04:00
Patrick Crews
2bb44aef97 Bug#40465: mysqldump.test does no checking of dump or restore.
Created new .test file - mysqldump_restore that does this for a limited number
of basic cases.
Created new .inc file - mysqldump.inc - renames original table and uses mysqldump
output to recreate the table, then uses diff_tables.inc to compare the two tables.
Backported include/diff_tables.inc to facilitate this testing.
2009-05-21 16:03:53 -04:00
Matthias Leich
5f57ca86e6 Merge fix for bug 42308 into GCA tree 2009-05-20 15:27:44 +02:00
Bjorn Munch
ba9e3c4502 merge from main 2009-05-20 14:22:39 +02:00
Matthias Leich
02a902edc1 Fix for Bug#42308 Several server tests do not pass MTR's --check option
Details:
Most tests mentioned within the bug report were already fixed.
The test modified here failed in stability (high parallel load) tests.

Details:
1. Take care that disconnects are finished before the test terminates.
2. Correct wrong handling of send/reap in events_stress which caused
   random garbled output
3. Minor beautifying of script code
2009-05-15 12:15:56 +02:00
Gleb Shchepa
fbb96b339a Bug #44290: explain crashes for subquery with distinct in
SQL_SELECT::test_quick_select

The crash was caused by an incomplete cleanup of JOIN_TAB::select
during the filesort of rows for GROUP BY clause inside a subquery.
Queries where a quick index access is replaced with filesort was
was affected. For example:

  SELECT 1 FROM
    (SELECT COUNT(DISTINCT c1) FROM t1
       WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x

Quick index access related data in the SQL_SELECT::test_quick_select
function was inconsistent after an incomplete cleanup.
This function has been completed to prevent crashes in the
SQL_SELECT::test_quick_select function.
2009-05-13 12:51:39 +05:00
Sergey Glukhov
2b373758af 5.0-bugteam->5.1-bugteam merge 2009-05-19 11:48:04 +05:00
Gleb Shchepa
2121599d38 Bug #44290: explain crashes for subquery with distinct in
SQL_SELECT::test_quick_select

The crash was caused by an incomplete cleanup of JOIN_TAB::select
during the filesort of rows for GROUP BY clause inside a subquery.
Queries where a quick index access is replaced with filesort was
was affected. For example:

  SELECT 1 FROM
    (SELECT COUNT(DISTINCT c1) FROM t1
       WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x

Quick index access related data in the SQL_SELECT::test_quick_select
function was inconsistent after an incomplete cleanup.
This function has been completed to prevent crashes in the
SQL_SELECT::test_quick_select function.
2009-05-12 22:42:31 +05:00
Bjorn Munch
8d7f2d26e5 merge from main 2009-05-11 12:18:20 +02:00
Chad MILLER
128afdc3e5 Merge community up to enterprise, thus ending the community-server
adventure.
2009-05-06 09:06:32 -04:00
Chad MILLER
9d58239dea Pull 5.1 treatment of community features into 5.0. 2009-05-05 17:03:23 -04:00
Bjorn Munch
1151d8625f merge from main, redo 2009-04-17 15:46:51 +02:00
Sergey Glukhov
65e3d360f9 5.0-bugteam->5.1-bugteam merge 2009-04-17 13:46:27 +05:00
He Zhenxing
435d6631aa Manually merge BUG#37145 to 5.1-bugteam 2009-04-09 07:42:51 +08:00
Serge Kozlov
2ee7a7cff1 Bug#37716.
1. Test case was rewritten completely.
2. Test covers 3 cases:
 a) do deadlock on slave, wait retries of transaction, unlock slave before lock
timeout;
 b) do deadlock on slave and wait error 'lock timeout exceed' on slave;
 c) same as b) but if of max relay log size = 0;
3. Added comments inline.
4. Updated result file.
2009-04-04 01:33:13 +04:00
Alexander Nozdrin
641d706b0e Patch for Bug#38741: main.innodb_mysql crashes randomly (2).
It was a test case problem: one 'reap' statement was forgotten.
2009-04-02 12:21:51 +04:00
Magnus Svensson
b43656bd96 Merge 2009-03-31 16:10:44 +02:00
Magnus Svensson
ce65f283a5 Bug#43983 Support force restart of all servers after test ended
- Some tests need to modify the server(s) so much that a total restart of all servers are
   necessary after test. Make it possible for a test to signal it want mtr.pl to restart
   all servers.
2009-03-31 15:39:40 +02:00
Ramil Kalimullin
8d3aceb09e Merge 2009-03-27 13:34:24 +04:00
He Zhenxing
9530126822 BUG#37145 Killing a statement doing DDL may log binlog event with error code 1053
When the thread executing a DDL was killed after finished its
execution but before writing the binlog event, the error code in
the binlog event could be set wrongly to ER_SERVER_SHUTDOWN or
ER_QUERY_INTERRUPTED.

This patch fixed the problem by ignoring the kill status when
constructing the event for DDL statements.

This patch also included the following changes in order to
provide the test case.

 1) modified mysqltest to support variable for connection command

 2) modified mysql-test-run.pl, add new variable MYSQL_SLAVE to
    run mysql client against the slave mysqld.
2009-03-27 13:19:50 +08:00
Alexey Kopytov
159b18fad1 Automerge. 2009-03-24 23:50:59 +03:00
Alexey Kopytov
b071b660e9 Fix for bug #43801: mysql.test takes too long, fails due to
expired timeout on debx86-b in PB 

Moved the resource-intensive test case for bug #41486 into 
a separate test file to reduce execution time for mysql.test.
2009-03-24 23:44:38 +03:00
Horst Hunger
ea24cef9b2 Due to bug#43733 I disabled "concurrent_innodb_(un)safelog.test" for embedded server. 2009-03-18 17:23:39 +01:00
Horst Hunger
e9c874224b Fix for bug 39484 after review. I inserted the review results (also including the patches itself):
"Release_lock("hello")" is now also successful when delivering NULL, replaced two sleeps by wait_condition. The last two "sleep 1" have not been replaced as all tried wait conditions leaded to nondeterministic results, especially to succeeding concurrent updates. To replace the sleeps there should be some time planned (or internal knowledge of the server may help).
2009-03-17 14:43:43 +01:00
Patrick Crews
7648f4aee7 merge 5.0 -> 5.1 2009-03-15 18:39:48 -04:00