From 4cc8730d15468e4b88952b4b03182532517a621b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 10 Jun 2005 21:29:37 +0200 Subject: [PATCH 1/5] mtr_process.pl: Added a sleep for 5 seconds when shuting down, work around for strange problem with server restarts mtr_cases.pl: Set default time zone as opt to mysqld mysql-test-run.pl: Enabled --mysqld= to work Put some Windows path names into environment, to be used in --replace_result mysql-test-run.sh: Make shell script tolerant to Windows change in test cases mysql-test/mysql-test-run.sh: Make shell script tolerant to Windows change in test cases mysql-test/mysql-test-run.pl: Enabled --mysqld= to work Put some Windows path names into environment, to be used in --replace_result mysql-test/lib/mtr_cases.pl: Set default time zone as opt to mysqld mysql-test/lib/mtr_process.pl: Added a sleep for 5 seconds when shuting down, work around for strange problem with server restarts --- mysql-test/lib/mtr_cases.pl | 14 ++++++-------- mysql-test/lib/mtr_process.pl | 2 ++ mysql-test/mysql-test-run.pl | 18 +++++++++++++++--- mysql-test/mysql-test-run.sh | 3 ++- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl index 878afe95f2c..b4f0080a4e9 100644 --- a/mysql-test/lib/mtr_cases.pl +++ b/mysql-test/lib/mtr_cases.pl @@ -171,8 +171,8 @@ sub collect_one_test_case($$$$$) { my $slave_sh= "$testdir/$tname-slave.sh"; my $disabled= "$testdir/$tname.disabled"; - $tinfo->{'master_opt'}= []; - $tinfo->{'slave_opt'}= []; + $tinfo->{'master_opt'}= ["--default-time-zone=+3:00"]; + $tinfo->{'slave_opt'}= ["--default-time-zone=+3:00"]; $tinfo->{'slave_mi'}= []; if ( -f $master_opt_file ) @@ -180,9 +180,9 @@ sub collect_one_test_case($$$$$) { $tinfo->{'master_restart'}= 1; # We think so for now # This is a dirty hack from old mysql-test-run, we use the opt file # to flag other things as well, it is not a opt list at all - my $extra_master_opt= mtr_get_opts_from_file($master_opt_file); + $tinfo->{'master_opt'}= mtr_get_opts_from_file($master_opt_file); - foreach my $opt (@$extra_master_opt) + foreach my $opt (@{$tinfo->{'master_opt'}}) { my $value; @@ -191,7 +191,7 @@ sub collect_one_test_case($$$$$) { if ( defined $value ) { $tinfo->{'timezone'}= $value; - $extra_master_opt= []; + $tinfo->{'master_opt'}= []; $tinfo->{'master_restart'}= 0; last; } @@ -206,13 +206,11 @@ sub collect_one_test_case($$$$$) { { $tinfo->{'result_file'}.= $::opt_result_ext; } - $extra_master_opt= []; + $tinfo->{'master_opt'}= []; $tinfo->{'master_restart'}= 0; last; } } - - $tinfo->{'master_opt'}= $extra_master_opt; } if ( -f $slave_opt_file ) diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index 7bca422773c..1eb4f6b7c58 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -669,6 +669,8 @@ sub mtr_mysqladmin_shutdown () { last; # If we got here, we are done } + sleep(5) if $::glob_win32; # FIXME next startup fails if no sleep + return $res; } diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index d4fb37c2f96..17ddebdcb2b 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -204,7 +204,7 @@ our $opt_bench= 0; our $opt_small_bench= 0; our $opt_big_test= 0; # Send --big-test to mysqltest -our $opt_extra_mysqld_opt; # FIXME not handled +our @opt_extra_mysqld_opt; our $opt_compress; our $opt_current_test; @@ -500,7 +500,7 @@ sub command_line_setup () { 'record' => \$opt_record, # ??? - 'mysqld=s' => \$opt_extra_mysqld_opt, + 'mysqld=s' => \@opt_extra_mysqld_opt, # Run test on running server 'extern' => \$opt_extern, @@ -953,13 +953,25 @@ sub environment_setup () { $ENV{'LC_COLLATE'}= "C"; $ENV{'USE_RUNNING_SERVER'}= $glob_use_running_server; $ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir; + $ENV{'MYSQL_TEST_WINDIR'}= $glob_mysql_test_dir; $ENV{'MASTER_MYSOCK'}= $master->[0]->{'path_mysock'}; + $ENV{'MASTER_WINMYSOCK'}= $master->[0]->{'path_mysock'}; $ENV{'MASTER_MYSOCK1'}= $master->[1]->{'path_mysock'}; $ENV{'MASTER_MYPORT'}= $master->[0]->{'path_myport'}; $ENV{'MASTER_MYPORT1'}= $master->[1]->{'path_myport'}; $ENV{'SLAVE_MYPORT'}= $slave->[0]->{'path_myport'}; # $ENV{'MYSQL_TCP_PORT'}= '@MYSQL_TCP_PORT@'; # FIXME $ENV{'MYSQL_TCP_PORT'}= 3306; + + if ( $glob_cygwin_perl ) + { + foreach my $key ('MYSQL_TEST_WINDIR','MASTER_MYSOCK') + { + $ENV{$key}= `cygpath -w $ENV{$key}`; + $ENV{$key} =~ s,\\,\\\\,g; + chomp($ENV{$key}); + } + } } @@ -1852,7 +1864,7 @@ sub mysqld_arguments ($$$$$) { } } - foreach my $arg ( @$extra_opt ) + foreach my $arg ( @opt_extra_mysqld_opt, @$extra_opt ) { mtr_add_arg($args, "%s%s", $prefix, $arg); } diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 3f7e7d22200..7540a76317e 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -170,7 +170,8 @@ cd .. BASEDIR=`pwd` cd $CWD MYSQL_TEST_DIR=$BASEDIR/mysql-test -export MYSQL_TEST_DIR +MYSQL_TEST_WINDIR=$MYSQL_TEST_DIR +export MYSQL_TEST_DIR MYSQL_TEST_WINDIR STD_DATA=$MYSQL_TEST_DIR/std_data hostname=`hostname` # Installed in the mysql privilege table From 0b5700c086e07ddb3f173203c05170372d853a20 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 15 Jun 2005 02:57:23 +0400 Subject: [PATCH 2/5] gcc 2.96 fixes (workarounds for compiler bugs in namespace handling) extra/yassl/include/yassl_int.hpp: gcc 2.96 fixes extra/yassl/include/yassl_types.hpp: gcc 2.96 fixes --- extra/yassl/include/yassl_int.hpp | 7 ++++++- extra/yassl/include/yassl_types.hpp | 11 ++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/extra/yassl/include/yassl_int.hpp b/extra/yassl/include/yassl_int.hpp index d3f7754f074..60a78a3970e 100644 --- a/extra/yassl/include/yassl_int.hpp +++ b/extra/yassl/include/yassl_int.hpp @@ -164,7 +164,12 @@ private: // openSSL bignum struct BIGNUM { - Integer int_; + /* + gcc 2.96 fix: because of two Integer classes (yaSSL::Integer and + TaoCrypt::Integer), we need to explicitly state the namespace + here to let gcc 2.96 deduce the correct type. + */ + yaSSL::Integer int_; void assign(const byte* b, uint s) { int_.assign(b,s); } }; diff --git a/extra/yassl/include/yassl_types.hpp b/extra/yassl/include/yassl_types.hpp index d1d3fb829de..01b82d95039 100644 --- a/extra/yassl/include/yassl_types.hpp +++ b/extra/yassl/include/yassl_types.hpp @@ -445,6 +445,15 @@ const opaque master_label[MASTER_LABEL_SZ + 1] = "master secret"; const opaque key_label [KEY_LABEL_SZ + 1] = "key expansion"; -} // naemspace +} // namespace + +#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96 +/* + gcc 2.96 bails out because of two declarations of byte: yaSSL::byte and + TaoCrypt::byte. TODO: define global types.hpp and move the declaration of + 'byte' there. +*/ +using yaSSL::byte; +#endif #endif // yaSSL_TYPES_HPP From b0d82705d3b3f69b61038909e15c0d00d38f3150 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 16 Jun 2005 16:56:03 +0200 Subject: [PATCH 3/5] WL#2076: Added if(...) construct to mysqltest Removed SHOW BINLOG EVENTS in test case for ps-protocol and row-based replication client/mysqltest.c: WL#2067: Added if(...) construct to mysqltest mysql-test/include/rpl_stmt_seq.inc: Removed SHOW BINLOG EVENTS in test case for ps-protocol and row-based replication mysql-test/r/rpl_ddl.result: Removed SHOW BINLOG EVENTS in test case for ps-protocol and row-based replication mysql-test/t/rpl_ddl.test: Comment --- client/mysqltest.c | 84 ++-- mysql-test/include/rpl_stmt_seq.inc | 29 +- mysql-test/r/rpl_ddl.result | 585 ---------------------------- mysql-test/t/rpl_ddl.test | 2 + 4 files changed, 81 insertions(+), 619 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index e60d9ecd1c5..131616b6f71 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -153,10 +153,6 @@ static char TMPDIR[FN_REFLEN]; static char delimiter[MAX_DELIMITER]= DEFAULT_DELIMITER; static uint delimiter_length= 1; -static int *cur_block, *block_stack_end; -static int block_stack[BLOCK_STACK_DEPTH]; - -static int block_ok_stack[BLOCK_STACK_DEPTH]; static CHARSET_INFO *charset_info= &my_charset_latin1; /* Default charset */ static const char *charset_name= "latin1"; /* Default character set name */ @@ -210,8 +206,6 @@ MYSQL_RES *last_result=0; PARSER parser; MASTER_POS master_pos; -int *block_ok; /* set to 0 if the current block should not be executed */ -int false_block_depth = 0; /* if set, all results are concated and compared against this file */ const char *result_file = 0; @@ -281,6 +275,7 @@ Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL, Q_START_TIMER, Q_END_TIMER, Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL, Q_DISABLE_RECONNECT, Q_ENABLE_RECONNECT, +Q_IF, Q_UNKNOWN, /* Unknown command. */ Q_COMMENT, /* Comments, ignored. */ @@ -368,9 +363,20 @@ const char *command_names[]= "enable_ps_protocol", "disable_reconnect", "enable_reconnect", + "if", 0 }; +/* Block stack */ +typedef struct +{ + int line; /* Start line of block */ + my_bool ok; /* Should block be executed */ + enum enum_commands cmd; /* Command owning the block */ +} BLOCK; +static BLOCK block_stack[BLOCK_STACK_DEPTH]; +static BLOCK *cur_block, *block_stack_end; + TYPELIB command_typelib= {array_elements(command_names),"", command_names, 0}; @@ -1723,36 +1729,54 @@ int do_connect(struct st_query* q) int do_done(struct st_query* q) { + /* Dummy statement to eliminate compiler warning */ q->type = Q_END_BLOCK; + + /* Check if empty block stack */ if (cur_block == block_stack) die("Stray '}' - end of block before beginning"); - if (*block_ok--) + + /* Test if inner block has been executed */ + if (cur_block->ok && cur_block->cmd == Q_WHILE) { - parser.current_line = *--cur_block; + /* Pop block from stack, re-execute outer block */ + cur_block--; + parser.current_line = cur_block->line; } else { - ++parser.current_line; - --cur_block; + /* Pop block from stack, goto next line */ + cur_block--; + parser.current_line++; } return 0; } -int do_while(struct st_query* q) + +int do_block(enum enum_commands cmd, struct st_query* q) { char* p=q->first_argument; const char* expr_start, *expr_end; VAR v; + + /* Check stack overflow */ if (cur_block == block_stack_end) die("Nesting too deeply"); - if (!*block_ok) + + /* Set way to find outer block again, increase line counter */ + cur_block->line= parser.current_line++; + + /* If this block is ignored */ + if (!cur_block->ok) { - ++false_block_depth; - *++block_ok = 0; - *cur_block++ = parser.current_line++; + /* Inner block should be ignored too */ + cur_block++; + cur_block->cmd= cmd; + cur_block->ok= FALSE; return 0; } + /* Parse and evaluate test expression */ expr_start = strchr(p, '('); if (!expr_start) die("missing '(' in while"); @@ -1761,14 +1785,12 @@ int do_while(struct st_query* q) die("missing ')' in while"); var_init(&v,0,0,0,0); eval_expr(&v, ++expr_start, &expr_end); - *cur_block++ = parser.current_line++; - if (!v.int_val) - { - *++block_ok = 0; - false_block_depth++; - } - else - *++block_ok = 1; + + /* Define inner block */ + cur_block++; + cur_block->cmd= cmd; + cur_block->ok= (v.int_val ? TRUE : FALSE); + var_free(&v); return 0; } @@ -3404,12 +3426,13 @@ int main(int argc, char **argv) lineno = lineno_stack; my_init_dynamic_array(&q_lines, sizeof(struct st_query*), INIT_Q_LINES, INIT_Q_LINES); + memset(block_stack, 0, sizeof(block_stack)); - block_stack_end = block_stack + BLOCK_STACK_DEPTH; - memset(block_ok_stack, 0, sizeof(block_stack)); - cur_block = block_stack; - block_ok = block_ok_stack; - *block_ok = 1; + block_stack_end= block_stack + BLOCK_STACK_DEPTH; + cur_block= block_stack; + cur_block->ok= TRUE; /* Outer block should always be executed */ + cur_block->cmd= Q_UNKNOWN; + init_dynamic_string(&ds_res, "", 0, 65536); parse_args(argc, argv); if (mysql_server_init(embedded_server_arg_count, @@ -3461,7 +3484,7 @@ int main(int argc, char **argv) int current_line_inc = 1, processed = 0; if (q->type == Q_UNKNOWN || q->type == Q_COMMENT_WITH_COMMAND) get_query_type(q); - if (*block_ok) + if (cur_block->ok) { processed = 1; switch (q->type) { @@ -3657,7 +3680,8 @@ int main(int argc, char **argv) { current_line_inc = 0; switch (q->type) { - case Q_WHILE: do_while(q); break; + case Q_WHILE: do_block(Q_WHILE, q); break; + case Q_IF: do_block(Q_IF, q); break; case Q_END_BLOCK: do_done(q); break; default: current_line_inc = 1; break; } diff --git a/mysql-test/include/rpl_stmt_seq.inc b/mysql-test/include/rpl_stmt_seq.inc index 6f207e66156..d56ee02e33c 100644 --- a/mysql-test/include/rpl_stmt_seq.inc +++ b/mysql-test/include/rpl_stmt_seq.inc @@ -4,6 +4,12 @@ # the $variables is extreme sensitive. # +############################################################### +# Debug options : To debug this test script +############################################################### +let $showbinlog= 0; +let $manipulate= 1; + ######## The typical test sequence # 1. INSERT without commit # check table content of master and slave @@ -52,9 +58,12 @@ let $MAX= `SELECT MAX(f1) FROM t1` ; eval INSERT INTO t1 SET f1= $MAX + 1; # results before DDL(to be tested) SELECT MAX(f1) FROM t1; +if ($show_binlog) +{ --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s'; +} sync_slave_with_master; connection slave; @@ -63,9 +72,12 @@ SELECT '-------- switch to slave --------' as ""; --enable_query_log # results before DDL(to be tested) SELECT MAX(f1) FROM t1; +if ($show_binlog) +{ --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; +} ############################################################### # command to be tested @@ -79,9 +91,12 @@ eval $my_stmt; let $my_stmt= ERROR: YOU FORGOT TO FILL IN THE STATEMENT; # results after DDL(to be tested) SELECT MAX(f1) FROM t1; +if ($show_binlog) +{ --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s'; +} sync_slave_with_master; connection slave; @@ -90,9 +105,12 @@ SELECT '-------- switch to slave --------' as ""; --enable_query_log # results after DDL(to be tested) SELECT MAX(f1) FROM t1; +if ($show_binlog) +{ --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; +} ############################################################### # ROLLBACK @@ -114,9 +132,12 @@ eval SELECT CONCAT(CONCAT('TEST-INFO: MASTER: The INSERT is ', ' (Failed)')) AS "" FROM mysqltest1.t1; --enable_query_log +if ($show_binlog) +{ --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s'; +} sync_slave_with_master; connection slave; @@ -133,16 +154,17 @@ eval SELECT CONCAT(CONCAT('TEST-INFO: SLAVE: The INSERT is ', ' (Failed)')) AS "" FROM mysqltest1.t1; --enable_query_log +if ($show_binlog) +{ --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; +} ############################################################### # Manipulate binlog ############################################################### -#let $manipulate= 0; -let $manipulate= 1; -while ($manipulate) +if ($manipulate) { #### Manipulate the binary logs, # so that the output of SHOW BINLOG EVENTS IN @@ -171,7 +193,6 @@ flush logs; # sleep 1; # eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; inc $_log_num_n; -let $manipulate= 0; } connection master; diff --git a/mysql-test/r/rpl_ddl.result b/mysql-test/r/rpl_ddl.result index 9e3f76fe0bb..3737883b694 100644 --- a/mysql-test/r/rpl_ddl.result +++ b/mysql-test/r/rpl_ddl.result @@ -49,152 +49,22 @@ INSERT INTO t1 SET f1= 0 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 1 -SHOW BINLOG EVENTS IN 'master-bin.000001'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 # Start 1 # Server ver: VERSION, Binlog ver: 3 -master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1 -master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2 -master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3 -master-bin.000001 # Query 1 # CREATE DATABASE mysqltest1 -master-bin.000001 # Query 1 # CREATE DATABASE mysqltest2 -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0 -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1) -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0 -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 0 -SHOW BINLOG EVENTS IN 'slave-bin.000001'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000001 # Start 2 # Server ver: VERSION, Binlog ver: 3 -slave-bin.000001 # Query 2 # use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9 -slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1 -slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2 -slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3 -slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest1 -slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest2 -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0 -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1) -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0 -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) -------- switch to master ------- COMMIT; SELECT MAX(f1) FROM t1; MAX(f1) 1 -SHOW BINLOG EVENTS IN 'master-bin.000001'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 # Start 1 # Server ver: VERSION, Binlog ver: 3 -master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1 -master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2 -master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3 -master-bin.000001 # Query 1 # CREATE DATABASE mysqltest1 -master-bin.000001 # Query 1 # CREATE DATABASE mysqltest2 -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0 -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1) -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0 -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) -master-bin.000001 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 0 + 1 -master-bin.000001 # Query 1 # use `mysqltest1`; COMMIT -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 1 -SHOW BINLOG EVENTS IN 'slave-bin.000001'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000001 # Start 2 # Server ver: VERSION, Binlog ver: 3 -slave-bin.000001 # Query 2 # use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9 -slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1 -slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2 -slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3 -slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest1 -slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest2 -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0 -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1) -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0 -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) -slave-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 0 + 1 -------- switch to master ------- ROLLBACK; @@ -203,40 +73,6 @@ MAX(f1) 1 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000001'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 # Start 1 # Server ver: VERSION, Binlog ver: 3 -master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1 -master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2 -master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3 -master-bin.000001 # Query 1 # CREATE DATABASE mysqltest1 -master-bin.000001 # Query 1 # CREATE DATABASE mysqltest2 -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0 -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1) -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0 -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB" -master-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) -master-bin.000001 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 0 + 1 -master-bin.000001 # Query 1 # use `mysqltest1`; COMMIT -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -244,39 +80,6 @@ MAX(f1) 1 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000001'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000001 # Start 2 # Server ver: VERSION, Binlog ver: 3 -slave-bin.000001 # Query 2 # use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9 -slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1 -slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2 -slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3 -slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest1 -slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest2 -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0 -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1) -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0 -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB" -slave-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) -slave-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 0 + 1 -------- switch to master ------- flush logs; @@ -293,30 +96,22 @@ INSERT INTO t1 SET f1= 1 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 2 -SHOW BINLOG EVENTS IN 'master-bin.000002'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 1 -SHOW BINLOG EVENTS IN 'slave-bin.000002'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- ROLLBACK; SELECT MAX(f1) FROM t1; MAX(f1) 1 -SHOW BINLOG EVENTS IN 'master-bin.000002'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 1 -SHOW BINLOG EVENTS IN 'slave-bin.000002'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- ROLLBACK; @@ -325,8 +120,6 @@ MAX(f1) 1 TEST-INFO: MASTER: The INSERT is not committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000002'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -334,8 +127,6 @@ MAX(f1) 1 TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000002'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- flush logs; @@ -352,34 +143,22 @@ INSERT INTO t1 SET f1= 1 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 2 -SHOW BINLOG EVENTS IN 'master-bin.000003'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 1 -SHOW BINLOG EVENTS IN 'slave-bin.000003'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- SET AUTOCOMMIT=1; SELECT MAX(f1) FROM t1; MAX(f1) 2 -SHOW BINLOG EVENTS IN 'master-bin.000003'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000003 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000003 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 1 + 1 -master-bin.000003 # Query 1 # use `mysqltest1`; COMMIT -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 2 -SHOW BINLOG EVENTS IN 'slave-bin.000003'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000003 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 1 + 1 -------- switch to master ------- ROLLBACK; @@ -388,11 +167,6 @@ MAX(f1) 2 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000003'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000003 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000003 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 1 + 1 -master-bin.000003 # Query 1 # use `mysqltest1`; COMMIT -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -400,9 +174,6 @@ MAX(f1) 2 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000003'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000003 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 1 + 1 -------- switch to master ------- flush logs; @@ -420,34 +191,22 @@ INSERT INTO t1 SET f1= 2 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 3 -SHOW BINLOG EVENTS IN 'master-bin.000004'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 2 -SHOW BINLOG EVENTS IN 'slave-bin.000004'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- START TRANSACTION; SELECT MAX(f1) FROM t1; MAX(f1) 3 -SHOW BINLOG EVENTS IN 'master-bin.000004'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000004 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000004 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 2 + 1 -master-bin.000004 # Query 1 # use `mysqltest1`; COMMIT -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 3 -SHOW BINLOG EVENTS IN 'slave-bin.000004'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000004 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 2 + 1 -------- switch to master ------- ROLLBACK; @@ -456,11 +215,6 @@ MAX(f1) 3 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000004'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000004 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000004 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 2 + 1 -master-bin.000004 # Query 1 # use `mysqltest1`; COMMIT -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -468,9 +222,6 @@ MAX(f1) 3 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000004'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000004 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 2 + 1 -------- switch to master ------- flush logs; @@ -487,34 +238,22 @@ INSERT INTO t1 SET f1= 3 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 4 -SHOW BINLOG EVENTS IN 'master-bin.000005'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 3 -SHOW BINLOG EVENTS IN 'slave-bin.000005'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- BEGIN; SELECT MAX(f1) FROM t1; MAX(f1) 4 -SHOW BINLOG EVENTS IN 'master-bin.000005'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000005 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000005 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 3 + 1 -master-bin.000005 # Query 1 # use `mysqltest1`; COMMIT -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 4 -SHOW BINLOG EVENTS IN 'slave-bin.000005'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000005 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 3 + 1 -------- switch to master ------- ROLLBACK; @@ -523,11 +262,6 @@ MAX(f1) 4 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000005'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000005 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000005 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 3 + 1 -master-bin.000005 # Query 1 # use `mysqltest1`; COMMIT -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -535,9 +269,6 @@ MAX(f1) 4 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000005'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000005 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 3 + 1 -------- switch to master ------- flush logs; @@ -554,36 +285,22 @@ INSERT INTO t1 SET f1= 4 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 5 -SHOW BINLOG EVENTS IN 'master-bin.000006'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 4 -SHOW BINLOG EVENTS IN 'slave-bin.000006'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- DROP TABLE mysqltest1.t2; SELECT MAX(f1) FROM t1; MAX(f1) 5 -SHOW BINLOG EVENTS IN 'master-bin.000006'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000006 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000006 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 4 + 1 -master-bin.000006 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000006 # Query 1 # use `mysqltest1`; DROP TABLE mysqltest1.t2 -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 5 -SHOW BINLOG EVENTS IN 'slave-bin.000006'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000006 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 4 + 1 -slave-bin.000006 # Query 1 # use `mysqltest1`; DROP TABLE mysqltest1.t2 -------- switch to master ------- ROLLBACK; @@ -592,12 +309,6 @@ MAX(f1) 5 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000006'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000006 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000006 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 4 + 1 -master-bin.000006 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000006 # Query 1 # use `mysqltest1`; DROP TABLE mysqltest1.t2 -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -605,10 +316,6 @@ MAX(f1) 5 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000006'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000006 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 4 + 1 -slave-bin.000006 # Query 1 # use `mysqltest1`; DROP TABLE mysqltest1.t2 -------- switch to master ------- flush logs; @@ -633,30 +340,22 @@ INSERT INTO t1 SET f1= 5 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 6 -SHOW BINLOG EVENTS IN 'master-bin.000007'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 5 -SHOW BINLOG EVENTS IN 'slave-bin.000007'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- DROP TEMPORARY TABLE mysqltest1.t23; SELECT MAX(f1) FROM t1; MAX(f1) 6 -SHOW BINLOG EVENTS IN 'master-bin.000007'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 5 -SHOW BINLOG EVENTS IN 'slave-bin.000007'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- ROLLBACK; @@ -667,12 +366,6 @@ MAX(f1) 5 TEST-INFO: MASTER: The INSERT is not committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000007'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000007 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000007 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1 -master-bin.000007 # Query 1 # use `mysqltest1`; DROP TEMPORARY TABLE mysqltest1.t23 -master-bin.000007 # Query 1 # use `mysqltest1`; ROLLBACK -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -680,10 +373,6 @@ MAX(f1) 6 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000007'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000007 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1 -slave-bin.000007 # Query 1 # use `mysqltest1`; DROP TEMPORARY TABLE mysqltest1.t23 -------- switch to master ------- flush logs; @@ -708,36 +397,22 @@ INSERT INTO t1 SET f1= 5 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 6 -SHOW BINLOG EVENTS IN 'master-bin.000008'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 6 -SHOW BINLOG EVENTS IN 'slave-bin.000008'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- RENAME TABLE mysqltest1.t3 to mysqltest1.t20; SELECT MAX(f1) FROM t1; MAX(f1) 6 -SHOW BINLOG EVENTS IN 'master-bin.000008'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000008 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000008 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1 -master-bin.000008 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000008 # Query 1 # use `mysqltest1`; RENAME TABLE mysqltest1.t3 to mysqltest1.t20 -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 6 -SHOW BINLOG EVENTS IN 'slave-bin.000008'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000008 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1 -slave-bin.000008 # Query 1 # use `mysqltest1`; RENAME TABLE mysqltest1.t3 to mysqltest1.t20 -------- switch to master ------- ROLLBACK; @@ -746,12 +421,6 @@ MAX(f1) 6 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000008'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000008 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000008 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1 -master-bin.000008 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000008 # Query 1 # use `mysqltest1`; RENAME TABLE mysqltest1.t3 to mysqltest1.t20 -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -759,10 +428,6 @@ MAX(f1) 6 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000008'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000008 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1 -slave-bin.000008 # Query 1 # use `mysqltest1`; RENAME TABLE mysqltest1.t3 to mysqltest1.t20 -------- switch to master ------- flush logs; @@ -789,36 +454,22 @@ INSERT INTO t1 SET f1= 6 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 7 -SHOW BINLOG EVENTS IN 'master-bin.000009'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 6 -SHOW BINLOG EVENTS IN 'slave-bin.000009'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT; SELECT MAX(f1) FROM t1; MAX(f1) 7 -SHOW BINLOG EVENTS IN 'master-bin.000009'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000009 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000009 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 6 + 1 -master-bin.000009 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000009 # Query 1 # use `mysqltest1`; ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 7 -SHOW BINLOG EVENTS IN 'slave-bin.000009'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000009 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 6 + 1 -slave-bin.000009 # Query 1 # use `mysqltest1`; ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT -------- switch to master ------- ROLLBACK; @@ -827,12 +478,6 @@ MAX(f1) 7 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000009'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000009 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000009 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 6 + 1 -master-bin.000009 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000009 # Query 1 # use `mysqltest1`; ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -840,10 +485,6 @@ MAX(f1) 7 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000009'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000009 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 6 + 1 -slave-bin.000009 # Query 1 # use `mysqltest1`; ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT -------- switch to master ------- flush logs; @@ -872,36 +513,22 @@ INSERT INTO t1 SET f1= 7 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 8 -SHOW BINLOG EVENTS IN 'master-bin.000010'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 7 -SHOW BINLOG EVENTS IN 'slave-bin.000010'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB"; SELECT MAX(f1) FROM t1; MAX(f1) 8 -SHOW BINLOG EVENTS IN 'master-bin.000010'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000010 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000010 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 7 + 1 -master-bin.000010 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000010 # Query 1 # use `mysqltest1`; CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB" -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 8 -SHOW BINLOG EVENTS IN 'slave-bin.000010'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000010 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 7 + 1 -slave-bin.000010 # Query 1 # use `mysqltest1`; CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB" -------- switch to master ------- ROLLBACK; @@ -910,12 +537,6 @@ MAX(f1) 8 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000010'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000010 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000010 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 7 + 1 -master-bin.000010 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000010 # Query 1 # use `mysqltest1`; CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB" -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -923,10 +544,6 @@ MAX(f1) 8 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000010'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000010 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 7 + 1 -slave-bin.000010 # Query 1 # use `mysqltest1`; CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB" -------- switch to master ------- flush logs; @@ -943,30 +560,22 @@ INSERT INTO t1 SET f1= 8 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 9 -SHOW BINLOG EVENTS IN 'master-bin.000011'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 8 -SHOW BINLOG EVENTS IN 'slave-bin.000011'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT); SELECT MAX(f1) FROM t1; MAX(f1) 9 -SHOW BINLOG EVENTS IN 'master-bin.000011'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 8 -SHOW BINLOG EVENTS IN 'slave-bin.000011'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- ROLLBACK; @@ -977,12 +586,6 @@ MAX(f1) 8 TEST-INFO: MASTER: The INSERT is not committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000011'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000011 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000011 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1 -master-bin.000011 # Query 1 # use `mysqltest1`; CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) -master-bin.000011 # Query 1 # use `mysqltest1`; ROLLBACK -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -990,10 +593,6 @@ MAX(f1) 9 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000011'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000011 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1 -slave-bin.000011 # Query 1 # use `mysqltest1`; CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) -------- switch to master ------- flush logs; @@ -1010,36 +609,22 @@ INSERT INTO t1 SET f1= 8 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 9 -SHOW BINLOG EVENTS IN 'master-bin.000012'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 9 -SHOW BINLOG EVENTS IN 'slave-bin.000012'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- TRUNCATE TABLE mysqltest1.t7; SELECT MAX(f1) FROM t1; MAX(f1) 9 -SHOW BINLOG EVENTS IN 'master-bin.000012'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000012 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000012 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1 -master-bin.000012 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000012 # Query 1 # use `mysqltest1`; TRUNCATE TABLE mysqltest1.t7 -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 9 -SHOW BINLOG EVENTS IN 'slave-bin.000012'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000012 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1 -slave-bin.000012 # Query 1 # use `mysqltest1`; TRUNCATE TABLE mysqltest1.t7 -------- switch to master ------- ROLLBACK; @@ -1048,12 +633,6 @@ MAX(f1) 9 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000012'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000012 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000012 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1 -master-bin.000012 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000012 # Query 1 # use `mysqltest1`; TRUNCATE TABLE mysqltest1.t7 -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -1061,10 +640,6 @@ MAX(f1) 9 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000012'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000012 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1 -slave-bin.000012 # Query 1 # use `mysqltest1`; TRUNCATE TABLE mysqltest1.t7 -------- switch to master ------- flush logs; @@ -1089,34 +664,22 @@ INSERT INTO t1 SET f1= 9 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 10 -SHOW BINLOG EVENTS IN 'master-bin.000013'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 9 -SHOW BINLOG EVENTS IN 'slave-bin.000013'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; SELECT MAX(f1) FROM t1; MAX(f1) 10 -SHOW BINLOG EVENTS IN 'master-bin.000013'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000013 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000013 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 9 + 1 -master-bin.000013 # Query 1 # use `mysqltest1`; COMMIT -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 10 -SHOW BINLOG EVENTS IN 'slave-bin.000013'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000013 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 9 + 1 -------- switch to master ------- ROLLBACK; @@ -1125,11 +688,6 @@ MAX(f1) 10 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000013'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000013 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000013 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 9 + 1 -master-bin.000013 # Query 1 # use `mysqltest1`; COMMIT -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -1137,9 +695,6 @@ MAX(f1) 10 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000013'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000013 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 9 + 1 -------- switch to master ------- flush logs; @@ -1157,30 +712,22 @@ INSERT INTO t1 SET f1= 10 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 11 -SHOW BINLOG EVENTS IN 'master-bin.000014'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 10 -SHOW BINLOG EVENTS IN 'slave-bin.000014'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- UNLOCK TABLES; SELECT MAX(f1) FROM t1; MAX(f1) 11 -SHOW BINLOG EVENTS IN 'master-bin.000014'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 10 -SHOW BINLOG EVENTS IN 'slave-bin.000014'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- ROLLBACK; @@ -1189,8 +736,6 @@ MAX(f1) 10 TEST-INFO: MASTER: The INSERT is not committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000014'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -1198,8 +743,6 @@ MAX(f1) 10 TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000014'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- flush logs; @@ -1218,30 +761,22 @@ ERROR HY000: Table 't1' was locked with a READ lock and can't be updated SELECT MAX(f1) FROM t1; MAX(f1) 10 -SHOW BINLOG EVENTS IN 'master-bin.000015'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 10 -SHOW BINLOG EVENTS IN 'slave-bin.000015'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- UNLOCK TABLES; SELECT MAX(f1) FROM t1; MAX(f1) 10 -SHOW BINLOG EVENTS IN 'master-bin.000015'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 10 -SHOW BINLOG EVENTS IN 'slave-bin.000015'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- ROLLBACK; @@ -1250,8 +785,6 @@ MAX(f1) 10 TEST-INFO: MASTER: The INSERT is not committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000015'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -1259,8 +792,6 @@ MAX(f1) 10 TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000015'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- flush logs; @@ -1278,34 +809,22 @@ INSERT INTO t1 SET f1= 10 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 11 -SHOW BINLOG EVENTS IN 'master-bin.000016'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 10 -SHOW BINLOG EVENTS IN 'slave-bin.000016'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- UNLOCK TABLES; SELECT MAX(f1) FROM t1; MAX(f1) 11 -SHOW BINLOG EVENTS IN 'master-bin.000016'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000016 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000016 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 10 + 1 -master-bin.000016 # Query 1 # use `mysqltest1`; COMMIT -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 11 -SHOW BINLOG EVENTS IN 'slave-bin.000016'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000016 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 10 + 1 -------- switch to master ------- ROLLBACK; @@ -1314,11 +833,6 @@ MAX(f1) 11 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000016'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000016 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000016 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 10 + 1 -master-bin.000016 # Query 1 # use `mysqltest1`; COMMIT -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -1326,9 +840,6 @@ MAX(f1) 11 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000016'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000016 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 10 + 1 -------- switch to master ------- flush logs; @@ -1345,36 +856,22 @@ INSERT INTO t1 SET f1= 11 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 12 -SHOW BINLOG EVENTS IN 'master-bin.000017'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 11 -SHOW BINLOG EVENTS IN 'slave-bin.000017'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- DROP INDEX my_idx6 ON mysqltest1.t6; SELECT MAX(f1) FROM t1; MAX(f1) 12 -SHOW BINLOG EVENTS IN 'master-bin.000017'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000017 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000017 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 11 + 1 -master-bin.000017 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000017 # Query 1 # use `mysqltest1`; DROP INDEX my_idx6 ON mysqltest1.t6 -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 12 -SHOW BINLOG EVENTS IN 'slave-bin.000017'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000017 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 11 + 1 -slave-bin.000017 # Query 1 # use `mysqltest1`; DROP INDEX my_idx6 ON mysqltest1.t6 -------- switch to master ------- ROLLBACK; @@ -1383,12 +880,6 @@ MAX(f1) 12 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000017'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000017 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000017 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 11 + 1 -master-bin.000017 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000017 # Query 1 # use `mysqltest1`; DROP INDEX my_idx6 ON mysqltest1.t6 -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -1396,10 +887,6 @@ MAX(f1) 12 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000017'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000017 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 11 + 1 -slave-bin.000017 # Query 1 # use `mysqltest1`; DROP INDEX my_idx6 ON mysqltest1.t6 -------- switch to master ------- flush logs; @@ -1424,36 +911,22 @@ INSERT INTO t1 SET f1= 12 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 13 -SHOW BINLOG EVENTS IN 'master-bin.000018'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 12 -SHOW BINLOG EVENTS IN 'slave-bin.000018'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- CREATE INDEX my_idx5 ON mysqltest1.t5(f1); SELECT MAX(f1) FROM t1; MAX(f1) 13 -SHOW BINLOG EVENTS IN 'master-bin.000018'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000018 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000018 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 12 + 1 -master-bin.000018 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000018 # Query 1 # use `mysqltest1`; CREATE INDEX my_idx5 ON mysqltest1.t5(f1) -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 13 -SHOW BINLOG EVENTS IN 'slave-bin.000018'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000018 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 12 + 1 -slave-bin.000018 # Query 1 # use `mysqltest1`; CREATE INDEX my_idx5 ON mysqltest1.t5(f1) -------- switch to master ------- ROLLBACK; @@ -1462,12 +935,6 @@ MAX(f1) 13 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000018'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000018 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000018 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 12 + 1 -master-bin.000018 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000018 # Query 1 # use `mysqltest1`; CREATE INDEX my_idx5 ON mysqltest1.t5(f1) -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -1475,10 +942,6 @@ MAX(f1) 13 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000018'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000018 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 12 + 1 -slave-bin.000018 # Query 1 # use `mysqltest1`; CREATE INDEX my_idx5 ON mysqltest1.t5(f1) -------- switch to master ------- flush logs; @@ -1505,36 +968,22 @@ INSERT INTO t1 SET f1= 13 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 14 -SHOW BINLOG EVENTS IN 'master-bin.000019'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 13 -SHOW BINLOG EVENTS IN 'slave-bin.000019'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- DROP DATABASE mysqltest2; SELECT MAX(f1) FROM t1; MAX(f1) 14 -SHOW BINLOG EVENTS IN 'master-bin.000019'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000019 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000019 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 13 + 1 -master-bin.000019 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000019 # Query 1 # DROP DATABASE mysqltest2 -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 14 -SHOW BINLOG EVENTS IN 'slave-bin.000019'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000019 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 13 + 1 -slave-bin.000019 # Query 1 # DROP DATABASE mysqltest2 -------- switch to master ------- ROLLBACK; @@ -1543,12 +992,6 @@ MAX(f1) 14 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000019'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000019 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000019 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 13 + 1 -master-bin.000019 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000019 # Query 1 # DROP DATABASE mysqltest2 -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -1556,10 +999,6 @@ MAX(f1) 14 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000019'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000019 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 13 + 1 -slave-bin.000019 # Query 1 # DROP DATABASE mysqltest2 -------- switch to master ------- flush logs; @@ -1584,36 +1023,22 @@ INSERT INTO t1 SET f1= 14 + 1; SELECT MAX(f1) FROM t1; MAX(f1) 15 -SHOW BINLOG EVENTS IN 'master-bin.000020'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 14 -SHOW BINLOG EVENTS IN 'slave-bin.000020'; -Log_name Pos Event_type Server_id Orig_log_pos Info -------- switch to master ------- CREATE DATABASE mysqltest3; SELECT MAX(f1) FROM t1; MAX(f1) 15 -SHOW BINLOG EVENTS IN 'master-bin.000020'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000020 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000020 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 14 + 1 -master-bin.000020 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000020 # Query 1 # CREATE DATABASE mysqltest3 -------- switch to slave -------- SELECT MAX(f1) FROM t1; MAX(f1) 15 -SHOW BINLOG EVENTS IN 'slave-bin.000020'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000020 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 14 + 1 -slave-bin.000020 # Query 1 # CREATE DATABASE mysqltest3 -------- switch to master ------- ROLLBACK; @@ -1622,12 +1047,6 @@ MAX(f1) 15 TEST-INFO: MASTER: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'master-bin.000020'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000020 # Query 1 # use `mysqltest1`; BEGIN -master-bin.000020 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 14 + 1 -master-bin.000020 # Query 1 # use `mysqltest1`; COMMIT -master-bin.000020 # Query 1 # CREATE DATABASE mysqltest3 -------- switch to slave -------- SELECT MAX(f1) FROM t1; @@ -1635,10 +1054,6 @@ MAX(f1) 15 TEST-INFO: SLAVE: The INSERT is committed (Succeeded) -SHOW BINLOG EVENTS IN 'slave-bin.000020'; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000020 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 14 + 1 -slave-bin.000020 # Query 1 # CREATE DATABASE mysqltest3 -------- switch to master ------- flush logs; diff --git a/mysql-test/t/rpl_ddl.test b/mysql-test/t/rpl_ddl.test index d9b09d397b5..301a55b5493 100644 --- a/mysql-test/t/rpl_ddl.test +++ b/mysql-test/t/rpl_ddl.test @@ -253,6 +253,8 @@ let $my_slave_commit= false; --source include/rpl_stmt_seq.inc # With prior read locking +# Note that this test generate an error since the rpl_stmt_seq.inc +# tries to insert into t1. LOCK TABLES mysqltest1.t1 READ; let $my_stmt= UNLOCK TABLES; let $my_master_commit= false; From 0812385dcc5557e25e09371dedf52bccd0102d4a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 16 Jun 2005 09:45:41 -0700 Subject: [PATCH 4/5] group_by.result, group_by.test: Added a test case for bug #8614. sql_select.cc: Fixed bug #8614. SELECT DISTINCT ... GROUP BY 'const' must be equivalent to SELECT ... GROUP BY 'const'. sql/sql_select.cc: Fixed bug #8614. SELECT DISTINCT ... GROUP BY 'const' must be equivalent to SELECT ... GROUP BY 'const'. mysql-test/t/group_by.test: Added a test case for bug #8614. mysql-test/r/group_by.result: Added a test case for bug #8614. --- mysql-test/r/group_by.result | 10 ++++++++++ mysql-test/t/group_by.test | 15 ++++++++++++++- sql/sql_select.cc | 11 ++++++++--- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 3e082fa04e3..ee4b6a31f2f 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -722,3 +722,13 @@ WHERE hostname LIKE '%aol%' GROUP BY hostname; hostname no cache-dtc-af05.proxy.aol.com 1 +DROP TABLE t1; +CREATE TABLE t1 (a int, b int); +INSERT INTO t1 VALUES (1,2), (1,3); +SELECT a, b FROM t1 GROUP BY 'const'; +a b +1 2 +SELECT DISTINCT a, b FROM t1 GROUP BY 'const'; +a b +1 2 +DROP TABLE t1; diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 21d5abcc287..f9d113a9c50 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -1,3 +1,4 @@ + # Initialise --disable_warnings drop table if exists t1,t2,t3; @@ -524,7 +525,7 @@ select min(b) from t1; drop table t1; # -# Test for bug #11088: GROUP BY a BLOB colimn with COUNT(DISTINCT column1) +# Test for bug #11088: GROUP BY a BLOB column with COUNT(DISTINCT column1) # CREATE TABLE t1 (id int PRIMARY KEY, user_id int, hostname longtext); @@ -539,3 +540,15 @@ SELECT hostname, COUNT(DISTINCT user_id) as no FROM t1 WHERE hostname LIKE '%aol%' GROUP BY hostname; +DROP TABLE t1; + +# +# Test for bug #8614: GROUP BY 'const with DISTINCT +# + +CREATE TABLE t1 (a int, b int); +INSERT INTO t1 VALUES (1,2), (1,3); +SELECT a, b FROM t1 GROUP BY 'const'; +SELECT DISTINCT a, b FROM t1 GROUP BY 'const'; + +DROP TABLE t1; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 352227acc68..5b5dde54bc9 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -676,9 +676,14 @@ JOIN::optimize() DBUG_RETURN(1); } simple_group= 0; - group_list= remove_const(this, group_list, conds, - rollup.state == ROLLUP::STATE_NONE, - &simple_group); + { + ORDER *old_group_list; + group_list= remove_const(this, (old_group_list= group_list), conds, + rollup.state == ROLLUP::STATE_NONE, + &simple_group); + if (old_group_list && !group_list) + select_distinct= 0; + } if (!group_list && group) { order=0; // The output has only one row From f2e153e53f412e9d88c3fb0f97725031e15edf13 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 16 Jun 2005 11:59:00 -0700 Subject: [PATCH 5/5] group_by.result, group_by.test: Correction after merge of fix for bug #8614. mysql-test/t/group_by.test: Correction after merge of fix for bug #8614. mysql-test/r/group_by.result: Correction after merge of fix for bug #8614. --- mysql-test/r/group_by.result | 8 ++------ mysql-test/t/group_by.test | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index ae986dc2a75..6e36d32bd2b 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -721,11 +721,8 @@ SELECT hostname, COUNT(DISTINCT user_id) as no FROM t1 WHERE hostname LIKE '%aol%' GROUP BY hostname; hostname no -cache-dtc-af05.proxy.aol.com -DROP TABLE t1; 1 -drop table if exists t1, t2; -Warnings: -Note 1051 Unknown table 't2' +cache-dtc-af05.proxy.aol.com 1 +DROP TABLE t1; create table t1 (c1 char(3), c2 char(3)); create table t2 (c3 char(3), c4 char(3)); insert into t1 values ('aaa', 'bb1'), ('aaa', 'bb2'); @@ -747,7 +744,6 @@ aaa show warnings; Level Code Message drop table t1, t2; -DROP TABLE t1; CREATE TABLE t1 (a int, b int); INSERT INTO t1 VALUES (1,2), (1,3); SELECT a, b FROM t1 GROUP BY 'const'; diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 0e94f4678b7..b652df7ecc4 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -546,7 +546,6 @@ DROP TABLE t1; # Bug#11211: Ambiguous column reference in GROUP BY. # -drop table if exists t1, t2; create table t1 (c1 char(3), c2 char(3)); create table t2 (c3 char(3), c4 char(3)); insert into t1 values ('aaa', 'bb1'), ('aaa', 'bb2');