Loading mysql-test/r/ndb_auto_increment.result +3 −3 Original line number Diff line number Diff line Loading @@ -421,10 +421,10 @@ select * from t1 order by a; a 1 20 21 33 34 35 65 insert into t1 values (100); insert into t1 values (NULL); insert into t1 values (NULL); Loading @@ -432,11 +432,11 @@ select * from t1 order by a; a 1 20 21 22 33 34 35 65 66 100 101 set auto_increment_offset = @old_auto_increment_offset; Loading mysql-test/r/ndb_bug31477.result 0 → 100644 +98 −0 Original line number Diff line number Diff line drop table if exists t1; create table t1(a int primary key, b int, c int, unique(b)) engine = ndb; insert into t1 values (2,2,2); insert into t1 values (3,3,3); insert into t1 values (4,4,4); begin; insert into t1 values (1,1,1); begin; update t1 set c = 2 where b = 1; ERROR HY000: Lock wait timeout exceeded; try restarting transaction rollback; rollback; drop table t1; create table t1(a int primary key, b int, c int, key(b)) engine = ndb; insert into t1 values (2,2,2); insert into t1 values (3,3,3); insert into t1 values (4,4,4); begin; insert into t1 values (1,1,1); begin; update t1 set c = 2 where b = 1; ERROR HY000: Lock wait timeout exceeded; try restarting transaction rollback; rollback; drop table t1; --con1 create table t1(a int primary key, b int, c int, key(b)) engine = ndb; insert into t1 values (1,1,1); insert into t1 values (2,2,2); insert into t1 values (3,3,3); insert into t1 values (4,4,4); begin; update t1 set c = 10 where a = 1; update t1 set c = 20 where a = 1; update t1 set c = 30 where a = 1; --con1 c=30 select * from t1 where b >= 1 order by b; a b c 1 1 30 2 2 2 3 3 3 4 4 4 --con2 c=1 select * from t1 where b >= 1 order by b; a b c 1 1 1 2 2 2 3 3 3 4 4 4 --con1 delete from t1 where a = 1; --con1 c=none select * from t1 where b >= 1 order by b; a b c 2 2 2 3 3 3 4 4 4 --con2 c=1 select * from t1 where b >= 1 order by b; a b c 1 1 1 2 2 2 3 3 3 4 4 4 --con1 commit; --con1 c=none select * from t1 where b >= 1 order by b; a b c 2 2 2 3 3 3 4 4 4 --con2 c=none select * from t1 where b >= 1 order by b; a b c 2 2 2 3 3 3 4 4 4 --con1 begin; insert into t1 values (1,1,1); update t1 set c = 10 where a = 1; update t1 set c = 20 where a = 1; update t1 set c = 30 where a = 1; --con1 c=30 select * from t1 where b >= 1 order by b; a b c 1 1 30 2 2 2 3 3 3 4 4 4 --con2 c=none select * from t1 where b >= 1 order by b; a b c 2 2 2 3 3 3 4 4 4 drop table t1; mysql-test/r/ndb_condition_pushdown.result +6 −0 Original line number Diff line number Diff line Loading @@ -1904,6 +1904,12 @@ a b d 10 1 4369 20 2 8738 50 5 21845 -- big filter just below limit a b d 10 1 4369 20 2 8738 50 5 21845 -- big filter just above limit a b d 10 1 4369 20 2 8738 Loading mysql-test/r/ndb_restore.result +35 −15 Original line number Diff line number Diff line Loading @@ -266,21 +266,41 @@ a 2000 3000 10000 show table status like 't1_c'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment X X X X X X X X X X 3001 X X X X X X X show table status like 't2_c'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment X X X X X X X X X X 501 X X X X X X X show table status like 't4_c'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment X X X X X X X X X X 290000001 X X X X X X X show table status like 't7_c'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment X X X X X X X X X X 29 X X X X X X X show table status like 't10_c'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment X X X X X X X X X X 10001 X X X X X X X select max(capgoaledatta) from t1_c; max(capgoaledatta) 3000 select auto_increment from information_schema.tables where table_name = 't1_c'; auto_increment 3001 select max(capgotod) from t2_c; max(capgotod) 500 select auto_increment from information_schema.tables where table_name = 't2_c'; auto_increment 501 select max(capfa) from t4_c; max(capfa) 290000000 select auto_increment from information_schema.tables where table_name = 't4_c'; auto_increment 290000001 select max(dardtestard) from t7_c; max(dardtestard) 28 select auto_increment from information_schema.tables where table_name = 't7_c'; auto_increment 29 select max(a) from t10_c; max(a) 10000 select auto_increment from information_schema.tables where table_name = 't10_c'; auto_increment 10001 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9, t10; drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c, t10_c; 520093696,<the_backup_id> mysql-test/t/ndb_bug31477.test 0 → 100644 +109 −0 Original line number Diff line number Diff line --source include/have_ndb.inc --disable_warnings drop table if exists t1; --enable_warnings # setup connect (con1,localhost,root,,test); connect (con2,localhost,root,,test); # unique index connection con1; create table t1(a int primary key, b int, c int, unique(b)) engine = ndb; insert into t1 values (2,2,2); insert into t1 values (3,3,3); insert into t1 values (4,4,4); begin; insert into t1 values (1,1,1); connection con2; begin; --error 1205 update t1 set c = 2 where b = 1; rollback; connection con1; rollback; drop table t1; # ordered index connection con1; create table t1(a int primary key, b int, c int, key(b)) engine = ndb; insert into t1 values (2,2,2); insert into t1 values (3,3,3); insert into t1 values (4,4,4); begin; insert into t1 values (1,1,1); connection con2; begin; --error 1205 update t1 set c = 2 where b = 1; rollback; connection con1; rollback; drop table t1; # multiple versions --echo --con1 connection con1; create table t1(a int primary key, b int, c int, key(b)) engine = ndb; insert into t1 values (1,1,1); insert into t1 values (2,2,2); insert into t1 values (3,3,3); insert into t1 values (4,4,4); begin; update t1 set c = 10 where a = 1; update t1 set c = 20 where a = 1; update t1 set c = 30 where a = 1; --echo --con1 c=30 select * from t1 where b >= 1 order by b; --echo --con2 c=1 connection con2; select * from t1 where b >= 1 order by b; --echo --con1 connection con1; delete from t1 where a = 1; --echo --con1 c=none select * from t1 where b >= 1 order by b; --echo --con2 c=1 connection con2; select * from t1 where b >= 1 order by b; --echo --con1 connection con1; commit; --echo --con1 c=none select * from t1 where b >= 1 order by b; --echo --con2 c=none connection con2; select * from t1 where b >= 1 order by b; --echo --con1 connection con1; begin; insert into t1 values (1,1,1); update t1 set c = 10 where a = 1; update t1 set c = 20 where a = 1; update t1 set c = 30 where a = 1; --echo --con1 c=30 select * from t1 where b >= 1 order by b; --echo --con2 c=none connection con2; select * from t1 where b >= 1 order by b; # this fails with "no such table" via con2 ??? connection con1; drop table t1; Loading
mysql-test/r/ndb_auto_increment.result +3 −3 Original line number Diff line number Diff line Loading @@ -421,10 +421,10 @@ select * from t1 order by a; a 1 20 21 33 34 35 65 insert into t1 values (100); insert into t1 values (NULL); insert into t1 values (NULL); Loading @@ -432,11 +432,11 @@ select * from t1 order by a; a 1 20 21 22 33 34 35 65 66 100 101 set auto_increment_offset = @old_auto_increment_offset; Loading
mysql-test/r/ndb_bug31477.result 0 → 100644 +98 −0 Original line number Diff line number Diff line drop table if exists t1; create table t1(a int primary key, b int, c int, unique(b)) engine = ndb; insert into t1 values (2,2,2); insert into t1 values (3,3,3); insert into t1 values (4,4,4); begin; insert into t1 values (1,1,1); begin; update t1 set c = 2 where b = 1; ERROR HY000: Lock wait timeout exceeded; try restarting transaction rollback; rollback; drop table t1; create table t1(a int primary key, b int, c int, key(b)) engine = ndb; insert into t1 values (2,2,2); insert into t1 values (3,3,3); insert into t1 values (4,4,4); begin; insert into t1 values (1,1,1); begin; update t1 set c = 2 where b = 1; ERROR HY000: Lock wait timeout exceeded; try restarting transaction rollback; rollback; drop table t1; --con1 create table t1(a int primary key, b int, c int, key(b)) engine = ndb; insert into t1 values (1,1,1); insert into t1 values (2,2,2); insert into t1 values (3,3,3); insert into t1 values (4,4,4); begin; update t1 set c = 10 where a = 1; update t1 set c = 20 where a = 1; update t1 set c = 30 where a = 1; --con1 c=30 select * from t1 where b >= 1 order by b; a b c 1 1 30 2 2 2 3 3 3 4 4 4 --con2 c=1 select * from t1 where b >= 1 order by b; a b c 1 1 1 2 2 2 3 3 3 4 4 4 --con1 delete from t1 where a = 1; --con1 c=none select * from t1 where b >= 1 order by b; a b c 2 2 2 3 3 3 4 4 4 --con2 c=1 select * from t1 where b >= 1 order by b; a b c 1 1 1 2 2 2 3 3 3 4 4 4 --con1 commit; --con1 c=none select * from t1 where b >= 1 order by b; a b c 2 2 2 3 3 3 4 4 4 --con2 c=none select * from t1 where b >= 1 order by b; a b c 2 2 2 3 3 3 4 4 4 --con1 begin; insert into t1 values (1,1,1); update t1 set c = 10 where a = 1; update t1 set c = 20 where a = 1; update t1 set c = 30 where a = 1; --con1 c=30 select * from t1 where b >= 1 order by b; a b c 1 1 30 2 2 2 3 3 3 4 4 4 --con2 c=none select * from t1 where b >= 1 order by b; a b c 2 2 2 3 3 3 4 4 4 drop table t1;
mysql-test/r/ndb_condition_pushdown.result +6 −0 Original line number Diff line number Diff line Loading @@ -1904,6 +1904,12 @@ a b d 10 1 4369 20 2 8738 50 5 21845 -- big filter just below limit a b d 10 1 4369 20 2 8738 50 5 21845 -- big filter just above limit a b d 10 1 4369 20 2 8738 Loading
mysql-test/r/ndb_restore.result +35 −15 Original line number Diff line number Diff line Loading @@ -266,21 +266,41 @@ a 2000 3000 10000 show table status like 't1_c'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment X X X X X X X X X X 3001 X X X X X X X show table status like 't2_c'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment X X X X X X X X X X 501 X X X X X X X show table status like 't4_c'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment X X X X X X X X X X 290000001 X X X X X X X show table status like 't7_c'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment X X X X X X X X X X 29 X X X X X X X show table status like 't10_c'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment X X X X X X X X X X 10001 X X X X X X X select max(capgoaledatta) from t1_c; max(capgoaledatta) 3000 select auto_increment from information_schema.tables where table_name = 't1_c'; auto_increment 3001 select max(capgotod) from t2_c; max(capgotod) 500 select auto_increment from information_schema.tables where table_name = 't2_c'; auto_increment 501 select max(capfa) from t4_c; max(capfa) 290000000 select auto_increment from information_schema.tables where table_name = 't4_c'; auto_increment 290000001 select max(dardtestard) from t7_c; max(dardtestard) 28 select auto_increment from information_schema.tables where table_name = 't7_c'; auto_increment 29 select max(a) from t10_c; max(a) 10000 select auto_increment from information_schema.tables where table_name = 't10_c'; auto_increment 10001 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9, t10; drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c, t10_c; 520093696,<the_backup_id>
mysql-test/t/ndb_bug31477.test 0 → 100644 +109 −0 Original line number Diff line number Diff line --source include/have_ndb.inc --disable_warnings drop table if exists t1; --enable_warnings # setup connect (con1,localhost,root,,test); connect (con2,localhost,root,,test); # unique index connection con1; create table t1(a int primary key, b int, c int, unique(b)) engine = ndb; insert into t1 values (2,2,2); insert into t1 values (3,3,3); insert into t1 values (4,4,4); begin; insert into t1 values (1,1,1); connection con2; begin; --error 1205 update t1 set c = 2 where b = 1; rollback; connection con1; rollback; drop table t1; # ordered index connection con1; create table t1(a int primary key, b int, c int, key(b)) engine = ndb; insert into t1 values (2,2,2); insert into t1 values (3,3,3); insert into t1 values (4,4,4); begin; insert into t1 values (1,1,1); connection con2; begin; --error 1205 update t1 set c = 2 where b = 1; rollback; connection con1; rollback; drop table t1; # multiple versions --echo --con1 connection con1; create table t1(a int primary key, b int, c int, key(b)) engine = ndb; insert into t1 values (1,1,1); insert into t1 values (2,2,2); insert into t1 values (3,3,3); insert into t1 values (4,4,4); begin; update t1 set c = 10 where a = 1; update t1 set c = 20 where a = 1; update t1 set c = 30 where a = 1; --echo --con1 c=30 select * from t1 where b >= 1 order by b; --echo --con2 c=1 connection con2; select * from t1 where b >= 1 order by b; --echo --con1 connection con1; delete from t1 where a = 1; --echo --con1 c=none select * from t1 where b >= 1 order by b; --echo --con2 c=1 connection con2; select * from t1 where b >= 1 order by b; --echo --con1 connection con1; commit; --echo --con1 c=none select * from t1 where b >= 1 order by b; --echo --con2 c=none connection con2; select * from t1 where b >= 1 order by b; --echo --con1 connection con1; begin; insert into t1 values (1,1,1); update t1 set c = 10 where a = 1; update t1 set c = 20 where a = 1; update t1 set c = 30 where a = 1; --echo --con1 c=30 select * from t1 where b >= 1 order by b; --echo --con2 c=none connection con2; select * from t1 where b >= 1 order by b; # this fails with "no such table" via con2 ??? connection con1; drop table t1;