2778 Mats Kindahl 2008-12-08 [merge]
Merging patch with 5.1-bugteam.
removed:
mysql-test/include/wait_condition.inc.moved
mysql-test/suite/funcs_1/r/ndb_trig_0102.result.moved
mysql-test/suite/funcs_1/r/ndb_trig_03.result.moved
mysql-test/suite/funcs_1/r/ndb_trig_0407.result.moved
mysql-test/suite/funcs_1/r/ndb_trig_08.result.moved
mysql-test/suite/funcs_1/r/ndb_trig_09.result.moved
mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result.moved
mysql-test/suite/funcs_1/t/ndb_trig_0102.test.moved
mysql-test/suite/funcs_1/t/ndb_trig_03.test.moved
mysql-test/suite/funcs_1/t/ndb_trig_0407.test.moved
mysql-test/suite/funcs_1/t/ndb_trig_08.test.moved
mysql-test/suite/funcs_1/t/ndb_trig_09.test.moved
mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test.moved
mysql-test/suite/rpl/r/rpl_redirect.result
mysql-test/suite/rpl/r/rpl_row_stop_middle.result
mysql-test/suite/rpl/t/rpl_redirect.test
mysql-test/suite/rpl/t/rpl_row_stop_middle.test
added:
mysql-test/r/csv_alter_table.result
mysql-test/r/ctype_filesystem.result
mysql-test/r/multi_update2.result
mysql-test/r/partition_innodb_stmt.result
mysql-test/r/perror-win.result
mysql-test/r/timestamp_sysdate_is_now_func.result
mysql-test/t/ctype_filesystem-master.opt
mysql-test/t/ctype_filesystem.test
mysql-test/t/multi_update2-master.opt
mysql-test/t/multi_update2.test
mysql-test/t/partition_innodb_stmt.test
mysql-test/t/perror-win.test
mysql-test/t/timestamp_sysdate_is_now_func-master.opt
mysql-test/t/timestamp_sysdate_is_now_func.test
sql/MSG00001.bin
sql/message.h
sql/message.rc
modified:
.bzr-mysql/default.conf
.bzrignore
BUILD/SETUP.sh
BUILD/compile-dist
client/mysql.cc
client/mysqlcheck.c
configure.in
dbug/dbug.c
extra/perror.c
extra/yassl/include/cert_wrapper.hpp
extra/yassl/include/openssl/prefix_ssl.h
extra/yassl/include/openssl/ssl.h
extra/yassl/include/yassl_imp.hpp
extra/yassl/include/yassl_int.hpp
extra/yassl/include/yassl_types.hpp
extra/yassl/src/cert_wrapper.cpp
extra/yassl/src/ssl.cpp
extra/yassl/src/yassl_error.cpp
extra/yassl/src/yassl_imp.cpp
extra/yassl/src/yassl_int.cpp
include/Makefile.am
include/my_global.h
include/my_pthread.h
libmysql/libmysql.c
libmysqld/examples/CMakeLists.txt
libmysqld/lib_sql.cc
libmysqld/libmysqld.def
mysql-test/extra/rpl_tests/rpl_insert_id.test
mysql-test/extra/rpl_tests/rpl_row_basic.test
mysql-test/include/check-testcase.test
mysql-test/mysql-test-run.pl
mysql-test/r/alter_table.result
mysql-test/r/create.result
mysql-test/r/ctype_utf8.result
mysql-test/r/events_bugs.result
mysql-test/r/events_scheduling.result
mysql-test/r/events_time_zone.result
mysql-test/r/explain.result
mysql-test/r/federated.result
mysql-test/r/fulltext.result
mysql-test/r/func_compress.result
mysql-test/r/func_group.result
mysql-test/r/func_sapdb.result
mysql-test/r/group_by.result
mysql-test/r/group_concat_max_len_func.result
mysql-test/r/information_schema.result
mysql-test/r/information_schema_part.result
mysql-test/r/innodb_data_home_dir_basic.result
mysql-test/r/innodb_flush_method_basic.result
mysql-test/r/innodb_mysql.result
mysql-test/r/limit.result
mysql-test/r/log_output_func.result
mysql-test/r/log_tables.result
mysql-test/r/max_allowed_packet_basic.result
mysql-test/r/max_allowed_packet_func.result
mysql-test/r/merge.result
mysql-test/r/metadata.result
mysql-test/r/multi_update.result
mysql-test/r/mysqlcheck.result
mysql-test/r/net_buffer_length_basic.result
mysql-test/r/openssl_1.result
mysql-test/r/order_by.result
mysql-test/r/packet.result
mysql-test/r/partition.result
mysql-test/r/partition_archive.result
mysql-test/r/partition_datatype.result
mysql-test/r/partition_innodb.result
mysql-test/r/partition_mgm.result
mysql-test/r/partition_mgm_err.result
mysql-test/r/partition_not_windows.result
mysql-test/r/partition_range.result
mysql-test/r/partition_symlink.result
mysql-test/r/partition_windows.result
mysql-test/r/ps_11bugs.result
mysql-test/r/show_check.result
mysql-test/r/sp.result
mysql-test/r/ssl_capath_basic.result
mysql-test/r/ssl_cipher_basic.result
mysql-test/r/subselect.result
mysql-test/r/subselect3.result
mysql-test/r/symlink.result
mysql-test/r/thread_cache_size_func.result
mysql-test/r/timestamp_func.result
mysql-test/r/timezone2.result
mysql-test/r/timezone3.result
mysql-test/r/type_newdecimal.result
mysql-test/r/union.result
mysql-test/r/update.result
mysql-test/r/variables-notembedded.result
mysql-test/r/variables.result
mysql-test/r/view.result
mysql-test/r/wait_timeout_func.result
mysql-test/r/windows.result
mysql-test/std_data/Moscow_leap
mysql-test/suite/funcs_1/datadict/is_tables.inc
mysql-test/suite/funcs_1/r/is_character_sets.result
mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result
mysql-test/suite/funcs_1/r/is_collations.result
mysql-test/suite/funcs_1/r/is_columns.result
mysql-test/suite/funcs_1/r/is_columns_is.result
mysql-test/suite/funcs_1/r/is_events.result
mysql-test/suite/funcs_1/r/is_routines.result
mysql-test/suite/funcs_1/r/is_schemata.result
mysql-test/suite/funcs_1/r/is_tables.result
mysql-test/suite/funcs_1/r/is_triggers.result
mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc
mysql-test/suite/ndb/r/ndb_partition_key.result
mysql-test/suite/ndb/r/ndb_partition_range.result
mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result
mysql-test/suite/parts/inc/partition_auto_increment.inc
mysql-test/suite/parts/inc/partition_directory.inc
mysql-test/suite/parts/inc/partition_mgm.inc
mysql-test/suite/parts/r/ndb_dd_backuprestore.result
mysql-test/suite/parts/r/part_supported_sql_func_innodb.result
mysql-test/suite/parts/r/part_supported_sql_func_myisam.result
mysql-test/suite/parts/r/part_supported_sql_func_ndb.result
mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result
mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
mysql-test/suite/parts/r/partition_alter1_1_innodb.result
mysql-test/suite/parts/r/partition_alter1_1_myisam.result
mysql-test/suite/parts/r/partition_alter1_2_innodb.result
mysql-test/suite/parts/r/partition_alter1_2_myisam.result
mysql-test/suite/parts/r/partition_alter2_1_innodb.result
mysql-test/suite/parts/r/partition_alter2_1_myisam.result
mysql-test/suite/parts/r/partition_alter2_2_innodb.result
mysql-test/suite/parts/r/partition_alter2_2_myisam.result
mysql-test/suite/parts/r/partition_alter3_innodb.result
mysql-test/suite/parts/r/partition_alter3_myisam.result
mysql-test/suite/parts/r/partition_alter4_innodb.result
mysql-test/suite/parts/r/partition_alter4_myisam.result
mysql-test/suite/parts/r/partition_auto_increment_archive.result
mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
mysql-test/suite/parts/r/partition_auto_increment_innodb.result
mysql-test/suite/parts/r/partition_auto_increment_memory.result
mysql-test/suite/parts/r/partition_auto_increment_myisam.result
mysql-test/suite/parts/r/partition_auto_increment_ndb.result
mysql-test/suite/parts/r/partition_basic_innodb.result
mysql-test/suite/parts/r/partition_basic_myisam.result
mysql-test/suite/parts/r/partition_basic_symlink_innodb.result
mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
mysql-test/suite/parts/r/partition_bit_innodb.result
mysql-test/suite/parts/r/partition_bit_myisam.result
mysql-test/suite/parts/r/partition_bit_ndb.result
mysql-test/suite/parts/r/partition_char_innodb.result
mysql-test/suite/parts/r/partition_char_myisam.result
mysql-test/suite/parts/r/partition_datetime_innodb.result
mysql-test/suite/parts/r/partition_datetime_myisam.result
mysql-test/suite/parts/r/partition_decimal_innodb.result
mysql-test/suite/parts/r/partition_decimal_myisam.result
mysql-test/suite/parts/r/partition_engine_innodb.result
mysql-test/suite/parts/r/partition_engine_myisam.result
mysql-test/suite/parts/r/partition_engine_ndb.result
mysql-test/suite/parts/r/partition_float_innodb.result
mysql-test/suite/parts/r/partition_float_myisam.result
mysql-test/suite/parts/r/partition_int_innodb.result
mysql-test/suite/parts/r/partition_int_myisam.result
mysql-test/suite/parts/r/partition_int_ndb.result
mysql-test/suite/parts/r/partition_mgm_lc0_archive.result
mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result
mysql-test/suite/parts/r/partition_mgm_lc1_archive.result
mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result
mysql-test/suite/parts/r/partition_mgm_lc2_archive.result
mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result
mysql-test/suite/parts/r/partition_mgm_lc2_memory.result
mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result
mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result
mysql-test/suite/parts/r/partition_special_innodb.result
mysql-test/suite/parts/r/partition_special_myisam.result
mysql-test/suite/parts/r/partition_syntax_innodb.result
mysql-test/suite/parts/r/partition_syntax_myisam.result
mysql-test/suite/parts/r/rpl_partition.result
mysql-test/suite/parts/t/partition_mgm_lc0_archive.test
mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
mysql-test/suite/rpl/r/rpl_insert_id.result
mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
mysql-test/suite/rpl/r/rpl_row_basic_8partition.result
mysql-test/suite/rpl/t/disabled.def
mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result
mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result
mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result
mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result
mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result
mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result
mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
mysql-test/t/alter_table.test
mysql-test/t/ctype_utf8.test
mysql-test/t/disabled.def
mysql-test/t/events_bugs.test
mysql-test/t/events_scheduling.test
mysql-test/t/events_time_zone.test
mysql-test/t/explain.test
mysql-test/t/federated.test
mysql-test/t/federated_innodb.test
mysql-test/t/fulltext.test
mysql-test/t/func_compress.test
mysql-test/t/func_group.test
mysql-test/t/func_sapdb.test
mysql-test/t/group_by.test
mysql-test/t/group_concat_max_len_func.test
mysql-test/t/information_schema.test
mysql-test/t/information_schema_part.test
mysql-test/t/innodb_bug34300.test
mysql-test/t/innodb_mysql.test
mysql-test/t/limit.test
mysql-test/t/log_output_func.test
mysql-test/t/log_tables.test
mysql-test/t/max_allowed_packet_basic.test
mysql-test/t/max_allowed_packet_func.test
mysql-test/t/merge.test
mysql-test/t/metadata.test
mysql-test/t/multi_update.test
mysql-test/t/mysqlcheck.test
mysql-test/t/net_buffer_length_basic.test
mysql-test/t/openssl_1.test
mysql-test/t/order_by.test
mysql-test/t/packet.test
mysql-test/t/partition.test
mysql-test/t/partition_innodb.test
mysql-test/t/partition_mgm.test
mysql-test/t/partition_mgm_err.test
mysql-test/t/partition_not_windows.test
mysql-test/t/ps_11bugs.test
mysql-test/t/sp.test
mysql-test/t/subselect.test
mysql-test/t/subselect3.test
mysql-test/t/symlink.test
mysql-test/t/thread_cache_size_func.test
mysql-test/t/timestamp_func.test
mysql-test/t/timezone3.test
mysql-test/t/type_newdecimal.test
mysql-test/t/union.test
mysql-test/t/update.test
mysql-test/t/variables-notembedded.test
mysql-test/t/variables.test
mysql-test/t/view.test
mysql-test/t/wait_timeout_func.test
mysql-test/t/windows.test*
mysql-test/valgrind.supp
mysys/mf_tempdir.c
mysys/my_getopt.c
mysys/my_init.c
mysys/my_symlink.c
mysys/my_thr_init.c
mysys/thr_mutex.c
scripts/Makefile.am
scripts/mysql_config.pl.in
scripts/mysql_config.sh
scripts/mysqldumpslow.sh
sql/CMakeLists.txt
sql/Makefile.am
sql/event_scheduler.cc
sql/field.cc
sql/ha_partition.cc
sql/ha_partition.h
sql/handler.cc
sql/handler.h
sql/item.cc
sql/item.h
sql/item_cmpfunc.cc
sql/item_cmpfunc.h
sql/item_func.cc
sql/item_func.h
sql/item_sum.cc
sql/item_sum.h
sql/item_timefunc.cc
sql/item_timefunc.h
sql/key.cc
sql/message.mc
sql/my_decimal.cc
sql/mysql_priv.h
sql/mysqld.cc
sql/nt_servc.cc
sql/nt_servc.h
sql/opt_range.cc
sql/opt_sum.cc
sql/parse_file.cc
sql/parse_file.h
sql/partition_info.cc
sql/set_var.cc
sql/set_var.h
sql/share/errmsg.txt
sql/slave.cc
sql/slave.h
sql/sql_base.cc
sql/sql_class.cc
sql/sql_db.cc
sql/sql_delete.cc
sql/sql_error.cc
sql/sql_insert.cc
sql/sql_lex.cc
sql/sql_lex.h
sql/sql_manager.cc
sql/sql_parse.cc
sql/sql_partition.cc
sql/sql_plugin.cc
sql/sql_repl.cc
sql/sql_select.cc
sql/sql_select.h
sql/sql_show.cc
sql/sql_table.cc
sql/sql_trigger.cc
sql/sql_update.cc
sql/sql_view.cc
sql/sql_yacc.yy
sql/table.cc
sql/table.h
sql/tztime.cc
sql/tztime.h
storage/archive/ha_archive.cc
support-files/mysql.spec.sh
tests/mysql_client_test.c
=== modified file 'mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result'
--- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result 2008-07-29 15:36:13
+0000
+++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result 2008-12-03 19:55:49
+0000
@@ -133,10 +133,6 @@ master-bin.000001 # Query # # use `test`
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
-master-bin.000001 # Query # # use `test`; BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.t2)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # use `test`; COMMIT
insert into t1 values(11);
commit;
show binlog events from <binlog_start>;
@@ -148,8 +144,6 @@ master-bin.000001 # Xid # # COMMIT /* XI
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # use `test`; COMMIT
-master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
@@ -278,10 +272,6 @@ master-bin.000001 # Query # # use `test`
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
-master-bin.000001 # Query # # use `test`; BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.t2)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # use `test`; COMMIT
master-bin.000001 # Query # # use `test`; drop table t1,t2
master-bin.000001 # Query # # use `test`; create table t0 (n int)
master-bin.000001 # Query # # use `test`; BEGIN
@@ -382,7 +372,7 @@ master-bin.000001 # Query # # use `test`
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # use `test`; COMMIT
+master-bin.000001 # Query # # use `test`; ROLLBACK
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t2
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a))
engine=innodb
master-bin.000001 # Query # # use `test`; BEGIN
@@ -395,16 +385,16 @@ master-bin.000001 # Xid # # COMMIT /* XI
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t2)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE t2
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # use `test`; COMMIT
-master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # use `test`; COMMIT
+master-bin.000001 # Query # # use `test`; ROLLBACK
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
@@ -412,7 +402,7 @@ master-bin.000001 # Query # # use `test`
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # use `test`; COMMIT
+master-bin.000001 # Query # # use `test`; ROLLBACK
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Query # # use `test`; TRUNCATE table t2
master-bin.000001 # Query # # use `test`; COMMIT
=== modified file 'mysql-test/suite/rpl/r/rpl_row_create_table.result'
--- a/mysql-test/suite/rpl/r/rpl_row_create_table.result 2008-10-08 09:15:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result 2008-12-03 19:55:49 +0000
@@ -4,34 +4,39 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+**** Resetting master and slave ****
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
-SHOW BINLOG EVENTS FROM 216;
+SHOW BINLOG EVENTS FROM 106;
Log_name #
-Pos 216
+Pos 106
Event_type Query
Server_id #
-End_log_pos 309
+End_log_pos 199
Info use `test`; CREATE TABLE t1 (a INT, b INT)
Log_name #
-Pos 309
+Pos 199
Event_type Query
Server_id #
-End_log_pos 415
+End_log_pos 305
Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge
Log_name #
-Pos 415
+Pos 305
Event_type Query
Server_id #
-End_log_pos 521
+End_log_pos 411
Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8
Log_name #
-Pos 521
+Pos 411
Event_type Query
Server_id #
-End_log_pos 640
+End_log_pos 530
Info use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8
**** On Master ****
SHOW CREATE TABLE t1;
@@ -125,9 +130,14 @@ NULL 3 6
NULL 4 2
NULL 5 10
NULL 6 12
+**** Resetting master and slave ****
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
ERROR 23000: Duplicate entry '2' for key 'b'
-SHOW BINLOG EVENTS FROM 1374;
+SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
CREATE TABLE t7 (a INT, b INT UNIQUE);
INSERT INTO t7 SELECT a,b FROM tt3;
@@ -137,18 +147,23 @@ a b
1 2
2 4
3 6
-SHOW BINLOG EVENTS FROM 1374;
+SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
-# 1374 Query # 1474 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
-# 1474 Query # 1542 use `test`; BEGIN
-# 1542 Table_map # 1584 table_id: # (test.t7)
-# 1584 Write_rows # 1640 table_id: # flags: STMT_END_F
-# 1640 Query # 1711 use `test`; ROLLBACK
+# 106 Query # 206 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
+# 206 Query # 274 use `test`; BEGIN
+# 274 Table_map # 316 table_id: # (test.t7)
+# 316 Write_rows # 372 table_id: # flags: STMT_END_F
+# 372 Query # 443 use `test`; ROLLBACK
SELECT * FROM t7 ORDER BY a,b;
a b
1 2
2 4
3 6
+**** Resetting master and slave ****
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
CREATE TEMPORARY TABLE tt4 (a INT, b INT);
INSERT INTO tt4 VALUES (4,8), (5,10), (6,12);
BEGIN;
@@ -156,12 +171,12 @@ INSERT INTO t7 SELECT a,b FROM tt4;
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-SHOW BINLOG EVENTS FROM 1711;
+SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
-# 1711 Query # 1779 use `test`; BEGIN
-# 1779 Table_map # 1821 table_id: # (test.t7)
-# 1821 Write_rows # 1877 table_id: # flags: STMT_END_F
-# 1877 Query # 1946 use `test`; COMMIT
+# 106 Query # 174 use `test`; BEGIN
+# 174 Table_map # 216 table_id: # (test.t7)
+# 216 Write_rows # 272 table_id: # flags: STMT_END_F
+# 272 Query # 343 use `test`; ROLLBACK
SELECT * FROM t7 ORDER BY a,b;
a b
1 2
@@ -178,6 +193,11 @@ a b
4 8
5 10
6 12
+**** Resetting master and slave ****
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
CREATE TABLE t8 LIKE t4;
CREATE TABLE t9 LIKE tt4;
CREATE TEMPORARY TABLE tt5 LIKE t4;
@@ -196,10 +216,10 @@ Create Table CREATE TABLE `t9` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-SHOW BINLOG EVENTS FROM 1946;
+SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
-# 1946 Query # 2032 use `test`; CREATE TABLE t8 LIKE t4
-# 2032 Query # 2171 use `test`; CREATE TABLE `t9` (
+# 106 Query # 192 use `test`; CREATE TABLE t8 LIKE t4
+# 192 Query # 331 use `test`; CREATE TABLE `t9` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
)
@@ -276,9 +296,8 @@ a
1
2
3
-SHOW BINLOG EVENTS;
+SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
-# 4 Format_desc # 106 Server ver: #, Binlog ver: #
# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT)
# 192 Query # 260 use `test`; BEGIN
# 260 Table_map # 301 table_id: # (test.t1)
@@ -308,7 +327,7 @@ Log_name Pos Event_type Server_id End_lo
# 1329 Query # 1397 use `test`; BEGIN
# 1397 Table_map # 1438 table_id: # (test.t1)
# 1438 Write_rows # 1482 table_id: # flags: STMT_END_F
-# 1482 Query # 1551 use `test`; COMMIT
+# 1482 Query # 1553 use `test`; ROLLBACK
SHOW TABLES;
Tables_in_test
t1
@@ -371,9 +390,8 @@ a
4
6
9
-SHOW BINLOG EVENTS;
+SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
-# 4 Format_desc # 106 Server ver: #, Binlog ver: #
# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT)
# 192 Query # 260 use `test`; BEGIN
# 260 Table_map # 301 table_id: # (test.t1)
@@ -394,6 +412,11 @@ a
6
9
TRUNCATE TABLE t2;
+**** Resetting master and slave ****
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
BEGIN;
INSERT INTO t2 SELECT a*a FROM t1;
CREATE TEMPORARY TABLE tt2
@@ -406,14 +429,14 @@ Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SELECT * FROM t2 ORDER BY a;
a
-SHOW BINLOG EVENTS FROM 949;
+SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
-# 949 Query # 1017 use `test`; BEGIN
-# 1017 Table_map # 1058 table_id: # (test.t2)
-# 1058 Write_rows # 1102 table_id: # flags: STMT_END_F
-# 1102 Table_map # 1143 table_id: # (test.t2)
-# 1143 Write_rows # 1182 table_id: # flags: STMT_END_F
-# 1182 Query # 1253 use `test`; ROLLBACK
+# 106 Query # 174 use `test`; BEGIN
+# 174 Table_map # 215 table_id: # (test.t2)
+# 215 Write_rows # 259 table_id: # flags: STMT_END_F
+# 259 Table_map # 300 table_id: # (test.t2)
+# 300 Write_rows # 339 table_id: # flags: STMT_END_F
+# 339 Query # 410 use `test`; ROLLBACK
SELECT * FROM t2 ORDER BY a;
a
DROP TABLE t1,t2;
=== modified file 'mysql-test/suite/rpl/r/rpl_slave_skip.result'
--- a/mysql-test/suite/rpl/r/rpl_slave_skip.result 2008-03-28 12:16:41 +0000
+++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result 2008-12-03 19:55:49 +0000
@@ -174,6 +174,7 @@ DROP TRIGGER tr2;
INSERT INTO t1 VALUES (3,'master/slave');
INSERT INTO t2 VALUES (3,'master/slave');
INSERT INTO t3 VALUES (3,'master/slave');
+COMMIT;
SELECT * FROM t1 ORDER BY a;
a b
2 master only
=== modified file 'mysql-test/suite/rpl/r/rpl_trigger.result'
--- a/mysql-test/suite/rpl/r/rpl_trigger.result 2007-12-18 09:07:08 +0000
+++ b/mysql-test/suite/rpl/r/rpl_trigger.result 2008-12-05 09:23:27 +0000
@@ -975,3 +975,22 @@ a b
2 b
3 c
drop table t1;
+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;
+create table t1 ( f int ) engine = innodb;
+create table log ( r int ) engine = myisam;
+create trigger tr
+after insert on t1
+for each row insert into log values ( new.f );
+set autocommit = 0;
+insert into t1 values ( 1 );
+rollback;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+Comparing tables master:test.t1 and slave:test.t1
+Comparing tables master:test.log and slave:test.log
+drop table t1, log;
=== modified file 'mysql-test/suite/rpl/t/rpl_row_create_table.test'
--- a/mysql-test/suite/rpl/t/rpl_row_create_table.test 2008-10-08 09:15:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test 2008-12-03 19:55:49 +0000
@@ -29,6 +29,8 @@ SET GLOBAL storage_engine=memory;
START SLAVE;
--enable_query_log
+--source include/reset_master_and_slave.inc
+
connection master;
CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
@@ -36,7 +38,7 @@ CREATE TABLE t3 (a INT, b INT) CHARSET=u
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
---query_vertical SHOW BINLOG EVENTS FROM 216
+--query_vertical SHOW BINLOG EVENTS FROM 106
--echo **** On Master ****
--query_vertical SHOW CREATE TABLE t1
--query_vertical SHOW CREATE TABLE t2
@@ -65,6 +67,8 @@ SELECT * FROM t5 ORDER BY a,b,c;
--query_vertical SHOW CREATE TABLE t6
SELECT * FROM t6 ORDER BY a,b,c;
+--source include/reset_master_and_slave.inc
+
connection master;
# Test for erroneous constructions
--error ER_DUP_ENTRY
@@ -72,7 +76,7 @@ CREATE TABLE t7 (UNIQUE(b)) SELECT a,b F
# Shouldn't be written to the binary log
--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 1374;
+SHOW BINLOG EVENTS FROM 106;
# Test that INSERT-SELECT works the same way as for SBR.
CREATE TABLE t7 (a INT, b INT UNIQUE);
@@ -82,10 +86,12 @@ SELECT * FROM t7 ORDER BY a,b;
# Should be written to the binary log
--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 1374;
+SHOW BINLOG EVENTS FROM 106;
sync_slave_with_master;
SELECT * FROM t7 ORDER BY a,b;
+--source include/reset_master_and_slave.inc
+
connection master;
CREATE TEMPORARY TABLE tt4 (a INT, b INT);
INSERT INTO tt4 VALUES (4,8), (5,10), (6,12);
@@ -94,11 +100,13 @@ INSERT INTO t7 SELECT a,b FROM tt4;
ROLLBACK;
--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 1711;
+SHOW BINLOG EVENTS FROM 106;
SELECT * FROM t7 ORDER BY a,b;
sync_slave_with_master;
SELECT * FROM t7 ORDER BY a,b;
+--source include/reset_master_and_slave.inc
+
connection master;
CREATE TABLE t8 LIKE t4;
CREATE TABLE t9 LIKE tt4;
@@ -110,7 +118,7 @@ CREATE TEMPORARY TABLE tt7 SELECT 1;
--query_vertical SHOW CREATE TABLE t9
--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 1946;
+SHOW BINLOG EVENTS FROM 106;
sync_slave_with_master;
--echo **** On Slave ****
--query_vertical SHOW CREATE TABLE t8
@@ -162,7 +170,7 @@ SELECT * FROM t3 ORDER BY a;
SELECT * FROM t4 ORDER BY a;
--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server
ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS;
+SHOW BINLOG EVENTS FROM 106;
sync_slave_with_master;
SHOW TABLES;
SELECT TABLE_NAME,ENGINE
@@ -208,13 +216,17 @@ COMMIT;
SELECT * FROM t2 ORDER BY a;
--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server
ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS;
+SHOW BINLOG EVENTS FROM 106;
sync_slave_with_master;
SELECT * FROM t2 ORDER BY a;
connection master;
TRUNCATE TABLE t2;
+sync_slave_with_master;
+
+--source include/reset_master_and_slave.inc
+connection master;
BEGIN;
INSERT INTO t2 SELECT a*a FROM t1;
CREATE TEMPORARY TABLE tt2
@@ -227,7 +239,7 @@ ROLLBACK;
SELECT * FROM t2 ORDER BY a;
--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server
ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 949;
+SHOW BINLOG EVENTS FROM 106;
sync_slave_with_master;
SELECT * FROM t2 ORDER BY a;
=== modified file 'mysql-test/suite/rpl/t/rpl_slave_skip.test'
--- a/mysql-test/suite/rpl/t/rpl_slave_skip.test 2008-03-28 12:16:41 +0000
+++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test 2008-12-03 19:55:49 +0000
@@ -121,6 +121,7 @@ DROP TRIGGER tr2;
INSERT INTO t1 VALUES (3,'master/slave');
INSERT INTO t2 VALUES (3,'master/slave');
INSERT INTO t3 VALUES (3,'master/slave');
+COMMIT;
SELECT * FROM t1 ORDER BY a;
SELECT * FROM t2 ORDER BY a;
=== modified file 'mysql-test/suite/rpl/t/rpl_trigger.test'
--- a/mysql-test/suite/rpl/t/rpl_trigger.test 2007-12-18 09:07:08 +0000
+++ b/mysql-test/suite/rpl/t/rpl_trigger.test 2008-12-05 09:23:27 +0000
@@ -467,20 +467,48 @@ drop trigger if exists t1_bi;
insert into t1 values (3, "c");
select * from t1;
-
-save_master_pos;
-connection slave;
-sync_with_master;
-
+sync_slave_with_master;
select * from t1;
connection master;
drop table t1;
+sync_slave_with_master;
#
-# End of tests
+# Bug#40116: Uncommited changes are replicated and stay on slave after
+# rollback on master
#
-save_master_pos;
+
+connection master;
+source include/master-slave-reset.inc;
+source include/have_innodb.inc;
connection slave;
-sync_with_master;
+source include/have_innodb.inc;
+
+connection master;
+create table t1 ( f int ) engine = innodb;
+create table log ( r int ) engine = myisam;
+create trigger tr
+ after insert on t1
+ for each row insert into log values ( new.f );
+
+set autocommit = 0;
+insert into t1 values ( 1 );
+rollback;
+
+let $diff_table_1=master:test.t1;
+let $diff_table_2=slave:test.t1;
+--source include/diff_tables.inc
+
+let $diff_table_1=master:test.log;
+let $diff_table_2=slave:test.log;
+--source include/diff_tables.inc
+
+connection master;
+drop table t1, log;
+sync_slave_with_master;
+
+#
+# End of tests
+#
=== modified file 'sql/log.cc'
--- a/sql/log.cc 2008-11-06 14:18:25 +0000
+++ b/sql/log.cc 2008-12-08 10:32:24 +0000
@@ -1478,60 +1478,11 @@ static int binlog_commit(handlerton *hto
}
/*
- Decision table for committing a transaction. The top part, the
- *conditions* represent different cases that can occur, and hte
- bottom part, the *actions*, represent what should be done in that
- particular case.
+ We commit the transaction if:
- Real transaction 'all' was true
+ - We are not in a transaction and committing a statement, or
- Statement in cache There were at least one statement in the
- transaction cache
-
- In transaction We are inside a transaction
-
- Stmt modified non-trans The statement being committed modified a
- non-transactional table
-
- All modified non-trans Some statement before this one in the
- transaction modified a non-transactional
- table
-
-
- ============================= = = = = = = = = = = = = = = = =
- Real transaction N N N N N N N N N N N N N N N N
- Statement in cache N N N N N N N N Y Y Y Y Y Y Y Y
- In transaction N N N N Y Y Y Y N N N N Y Y Y Y
- Stmt modified non-trans N N Y Y N N Y Y N N Y Y N N Y Y
- All modified non-trans N Y N Y N Y N Y N Y N Y N Y N Y
-
- Action: (C)ommit/(A)ccumulate C C - C A C - C - - - - A A - A
- ============================= = = = = = = = = = = = = = = = =
-
-
- ============================= = = = = = = = = = = = = = = = =
- Real transaction Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
- Statement in cache N N N N N N N N Y Y Y Y Y Y Y Y
- In transaction N N N N Y Y Y Y N N N N Y Y Y Y
- Stmt modified non-trans N N Y Y N N Y Y N N Y Y N N Y Y
- All modified non-trans N Y N Y N Y N Y N Y N Y N Y N Y
-
- (C)ommit/(A)ccumulate/(-) - - - - C C - C - - - - C C - C
- ============================= = = = = = = = = = = = = = = = =
-
- In other words, we commit the transaction if and only if both of
- the following are true:
- - We are not in a transaction and committing a statement
-
- - We are in a transaction and one (or more) of the following are
- true:
-
- - A full transaction is committed
-
- OR
-
- - A non-transactional statement is committed and there is
- no statement cached
+ - We are in a transaction and a full transaction is committed
Otherwise, we accumulate the statement
*/
@@ -1544,11 +1495,7 @@ static int binlog_commit(handlerton *hto
YESNO(in_transaction),
YESNO(thd->transaction.all.modified_non_trans_table),
YESNO(thd->transaction.stmt.modified_non_trans_table)));
- if (in_transaction &&
- (all ||
- (!trx_data->at_least_one_stmt &&
- thd->transaction.stmt.modified_non_trans_table)) ||
- !in_transaction && !all)
+ if (!in_transaction || all)
{
Query_log_event qev(thd, STRING_WITH_LEN("COMMIT"), TRUE, FALSE);
qev.error_code= 0; // see comment in MYSQL_LOG::write(THD, IO_CACHE)
| Thread |
|---|
| • bzr push into mysql-5.1-bugteam branch (mats:2778) | Mats Kindahl | 8 Dec |