From 89bb3165501b09b2922d361905a4efb7b490d8b0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Apr 2003 20:24:15 +0300 Subject: One test case, one bug fix and one new feature mysql-test/r/innodb.result: A test case for non-functional rollback after inserting a row into MyISAM table with binary log enabled. mysql-test/t/innodb.test: A test case for non-functional rollback after inserting a row into MyISAM table with binary log enabled. sql/sql_show.cc: Displaying disabled keys in SHOW KEYS sql/sql_table.cc: Fix for a serious bug with ALTER TABLE ENABLE / DISABLE KEYS --- mysql-test/t/innodb.test | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mysql-test/t/innodb.test') diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 2f7285e7898..9d614e8d163 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -797,3 +797,11 @@ select * from t1; select * from t2; drop table t1,t2; +CREATE TABLE t2 ( NEXT_T BIGINT NOT NULL PRIMARY KEY) TYPE=MyISAM; +CREATE TABLE t1 ( B_ID INTEGER NOT NULL PRIMARY KEY) TYPE=InnoDB; +SET AUTOCOMMIT=0; +INSERT INTO t1 ( B_ID ) VALUES ( 1 ); +INSERT INTO t2 ( NEXT_T ) VALUES ( 1 ); +ROLLBACK; +SELECT * FROM t1; +drop table t1,t2; -- cgit v1.2.1 From 3e335144be1af3f7c70a0c385b4e88da2c1e5e94 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 Apr 2003 20:09:24 +0300 Subject: Two bug fixes mysql-test/r/innodb.result: Fix for a bug that caused queries with ORDER BY field_in_select_list to be returned entirely unsorted. mysql-test/t/innodb.test: Fix for a bug that caused queries with ORDER BY field_in_select_list to be returned entirely unsorted. sql/sql_select.cc: Fix for a bug that caused queries with ORDER BY field_in_select_list to be returned entirely unsorted. sql/sql_update.cc: Fix for a glitch that caused too many tables to be locked. --- mysql-test/t/innodb.test | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mysql-test/t/innodb.test') diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 9d614e8d163..b8929d5c4de 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -802,6 +802,11 @@ CREATE TABLE t1 ( B_ID INTEGER NOT NULL PRIMARY KEY) TYPE=InnoDB; SET AUTOCOMMIT=0; INSERT INTO t1 ( B_ID ) VALUES ( 1 ); INSERT INTO t2 ( NEXT_T ) VALUES ( 1 ); +-- error 1196 ROLLBACK; SELECT * FROM t1; drop table t1,t2; +create table t1 ( pk int primary key, parent int not null, child int not null, index (parent) ) type = innodb; +insert into t1 values (1,0,4), (2,1,3), (3,2,1), (4,1,2); +select distinct parent,child from t1 order by parent; +drop table t1; -- cgit v1.2.1 From 7032486889f42b3f18b4a0a5be6cb97b74790ea8 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Apr 2003 21:52:16 +0300 Subject: Fixes for valgrind Added optimzation for clustered index Fixed bug in UPDATE ... ORDER BY Fixed handling of UPDATE ... LIMIT BitKeeper/deleted/.del-.cvsignore~7e29af89a3559f4c: Delete: Images/.cvsignore BitKeeper/deleted/.del-README~d5a4e7ca3a2e87a9: Delete: repl-tests/README BitKeeper/deleted/.del-run-all-tests~4deb6479a13e4568: Delete: repl-tests/run-all-tests BitKeeper/deleted/.del-run.test~3dc5b9bd1e9feea5: Delete: repl-tests/test-repl-alter/run.test BitKeeper/deleted/.del-run.test~4020771cff278f14: Delete: repl-tests/test-bad-query/run.test BitKeeper/deleted/.del-run.test~452f2b66537404a8: Delete: repl-tests/test-dump/run.test BitKeeper/deleted/.del-run.test~b1f0c1f96554df8: Delete: repl-tests/test-auto-inc/run.test BitKeeper/deleted/.del-table-dump-check.master~e13afeb8c79264b5: Delete: repl-tests/test-dump/table-dump-check.master BitKeeper/deleted/.del-table-dump-select.master~744acb955e33f3db: Delete: repl-tests/test-dump/table-dump-select.master BitKeeper/deleted/.del-x.master~29a93ed7956c8693: Delete: repl-tests/test-auto-inc/x.master BitKeeper/deleted/.del-x.master~3b248cbac9abda2b: Delete: repl-tests/test-bad-query/x.master BitKeeper/deleted/.del-foo-dump-master.master~b49ae6bec1e918ee: Delete: repl-tests/test-repl/foo-dump-master.master BitKeeper/deleted/.del-foo-dump-slave.master~f16ed20457d59be9: Delete: repl-tests/test-repl/foo-dump-slave.master BitKeeper/deleted/.del-repl-timestamp.master.reject~3492d2b74b413771: Delete: repl-tests/test-repl-ts/repl-timestamp.master.reject BitKeeper/deleted/.del-repl-timestamp.master~4b7782da5cc13161: Delete: repl-tests/test-repl-ts/repl-timestamp.master BitKeeper/deleted/.del-run.test~a1e32ea1e4253af4: Delete: repl-tests/test-repl/run.test BitKeeper/deleted/.del-run.test~ce5e626c91b760ec: Delete: repl-tests/test-repl-ts/run.test BitKeeper/deleted/.del-sum-wlen-master.master~1a5ea625c79e978: Delete: repl-tests/test-repl/sum-wlen-master.master BitKeeper/deleted/.del-sum-wlen-slave.master~f016d98833433084: Delete: repl-tests/test-repl/sum-wlen-slave.master BitKeeper/deleted/.del-test.master~5829e7b3770179db: Delete: repl-tests/test-repl-alter/test.master BitKeeper/deleted/.del-master-slave.inc~6775f6ae10137c39: Delete: repl-tests/include/master-slave.inc include/my_global.h: Fix for purify/valgrind myisam/mi_info.c: Updated comment mysql-test/r/group_by.result: New test results mysql-test/r/innodb.result: New test results mysql-test/r/join_outer.result: New test results mysql-test/r/multi_update.result: New test results mysql-test/r/null_key.result: New test results mysql-test/r/update.result: New test results mysql-test/t/group_by.test: Added extra explain to 'suspicious' test. mysql-test/t/innodb.test: Added test for UPDATE ... ORDER BY mysql-test/t/join_outer.test: Changed test to be repeatable mysql-test/t/multi_update.test: Slight change of test to catch more bugs mysql-test/t/update.test: Better test for UPDATE ... ORDER BY sql/field.cc: Simple optimization sql/ha_heap.h: Added optimzation for clustered index sql/ha_innodb.cc: Added optimzation for clustered index sql/ha_innodb.h: Added optimzation for clustered index sql/handler.h: Added optimzation for clustered index sql/item_sum.cc: Removed some usage of current_thd sql/mysqld.cc: Fix bug when compiling for purify/valgrind sql/opt_range.cc: Added optimzation for clustered index sql/records.cc: Fixed comment sql/sql_list.h: Fixed comment sql/sql_select.cc: Removed some usage of current_thd sql/sql_select.h: Removed some usage of current_thd sql/sql_union.cc: Removed some usage of current_thd sql/sql_update.cc: Fixed bug in UPDATE ... ORDER BY Fixed handling of UPDATE ... LIMIT support-files/my-huge.cnf.sh: Added default size for query cache support-files/my-large.cnf.sh: Added default size for query cache --- mysql-test/t/innodb.test | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'mysql-test/t/innodb.test') diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 2f7285e7898..88edaac190a 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -795,5 +795,58 @@ select * from t1; update t1,t2 set t1.b=t1.b+2,t2.b=t1.b where t1.b between 3 and 5; select * from t1; select * from t2; +drop table t1,t2; +# +# Test that MySQL priorities clustered indexes +# + +create table t1 (a int not null auto_increment primary key, b int, c int, key(c)) type=innodb; +create table t2 (a int not null auto_increment primary key, b int); +insert into t1 (b) values (null),(null),(null),(null),(null),(null),(null); +insert into t2 (a) select b from t1; +insert into t1 (b) select b from t2; +insert into t2 (a) select b from t1; +insert into t1 (a) select b from t2; +insert into t2 (a) select b from t1; +insert into t1 (a) select b from t2; +insert into t2 (a) select b from t1; +insert into t1 (a) select b from t2; +insert into t2 (a) select b from t1; +insert into t1 (a) select b from t2; +insert into t2 (a) select b from t1; +insert into t1 (a) select b from t2; +insert into t2 (a) select b from t1; +insert into t1 (a) select b from t2; +insert into t2 (a) select b from t1; +insert into t1 (a) select b from t2; +insert into t2 (a) select b from t1; +insert into t1 (a) select b from t2; +select count(*) from t1; +explain select a from t1 where a between 1 and 10000; +explain select * from t1 where a between 1 and 10000; +explain select * from t1 where c between 1 and 10000; +update t1 set c=a; +explain select * from t1 where c between 1 and 10000; drop table t1,t2; + +# +# Test of UPDATE ... ORDER BY +# + +create table t1 (id int primary key auto_increment, fk int, index index_fk (fk)) type=innodb; + +insert into t1 (id) values (null),(null),(null),(null),(null); +update t1 set fk=69 where fk is null order by id limit 1; +SELECT * from t1; +drop table t1; + +create table t1 (a int not null, b int not null, key (a)); +insert into t1 values (1,1),(1,2),(1,3),(3,1),(3,2),(3,3),(3,1),(3,2),(3,3),(2,1),(2,2),(2,3); +SET @tmp=0; +update t1 set b=(@tmp:=@tmp+1) order by a; +update t1 set b=99 where a=1 order by b asc limit 1; +update t1 set b=100 where a=1 order by b desc limit 2; +update t1 set a=a+10+b where a=1 order by b; +select * from t1 order by a,b; +drop table t1; -- cgit v1.2.1 From 671e77a1f7bfbb51fdd2d9af361e226e89506048 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Apr 2003 16:05:27 +0200 Subject: - Removed two EXPLAIN SELECT statements from the InnoDB test suite (the results are nondeterministic and provide different output on 32bit and 64bit architectures) mysql-test/r/innodb.result: - removed two EXPLAIN SELECT results because the output is nondeterministic (the result was different on 64bit platforms) mysql-test/t/innodb.test: - removed two EXPLAIN SELECT tests because the results are nondeterministic (the result was different on 64bit platforms) --- mysql-test/t/innodb.test | 2 -- 1 file changed, 2 deletions(-) (limited to 'mysql-test/t/innodb.test') diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 88edaac190a..ab3157a7f86 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -823,8 +823,6 @@ insert into t1 (a) select b from t2; insert into t2 (a) select b from t1; insert into t1 (a) select b from t2; select count(*) from t1; -explain select a from t1 where a between 1 and 10000; -explain select * from t1 where a between 1 and 10000; explain select * from t1 where c between 1 and 10000; update t1 set c=a; explain select * from t1 where c between 1 and 10000; -- cgit v1.2.1 From 38b70f0608fbd8f5c3f25fba16c2887611311803 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Apr 2003 14:13:22 +0300 Subject: code cleanup mysql-test/r/innodb.result: fixing result mysql-test/t/innodb.test: fixing test sql/sql_base.cc: committing a fix in order to pull new stuff --- mysql-test/t/innodb.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/t/innodb.test') diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 393112beb27..4fb9351020e 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -809,7 +809,7 @@ drop table t1,t2; create table t1 ( pk int primary key, parent int not null, child int not null, index (parent) ) type = innodb; insert into t1 values (1,0,4), (2,1,3), (3,2,1), (4,1,2); select distinct parent,child from t1 order by parent; -drop table t1,t2; +drop table t1; # # Test that MySQL priorities clustered indexes -- cgit v1.2.1 From 34c3c0279441554e8d42ff0ec18a2890c1a6e148 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 3 May 2003 16:21:43 +0300 Subject: Fix problem where key_read was not cleaned up properly, which caused assert in innodb test. mysql-test/r/innodb.result: Changed tests to make them repeatable. mysql-test/t/innodb.test: Changed tests to make them repeatable. sql/opt_sum.cc: Safety fix sql/sql_base.cc: Safety assert --- mysql-test/t/innodb.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/t/innodb.test') diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index ab3157a7f86..8aa26b567a6 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -776,7 +776,7 @@ drop table t1; CREATE TABLE t1 (a int not null primary key, b int not null, key (b)) type=innodb; CREATE TABLE t2 (a int not null primary key, b int not null, key (b)) type=innodb; -INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9); +INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,12); INSERT INTO t2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9); # Full join, without key @@ -792,7 +792,7 @@ update t1,t2 set t1.b=t1.b+10 where t1.b=2; select * from t1; # Range key (in t1) -update t1,t2 set t1.b=t1.b+2,t2.b=t1.b where t1.b between 3 and 5; +update t1,t2 set t1.b=t1.b+2,t2.b=t1.b+10 where t1.b between 3 and 5 and t1.a=t2.a+100; select * from t1; select * from t2; drop table t1,t2; -- cgit v1.2.1 From 7a96b137ef140d2e6d372927c33ca0aecb058ffa Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 13 May 2003 19:30:07 +0200 Subject: - disabled all "EXPLAIN SELECT" tests from the InnoDB test because of nodeterministic results on some platforms --- mysql-test/t/innodb.test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mysql-test/t/innodb.test') diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index ae1f7dae922..dc3c76f1a91 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -40,9 +40,9 @@ update ignore t1 set id=id+1; # This will change all rows select * from t1; update ignore t1 set id=1023 where id=1010; select * from t1 where parent_id=102; -explain select level from t1 where level=1; -explain select level,id from t1 where level=1; -explain select level,id,parent_id from t1 where level=1; +# explain select level from t1 where level=1; +# explain select level,id from t1 where level=1; +# explain select level,id,parent_id from t1 where level=1; select level,id from t1 where level=1; select level,id,parent_id from t1 where level=1; optimize table t1; @@ -339,7 +339,7 @@ update ignore t1 set id=id+1; # This will change all rows select * from t1; update ignore t1 set id=1023 where id=1010; select * from t1 where parent_id=102; -explain select level from t1 where level=1; +# explain select level from t1 where level=1; select level,id from t1 where level=1; select level,id,parent_id from t1 where level=1; select level,id from t1 where level=1 order by id; -- cgit v1.2.1