Loading mysql-test/r/ctype_recoding.result +1 −1 Original line number Diff line number Diff line Loading @@ -253,7 +253,7 @@ create table t1(a char character set cp1251 default _koi8r 0xFF); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` char(1) character set cp1251 default '' `a` char(1) CHARACTER SET cp1251 DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1(a char character set latin1 default _cp1251 0xFF); Loading mysql-test/r/innodb_mysql.result +26 −4 Original line number Diff line number Diff line Loading @@ -432,22 +432,44 @@ ifnull( c, 0 ) + 1; select last_insert_id(); last_insert_id() 1 2 select last_insert_id(0); last_insert_id(0) 0 insert into t2 ( a ) values ( 6 ) on duplicate key update c = ifnull( c, 0 ) + 1; select last_insert_id(); last_insert_id() 0 select * from t2; k a c 1 6 1 1 6 2 2 7 NULL insert ignore into t2 values (null,6,1),(10,8,1); select last_insert_id(); last_insert_id() 1 0 insert ignore into t2 values (null,6,1),(null,8,1),(null,15,1),(null,20,1); select last_insert_id(); last_insert_id() 11 select * from t2; k a c 1 6 1 1 6 2 2 7 NULL 10 8 1 11 15 1 12 20 1 insert into t2 ( a ) values ( 6 ) on duplicate key update c = ifnull( c, 0 ) + 1, k=last_insert_id(k); select last_insert_id(); last_insert_id() 1 select * from t2; k a c 1 6 3 2 7 NULL 10 8 1 11 15 1 Loading mysql-test/t/heap_btree.test +0 −12 Original line number Diff line number Diff line Loading @@ -204,16 +204,4 @@ CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY; INSERT INTO t1 VALUES(NULL),(NULL); DROP TABLE t1; select a from t1 where a > 2; delete from t1 where a < 4; select a from t1 order by a; insert into t1 values (2), (2), (2), (1), (1), (3), (3), (3), (3); select a from t1 where a > 4; delete from t1 where a > 4; select a from t1 order by a; select a from t1 where a > 3; delete from t1 where a >= 2; select a from t1 order by a; drop table t1; --echo End of 5.0 tests mysql-test/t/innodb_mysql.test +18 −3 Original line number Diff line number Diff line Loading @@ -369,8 +369,8 @@ insert into t1 values('aaa'); drop table t1; # Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY # UPDATE": now LAST_INSERT_ID() will return the id of the updated # row. # UPDATE": if the row is updated, it's like a regular UPDATE: # LAST_INSERT_ID() is not affected. CREATE TABLE `t2` ( `k` int(11) NOT NULL auto_increment, `a` int(11) default NULL, Loading @@ -390,6 +390,12 @@ insert into t2 ( a ) values ( 6 ) on duplicate key update c = ifnull( c, 0 ) + 1; select last_insert_id(); # test again when last_insert_id() is 0 initially select last_insert_id(0); insert into t2 ( a ) values ( 6 ) on duplicate key update c = ifnull( c, 0 ) + 1; select last_insert_id(); select * from t2; # Test of LAST_INSERT_ID() when autogenerated will fail: Loading @@ -402,5 +408,14 @@ insert ignore into t2 values (null,6,1),(null,8,1),(null,15,1),(null,20,1); select last_insert_id(); select * from t2; drop table t2; # Test of the workaround which enables people to know the id of the # updated row in INSERT ON DUPLICATE KEY UPDATE, by using # LAST_INSERT_ID(autoinc_col) in the UPDATE clause. insert into t2 ( a ) values ( 6 ) on duplicate key update c = ifnull( c, 0 ) + 1, k=last_insert_id(k); select last_insert_id(); select * from t2; drop table t2; mysql-test/t/partition.test +10 −6 Original line number Diff line number Diff line Loading @@ -1340,11 +1340,13 @@ subpartition by hash (a) (SUBPARTITION subpart00, SUBPARTITION subpart01)); --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/test/t1* || true --exec ls $MYSQLTEST_VARDIR/master-data/test/t1.* || true --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1* || true --exec ls $MYSQLTEST_VARDIR/master-data/test/t1#* || true --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1* || true --exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1#* || true --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1#* || true --replace_result $MYSQLTEST_VARDIR "hello" eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO Loading @@ -1354,11 +1356,13 @@ eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO (SUBPARTITION subpart20, SUBPARTITION subpart21)); --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/test/t1* || true --exec ls $MYSQLTEST_VARDIR/master-data/test/t1.* || true --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/test/t1#* || true --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1* || true --exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1#* || true --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1* || true --exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1#* || true drop table t1; --exec rmdir $MYSQLTEST_VARDIR/master-data/tmpdata || true Loading Loading
mysql-test/r/ctype_recoding.result +1 −1 Original line number Diff line number Diff line Loading @@ -253,7 +253,7 @@ create table t1(a char character set cp1251 default _koi8r 0xFF); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` char(1) character set cp1251 default '' `a` char(1) CHARACTER SET cp1251 DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1(a char character set latin1 default _cp1251 0xFF); Loading
mysql-test/r/innodb_mysql.result +26 −4 Original line number Diff line number Diff line Loading @@ -432,22 +432,44 @@ ifnull( c, 0 ) + 1; select last_insert_id(); last_insert_id() 1 2 select last_insert_id(0); last_insert_id(0) 0 insert into t2 ( a ) values ( 6 ) on duplicate key update c = ifnull( c, 0 ) + 1; select last_insert_id(); last_insert_id() 0 select * from t2; k a c 1 6 1 1 6 2 2 7 NULL insert ignore into t2 values (null,6,1),(10,8,1); select last_insert_id(); last_insert_id() 1 0 insert ignore into t2 values (null,6,1),(null,8,1),(null,15,1),(null,20,1); select last_insert_id(); last_insert_id() 11 select * from t2; k a c 1 6 1 1 6 2 2 7 NULL 10 8 1 11 15 1 12 20 1 insert into t2 ( a ) values ( 6 ) on duplicate key update c = ifnull( c, 0 ) + 1, k=last_insert_id(k); select last_insert_id(); last_insert_id() 1 select * from t2; k a c 1 6 3 2 7 NULL 10 8 1 11 15 1 Loading
mysql-test/t/heap_btree.test +0 −12 Original line number Diff line number Diff line Loading @@ -204,16 +204,4 @@ CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY; INSERT INTO t1 VALUES(NULL),(NULL); DROP TABLE t1; select a from t1 where a > 2; delete from t1 where a < 4; select a from t1 order by a; insert into t1 values (2), (2), (2), (1), (1), (3), (3), (3), (3); select a from t1 where a > 4; delete from t1 where a > 4; select a from t1 order by a; select a from t1 where a > 3; delete from t1 where a >= 2; select a from t1 order by a; drop table t1; --echo End of 5.0 tests
mysql-test/t/innodb_mysql.test +18 −3 Original line number Diff line number Diff line Loading @@ -369,8 +369,8 @@ insert into t1 values('aaa'); drop table t1; # Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY # UPDATE": now LAST_INSERT_ID() will return the id of the updated # row. # UPDATE": if the row is updated, it's like a regular UPDATE: # LAST_INSERT_ID() is not affected. CREATE TABLE `t2` ( `k` int(11) NOT NULL auto_increment, `a` int(11) default NULL, Loading @@ -390,6 +390,12 @@ insert into t2 ( a ) values ( 6 ) on duplicate key update c = ifnull( c, 0 ) + 1; select last_insert_id(); # test again when last_insert_id() is 0 initially select last_insert_id(0); insert into t2 ( a ) values ( 6 ) on duplicate key update c = ifnull( c, 0 ) + 1; select last_insert_id(); select * from t2; # Test of LAST_INSERT_ID() when autogenerated will fail: Loading @@ -402,5 +408,14 @@ insert ignore into t2 values (null,6,1),(null,8,1),(null,15,1),(null,20,1); select last_insert_id(); select * from t2; drop table t2; # Test of the workaround which enables people to know the id of the # updated row in INSERT ON DUPLICATE KEY UPDATE, by using # LAST_INSERT_ID(autoinc_col) in the UPDATE clause. insert into t2 ( a ) values ( 6 ) on duplicate key update c = ifnull( c, 0 ) + 1, k=last_insert_id(k); select last_insert_id(); select * from t2; drop table t2;
mysql-test/t/partition.test +10 −6 Original line number Diff line number Diff line Loading @@ -1340,11 +1340,13 @@ subpartition by hash (a) (SUBPARTITION subpart00, SUBPARTITION subpart01)); --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/test/t1* || true --exec ls $MYSQLTEST_VARDIR/master-data/test/t1.* || true --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1* || true --exec ls $MYSQLTEST_VARDIR/master-data/test/t1#* || true --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1* || true --exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1#* || true --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1#* || true --replace_result $MYSQLTEST_VARDIR "hello" eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO Loading @@ -1354,11 +1356,13 @@ eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO (SUBPARTITION subpart20, SUBPARTITION subpart21)); --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/test/t1* || true --exec ls $MYSQLTEST_VARDIR/master-data/test/t1.* || true --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/test/t1#* || true --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1* || true --exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1#* || true --replace_result $MYSQLTEST_VARDIR "hello" --exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1* || true --exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1#* || true drop table t1; --exec rmdir $MYSQLTEST_VARDIR/master-data/tmpdata || true Loading