List:Commits« Previous MessageNext Message »
From:Sven Sandberg Date:November 13 2008 8:22pm
Subject:bzr push into mysql-6.0-rpl branch (sven:2724 to 2725) Bug#38350
View as plain text  
 2725 Sven Sandberg	2008-11-13 [merge]
      merged fix for BUG#38350 from 5.1-rpl to 6.0-rpl
modified:
  mysql-test/extra/rpl_tests/rpl_loaddata.test
  mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test
  mysql-test/extra/rpl_tests/rpl_truncate_helper.test
  mysql-test/include/query_cache.inc
  mysql-test/r/cache_innodb.result
  mysql-test/r/innodb-autoinc-optimize.result
  mysql-test/r/innodb.result
  mysql-test/r/log_tables.result
  mysql-test/r/mysql_client_test.result
  mysql-test/r/partition.result
  mysql-test/r/status.result
  mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result
  mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test
  mysql-test/suite/rpl/r/rpl_alter_db.result
  mysql-test/suite/rpl/r/rpl_drop_db.result
  mysql-test/suite/rpl/r/rpl_drop_view.result
  mysql-test/suite/rpl/r/rpl_events.result
  mysql-test/suite/rpl/r/rpl_idempotency.result
  mysql-test/suite/rpl/r/rpl_ignore_table.result
  mysql-test/suite/rpl/r/rpl_loaddata.result
  mysql-test/suite/rpl/r/rpl_packet.result
  mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
  mysql-test/suite/rpl/r/rpl_stm_EE_err2.result
  mysql-test/suite/rpl/r/rpl_truncate_2myisam.result
  mysql-test/suite/rpl/r/rpl_truncate_3innodb.result
  mysql-test/suite/rpl/t/rpl_alter_db.test
  mysql-test/suite/rpl/t/rpl_drop_db.test
  mysql-test/suite/rpl/t/rpl_drop_view.test
  mysql-test/suite/rpl/t/rpl_events.test
  mysql-test/suite/rpl/t/rpl_idempotency.test
  mysql-test/suite/rpl/t/rpl_ignore_table.test
  mysql-test/suite/rpl/t/rpl_packet.test
  mysql-test/suite/rpl/t/rpl_row_max_relay_size.test
  mysql-test/suite/rpl_ndb_big/r/rpl_ndb_2other.result
  mysql-test/suite/rpl_ndb_big/r/rpl_ndb_ctype_ucs2_def.result
  mysql-test/suite/rpl_ndb_big/r/rpl_ndb_multi.result
  mysql-test/suite/rpl_ndb_big/t/rpl_ndb_2other.test
  mysql-test/suite/rpl_ndb_big/t/rpl_ndb_ctype_ucs2_def.test
  mysql-test/suite/rpl_ndb_big/t/rpl_ndb_multi.test
  mysql-test/t/innodb-autoinc-optimize.test
  mysql-test/t/innodb.test
  mysql-test/t/log_tables.test
  mysql-test/t/mysql_client_test.test
  mysql-test/t/partition.test
  mysql-test/t/status.test

 2724 Andrei Elkin	2008-11-12 [merge]
      merging (5.1->5.1-rpl) -> 6.1-rpl
modified:
  mysql-test/suite/rpl/r/rpl_locktrans_innodb.result

=== modified file 'mysql-test/extra/rpl_tests/rpl_loaddata.test'
--- a/mysql-test/extra/rpl_tests/rpl_loaddata.test	2008-04-08 06:34:40 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test	2008-11-13 19:40:36 +0000
@@ -146,10 +146,9 @@ terminated by ',' optionally enclosed by
 '\n##\n' starting by '>' ignore 1 lines;
 connection slave;
 --source include/wait_for_slave_sql_to_stop.inc
-drop table t2;
+drop table t1, t2;
 connection master;
-drop table t2;
-drop table t1;
+drop table t1, t2;
 
 # BUG#17233 LOAD DATA INFILE: failure causes mysqld dbug_assert, binlog not flushed
 CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
@@ -157,8 +156,6 @@ CREATE TABLE t1 (word CHAR(20) NOT NULL 
 --error ER_DUP_ENTRY
 LOAD DATA INFILE "../../std_data/words.dat" INTO TABLE t1;
 
---disable_warnings
 DROP TABLE IF EXISTS t1;
---enable_warnings
 
 # End of 4.1 tests

=== modified file 'mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test'
--- a/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test	2007-06-13 03:52:43 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test	2008-11-13 19:19:00 +0000
@@ -18,13 +18,18 @@ eval create table t1 (a int, unique(a)) 
 set sql_log_bin=0;
 insert into t1 values(2);
 set sql_log_bin=1;
-save_master_pos;
+
 --error ER_DUP_ENTRY
 insert into t1 values(1),(2);
 drop table t1;
-save_master_pos;
+
 connection slave;
 --source include/wait_for_slave_sql_to_stop.inc
+let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
+let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
+--echo Error: "$error" (expected different error codes on master and slave)
+--echo Errno: "$errno" (expected 0)
+drop table t1;
 
 # End of 4.1 tests
 

=== modified file 'mysql-test/extra/rpl_tests/rpl_truncate_helper.test'
--- a/mysql-test/extra/rpl_tests/rpl_truncate_helper.test	2007-11-02 12:00:38 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_truncate_helper.test	2008-11-13 19:19:00 +0000
@@ -14,6 +14,9 @@ START SLAVE;
 
 --echo **** On Master ****
 connection master;
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
+
 eval SET SESSION BINLOG_FORMAT=$format;
 eval SET GLOBAL  BINLOG_FORMAT=$format;
 
@@ -40,3 +43,5 @@ source include/show_binlog_events.inc;
 
 connection master;
 RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;

=== modified file 'mysql-test/include/query_cache.inc'
--- a/mysql-test/include/query_cache.inc	2007-06-06 17:57:07 +0000
+++ b/mysql-test/include/query_cache.inc	2008-11-13 19:19:00 +0000
@@ -176,6 +176,7 @@ show status like "Qcache_queries_in_cach
 show status like "Qcache_hits";
 
 # Final cleanup
+eval set GLOBAL query_cache_size=$save_query_cache_size;
 connection default;
 drop table t2;
 disconnect connection1;

=== modified file 'mysql-test/r/cache_innodb.result'
--- a/mysql-test/r/cache_innodb.result	2006-11-21 20:32:58 +0000
+++ b/mysql-test/r/cache_innodb.result	2008-11-13 19:19:00 +0000
@@ -218,4 +218,5 @@ Qcache_queries_in_cache	1
 show status like "Qcache_hits";
 Variable_name	Value
 Qcache_hits	2
+set GLOBAL query_cache_size=1048576;
 drop table t2;

=== modified file 'mysql-test/r/innodb-autoinc-optimize.result'
--- a/mysql-test/r/innodb-autoinc-optimize.result	2008-08-21 23:38:19 +0000
+++ b/mysql-test/r/innodb-autoinc-optimize.result	2008-11-13 19:40:36 +0000
@@ -5,3 +5,5 @@ optimize table t1;
 Table	Op	Msg_type	Msg_text
 test.t1	optimize	note	Table does not support optimize, doing recreate + analyze instead
 test.t1	optimize	status	OK
+==== clean up ====
+DROP TABLE t1;

=== modified file 'mysql-test/r/innodb.result'
--- a/mysql-test/r/innodb.result	2008-10-20 19:13:22 +0000
+++ b/mysql-test/r/innodb.result	2008-11-13 19:40:36 +0000
@@ -1768,6 +1768,7 @@ set global innodb_sync_spin_loops=20;
 show variables like "innodb_sync_spin_loops";
 Variable_name	Value
 innodb_sync_spin_loops	20
+SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency;
 show variables like "innodb_thread_concurrency";
 Variable_name	Value
 innodb_thread_concurrency	8
@@ -1785,6 +1786,7 @@ set global innodb_thread_concurrency=16;
 show variables like "innodb_thread_concurrency";
 Variable_name	Value
 innodb_thread_concurrency	16
+SET @@global.innodb_thread_concurrency= @old_innodb_thread_concurrency;
 show variables like "innodb_concurrency_tickets";
 Variable_name	Value
 innodb_concurrency_tickets	500

=== modified file 'mysql-test/r/log_tables.result'
--- a/mysql-test/r/log_tables.result	2008-11-12 20:04:19 +0000
+++ b/mysql-test/r/log_tables.result	2008-11-13 19:40:36 +0000
@@ -1,3 +1,8 @@
+SET @old_general_log_state = @@global.general_log;
+SET @old_log_output=       @@global.log_output;
+SET @old_slow_query_log=   @@global.slow_query_log;
+SET @old_general_log=      @@global.general_log;
+SET @old_long_query_time=  @@session.long_query_time;
 use mysql;
 SET @saved_long_query_time = @@long_query_time;
 SET @saved_log_output = @@log_output;
@@ -362,7 +367,6 @@ slow_log
 slow_log_new
 drop table slow_log_new, general_log_new;
 use test;
-SET @saved_log_output= @@global.log_output;
 SET GLOBAL LOG_OUTPUT = 'TABLE';
 SET GLOBAL general_log = 0;
 FLUSH LOGS;
@@ -430,8 +434,8 @@ SET SESSION long_query_time =@saved_long
 FLUSH LOGS;
 ALTER TABLE mysql.slow_log DROP COLUMN seq;
 ALTER TABLE mysql.slow_log ENGINE = CSV;
-SET GLOBAL general_log = @saved_general_log;
-SET GLOBAL slow_query_log = @saved_slow_query_log;
+SET GLOBAL general_log = @old_general_log;
+SET GLOBAL slow_query_log = @old_slow_query_log;
 drop procedure if exists proc25422_truncate_slow;
 drop procedure if exists proc25422_truncate_general;
 drop procedure if exists proc25422_alter_slow;
@@ -622,8 +626,8 @@ DROP TABLE `db_17876.general_log_data`;
 DROP PROCEDURE IF EXISTS `db_17876.archiveSlowLog`;
 DROP PROCEDURE IF EXISTS `db_17876.archiveGeneralLog`;
 DROP DATABASE IF EXISTS `db_17876`;
-SET GLOBAL general_log = @saved_general_log;
-SET GLOBAL slow_query_log = @saved_slow_query_log;
+SET GLOBAL general_log = @old_general_log;
+SET GLOBAL slow_query_log = @old_slow_query_log;
 select CONNECTION_ID() into @thread_id;
 truncate table mysql.general_log;
 set global general_log = on;
@@ -839,7 +843,7 @@ Query	execute long_query using @lparam
 Execute	select '000 001 002 003 004 005 006 007 008 009010 011 012 013 014 015 016 017 018 019020 021 022 023 024 025 026 027 028 029030 031 032 033 034 035 036 037 038 039040 041 042 043 044 045 046 047 048 049050 051 052 053 054 055 056 057 058 059060 061 062 063 064 065 066 067 068 069070 071 072 073 074 075 076 077 078 079080 081 082 083 084 085 086 087 088 089090 091 092 093 094 095 096 097 098 099100 101 102 103 104 105 106 107 108 109110 111 112 113 114 115 116 117 118 119120 121 122 123 124 125 126 127 128 129130 131 132 133 134 135 136 137 138 139140 141 142 143 144 145 146 147 148 149150 151 152 153 154 155 156 157 158 159160 161 162 163 164 165 166 167 168 169170 171 172 173 174 175 176 177 178 179180 181 182 183 184 185 186 187 188 189190 191 192 193 194 195 196 197 198 199200 201 202 203 204 205 206 207 208 209210 211 212 213 214 215 216 217 218 219220 221 222 223 224 225 226 227 228 229230 231 232 233 234 235 236 237 238 239240 241 242 243 244 245 246 247 248 2
 49250 251 252 253 254 255 256 257 258 259260 261 262 263 264 265 266 267 268 269270 271 272 273 274 275 276 277 278 279280 281 282 283 284 285 286 287 288 289290 291 292 293 294 295 296 297 298 299300 301 302 303 304 305 306 307 308 309310 311 312 313 314 315 316 317 318 319320 321 322 323 324 325 326 327 328 329330 331 332 333 334 335 336 337 338 339340 341 342 343 344 345 346 347 348 349350 351 352 353 354 355 356 357 358 359360 361 362 363 364 365 366 367 368 369370 371 372 373 374 375 376 377 378 379380 381 382 383 384 385 386 387 388 389390 391 392 393 394 395 396 397 398 399400 401 402 403 404 405 406 407 408 409410 411 412 413 414 415 416 417 418 419420 421 422 423 424 425 426 427 428 429430 431 432 433 434 435 436 437 438 439440 441 442 443 444 445 446 447 448 449450 451 452 453 454 455 456 457 458 459460 461 462 463 464 465 466 467 468 469470 471 472 473 474 475 476 477 478 479480 481 482 483 484 485 486 487 488 489490 491 492 493 494 495 496 497 498 499500 501 502 
 503 504 505 506 507 508 509510 511 512 513 514 515 516 517 518 519520 521 522 523 524 525 526 527 528 529530 531 532 533 534 535 536 537 538 539540 541 542 543 544 545 546 547 548 549550 551 552 553 554 555 556 557 558 559560 561 562 563 564 565 566 567 568 569570 571 572 573 574 575 576 577 578 579580 581 582 583 584 585 586 587 588 589590 591 592 593 594 595 596 597 598 599600 601 602 603 604 605 606 607 608 609610 611 612 613 614 615 616 617 618 619620 621 622 623 624 625 626 627 628 629630 631 632 633 634 635 636 637 638 639640 641 642 643 644 645 646 647 648 649650 651 652 653 654 655 656 657 658 659660 661 662 663 664 665 666 667 668 669670 671 672 673 674 675 676 677 678 679680 681 682 683 684 685 686 687 688 689690 691 692 693 694 695 696 697 698 699700 701 702 703 704 705 706 707 708 709710 711 712 713 714 715 716 717 718 719720 721 722 723 724 725 726 727 728 729730 731 732 733 734 735 736 737 738 739740 741 742 743 744 745 746 747 748 749750 751 752 753 754 755 75
 6 757 758 759760 761 762 763 764 765 766 767 768 769770 771 772 773 774 775 776 777 778 779780 781 782 783 784 785 786 787 788 789790 791 792 793 794 795 796 797 798 799800 801 802 803 804 805 806 807 808 809810 811 812 813 814 815 816 817 818 819820 821 822 823 824 825 826 827 828 829830 831 832 833 834 835 836 837 838 839840 841 842 843 844 845 846 847 848 849850 851 852 853 854 855 856 857 858 859860 861 862 863 864 865 866 867 868 869870 871 872 873 874 875 876 877 878 879880 881 882 883 884 885 886 887 888 889890 891 892 893 894 895 896 897 898 899900 901 902 903 904 905 906 907 908 909910 911 912 913 914 915 916 917 918 919920 921 922 923 924 925 926 927 928 929930 931 932 933 934 935 936 937 938 939940 941 942 943 944 945 946 947 948 949950 951 952 953 954 955 956 957 958 959960 961 962 963 964 965 966 967 968 969970 971 972 973 974 975 976 977 978 979980 981 982 983 984 985 986 987 988 989990 991 992 993 994 995 996 997 998 999' as long_query
 Query	set global general_log = off
 deallocate prepare long_query;
-set global general_log = @saved_general_log;
+set global general_log = @old_general_log;
 DROP TABLE IF EXISTS log_count;
 DROP TABLE IF EXISTS slow_log_copy;
 DROP TABLE IF EXISTS general_log_copy;
@@ -892,8 +896,7 @@ TIMESTAMP	1	1	SELECT SQL_NO_CACHE 'Bug#3
 TIMESTAMP	1	1	SELECT SQL_NO_CACHE 'Bug#31700 - PK',  f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f1=2
 DROP TABLE t1;
 TRUNCATE TABLE mysql.slow_log;
-SET GLOBAL log_output= @saved_log_output;
-SET GLOBAL slow_query_log = @saved_slow_query_log;
-SET GLOBAL general_log=@saved_general_log;
-SET SESSION long_query_time =@saved_long_query_time;
-SET GLOBAL LOG_OUTPUT = @saved_log_output;
+SET @@session.long_query_time= @old_long_query_time;
+SET @@global.log_output=       @old_log_output;
+SET @@global.slow_query_log=   @old_slow_query_log;
+SET @@global.general_log=      @old_general_log;

=== modified file 'mysql-test/r/mysql_client_test.result'
--- a/mysql-test/r/mysql_client_test.result	2005-12-06 20:28:13 +0000
+++ b/mysql-test/r/mysql_client_test.result	2008-11-13 19:19:00 +0000
@@ -1 +1,3 @@
+SET @old_general_log= @@global.general_log;
 ok
+SET @@global.general_log= @old_general_log;

=== modified file 'mysql-test/r/partition.result'
--- a/mysql-test/r/partition.result	2008-11-06 16:18:25 +0000
+++ b/mysql-test/r/partition.result	2008-11-13 19:40:36 +0000
@@ -1,3 +1,4 @@
+SET @old_general_log= @@global.general_log;
 drop table if exists t1, t2;
 CREATE TABLE t1 (a INT)
 ENGINE=NonExistentEngine;
@@ -1947,3 +1948,4 @@ count(*)
 288
 drop table t1;
 End of 5.1 tests
+SET @@global.general_log= @old_general_log;

=== modified file 'mysql-test/r/status.result'
--- a/mysql-test/r/status.result	2008-11-12 15:23:22 +0000
+++ b/mysql-test/r/status.result	2008-11-13 19:40:36 +0000
@@ -209,6 +209,8 @@ ERROR 42000: SELECT command denied to us
 drop database db37908;
 drop procedure proc37908;
 drop function func37908;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost;
+DROP USER mysqltest_1@localhost;
 DROP VIEW IF EXISTS v1;
 CREATE VIEW v1 AS SELECT VARIABLE_NAME AS NAME, CONVERT(VARIABLE_VALUE, UNSIGNED) AS VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS;
 SELECT VALUE INTO @tc FROM v1 WHERE NAME = 'Threads_connected';

=== modified file 'mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result'
--- a/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result	2008-03-29 22:54:08 +0000
+++ b/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result	2008-11-13 19:19:00 +0000
@@ -1,3 +1,4 @@
+SET @old_relay_log_purge= @@global.relay_log_purge;
 change master to
 MASTER_HOST='dummy.localdomain',
 RELAY_LOG_FILE='slave-relay-bin.000001',
@@ -37,3 +38,4 @@ DROP PROCEDURE IF EXISTS p2;
 DROP FUNCTION IF EXISTS f1;
 DROP TRIGGER IF EXISTS tr1;
 stop slave sql_thread;
+SET @@global.relay_log_purge= @old_relay_log_purge;

=== modified file 'mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test'
--- a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test	2008-07-10 16:09:39 +0000
+++ b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test	2008-11-13 19:19:00 +0000
@@ -17,6 +17,10 @@
 
 source include/have_log_bin.inc;
 
+# Need to restore this at the end; CHANGE MASTER modifies it (see the
+# manual for CHANGE MASTER).
+SET @old_relay_log_purge= @@global.relay_log_purge;
+
 let $MYSQLD_DATADIR= `select @@datadir`;
 
 copy_file $MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 $MYSQLD_DATADIR/slave-relay-bin.000001;
@@ -51,6 +55,6 @@ enable_warnings;
 remove_file $MYSQLD_DATADIR/slave-relay-bin.000001;
 remove_file $MYSQLD_DATADIR/slave-relay-bin.index;
 stop slave sql_thread;
-let $slave_keep_connection=1;
 source include/wait_for_slave_sql_to_stop.inc;
 
+SET @@global.relay_log_purge= @old_relay_log_purge;

=== modified file 'mysql-test/suite/rpl/r/rpl_alter_db.result'
--- a/mysql-test/suite/rpl/r/rpl_alter_db.result	2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/r/rpl_alter_db.result	2008-11-13 19:19:00 +0000
@@ -4,5 +4,9 @@ reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
-use mysql;
+==== Verify that alter database does not stop replication ====
+create database temp_db;
+use temp_db;
 alter database collate latin1_bin;
+==== Clean up ====
+drop database temp_db;

=== modified file 'mysql-test/suite/rpl/r/rpl_drop_db.result'
--- a/mysql-test/suite/rpl/r/rpl_drop_db.result	2008-06-22 20:05:19 +0000
+++ b/mysql-test/suite/rpl/r/rpl_drop_db.result	2008-11-13 19:40:36 +0000
@@ -33,6 +33,5 @@ n
 1234
 use test;
 drop table t1;
-stop slave;
-drop database mysqltest1;
 drop database mysqltest1;
+include/stop_slave.inc

=== modified file 'mysql-test/suite/rpl/r/rpl_drop_view.result'
--- a/mysql-test/suite/rpl/r/rpl_drop_view.result	2008-10-07 10:26:19 +0000
+++ b/mysql-test/suite/rpl/r/rpl_drop_view.result	2008-11-13 19:40:36 +0000
@@ -25,4 +25,5 @@ select * from v2;
 ERROR 42S02: Table 'test.v2' doesn't exist
 select * from v3;
 ERROR 42S02: Table 'test.v3' doesn't exist
+==== clean up ====
 drop table t1, t2, t3;

=== modified file 'mysql-test/suite/rpl/r/rpl_events.result'
--- a/mysql-test/suite/rpl/r/rpl_events.result	2008-11-12 15:23:22 +0000
+++ b/mysql-test/suite/rpl/r/rpl_events.result	2008-11-13 19:40:36 +0000
@@ -1,10 +1,11 @@
-set global event_scheduler=1;
 stop slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
+SET @old_event_scheduler = @@global.event_scheduler;
+set global event_scheduler=1;
 set binlog_format=row;
 DROP EVENT IF EXISTS test.justonce;
 drop table if exists t1,t2;
@@ -190,4 +191,5 @@ select * from t28953;
 END;|
 ALTER EVENT event1 RENAME TO event2;
 DROP EVENT event2;
+SET @@global.event_scheduler= @old_event_scheduler;
 DROP TABLE t28953;

=== modified file 'mysql-test/suite/rpl/r/rpl_idempotency.result'
--- a/mysql-test/suite/rpl/r/rpl_idempotency.result	2008-10-13 18:33:08 +0000
+++ b/mysql-test/suite/rpl/r/rpl_idempotency.result	2008-11-13 19:19:00 +0000
@@ -6,6 +6,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: 1032");
 call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
+SET @old_slave_exec_mode= @@global.slave_exec_mode;
 CREATE TABLE t1 (a INT PRIMARY KEY);
 CREATE TABLE t2 (a INT);
 INSERT INTO t1 VALUES (-1),(-2),(-3);
@@ -222,7 +223,7 @@ Last_SQL_Error
 0
 set global slave_exec_mode='IDEMPOTENT';
 start slave sql_thread;
-set global slave_exec_mode='STRICT';
+SET @@global.slave_exec_mode= @old_slave_exec_mode;
 set @@session.binlog_format= @save_binlog_format;
 drop table t1,t2,ti2,ti1;
 *** end of tests

=== modified file 'mysql-test/suite/rpl/r/rpl_ignore_table.result'
--- a/mysql-test/suite/rpl/r/rpl_ignore_table.result	2007-12-12 19:12:29 +0000
+++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result	2008-11-13 19:19:00 +0000
@@ -116,7 +116,8 @@ show grants for mysqltest4@localhost;
 Grants for mysqltest4@localhost
 GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
 set global slave_exec_mode='IDEMPOTENT';
-drop table t1, t4, mysqltest2.t2;
+drop table t1, mysqltest2.t2;
+drop table t4;
 drop database mysqltest2;
 delete from mysql.user where user like "mysqltest%";
 delete from mysql.db where user like "mysqltest%";

=== modified file 'mysql-test/suite/rpl/r/rpl_loaddata.result'
--- a/mysql-test/suite/rpl/r/rpl_loaddata.result	2008-07-17 19:11:37 +0000
+++ b/mysql-test/suite/rpl/r/rpl_loaddata.result	2008-11-13 19:40:36 +0000
@@ -194,9 +194,8 @@ load data infile '../../std_data/rpl_loa
 terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
 '\n##\n' starting by '>' ignore 1 lines;
 ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
-drop table t2;
-drop table t2;
-drop table t1;
+drop table t1, t2;
+drop table t1, t2;
 CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
 LOAD DATA INFILE "../../std_data/words.dat" INTO TABLE t1;
 ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY'

=== modified file 'mysql-test/suite/rpl/r/rpl_packet.result'
--- a/mysql-test/suite/rpl/r/rpl_packet.result	2008-10-07 14:26:14 +0000
+++ b/mysql-test/suite/rpl/r/rpl_packet.result	2008-11-13 19:40:36 +0000
@@ -31,46 +31,9 @@ include/stop_slave.inc
 include/start_slave.inc
 CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
 INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048');
-show slave status;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	MASTER_MYPORT
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	No
-Slave_SQL_Running	#
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	0
-Last_Error	
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	0
-Last_SQL_Error	
-Replicate_Ignore_Server_Ids	
-Master_Server_Id	1
-drop table t1;
-drop table t1;
+Slave_IO_Running = No (expect No)
+==== clean up ====
+DROP TABLE t1;
+SET @@global.max_allowed_packet= 1024;
+SET @@global.net_buffer_length= 1024;
+DROP TABLE t1;

=== modified file 'mysql-test/suite/rpl/r/rpl_row_max_relay_size.result'
--- a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result	2008-07-17 19:11:37 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result	2008-11-13 19:40:36 +0000
@@ -1,5 +1,3 @@
-SET SESSION BINLOG_FORMAT=ROW;
-SET GLOBAL BINLOG_FORMAT=ROW;
 stop slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 reset master;

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_EE_err2.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result	2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result	2008-11-13 19:19:00 +0000
@@ -11,3 +11,6 @@ set sql_log_bin=1;
 insert into t1 values(1),(2);
 ERROR 23000: Duplicate entry '2' for key 'a'
 drop table t1;
+Error: "Query caused different errors on master and slave.     Error on master: 'Duplicate entry '%-.192s' for key %d' (1062), Error on slave: 'no error' (0). Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
+Errno: "0" (expected 0)
+drop table t1;

=== modified file 'mysql-test/suite/rpl/r/rpl_truncate_2myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result	2008-03-28 12:16:41 +0000
+++ b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result	2008-11-13 19:19:00 +0000
@@ -10,6 +10,8 @@ DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
 SET SESSION BINLOG_FORMAT=STATEMENT;
 SET GLOBAL  BINLOG_FORMAT=STATEMENT;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
@@ -42,12 +44,16 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; TRUNCATE TABLE t1
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
 STOP SLAVE;
 DROP TABLE IF EXISTS t1;
 DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
 SET SESSION BINLOG_FORMAT=MIXED;
 SET GLOBAL  BINLOG_FORMAT=MIXED;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
@@ -80,12 +86,16 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; TRUNCATE TABLE t1
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
 STOP SLAVE;
 DROP TABLE IF EXISTS t1;
 DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
 SET SESSION BINLOG_FORMAT=ROW;
 SET GLOBAL  BINLOG_FORMAT=ROW;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
@@ -121,12 +131,16 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; TRUNCATE TABLE t1
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
 STOP SLAVE;
 DROP TABLE IF EXISTS t1;
 DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
 SET SESSION BINLOG_FORMAT=STATEMENT;
 SET GLOBAL  BINLOG_FORMAT=STATEMENT;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
@@ -159,12 +173,16 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; DELETE FROM t1
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
 STOP SLAVE;
 DROP TABLE IF EXISTS t1;
 DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
 SET SESSION BINLOG_FORMAT=MIXED;
 SET GLOBAL  BINLOG_FORMAT=MIXED;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
@@ -197,12 +215,16 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	use `test`; DELETE FROM t1
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
 STOP SLAVE;
 DROP TABLE IF EXISTS t1;
 DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
 SET SESSION BINLOG_FORMAT=ROW;
 SET GLOBAL  BINLOG_FORMAT=ROW;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
@@ -242,3 +264,5 @@ master-bin.000001	#	Delete_rows	#	#	tabl
 master-bin.000001	#	Query	#	#	use `test`; COMMIT
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;

=== modified file 'mysql-test/suite/rpl/r/rpl_truncate_3innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result	2007-12-14 13:40:45 +0000
+++ b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result	2008-11-13 19:19:00 +0000
@@ -10,6 +10,8 @@ DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
 SET SESSION BINLOG_FORMAT=STATEMENT;
 SET GLOBAL  BINLOG_FORMAT=STATEMENT;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
@@ -46,12 +48,16 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
 STOP SLAVE;
 DROP TABLE IF EXISTS t1;
 DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
 SET SESSION BINLOG_FORMAT=MIXED;
 SET GLOBAL  BINLOG_FORMAT=MIXED;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
@@ -88,12 +94,16 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
 STOP SLAVE;
 DROP TABLE IF EXISTS t1;
 DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
 SET SESSION BINLOG_FORMAT=ROW;
 SET GLOBAL  BINLOG_FORMAT=ROW;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
@@ -131,12 +141,16 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
 STOP SLAVE;
 DROP TABLE IF EXISTS t1;
 DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
 SET SESSION BINLOG_FORMAT=STATEMENT;
 SET GLOBAL  BINLOG_FORMAT=STATEMENT;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
@@ -173,12 +187,16 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
 STOP SLAVE;
 DROP TABLE IF EXISTS t1;
 DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
 SET SESSION BINLOG_FORMAT=MIXED;
 SET GLOBAL  BINLOG_FORMAT=MIXED;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
@@ -215,12 +233,16 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;
 STOP SLAVE;
 DROP TABLE IF EXISTS t1;
 DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
+SET @old_session_binlog_format= @@session.binlog_format;
+SET @old_global_binlog_format= @@global.binlog_format;
 SET SESSION BINLOG_FORMAT=ROW;
 SET GLOBAL  BINLOG_FORMAT=ROW;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
@@ -260,3 +282,5 @@ master-bin.000001	#	Delete_rows	#	#	tabl
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;
+SET @@session.binlog_format= @old_session_binlog_format;
+SET @@global.binlog_format= @old_global_binlog_format;

=== modified file 'mysql-test/suite/rpl/t/rpl_alter_db.test'
--- a/mysql-test/suite/rpl/t/rpl_alter_db.test	2008-06-22 20:05:19 +0000
+++ b/mysql-test/suite/rpl/t/rpl_alter_db.test	2008-11-13 19:40:36 +0000
@@ -1,5 +1,14 @@
 source include/master-slave.inc;
-connection master;
-use mysql; # to be different from initial `test' db of mysqltest client
+
+--echo ==== Verify that alter database does not stop replication ====
+
+create database temp_db;
+use temp_db; # to be different from initial `test' db of mysqltest client
 alter database collate latin1_bin;
+
+sync_slave_with_master;
+
+--echo ==== Clean up ====
+connection master;
+drop database temp_db;
 sync_slave_with_master;

=== modified file 'mysql-test/suite/rpl/t/rpl_drop_db.test'
--- a/mysql-test/suite/rpl/t/rpl_drop_db.test	2008-06-22 20:05:19 +0000
+++ b/mysql-test/suite/rpl/t/rpl_drop_db.test	2008-11-13 19:40:36 +0000
@@ -48,17 +48,14 @@ select * from t1;
 
 #cleanup
 connection master;
-use test;
-drop table t1;
-sync_slave_with_master;
-stop slave;
---source include/wait_for_slave_to_stop.inc
-drop database mysqltest1;
 
-connection master;
 # Remove the "extra" file created above
 let $MYSQLD_DATADIR= `select @@datadir`;
---remove_file $MYSQLD_DATADIR/mysqltest1/f1.txt
-drop database mysqltest1;
+remove_file $MYSQLD_DATADIR/mysqltest1/f1.txt;
 
+use test;
+drop table t1;
+drop database mysqltest1;
 
+sync_slave_with_master;
+source include/stop_slave.inc;

=== modified file 'mysql-test/suite/rpl/t/rpl_drop_view.test'
--- a/mysql-test/suite/rpl/t/rpl_drop_view.test	2008-10-07 10:26:19 +0000
+++ b/mysql-test/suite/rpl/t/rpl_drop_view.test	2008-11-13 19:40:36 +0000
@@ -28,6 +28,7 @@ select * from v2;
 --error 1146
 select * from v3;
 
+--echo ==== clean up ====
 connection master;
 drop table t1, t2, t3;
 sync_slave_with_master;

=== modified file 'mysql-test/suite/rpl/t/rpl_events.test'
--- a/mysql-test/suite/rpl/t/rpl_events.test	2008-02-14 09:53:12 +0000
+++ b/mysql-test/suite/rpl/t/rpl_events.test	2008-11-13 19:19:00 +0000
@@ -5,11 +5,12 @@
 # in both row based and statement based format                   #
 ##################################################################
 
-set global event_scheduler=1;
-
 --source include/not_embedded.inc
 --source include/master-slave.inc
 
+SET @old_event_scheduler = @@global.event_scheduler;
+set global event_scheduler=1;
+
 let $engine_type= MyISAM;
 
 set binlog_format=row;
@@ -51,5 +52,6 @@ sync_slave_with_master;
 # that there is no bad timing cauing it to try to access the table.
 
 connection master;
+SET @@global.event_scheduler= @old_event_scheduler;
 DROP TABLE t28953;
 sync_slave_with_master;

=== modified file 'mysql-test/suite/rpl/t/rpl_idempotency.test'
--- a/mysql-test/suite/rpl/t/rpl_idempotency.test	2008-10-13 18:33:08 +0000
+++ b/mysql-test/suite/rpl/t/rpl_idempotency.test	2008-11-13 19:19:00 +0000
@@ -11,6 +11,8 @@ source include/have_innodb.inc;
 call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: 1032");
 call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
 
+SET @old_slave_exec_mode= @@global.slave_exec_mode;
+
 connection master;
 CREATE TABLE t1 (a INT PRIMARY KEY);
 CREATE TABLE t2 (a INT);
@@ -388,7 +390,7 @@ start slave sql_thread;
 connection master;
 sync_slave_with_master;
 #connection slave;
-set global slave_exec_mode='STRICT';
+SET @@global.slave_exec_mode= @old_slave_exec_mode;
 
 # cleanup for bug#31609 tests
 
@@ -399,12 +401,3 @@ drop table t1,t2,ti2,ti1;
 --source include/master-slave-end.inc
 
 --echo *** end of tests
-
-
-
-
-
-
-
-
-

=== modified file 'mysql-test/suite/rpl/t/rpl_ignore_table.test'
--- a/mysql-test/suite/rpl/t/rpl_ignore_table.test	2007-12-12 19:12:29 +0000
+++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test	2008-11-13 19:19:00 +0000
@@ -127,7 +127,8 @@ show grants for mysqltest4@localhost;
 set global slave_exec_mode='IDEMPOTENT';
 
 connection master;
-drop table t1, t4, mysqltest2.t2;
+drop table t1, mysqltest2.t2;
+drop table t4;
 drop database mysqltest2;
 delete from mysql.user where user like "mysqltest%";
 delete from mysql.db where user like "mysqltest%";

=== modified file 'mysql-test/suite/rpl/t/rpl_packet.test'
--- a/mysql-test/suite/rpl/t/rpl_packet.test	2008-10-07 14:26:14 +0000
+++ b/mysql-test/suite/rpl/t/rpl_packet.test	2008-11-13 19:40:36 +0000
@@ -13,6 +13,8 @@ enable_warnings;
 eval create database $db;
 
 connection master;
+let $old_max_allowed_packet= `SELECT @@global.max_allowed_packet`;
+let $old_net_buffer_length= `SELECT @@global.net_buffer_length`;
 SET @@global.max_allowed_packet=1024;
 SET @@global.net_buffer_length=1024;
 
@@ -72,16 +74,18 @@ INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaa
 
 # The slave I/O thread must stop after trying to read the above event
 connection slave;
---source include/wait_for_slave_io_to_stop.inc 
---replace_result $MASTER_MYPORT MASTER_MYPORT
-# important is only the 11th column Slave_IO_Running
---replace_column 1 # 7 # 8 # 9 # 12 # 22 # 23 # 33 # 35 # 36 #
-query_vertical show slave status;
+--source include/wait_for_slave_io_to_stop.inc
+let $slave_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1);
+--echo Slave_IO_Running = $slave_io_running (expect No)
 
-# Cleaning up
+
+--echo ==== clean up ====
 connection master;
-drop table t1;
+DROP TABLE t1;
+eval SET @@global.max_allowed_packet= $old_max_allowed_packet;
+eval SET @@global.net_buffer_length= $old_net_buffer_length;
+# slave is stopped
 connection slave;
-drop table t1;
+DROP TABLE t1;
 
 # End of tests

=== modified file 'mysql-test/suite/rpl/t/rpl_row_max_relay_size.test'
--- a/mysql-test/suite/rpl/t/rpl_row_max_relay_size.test	2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_max_relay_size.test	2008-11-13 19:19:00 +0000
@@ -4,8 +4,7 @@
 # Test of manual relay log rotation with FLUSH LOGS.
 
 # Requires statement logging
--- source include/not_ndb_default.inc
-SET SESSION BINLOG_FORMAT=ROW;
-SET GLOBAL BINLOG_FORMAT=ROW;
--- source extra/rpl_tests/rpl_max_relay_size.test
+source include/not_ndb_default.inc;
+source include/have_binlog_format_row.inc;
 
+source extra/rpl_tests/rpl_max_relay_size.test;

=== modified file 'mysql-test/suite/rpl_ndb_big/r/rpl_ndb_2other.result'
--- a/mysql-test/suite/rpl_ndb_big/r/rpl_ndb_2other.result	2008-09-11 08:01:28 +0000
+++ b/mysql-test/suite/rpl_ndb_big/r/rpl_ndb_2other.result	2008-11-13 19:40:36 +0000
@@ -8,6 +8,7 @@ SET storage_engine=ndb;
 
 === NDB -> MYISAM ===
 
+set @old_slave_exec_mode= @@global.slave_exec_mode;
 set @@global.slave_exec_mode= 'IDEMPOTENT';
 CREATE TABLE mysql.ndb_apply_status
 ( server_id INT UNSIGNED NOT NULL,
@@ -803,3 +804,4 @@ TRUNCATE TABLE t1;
 --- Do Cleanup --
 DROP TABLE IF EXISTS t1;
 drop table mysql.ndb_apply_status;
+set @@global.slave_exec_mode= @old_slave_exec_mode;

=== modified file 'mysql-test/suite/rpl_ndb_big/r/rpl_ndb_ctype_ucs2_def.result'
--- a/mysql-test/suite/rpl_ndb_big/r/rpl_ndb_ctype_ucs2_def.result	2008-09-11 08:01:28 +0000
+++ b/mysql-test/suite/rpl_ndb_big/r/rpl_ndb_ctype_ucs2_def.result	2008-11-13 19:40:36 +0000
@@ -11,8 +11,6 @@ show variables like "%character_set_ser%
 Variable_name	Value
 character_set_server	ucs2
 DROP TABLE IF EXISTS t1;
-create table t1 (a int) ENGINE=NDB;
-drop table t1;
 CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0',
 `nom` char(4) default NULL,
 `prenom` char(4) default NULL,
@@ -25,3 +23,5 @@ nid	nom	prenom
 select * from t1 order by nid;
 nid	nom	prenom
 1	XYZ1	ABC1
+==== clean up ====
+DROP TABLE t1;

=== modified file 'mysql-test/suite/rpl_ndb_big/r/rpl_ndb_multi.result'
--- a/mysql-test/suite/rpl_ndb_big/r/rpl_ndb_multi.result	2008-10-29 08:45:14 +0000
+++ b/mysql-test/suite/rpl_ndb_big/r/rpl_ndb_multi.result	2008-11-13 19:40:36 +0000
@@ -52,4 +52,6 @@ c1	c2	c3
 row3	C	3
 row4	D	4
 row5	E	5
+==== clean up ====
+DROP TABLE t1;
 STOP SLAVE;

=== modified file 'mysql-test/suite/rpl_ndb_big/t/rpl_ndb_2other.test'
--- a/mysql-test/suite/rpl_ndb_big/t/rpl_ndb_2other.test	2008-10-29 08:45:14 +0000
+++ b/mysql-test/suite/rpl_ndb_big/t/rpl_ndb_2other.test	2008-11-13 19:40:36 +0000
@@ -25,6 +25,7 @@ remove_file $datadir/mysql/ndb_apply_sta
 --error 0,1
 remove_file $datadir/mysql/ndb_apply_status.ndb;
 
+set @old_slave_exec_mode= @@global.slave_exec_mode;
 set @@global.slave_exec_mode= 'IDEMPOTENT';
 CREATE TABLE mysql.ndb_apply_status
                    ( server_id INT UNSIGNED NOT NULL,
@@ -46,3 +47,4 @@ SET storage_engine=innodb;
 
 connection slave;
 drop table mysql.ndb_apply_status;
+set @@global.slave_exec_mode= @old_slave_exec_mode;

=== modified file 'mysql-test/suite/rpl_ndb_big/t/rpl_ndb_ctype_ucs2_def.test'
--- a/mysql-test/suite/rpl_ndb_big/t/rpl_ndb_ctype_ucs2_def.test	2008-09-11 08:01:28 +0000
+++ b/mysql-test/suite/rpl_ndb_big/t/rpl_ndb_ctype_ucs2_def.test	2008-11-13 19:40:36 +0000
@@ -22,10 +22,7 @@ show variables like "%character_set_ser%
 --disable_warnings
 DROP TABLE IF EXISTS t1;
 --enable_warnings
-create table t1 (a int) ENGINE=NDB;
-drop table t1;
 
---connection master
 CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0',
                     `nom` char(4) default NULL,
                     `prenom` char(4) default NULL,
@@ -35,8 +32,12 @@ CREATE TABLE `t1` ( `nid` int(11) NOT NU
 INSERT INTO t1 VALUES(1,"XYZ1","ABC1");
 select * from t1 order by nid;
 
---sync_slave_with_master
+sync_slave_with_master;
 # connect to slave and ensure data it there.
---connection slave
+connection slave;
 select * from t1 order by nid;
 
+--echo ==== clean up ====
+connection master;
+DROP TABLE t1;
+sync_slave_with_master;

=== modified file 'mysql-test/suite/rpl_ndb_big/t/rpl_ndb_multi.test'
--- a/mysql-test/suite/rpl_ndb_big/t/rpl_ndb_multi.test	2008-09-11 08:01:28 +0000
+++ b/mysql-test/suite/rpl_ndb_big/t/rpl_ndb_multi.test	2008-11-13 19:40:36 +0000
@@ -64,4 +64,9 @@ sync_slave_with_master;
 connection slave;
 SELECT * FROM t1 ORDER BY c3;
 
+--echo ==== clean up ====
+connection server2;
+DROP TABLE t1;
+sync_slave_with_master;
+
 STOP SLAVE;

=== modified file 'mysql-test/t/innodb-autoinc-optimize.test'
--- a/mysql-test/t/innodb-autoinc-optimize.test	2008-08-20 10:29:58 +0000
+++ b/mysql-test/t/innodb-autoinc-optimize.test	2008-11-13 19:40:36 +0000
@@ -14,3 +14,6 @@ insert into t1 set a = -1;
 # NOTE: The database needs to be shutdown and restarted (here) for
 # the test to work. It's included for reference only.
 optimize table t1;
+
+--echo ==== clean up ====
+DROP TABLE t1;

=== modified file 'mysql-test/t/innodb.test'
--- a/mysql-test/t/innodb.test	2008-10-29 09:52:46 +0000
+++ b/mysql-test/t/innodb.test	2008-11-13 19:40:36 +0000
@@ -1284,6 +1284,7 @@ set global innodb_sync_spin_loops=20;
 show variables like "innodb_sync_spin_loops";
 
 # Test for innodb_thread_concurrency variable
+SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency;
 show variables like "innodb_thread_concurrency";
 set global innodb_thread_concurrency=1001;
 show variables like "innodb_thread_concurrency";
@@ -1291,6 +1292,7 @@ set global innodb_thread_concurrency=0;
 show variables like "innodb_thread_concurrency";
 set global innodb_thread_concurrency=16;
 show variables like "innodb_thread_concurrency";
+SET @@global.innodb_thread_concurrency= @old_innodb_thread_concurrency;
 
 # Test for innodb_concurrency_tickets variable
 show variables like "innodb_concurrency_tickets";

=== modified file 'mysql-test/t/log_tables.test'
--- a/mysql-test/t/log_tables.test	2008-11-12 20:04:19 +0000
+++ b/mysql-test/t/log_tables.test	2008-11-13 19:40:36 +0000
@@ -7,6 +7,12 @@
 # check that CSV engine was compiled in
 --source include/have_csv.inc
 
+SET @old_general_log_state = @@global.general_log;
+SET @old_log_output=       @@global.log_output;
+SET @old_slow_query_log=   @@global.slow_query_log;
+SET @old_general_log=      @@global.general_log;
+SET @old_long_query_time=  @@session.long_query_time;
+
 --disable_ps_protocol
 use mysql;
 
@@ -469,7 +475,6 @@ use test;
 #            AUTO_INCREMENT numbers)
 #
 
-SET @saved_log_output= @@global.log_output;
 SET GLOBAL LOG_OUTPUT = 'TABLE';
 
 ## test the general log
@@ -533,8 +538,8 @@ FLUSH LOGS;
 ALTER TABLE mysql.slow_log DROP COLUMN seq;
 ALTER TABLE mysql.slow_log ENGINE = CSV;
 
-SET GLOBAL general_log = @saved_general_log;
-SET GLOBAL slow_query_log = @saved_slow_query_log;
+SET GLOBAL general_log = @old_general_log;
+SET GLOBAL slow_query_log = @old_slow_query_log;
 
 #
 # Bug#25422 (Hang with log tables)
@@ -838,8 +843,8 @@ DROP PROCEDURE IF EXISTS `db_17876.archi
 DROP PROCEDURE IF EXISTS `db_17876.archiveGeneralLog`;
 DROP DATABASE IF EXISTS `db_17876`;
 
-SET GLOBAL general_log = @saved_general_log;
-SET GLOBAL slow_query_log = @saved_slow_query_log;
+SET GLOBAL general_log = @old_general_log;
+SET GLOBAL slow_query_log = @old_slow_query_log;
 
 #
 # Bug#21557 entries in the general query log truncated at 1000 characters.
@@ -957,7 +962,7 @@ execute long_query using @lparam;
 set global general_log = off;
 select command_type, argument from mysql.general_log where thread_id = @thread_id;
 deallocate prepare long_query;
-set global general_log = @saved_general_log;
+set global general_log = @old_general_log;
 
 #
 # Bug#34306: Can't make copy of log tables when server binary log is enabled
@@ -1029,9 +1034,8 @@ DROP TABLE t1;
 
 TRUNCATE TABLE mysql.slow_log;
 
-# RESET altered system variables before exiting the test
-SET GLOBAL log_output= @saved_log_output;
-SET GLOBAL slow_query_log = @saved_slow_query_log;
-SET GLOBAL general_log=@saved_general_log;
-SET SESSION long_query_time =@saved_long_query_time;
-SET GLOBAL LOG_OUTPUT = @saved_log_output;
+SET @@session.long_query_time= @old_long_query_time;
+
+SET @@global.log_output=       @old_log_output;
+SET @@global.slow_query_log=   @old_slow_query_log;
+SET @@global.general_log=      @old_general_log;

=== modified file 'mysql-test/t/mysql_client_test.test'
--- a/mysql-test/t/mysql_client_test.test	2008-03-04 13:33:07 +0000
+++ b/mysql-test/t/mysql_client_test.test	2008-11-13 19:19:00 +0000
@@ -1,6 +1,8 @@
 # This test should work in embedded server after we fix mysqltest
 -- source include/not_embedded.inc
 
+SET @old_general_log= @@global.general_log;
+
 # We run with different binaries for normal and --embedded-server
 #
 # If this test fails with "command "$MYSQL_CLIENT_TEST" failed",
@@ -14,3 +16,4 @@
 # End of 4.1 tests
 echo ok;
 
+SET @@global.general_log= @old_general_log;

=== modified file 'mysql-test/t/partition.test'
--- a/mysql-test/t/partition.test	2008-11-12 20:04:19 +0000
+++ b/mysql-test/t/partition.test	2008-11-13 19:40:36 +0000
@@ -10,6 +10,8 @@
 #
 --source include/have_partition.inc
 
+SET @old_general_log= @@global.general_log;
+
 --disable_warnings
 drop table if exists t1, t2;
 --enable_warnings
@@ -1944,3 +1946,6 @@ select count(*) from t1;
 drop table t1;
 
 --echo End of 5.1 tests
+
+
+SET @@global.general_log= @old_general_log;

=== modified file 'mysql-test/t/status.test'
--- a/mysql-test/t/status.test	2008-11-12 15:23:22 +0000
+++ b/mysql-test/t/status.test	2008-11-13 19:40:36 +0000
@@ -287,10 +287,15 @@ show procedure status where name ='proc3
 --error 1142
 show function status where name ='func37908' and 1 in (select func37908());
 
-connection root;
+connection default;
+disconnect con1;
+disconnect user1;
+disconnect root;
 drop database db37908;
 drop procedure proc37908;
 drop function func37908;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost;
+DROP USER mysqltest_1@localhost;
 # End of 5.1 tests
 
 #

Thread
bzr push into mysql-6.0-rpl branch (sven:2724 to 2725) Bug#38350Sven Sandberg13 Nov