Loading mysql-test/r/innodb.result +28 −0 Original line number Diff line number Diff line Loading @@ -1694,3 +1694,31 @@ select min(b) from t1 where a='8'; min(b) 6 drop table t1; create table test_checksum(a int not null) engine=innodb DEFAULT CHARSET=latin1; insert into test_checksum values (1),(2); set autocommit=0; checksum table test_checksum; Table Checksum test.test_checksum 1531596814 insert into test_checksum values(3); checksum table test_checksum; Table Checksum test.test_checksum 1531596814 commit; checksum table test_checksum; Table Checksum test.test_checksum 2050879373 commit; drop table test_checksum; create table test_checksum(a int not null) engine=innodb DEFAULT CHARSET=latin1; insert into test_checksum values (1),(2); set autocommit=1; checksum table test_checksum; Table Checksum test.test_checksum 1531596814 set autocommit=1; insert into test_checksum values(3); checksum table test_checksum; Table Checksum test.test_checksum 2050879373 drop table test_checksum; mysql-test/t/disabled.def 0 → 100644 +16 −0 Original line number Diff line number Diff line ############################################################################## # # List the test cases that are to be disabled temporarely. # # Separate the test case name and the comment with ':'. # # <testcasename> : Comment test # # Don't use any TAB characters for whitespace. # ############################################################################## rpl_relayrotate : Unstable test case, bug#12429 rpl_until : Unstable test case, bug#12429 rpl_deadlock : Unstable test case, bug#12429 kill : Unstable test case, bug#9712 mysql-test/t/innodb.test +41 −0 Original line number Diff line number Diff line Loading @@ -1239,4 +1239,45 @@ insert into t1 values ('8', '6'), ('4', '7'); select min(a) from t1; select min(b) from t1 where a='8'; drop table t1; # # Test that checksum table uses a consistent read Bug #12669 # connect (a,localhost,root,,); connect (b,localhost,root,,); connection a; create table test_checksum(a int not null) engine=innodb DEFAULT CHARSET=latin1; insert into test_checksum values (1),(2); set autocommit=0; checksum table test_checksum; connection b; insert into test_checksum values(3); connection a; # # Here checksum should not see insert # checksum table test_checksum; connection a; commit; checksum table test_checksum; commit; drop table test_checksum; # # autocommit = 1 # connection a; create table test_checksum(a int not null) engine=innodb DEFAULT CHARSET=latin1; insert into test_checksum values (1),(2); set autocommit=1; checksum table test_checksum; connection b; set autocommit=1; insert into test_checksum values(3); connection a; # # Here checksum sees insert # checksum table test_checksum; drop table test_checksum; # End of 4.1 tests scripts/mysql_config.sh +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ libs_r="$ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @LIBS@ @openssl_libs@" libs_r=`echo "$libs_r" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'` cflags="-I$pkgincludedir @CFLAGS@ " #note: end space! include="-I$pkgincludedir" embedded_libs="$ldflags -L$pkglibdir -lmysqld @LIBS@ @WRAPLIBS@ @innodb_system_libs@ $client_libs" embedded_libs="$ldflags -L$pkglibdir -lmysqld @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @innodb_system_libs@" embedded_libs=`echo "$embedded_libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'` # Remove some options that a client doesn't have to care about Loading sql/ha_innodb.cc +7 −0 Original line number Diff line number Diff line Loading @@ -5421,6 +5421,13 @@ ha_innobase::store_lock( prebuilt->select_lock_type = LOCK_NONE; prebuilt->stored_select_lock_type = LOCK_NONE; } else if (thd->lex->sql_command == SQLCOM_CHECKSUM) { /* Use consistent read for checksum table and convert lock type to the TL_READ */ prebuilt->select_lock_type = LOCK_NONE; prebuilt->stored_select_lock_type = LOCK_NONE; lock.type = TL_READ; } else { prebuilt->select_lock_type = LOCK_S; prebuilt->stored_select_lock_type = LOCK_S; Loading Loading
mysql-test/r/innodb.result +28 −0 Original line number Diff line number Diff line Loading @@ -1694,3 +1694,31 @@ select min(b) from t1 where a='8'; min(b) 6 drop table t1; create table test_checksum(a int not null) engine=innodb DEFAULT CHARSET=latin1; insert into test_checksum values (1),(2); set autocommit=0; checksum table test_checksum; Table Checksum test.test_checksum 1531596814 insert into test_checksum values(3); checksum table test_checksum; Table Checksum test.test_checksum 1531596814 commit; checksum table test_checksum; Table Checksum test.test_checksum 2050879373 commit; drop table test_checksum; create table test_checksum(a int not null) engine=innodb DEFAULT CHARSET=latin1; insert into test_checksum values (1),(2); set autocommit=1; checksum table test_checksum; Table Checksum test.test_checksum 1531596814 set autocommit=1; insert into test_checksum values(3); checksum table test_checksum; Table Checksum test.test_checksum 2050879373 drop table test_checksum;
mysql-test/t/disabled.def 0 → 100644 +16 −0 Original line number Diff line number Diff line ############################################################################## # # List the test cases that are to be disabled temporarely. # # Separate the test case name and the comment with ':'. # # <testcasename> : Comment test # # Don't use any TAB characters for whitespace. # ############################################################################## rpl_relayrotate : Unstable test case, bug#12429 rpl_until : Unstable test case, bug#12429 rpl_deadlock : Unstable test case, bug#12429 kill : Unstable test case, bug#9712
mysql-test/t/innodb.test +41 −0 Original line number Diff line number Diff line Loading @@ -1239,4 +1239,45 @@ insert into t1 values ('8', '6'), ('4', '7'); select min(a) from t1; select min(b) from t1 where a='8'; drop table t1; # # Test that checksum table uses a consistent read Bug #12669 # connect (a,localhost,root,,); connect (b,localhost,root,,); connection a; create table test_checksum(a int not null) engine=innodb DEFAULT CHARSET=latin1; insert into test_checksum values (1),(2); set autocommit=0; checksum table test_checksum; connection b; insert into test_checksum values(3); connection a; # # Here checksum should not see insert # checksum table test_checksum; connection a; commit; checksum table test_checksum; commit; drop table test_checksum; # # autocommit = 1 # connection a; create table test_checksum(a int not null) engine=innodb DEFAULT CHARSET=latin1; insert into test_checksum values (1),(2); set autocommit=1; checksum table test_checksum; connection b; set autocommit=1; insert into test_checksum values(3); connection a; # # Here checksum sees insert # checksum table test_checksum; drop table test_checksum; # End of 4.1 tests
scripts/mysql_config.sh +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ libs_r="$ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @LIBS@ @openssl_libs@" libs_r=`echo "$libs_r" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'` cflags="-I$pkgincludedir @CFLAGS@ " #note: end space! include="-I$pkgincludedir" embedded_libs="$ldflags -L$pkglibdir -lmysqld @LIBS@ @WRAPLIBS@ @innodb_system_libs@ $client_libs" embedded_libs="$ldflags -L$pkglibdir -lmysqld @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @innodb_system_libs@" embedded_libs=`echo "$embedded_libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'` # Remove some options that a client doesn't have to care about Loading
sql/ha_innodb.cc +7 −0 Original line number Diff line number Diff line Loading @@ -5421,6 +5421,13 @@ ha_innobase::store_lock( prebuilt->select_lock_type = LOCK_NONE; prebuilt->stored_select_lock_type = LOCK_NONE; } else if (thd->lex->sql_command == SQLCOM_CHECKSUM) { /* Use consistent read for checksum table and convert lock type to the TL_READ */ prebuilt->select_lock_type = LOCK_NONE; prebuilt->stored_select_lock_type = LOCK_NONE; lock.type = TL_READ; } else { prebuilt->select_lock_type = LOCK_S; prebuilt->stored_select_lock_type = LOCK_S; Loading