Commit graph

1174 commits

Author SHA1 Message Date
Andrei Elkin
19fd076fb1 merge bug#38205 fixes to 5.1-bt 2009-04-21 11:30:40 +03:00
Alfranio Correia
6736e5209a BUG#41793 rpl_binlog_corruption disabled in main (needs new mtr)
The test case was missing "let $slave_sql_errno= 1594;".
2009-04-15 12:43:17 +01:00
Narayanan V
0141da0444 Importing test cases for IBMDB2I
The current patch

-- Adds the ibmdb2i suite
-- related include(.inc) files
-- tests for Bug#44020 and Bug#44025
2009-04-14 16:32:55 +05:30
Andrei Elkin
a3299de2f7 Bug #38205 Row-based Replication (RBR) causes inconsistencies: HA_ERR_FOUND_DUPP_KEY
Bug#319  if while a non-transactional slave is replicating a transaction possible problem

only testing related: addressing reviewers' comments.

mysql-test/suite/bugs/r/rpl_bug38205.result:
  new results.
mysql-test/suite/bugs/t/rpl_bug38205.test:
  changing output per reviewer's offering.
mysql-test/suite/rpl/r/rpl_start_stop_slave.result:
  new results.
mysql-test/suite/rpl/t/rpl_start_stop_slave.test:
  refining tests for Bug #38205, Bug#319 to start slave with the necessary synchronization;
  changing output per reviewer's offering;
  removing redundant wait for stop.
2009-04-09 16:05:41 +03:00
He Zhenxing
a15e25f852 Auto merge 2009-04-09 14:31:09 +08:00
He Zhenxing
85cff45ef7 Manually merge BUG#37145 to 5.1-bugteam 2009-04-09 07:42:51 +08:00
Alfranio Correia
fb5bc0a39d BUG#39393. Post-fix for test rpl_skip_error.
The result set for multi-row statements is not the same between STMT and
RBR and among different versions. Thus to avoid test failures, we are not
printing out such result sets. Note, however, that this does not have
impact on coverage and accuracy since the execution is able to continue
without further issues when an error is found on the master and such error
is set to be skipped.
2009-04-08 22:02:19 +01:00
Alfranio Correia
43e85ecedf merge 5.1-bugteam --> 5.1-bugteam (local) 2009-04-08 11:07:24 +01:00
Alfranio Correia
e0d74efd85 merge 5.1-bugteam --> 5.1-bugteam (local) 2009-04-06 01:22:34 +01:00
Alfranio Correia
f9338b318e BUG#39393 slave-skip-errors does not work when using ROW based replication
RBR was not considering the option --slave-skip-errors.
                              
To fix the problem, we are reporting the ignored ERROR(s) as warnings thus avoiding 
stopping the SQL Thread. Besides, it fixes the output of "SHOW VARIABLES LIKE 
'slave_skip_errors'" which was showing nothing when the value "all" was assigned 
to --slave-skip-errors.
                  
@sql/log_event.cc
  skipped rbr errors when the option skip-slave-errors is set.
@sql/slave.cc
  fixed the output of for SHOW VARIABLES LIKE 'slave_skip_errors'"
@test-cases
  fixed the output of rpl.rpl_idempotency
  updated the test case rpl_skip_error
2009-04-05 13:03:04 +01:00
Serge Kozlov
a81e21f8a4 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
Guangbao Ni
102de8f5c3 AutoMerged from pushbuild mysql-5.1-bugteam 2009-04-03 18:42:00 +00:00
Guangbao Ni
173d29536d BUG#42640 mysqld crashes when unsafe statements are executed (STRICT_TRANS_TABLESmode)
Mysql server crashes because unsafe statements warning is wrongly elevated to error,
which is set the error status of Diagnostics_area of the thread in THD::binlog_query().
Yet the caller believes that binary logging shouldn't touch the status, so it will
set the status also later by my_ok(), my_error() or my_message() seperately
according to the execution result of the statement or transaction.
But the status of Diagnostics_area of the thread is allowed to set only once.

Fixed to clear the error wrongly set by binary logging, but keep the warning message.

mysql-test/suite/binlog/r/binlog_stm_ps.result:
  Change unsafe warning to NOTE level
mysql-test/suite/binlog/r/binlog_unsafe.result:
  Test case result for unsafe statements to ensure mysql sever don't crash
mysql-test/suite/binlog/t/binlog_unsafe.test:
  Test case for unsafe statements to ensure mysql sever don't crash
mysql-test/suite/rpl/r/rpl_skip_error.result:
  Change unsafe warning to NOTE level
mysql-test/suite/rpl/r/rpl_stm_loadfile.result:
  Change unsafe warning to NOTE level
mysql-test/suite/rpl/r/rpl_udf.result:
  Change unsafe warning to NOTE level
sql/sql_class.cc:
  the error status of the thread is cleared When a warning is elevated to an error
  because of unsafe warning of binary log.
2009-04-03 18:21:57 +00:00
Horst Hunger
92ea1722c0 Fix belonging to bug#42838: Though this bug is only for 6.0 I put in some updated result files for 6.0 and this are the corrsponding resul files for 5.1, so that sys_vars should then run successfully also in 5.1. 2009-04-03 11:37:48 +02:00
Georgi Kodinov
3346c5c9d3 merged 5.1-main -> 5.1-bugteam 2009-04-01 12:57:34 +03:00
Matthias Leich
a662bf763d Merge of fix for bug 43383 into actual tree 2009-03-30 15:36:10 +02:00
Matthias Leich
dcbf9a5537 Merge 5.0 -> 5.1 of fix for bug 43383
+ disable the funcs_1.charset_collation_* tests which are broken because
  of bug 38346, 40209, 40545, 40618
2009-03-30 12:03:25 +02:00
Georgi Kodinov
2b54a92c89 auto-merge 2009-03-27 14:15:50 +02:00
Georgi Kodinov
2c312d9737 disabled a failing test suite due to bug #42311 2009-03-27 14:12:33 +02:00
Tatiana A. Nurnberg
81f4ffc2cc auto-merge 2009-03-27 12:40:53 +01:00
Tatiana A. Nurnberg
ffd9792ca5 Bug#43748: crash when non-super user tries to kill the replication threads
Test was flakey on some machines and showed spurious
reds for races.

New-and-improved test makes do with fewer statements,
no mysqltest-variables, and no backticks. Should hope-
fully be more robust. Heck, it's debatable whether we
should have a test for this, anyway.

mysql-test/suite/rpl/r/rpl_temporary.result:
  streamlined
mysql-test/suite/rpl/t/rpl_temporary.test:
  streamlined
2009-03-27 12:20:37 +01:00
Georgi Kodinov
68907b3478 Worked around the problem described in bug #43884. 2009-03-27 12:59:31 +02:00
Matthias Leich
c9e9b9583e Fix for Bug#43383 main.variables-big : Weak testing code and result
including modifications according to code review
+ backport of the fix for
  Bug 41932 funcs_1: is_collation_character_set_applicability path
                     too long for tar
  which was missing in 5.0 (just a renaming of two files)
2009-03-26 19:12:19 +01:00
Georgi Kodinov
2f3b4cc796 fixed unupdated test suites. 2009-03-26 17:49:06 +02:00
Andrei Elkin
21cc7d5a25 Bug#38205 Row-based Replication (RBR) causes inconsistencies: HA_ERR_FOUND_DUP
Bug#319  if while a non-transactional slave is replicating a transaction possible problem 

It is impossible to roll back a mixed engines transaction when one of the engine is
non-transaction. In replication that fact is crucial because the slave can not safely
re-apply a transction that was interrupted with STOP SLAVE.

Fixed with making STOP SLAVE not be effective immediately in the case the current
group of replication events has modified a non-transaction table. In order for slave to leave
either the group needs finishing or the user issues KILL QUERY|CONNECTION slave_thread_id.


mysql-test/suite/bugs/r/rpl_bug38205.result:
  bug#38205 non-deterministic part of tests results.
mysql-test/suite/bugs/t/rpl_bug38205.test:
  bug#38205 non-deterministic part of tests.
mysql-test/suite/rpl/r/rpl_start_stop_slave.result:
  bug#38205 deterministic part of tests results.
mysql-test/suite/rpl/t/rpl_start_stop_slave-slave.opt:
  increasing `innodb_lock_wait_timeout' to make the test pass on slow env w/o
  timeout expired issue.
mysql-test/suite/rpl/t/rpl_start_stop_slave.test:
  bug#38205 deterministic part of tests.
sql/log_event.cc:
  Augmenting row-based events applying with the notion of 
  thd->transaction.{all,stmt}.modified_non_trans_table.
  The pair is set and reset according to its specification
  for the mixed transaction processing.
  Particualry, once `modified_non_trans_table' is set in the row-events
  processing loop, it will remain till the commit of the transaction.
sql/slave.cc:
  Consulting `thd->transaction.all.modified_non_trans_table' to decide
  whether to terminate by the sql thread or to continue even though
  the sql thread might have been STOP-ed (rli->abort_slave).
2009-03-26 10:25:06 +02:00
Leonard Zhou
19e3c5c8e0 Merge 2009-03-26 12:37:24 +08:00
Ramil Kalimullin
aca1a83fed Manual merge. 2009-03-25 23:41:16 +04:00
Matthias Leich
f44d633e34 Fix for Bug#43383 main.variables-big : Weak testing code and result
including modifications according to code review
+ backport of the fix for
  Bug 41932 funcs_1: is_collation_character_set_applicability path
                     too long for tar
  which was missing in 5.0 (just a renaming of two files)
2009-03-25 19:30:43 +01:00
Tatiana A. Nurnberg
4f5f7f353a Bug#43748: crash when non-super user tries to kill the replication threads
manual merge. also adds test specific to 5.1+

mysql-test/suite/rpl/r/rpl_temporary.result:
  show that a non-privileged user trying to
  kill system-threads no longer crashes the
  server. test in 5.1+ only.
mysql-test/suite/rpl/t/rpl_temporary.test:
  show that a non-privileged user trying to
  kill system-threads no longer crashes the
  server. test in 5.1+ only.
sql/sql_class.cc:
  manual merge
sql/sql_class.h:
  manual merge
sql/sql_parse.cc:
  manual merge
2009-03-25 17:42:34 +01:00
Andrei Elkin
67f9a6d178 Bug#42977 RBR logs for rows with more than 250 column results in corrupt binlog
The issue happened to be two-fold.
The table map event was recorded into binlog having
an incorrect size when number of columns exceeded 251. 
The Row-based event had incorrect recording and restoring m_width member within
the same as above conditions.

Fixed with correcting m_data_size and m_width.


mysql-test/suite/rpl/r/rpl_row_wide_table.result:
  the new test results.
mysql-test/suite/rpl/t/rpl_row_wide_table.test:
  regression test for bug#42977.
sql/log_event.cc:
  0. all buffers that used in net_store_length() are augmented with 1 for safety
  to be able to contain the magic and the content of ulonglong as well;
  1. Rows_log_event::get_data_size() yieled incorrect size |m_width/8| whereas 
     it should be m_width;
  2. Table_map_log_event::Table_map_log_event yieled incorrect value for
     `m_data_size' probably presuming 1-byte integer max for the column number;
sql/rpl_utility.h:
  DBUG_PRINT_BITSET() macro is left 256-cols limited but has made safe and commented.
2009-03-25 12:53:56 +02:00
Leonard Zhou
a49b057dc4 Fix test case erro in sles10-ia64-a.
Reset master before next test.

mysql-test/suite/rpl/r/rpl_timezone.result:
  Test result.
mysql-test/suite/rpl/t/rpl_timezone.test:
  Reset master before next test.
2009-03-25 14:19:42 +08:00
Luis Soares
ed1e9d214c BUG#39701: Mixed binlog format does not switch to row mode on
LOAD_FILE
            
LOAD_FILE is not safe to replicate in STATEMENT mode, because it
depends on a file (which is loaded on master and may not exist in
slave(s)). This leads to scenarios on which the slave replicates the
statement with 'load_file' and it will try to load the file from local
file system. Given that the file may not exist in the slave filesystem
the operation will not succeed (probably returning NULL), causing
master and slave(s) to diverge. However, when using MIXED mode
replication, this can be made to work, if the statement including
LOAD_FILE is marked as unsafe, triggering a switch to ROW mode,
meaning that the contents of the file are written to binlog as row
events. Consequently, the contents from the file in the master will
reach the slave via the binlog.
           
This patch addresses this bug by marking the load_file function as
unsafe. When in mixed mode and when LOAD_FILE is issued, there will be
a switch to row mode. Furthermore, when in statement mode, the
LOAD_FILE will raise a warning that the statement is unsafe in that
mode.


mysql-test/extra/rpl_tests/rpl_loadfile.test:
  Extra file that is "sourced" on both rpl_loadfile and rpl_stm_loadfile
  test files.
mysql-test/suite/rpl/r/rpl_loadfile.result:
  Updated with the results from the test case added to this file.
mysql-test/suite/rpl/r/rpl_stm_loadfile.result:
  Result file for rpl_loadfile test split with the warnings in statement
  mode.
mysql-test/suite/rpl/t/rpl_loadfile.test:
  After splitting the original rpl_loadfile file, this one is only 
  required to be executed in mixed or row format.
  Appended the test for 39701 to this file.
mysql-test/suite/rpl/t/rpl_stm_loadfile.test:
  Split the original rpl_loadfile test because load_file now raises
  a warning when in statement mode. The goal of this split is 
  two-fold: i) make the test case more resilient; ii) assert that 
  warnings are indeed raised when in statement mode.
sql/item_create.cc:
  Added the set_stmt_unsafe call to lex.
2009-03-24 18:27:33 +00:00
Leonard Zhou
da30dedd41 Bug#43440 rpl.rpl_temp_table_mix_row fails sporadicly
The problem is that after disconnect, the DOPR TEMPORARY TABLE event didn't been
written into binlog. So after syncing with slave, the TEMPORARY table on slave 
is not removed.
      
Waiting DROP TEMPORARY TABLE event to be written into binlog before sync slave with
master.

mysql-test/suite/rpl/t/disabled.def:
  Remove disable item.
mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test:
  Waiting DROP TEMPORARY TABLE event to be written into binlog
2009-03-24 16:55:03 +08:00
Leonard Zhou
515e83cc8e Merge 2009-03-24 15:19:46 +08:00
Horst Hunger
3c9dd8895c Merge to be able to push. 2009-03-24 11:48:38 +01:00
Leonard Zhou
28f0e8cf77 Merge 2009-03-24 14:24:27 +08:00
Georgi Kodinov
596a9dbdfb Disabled the failing test case until bug #43440 is resolved 2009-03-23 11:38:54 +02:00
Alfranio Correia
c461c1b0ca Post-fix BUG#42861. 2009-03-23 01:07:25 +00:00
Alfranio Correia
ef0d5cc5f2 auto-merge 5.1-bugteam (local) --> 5.1-bugteam 2009-03-22 19:46:57 +00:00
Horst Hunger
2aff261018 Reviewed fix for bug#37962 also including the revised result files for failing system variable tests. 2009-03-20 18:11:22 +01:00
Horst Hunger
667a004c53 Reviewed patch for Bug#39862. 2009-03-19 12:21:38 +01:00
Satya B
5c49e6ebb3 Merge 5.0-bugteam to 5.1-bugteam 2009-03-19 14:19:51 +05:30
Alfranio Correia
b97083dfc7 Bug #42861 Assigning invalid directories to --slave-load-tmpdir crashes the slave
Compiling with debug and assigning an invalid directory to --slave-load-tmpdir
was crashing the slave due to the following assertion DBUG_ASSERT(! is_set() ||
can_overwrite_status). This assertion assumes that a thread can change its
state once (i.e. ok,error, etc) before aborting, cleaning/resuming or completing
its execution unless the overwrite flag (i.e. can_overwrite_status) is true.

The Append_block_log_event::do_apply_event which is responsible for creating
temporary file(s) was not cleaning the thread state. Thus a failure while
trying to create a file in an invalid temporary directory was causing the crash.

To fix the problem we check if the temporary directory is valid before starting
the SQL Thread and reset the thread state before creating a file in
Append_block_log_event::do_apply_event.
2009-03-18 10:31:17 +00:00
Leonard Zhou
53849a24f9 Merge 2009-03-16 17:06:22 +08:00
Georgi Kodinov
6290bc7e61 addendum to the 22047 fix : updated funcs_1 test suite 2009-03-18 14:52:31 +02:00
Guangbao Ni
224376a796 Auto-merge from 5.1-bugteam 2009-03-18 15:02:06 +00:00
Guangbao Ni
0ba1cc2523 Bug #42217 mysql.procs_priv does not get replicated
mysql.procs_priv table itself does not get replicated.
Inserting routine privilege record into mysql.procs_priv table
is triggered by creating function/procedure statements
according to current user's privileges.
Because the current user of SQL thread has GLOBAL_ACL,
which doesn't need any check mysql.procs_priv privilege
when create/alter/execute routines.
Corresponding GLOBAL_ACL privilege user
doesn't insert routine privilege record into
mysql.procs_priv when creating a routine.

Fixed by switching the current user of SQL thread to definer user if
the definer user exists on slave.
That populates procs_priv, otherwise to keep the SQL thread
user and procs_priv remains unchanged.


mysql-test/suite/rpl/r/rpl_do_grant.result:
  Test case result for routine privilege when definer user exist or not on slave
mysql-test/suite/rpl/t/rpl_do_grant.test:
  Test case result for routine privilege when definer user exist or not on slave
sql/sql_parse.cc:
  Switch current user of SQL thread to definer user if the definer user
  existes on slave when checking whether the routine privilege is
  needed to insert mysql.procs_priv table or not.
2009-03-18 13:48:23 +00:00
Leonard Zhou
af53e5856a Merge 2009-03-18 11:05:48 +08:00
Patrick Crews
5b9903e1c8 Bug#41307: Tests using include/ndb_backup.inc won't work on Windows due to 'grep' call.
Re-recording of .result files for additional tests that use this include file.
2009-03-16 17:36:14 -04:00
Leonard Zhou
b42c29cfe3 BUG#22504 load data infile sql statement in replication architecture get error
The problem is issued because we set wrong start position and stop position of query string into binlog.
That two values are stored as part of head info of query string.
When we parse binlog, we first get position values then get the query string according position values.
But seems that two values are not calculated correctly after the parse of Yacc.

We don't want to touch so much of yacc because it may influence other codes.
So just add one space after 'INTO' key word when parsing.
This can easily resolve the problem.

mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
  Test result
mysql-test/suite/rpl/t/rpl_loaddatalocal.test:
  Test case
sql/log_event.cc:
  Add space after 'INTO'.
2009-03-16 16:21:29 +08:00