summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-03-30 02:32:41 +0300
committerunknown <monty@mysql.com>2004-03-30 02:32:41 +0300
commitceeaa24d187b228fd6e8b1ac1e667d341155640f (patch)
tree54b32bf1935af765ea1bb9b118082d9ce067d4c0 /mysql-test
parentdb9fde085fdbdacd48760c0243805e8df8b39a8c (diff)
downloadmariadb-git-ceeaa24d187b228fd6e8b1ac1e667d341155640f.tar.gz
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
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/bdb-crash.result7
-rw-r--r--mysql-test/r/myisam.result12
-rw-r--r--mysql-test/r/order_by.result105
-rw-r--r--mysql-test/t/order_by.test2
4 files changed, 112 insertions, 14 deletions
diff --git a/mysql-test/r/bdb-crash.result b/mysql-test/r/bdb-crash.result
index e414934b07c..778890e85e3 100644
--- a/mysql-test/r/bdb-crash.result
+++ b/mysql-test/r/bdb-crash.result
@@ -37,10 +37,3 @@ analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status Operation need committed state
drop table t1;
-create table t1 (a int) engine=bdb;
-set autocommit=0;
-insert into t1 values(1);
-analyze table t1;
-Table Op Msg_type Msg_text
-test.t1 analyze status Operation need committed state
-drop table t1;
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 5dc4803137e..d210048a5c7 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -474,13 +474,13 @@ select sql_big_result distinct t1.a from t1,t2;
a
1
explain select sql_big_result distinct t1.a from t1,t2 order by t2.a;
-table type possible_keys key key_len ref rows Extra
-t1 system NULL NULL NULL NULL 1 Using temporary
-t2 index NULL PRIMARY 4 NULL 2 Using index; Distinct
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 system NULL NULL NULL NULL 1 Using temporary
+1 SIMPLE t2 index NULL PRIMARY 4 NULL 2 Using index; Distinct
explain select distinct t1.a from t1,t2 order by t2.a;
-table type possible_keys key key_len ref rows Extra
-t1 system NULL NULL NULL NULL 1 Using temporary
-t2 index NULL PRIMARY 4 NULL 2 Using index; Distinct
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 system NULL NULL NULL NULL 1 Using temporary
+1 SIMPLE t2 index NULL PRIMARY 4 NULL 2 Using index; Distinct
drop table t1,t2;
CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MyISAM;
ERROR 42000: This version of MySQL doesn't yet support 'RTREE INDEX'
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index 2e9fe1995d0..1a10c9c6ce9 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -546,3 +546,108 @@ a b
1 2
5 NULL
DROP TABLE t1;
+create table t1(id int not null auto_increment primary key, t char(12));
+explain select id,t from t1 order by id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 Using filesort
+explain select id,t from t1 force index (primary) order by id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL PRIMARY 4 NULL 1000
+drop table t1;
+CREATE TABLE t1 (
+FieldKey varchar(36) NOT NULL default '',
+LongVal bigint(20) default NULL,
+StringVal mediumtext,
+KEY FieldKey (FieldKey),
+KEY LongField (FieldKey,LongVal),
+KEY StringField (FieldKey,StringVal(32))
+);
+INSERT INTO t1 VALUES ('0',3,'0'),('0',2,'1'),('0',1,'2'),('1',2,'1'),('1',1,'3'), ('1',0,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('3',2,'1'),('3',1,'2'),('3','3','3');
+EXPLAIN SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref FieldKey,LongField,StringField LongField 36 const 3 Using where
+SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal;
+FieldKey LongVal StringVal
+1 0 2
+1 1 3
+1 2 1
+EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range FieldKey,LongField,StringField FieldKey 36 NULL 4 Using where; Using filesort
+SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal;
+FieldKey LongVal StringVal
+3 1 2
+3 2 1
+3 3 3
+EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY FieldKey, LongVal;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range FieldKey,LongField,StringField LongField 36 NULL 4 Using where
+SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY FieldKey, LongVal;
+FieldKey LongVal StringVal
+3 1 2
+3 2 1
+3 3 3
+DROP TABLE t1;
+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 smallint(6) unsigned NOT NULL default '0', menu tinyint(4) NOT NULL default '0', KEY id (id), KEY menu (menu)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (11384, 2),(11392, 2);
+SELECT id FROM t1 WHERE id <11984 AND menu =2 ORDER BY id DESC LIMIT 1 ;
+id
+11392
+drop table t1;
+create table t1(a int, b int, index(b));
+insert into t1 values (2, 1), (1, 1), (4, NULL), (3, NULL), (6, 2), (5, 2);
+explain select * from t1 where b=1 or b is null order by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref_or_null b b 5 const 3 Using where; Using filesort
+select * from t1 where b=1 or b is null order by a;
+a b
+1 1
+2 1
+3 NULL
+4 NULL
+explain select * from t1 where b=2 or b is null order by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref_or_null b b 5 const 4 Using where; Using filesort
+select * from t1 where b=2 or b is null order by a;
+a b
+3 NULL
+4 NULL
+5 2
+6 2
+drop table t1;
+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;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+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;
+a b c d
+1 1 2 0
+1 1 12 -1
+1 1 52 -5
+1 1 92 -9
+select * from t1 where a=1 and b in (1);
+a b c d
+1 1 92 -9
+1 1 52 -5
+1 1 12 -1
+1 1 2 0
+drop table t1, t2;
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