From 47f561de04fda9883f703e5b92e9139eb5e59ccc Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 17 Mar 2004 18:43:58 +0400 Subject: Added test case for the bug #3155: strange results with index (x, y) ... WHERE x=val_1 AND y>=val_2 ORDER BY pk; (thankee Monty) mysql-test/r/order_by.result: Added test case for the bug #3155: strange results with index (x, y) ... WHERE x=val_1 AND y>=val_2 ORDER BY pk; mysql-test/t/order_by.test: Added test case for the bug #3155: strange results with index (x, y) ... WHERE x=val_1 AND y>=val_2 ORDER BY pk; --- mysql-test/t/order_by.test | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'mysql-test/t/order_by.test') diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index bbb0046b47f..2cd8dbbb95a 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -393,3 +393,28 @@ select * from t1 where b=1 or b is null order by a; explain select * from t1 where b=2 or b is null order by a; select * from t1 where b=2 or b is null order by a; drop table t1; + +# +# Bug #3155 +# + +create table t1 (a int not null auto_increment, b int not null, c int not null, d int not null, +key(a,b,d), key(c,b,a)); +create table t2 like t1; +insert into t1 values (NULL, 1, 2, 0), (NULL, 2, 1, 1), (NULL, 3, 4, 2), (NULL, 4, 3, 3); +insert into t2 select null, b, c, d from t1; +insert into t1 select null, b, c, d from t2; +insert into t2 select null, b, c, d from t1; +insert into t1 select null, b, c, d from t2; +insert into t2 select null, b, c, d from t1; +insert into t1 select null, b, c, d from t2; +insert into t2 select null, b, c, d from t1; +insert into t1 select null, b, c, d from t2; +insert into t2 select null, b, c, d from t1; +insert into t1 select null, b, c, d from t2; +optimize table t1; +set @row=10; +insert into t1 select 1, b, c + (@row:=@row - 1) * 10, d - @row from t2 limit 10; +select * from t1 where a=1 and b in (1) order by c, b, a; +select * from t1 where a=1 and b in (1); +drop table t1, t2; -- cgit v1.2.1 From 9cc7549518ac18b095895b18569ddcf58a392a9a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 26 Mar 2004 17:01:13 +0200 Subject: order_by.result: result of the test case for FORCE INDEX on ORDER BY order_by.test: test case for FORCE INDEX on ORDER BY sql_select.cc: Changing behaviour that MySQL server takes FORCE INDEX clause into account when optimising ORDER BY clause sql/sql_select.cc: Changing behaviour that MySQL server takes FORCE INDEX clause into account when optimising ORDER BY clause mysql-test/t/order_by.test: test case for FORCE INDEX on ORDER BY mysql-test/r/order_by.result: result of the test case for FORCE INDEX on ORDER BY --- mysql-test/t/order_by.test | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'mysql-test/t/order_by.test') diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index 8215ec84ae3..86ecc4aa70d 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -352,4 +352,15 @@ CREATE TABLE t1 (a INT, b INT); SET @id=0; UPDATE t1 SET a=0 ORDER BY (a=@id), b; DROP TABLE t1; - +create table t1(id int not null auto_increment primary key, t char(12)); +disable_query_log; +let $1 = 1000; +while ($1) + { + eval insert into t1(t) values ('$1'); + dec $1; + } +enable_query_log; +explain select id,t from t1 order by id; +explain select id,t from t1 force index (primary) order by id; +drop table t1; \ No newline at end of file -- cgit v1.2.1 From ceeaa24d187b228fd6e8b1ac1e667d341155640f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 30 Mar 2004 02:32:41 +0300 Subject: false/true -> FALSE/TRUE Fixes after last merge mysql-test/r/bdb-crash.result: fixed bad merge mysql-test/r/myisam.result: after merge fix mysql-test/r/order_by.result: fixed bad merge mysql-test/t/order_by.test: after merge fix sql/field_conv.cc: false/true -> FALSE/TRUE sql/handler.cc: false/true -> FALSE/TRUE sql/item.cc: false/true -> FALSE/TRUE sql/item_cmpfunc.cc: false/true -> FALSE/TRUE sql/item_sum.cc: false/true -> FALSE/TRUE sql/slave.cc: false/true -> FALSE/TRUE sql/sql_acl.cc: false/true -> FALSE/TRUE sql/sql_cache.cc: after merge fix sql/sql_help.cc: false/true -> FALSE/TRUE sql/sql_olap.cc: false/true -> FALSE/TRUE sql/sql_parse.cc: false/true -> FALSE/TRUE sql/sql_select.cc: fix after bad merge sql/sql_table.cc: fix after bad merge sql/sql_test.cc: false/true -> FALSE/TRUE --- mysql-test/t/order_by.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/t/order_by.test') diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index aa3e7429bf2..27c3fb28bb0 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -361,7 +361,7 @@ while ($1) enable_query_log; explain select id,t from t1 order by id; explain select id,t from t1 force index (primary) order by id; -drop table t1;s +drop table t1; # # Test of test_if_subkey() function -- cgit v1.2.1 From bc12d57fa781c3c0320733b9f096835f951edbbc Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 30 Mar 2004 19:24:28 +0300 Subject: Fix to get correct metadata when using temporary tables to create result. (Bug #2654) client/mysqltest.c: Added support for --enable_metadata mysql-test/t/order_by.test: Improved comment scripts/mysqlaccess.sh: CGI is required (Bug #2988) sql/field.cc: Fix to get correct metadata when using temporary tables to create result sql/field.h: Fix to get correct metadata when using temporary tables to create result sql/sql_insert.cc: Fix to get correct metadata when using temporary tables to create result --- mysql-test/t/order_by.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/t/order_by.test') diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index 27c3fb28bb0..9ae9c1b5e12 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -412,7 +412,7 @@ select * from t1 where b=2 or b is null order by a; drop table t1; # -# Bug #3155 +# Bug #3155 - Strange results with index (x, y) ... WHERE ... ORDER BY pk # create table t1 (a int not null auto_increment, b int not null, c int not null, d int not null, -- cgit v1.2.1