Commit graph

261 commits

Author SHA1 Message Date
Georgi Kodinov
05dbb26dfc merged 5.1 main -> 5.1-bugteam 2008-11-06 16:18:25 +02:00
Sven Sandberg
f40fc60cf2 BUG#36625: Please remove the rpl_probe and rpl_parse features from the server
Problem 1: BUG#36625: rpl_redirect doesn't do anything useful. It tests an
obsolete feature that was never fully implemented.
Fix 1: Remove rpl_redirect.
Problem 2: rpl_innodb_bug28430 and rpl_flushlog_loop are disabled despite the
bugs for which they were disabled have been fixed.
Fix 2: Re-enable rpl_innodb_bug28430 and rpl_flushlog_loop.


mysql-test/suite/rpl/r/rpl_redirect.result:
  Removed result file for obsolete test.\
mysql-test/suite/rpl/t/disabled.def:
  Re-enabled tests.
mysql-test/suite/rpl/t/rpl_redirect.test:
  Removed obsolete test.
2008-11-06 11:00:55 +01:00
Serge Kozlov
172f64911b Bug#39593. Removed test case rpl_row_stop_middle with result file 2008-10-16 22:40:15 +04:00
Mats Kindahl
04c054048b Merging with 5.1-5.1.29-rc 2008-10-08 13:37:13 +02:00
Mats Kindahl
dcd050c550 Bug #34707: Row based replication: slave creates table within wrong database
The failure was caused by executing a CREATE-SELECT statement that creates a
table in another database than the current one. In row-based logging, the
CREATE statement was written to the binary log without the database, hence
creating the table in the wrong database, causing the following inserts to
fail since the table didn't exist in the given database.

Fixed the bug by adding a parameter to store_create_info() that will make
the function print the database name before the table name and used that
in the calls that write the CREATE statement to the binary log. The database
name is only printed if it is different than the currently selected database.

The output of SHOW CREATE TABLE has not changed and is still printed without
the database name.

mysql-test/suite/rpl/t/rpl_row_create_table.test:
  Added test to check that CREATE-SELECT into another database than the
  current one replicates.
sql/sql_insert.cc:
  Adding parameter to calls to store_create_info().
sql/sql_show.cc:
  Adding parameter to calls to store_create_info().
  
  Extending store_create_info() with parameter 'show_database' that will cause
  the database to be written before the table name.
sql/sql_show.h:
  Adding parameter to call to store_create_info() to tell if the database should be shown or not.
sql/sql_table.cc:
  Adding parameter to calls to store_create_info().
2008-10-08 11:15:00 +02:00
Georgi Kodinov
4d7ad72e52 fixed test suite failures in 5.1-bugteam 2008-10-07 19:54:12 +03:00
Georgi Kodinov
e9ff58bb54 merged 5.0-bugteam -> 5.1-bugteam 2008-10-07 18:32:58 +03:00
Georgi Kodinov
7831b221e0 merged 5.1-5.1.29-rc -> 5.1-bugteam 2008-10-07 18:19:32 +03:00
Ramil Kalimullin
b4c5cafeb0 Fix for bug#38269: pushbuild gives valgrind error in
ha_statistic_increment for rpl_temporary

Problem: in some cases master send a special event to reconnecting
slave to keep slave's temporary tables (see #17284) and they still 
have references to the "old" SQL slave thread and use them to access
thread's data.

Fix: set temporary tables thread references to the actual SQL slave
thread in such cases.


mysql-test/suite/rpl/t/disabled.def:
  Fix for bug#38269: pushbuild gives valgrind error in 
  ha_statistic_increment for rpl_temporary
    - rpl_temporary test enabled.
sql/log_event.cc:
  Fix for bug#38269: pushbuild gives valgrind error in 
  ha_statistic_increment for rpl_temporary
    - if we keep slave's temporary tables after reconnect,
  set their thread pointers (->in_use) to the current SQL thread.
2008-10-07 18:21:17 +05:00
Mats Kindahl
acfd0ff7de The test rpl_blackhole was executed even when
there were no blackhole installed. This patch
adds a check for that.

mysql-test/suite/rpl/t/rpl_blackhole.test:
  Adding include of have_blackhole.
2008-10-03 12:52:01 +02:00
Mats Kindahl
f2a7af7b5f Merging with 5.1-5.1.29-rc. 2008-10-03 09:36:22 +02:00
Mats Kindahl
690fd28adf Bug #38360: BLACKHOLE replication with RBR is broken
Incremental patch to add comments to test cases.
2008-10-02 21:13:15 +02:00
Mats Kindahl
8d9cf89e96 Bug #38360: BLACKHOLE replication with RBR is broken
The Blackhole engine did not support row-based replication
since the delete_row(), update_row(), and the index and range
searching functions were not implemented.

This patch adds row-based replication support for the
Blackhole engine by implementing the two functions mentioned
above, and making the engine pretend that it has found the
correct row to delete or update when executed from the slave
SQL thread by implementing index and range searching functions.

It is necessary to only pretend this for the SQL thread, since
a SELECT executed on the Blackhole engine will otherwise never
return EOF, causing a livelock.


mysql-test/extra/binlog_tests/blackhole.test:
  Blackhole now handles row-based replication.
mysql-test/extra/rpl_tests/rpl_blackhole.test:
  Test helper file for testing that blackhole actually
  writes something to the binary log on the slave.
mysql-test/suite/binlog/t/binlog_multi_engine.test:
  Replication now handles row-based replcation.
mysql-test/suite/rpl/t/rpl_blackhole.test:
  Test that Blackhole works with primary key, index, or none.
sql/log_event.cc:
  Correcting code to only touch filler bits and leave
  all other bits alone. It is necessary since there is
  no guarantee that the engine will be able to fill in
  the bits correctly (e.g., the blackhole engine).
storage/blackhole/ha_blackhole.cc:
  Adding definitions for update_row() and delete_row() to return OK
  when executed from the slave SQL thread with thd->query == NULL
  (indicating that row-based replication events are being processed).
  
  Changing rnd_next(), index_read(), index_read_idx(), and
  index_read_last() to return OK when executed from the slave SQL
  thread (faking that the row has been found so that processing
  proceeds to update/delete the row).
storage/blackhole/ha_blackhole.h:
  Enabling row capabilities for engine.
  Defining write_row(), update_row(), and delete_row().
  Making write_row() private (as it should be).
2008-10-02 11:02:38 +02:00
Sven Sandberg
b920fb4512 BUG#38269: pushbuild gives valgrind error in ha_statistic_increment for rpl_temporary
Re-enabling failing test case because server logs were lost in pushbuild, so we need to run it again.


mysql-test/suite/rpl/t/disabled.def:
  Re-enabling failing test case because server logs were lost in pushbuild, so we need to run it again.
2008-10-01 16:02:04 +02:00
Patrick Crews
7eb271ba43 Bug#39803 Test rpl.rpl_truncate_7ndb_2 failing
Fixed bad path in .test file
Moved test to suite/rpl_ndb (per Cluster QA)
Re-recorded .result file to updated expected results.
2008-09-15 15:13:43 -04:00
Georgi Kodinov
9d668de5c6 merged 5.1.29-rc into 5.1-bugteam 2008-09-10 12:44:21 +03:00
Andrei Elkin
2f8c0a1675 Bug#36099 replicate-do-db affects replaying RBR events with mysqlbinlog
The replication filtering rules were inappropiately applied when
executing BINLOG pseudo-query.  The rules are supposed to be active
only at times when the slave's sql thread executes an event.
            
Fixed with correcting a condition to call replication rules only if
the slave sql thread executes the event.

mysql-test/suite/rpl/r/rpl_binlog_query_filter_rules.result:
  new result file
mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules-master.opt:
  a filtering option that would refuse to replicate a row event of the main test on
  slave
mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules.test:
  a regression test for the bug
sql/log_event.cc:
  avoiding to call the filtering rules if the execution thread is not a slave.
2008-09-03 13:01:18 +03:00
Mats Kindahl
d6d2f77f06 Merging 5.0-bugteam into 5.1-bugteam 2008-09-01 11:00:52 +02:00
He Zhenxing
923f61039e Cherry picking patch for BUG#37051 2008-08-26 18:01:49 +08:00
Sven Sandberg
bbb45c158f Bug#35807 - INSTALL PLUGIN replicates row-based, but not stmt-based
INSTALL PLUGIN and UNINSTALL PLUGIN worked with statement-based and
mixed-mode replication only, but not with row-based replication.

There is no statement-based replication of these statements.
But there was row-based replication of the inserts and deletes
to and from the mysql.plugin table.

The fix is to suppress binlogging during insert and delete to
and from the mysql.plugin table.


mysql-test/suite/rpl/r/rpl_plugin_load.result:
  new result file
mysql-test/suite/rpl/t/rpl_plugin_load-master.opt:
  new opt file
mysql-test/suite/rpl/t/rpl_plugin_load-slave.opt:
  new opt file
mysql-test/suite/rpl/t/rpl_plugin_load.test:
  new test
sql/sql_plugin.cc:
  Suppress binlogging during insert and delete to/from the
  mysql.plugin table.
2008-08-19 17:35:56 +02:00
Davi Arnaut
986a27fb03 Merge from mysql-5.1 main. 2008-08-15 12:58:19 -03:00
He Zhenxing
7bf8e29b99 Auto merge from mysql-5.1 main 2008-08-14 14:27:18 +08:00
Serge Kozlov
f2188dc323 Bug#18817, removing --binlog-format option from .opt files 2008-08-13 23:12:51 +04:00
Sven Sandberg
5101f124e8 merge 5.1 main -> 5.1-rpl-testfixes
all changes automerged without conflicts
2008-07-29 19:55:46 +02:00
Sven Sandberg
d8c838c27a BUG#37733: rpl.rpl_flushlog_loop 'row' fails sporadically on pushbuild
BUG#37884: rpl_row_basic_2myisam and rpl_row_basic_3innodb fail sporadically in pushbuild
These have been fixed in 5.1-rpl. Re-applying fix for BUG#37884
in 5.1-bugteam, and disabling rpl_flushlog_loop for BUG#37733 in
5.1-bugteam.


mysql-test/extra/rpl_tests/rpl_row_basic.test:
  Missing sync_slave_with_master added.
mysql-test/suite/rpl/t/disabled.def:
  Disabling rpl_flushlog_loop until the fixed version gets
  merged from 5.1-rpl
2008-07-23 16:34:02 +02:00
Sven Sandberg
7978905c5c BUG#37493: rpl_trunc_temp.test nondeterministic
Problem: the test waits for a 'DROP TEMPORARY TABLE' event to
appear in the master's binlog, then checks on the slave whether
the number of temporary tables has decreased. The slave does
not sync, causing a race.
Fix: check for the 'DROP TEMPORARY TABLE' event on slave
instead of on master.


mysql-test/suite/rpl/t/rpl_trunc_temp.test:
  - Fixed BUG#37493 by waiting for the event on the slave
  instead of on the master.
  - Added comments.
2008-07-23 12:13:55 +02:00
Sven Sandberg
6334196bd7 BUG#38269: pushbuild gives valgrind error in ha_statistic_increment for rpl_temporary
This does not fix the bug. It only disables the failing test.


mysql-test/suite/rpl/t/disabled.def:
  disable rpl_temporary
2008-07-21 21:05:06 +02:00
Sven Sandberg
b51c2eb3aa BUG#38077: rpl_incident At line 22: query 'SELECT * ...' Table 'test.t1' doesn't exist
This is not a fix to the bug. It only adds debug info, so
that we can analyze the bug better next time it happens.
Please revert the patch after the bug is fixed.


mysql-test/suite/rpl/t/rpl_incident.test:
  Added debug info. This will only be printed if the
  test fails.
2008-07-18 15:07:14 +02:00
Andrei Elkin
7d1bc0a4f9 Bug #36818 rpl_server_id1 fails expecting slave has stopped
the reason for the failure is that io thread passes through a sequence of state
changes before it eventually got stuck at the expect running state as NO.
It's unreasonble to wait for the running status while the whole idea of the test is
to get to the IO thread error.

Fixed with changing the waiting condition.

mysql-test/suite/rpl/r/rpl_server_id1.result:
  results changed
mysql-test/suite/rpl/t/disabled.def:
  re-enabling rpl_server_id1
mysql-test/suite/rpl/t/rpl_server_id1.test:
  deploying the exact waiting condition i.e to wait for the slave io error.
2008-07-18 14:53:16 +03:00
Sven Sandberg
620c4878b3 BUG#38178: rpl_loaddata_map fails sporadically in pushbuild
Problem: master binlog has 'create table t1'. Master binlog
was removed before slave could replicate it. In test's cleanup
code, master did 'drop table t1', which caused slave sql
thread to stop with an error since slave sql thread did not
know about t1.
Fix: t1 is just an auxiliary construction, only needed on
master. Hence, we turn off binlogging before t1 is created,
drop t1 as soon as we don't need it anymore, and then turn
on binlogging again.


mysql-test/include/show_binlog_events.inc:
  Filter out directories and block_len from
  LOAD DATA INFILE events.
mysql-test/suite/rpl/r/rpl_loaddata_map.result:
  updated result file
mysql-test/suite/rpl/t/rpl_loaddata_map.test:
  Turn off binlogging while t1 is used, drop t1 as soon
  as we don't need it anymore, and turn on binlogging again.
  Also added some comments and replaced 'show binlog events'
  by 'source include/show_binlog_events.inc'.
2008-07-18 13:34:19 +02:00
Andrei Elkin
f8e8332100 Bug #34647 rpl_temporary discovers more than one dump thread and fails to select
Many dump threads can exist due to a way the new version of mtr governs suites.

For this immediate problem the test is refined not to use I_S but rather to reconnect
explicitly with preserving logics of a an old target bug fixes verification.

mysql-test/suite/rpl/r/rpl_temporary.result:
  results changed
mysql-test/suite/rpl/t/rpl_temporary.test:
  refining the bug#17284 test to avoid counting dump threads in favor to reconnect
  explicitly with preserving the orig logics.
2008-07-18 11:20:55 +03:00
Sven Sandberg
ca505ca2bd BUG#38170: rpl_variables failed on pushbuild: could not sync with master
Problem: the test set @@global.init_slave to garbage at a time
which was not guaranteed to be after the time when the slave's
SQL thread used it. That would cause the slave's SQL thread to
stop in rare cases.
Fix: The test does not care about the value of
@@global.init_slave, except that it should be different on
master and slave. Hence, we set @@global.init_slave to
something that is valid SQL.


mysql-test/suite/rpl/r/rpl_variables.result:
  updated result file.
mysql-test/suite/rpl/t/rpl_variables.test:
  Set @@global.init_slave to something that is valid SQL.
2008-07-17 18:26:59 +02:00
Sven Sandberg
25b6b026a7 BUG#37200: rpl_switch_stm_row_mixed fails sporadically in pushbuild
This bug has been fixed in two slightly different ways in
6.0-rpl and {5.1,6.0}-bugteam. To avoid future merge
problems, I'm now copying the 6.0-rpl fix to 5.1-bugteam.
2008-07-03 10:27:25 +02:00
Sven Sandberg
ec73d940b1 BUG#37200: rpl_switch_stm_row_mixed fails sporadically in pushbuild
The previous fix for the bug was incomplete. The test failed
because t2 did not exist on the slave (since the slave was
lagging) when the
wait_condition was executed. Fixed by inserting
sync_slave_with_master just after t2 was created.
2008-07-02 17:04:45 +02:00
Sven Sandberg
0a60bd2243 BUG#37200: rpl_switch_stm_row_mixed fails sporadically in pushbuild
Problem: rpl_switch_stm_row_mixed did not wait until row events generated by
INSERT DELAYED were written to the master binlog before it synchronized slave
with master. This caused sporadic errors where these rows were missing on
slave.
Fix: wait until all rows appear on the slave.
This is a backport, applying the same to 5.1-bugteam as was previously
applied to 6.0-rpl
2008-06-30 13:06:41 +02:00
Gleb Shchepa
696c03e47c auto merge 5.1-main --> 5.1-bugteam 2008-06-25 14:44:55 +05:00
Tatiana A. Nurnberg
b4a45a7121 re 36818: rpl_server_id1 fails expecting slave has stopped
On a slow environment like valgrind the test is vulnerable
because it does not check if slave has stopped at time
of the new session is requested `start slave;' -- disabling
test till it is fixed.

mysql-test/suite/rpl/t/disabled.def:
  disable rpl_server_id1 until test is fixed.
2008-06-19 12:39:48 +02:00
Sven Sandberg
605ba6867f BUG#36826: rpl_slave_status fails sporadically in pushbuild
rpl_slave_status failed on pushbuild. The slave stopped with an
error. Adding sync_slave_with_master fixes the problem. Updated
test case. 

mysql-test/suite/rpl/r/rpl_slave_status.result:
  Updated result file.
mysql-test/suite/rpl/t/rpl_slave_status.test:
  - Added comment explaining what the test does.
  - Added sync_slave_with_master in two places where it was missing. This
    caused sporadic pushbuild errors.
  - Added wait_for_slave_to_{start,stop} after {START,STOP} SLAVE queries.
  - Removed 'drop table if exists' from setup code.
  - Replaced save_master_pos;connection slave;sync_with_master by
    sync_slave_with_master.
  - Replaced 'delete from mysql.user' by 'drop user'.
  - Wrapped 'show slave status' inside query_get_value(), so that only what
    we test is in the output.
2008-05-26 15:06:49 +02:00
Chad MILLER
78cda882ae Bug#36818: rpl_server_id1 fails expecting slave has stopped
The test is vulnerable because it does not check if slave has stopped at time
of the new session is requested `start slave;'

Fixed with deploying explicitly wait_for_slave_to_stop synchronization macro.
2008-05-20 11:14:03 -04:00
unknown
ee4e10c7fc disabled.def:
rpl_innodb_bug28430 disabled


mysql-test/suite/rpl/t/disabled.def:
  rpl_innodb_bug28430 disabled
2008-05-19 11:38:53 +05:00
unknown
85cabe0b91 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my51-bug36570
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-bugteam
2008-05-16 17:37:37 -04:00
unknown
277e783d13 Merge magare.gmz:/home/kgeorge/mysql/work/B36011-take2-5.0-bugteam
into  magare.gmz:/home/kgeorge/mysql/work/B36011-5.1-bugteam


sql/sql_select.cc:
  Auto merged
mysql-test/r/subselect.result:
  merge of bug 36011 to 5.1-bugteam
mysql-test/t/subselect.test:
  merge of bug 36011 to 5.1-bugteam
2008-05-16 19:03:50 +03:00
unknown
3618df7379 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my50-bug36570
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my51-bug36570


mysql-test/suite/rpl/t/rpl_sp.test:
  Auto merged
mysql-test/suite/rpl/r/rpl_sp.result:
  Use local.  Needs re-recording.
2008-05-16 11:36:11 -04:00
unknown
65677ea535 Fixes to make rpl_insert_id pass in 5.1-bugteam.
mysql-test/extra/rpl_tests/rpl_insert_id.test:
  Moving save and restore of @@global.concurrent_insert into the same
  session thread.
mysql-test/suite/rpl/r/rpl_insert_id.result:
  Result file change.
mysql-test/suite/rpl/t/rpl_insert_id.test:
  ***MISSING TEXT***
2008-05-16 16:08:24 +02:00
unknown
7b79348edb Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my50-bug36570
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my51-bug36570


mysql-test/suite/rpl/t/rpl_sp.test:
  Auto merged
mysql-test/suite/rpl/r/rpl_sp.result:
  manual merge.
2008-05-16 09:23:27 -04:00
unknown
9906138343 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my50-bug36570
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my51-bug36570


BitKeeper/deleted/.del-binlog_innodb.result:
  Auto merged
sql/sp_head.cc:
  Auto merged
mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result:
  need to re-record.
mysql-test/suite/rpl/r/rpl_sp.result:
  need to re-record.
mysql-test/r/mysqlbinlog.result:
  manual merge.
mysql-test/suite/rpl/t/rpl_sp.test:
  manual merge.
sql/sp.cc:
  manual merge.
sql/sp_head.h:
  manual merge.
2008-05-15 19:45:42 -04:00
unknown
439cbe54cb Merge mats-laptop.(none):/home/bkroot/mysql-5.1-bugteam
into  mats-laptop.(none):/home/bk/b36197-mysql-5.1-bugteam
2008-05-15 21:04:13 +02:00
unknown
496ec47d22 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my50-bug36570
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my51-bug36570


BitKeeper/deleted/.del-binlog_innodb.result:
  Auto merged
mysql-test/r/mysqlbinlog.result:
  need to record.
mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result:
  need to record.
mysql-test/suite/rpl/r/rpl_sp.result:
  need to record.
mysql-test/suite/rpl/t/rpl_sp.test:
  manual merge.
sql/sp.cc:
  Manual merge
2008-05-15 11:08:58 -04:00
unknown
d2a75dc900 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-bug36197
into  mats-laptop.(none):/home/bk/b36197-mysql-5.1-bugteam
2008-05-12 20:01:10 +02:00
unknown
dac6ffb958 BUG#36197: flush tables (or little table cache) can cause crash on slave
When flushing tables, there were a slight chance that the flush was occuring
between processing of two table map events. Since the tables are opened
one by one, it might result in that the tables were not valid and that sub-
sequent locking of tables would cause the slave to crash.

The problem is solved by opening and locking all tables at once using
simple_open_n_lock_tables(). Also, the patch contain a change to open_tables()
so that pre-locking only takes place when the trg_event_map is not zero, which
was not the case before (this caused the lock to be placed in thd->locked_tables
instead of thd->lock since the assumption was that triggers would be called
later and therefore the tables should be pre-locked).


mysql-test/suite/rpl/r/rpl_found_rows.result:
  Result change
mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result:
  Result change
mysql-test/suite/rpl/t/rpl_found_rows.test:
  Adding drop of table that was created in test.
mysql-test/suite/rpl/t/rpl_slave_status.test:
  Adding waits for slave start and stop to ensure that test works.
sql/log_event.cc:
  Replacing table-by-table open and lock with a single call
  to simple_open_n_lock_tables(), which in turn required some
  changes to other code.
sql/log_event_old.cc:
  Replacing table-by-table open and lock with a single call
  to simple_open_n_lock_tables(), which in turn required some
  changes to other code.
sql/sql_base.cc:
  Extending check inside open_tables() so that pre-locking in only done if
  tables->trg_egent_map is non-zero.
mysql-test/include/wait_for_slave_sql_to_start.inc:
  New BitKeeper file ``mysql-test/include/wait_for_slave_sql_to_start.inc''
2008-05-12 19:50:53 +02:00