summaryrefslogtreecommitdiff
path: root/mysql-test/r/order_by.result
diff options
context:
space:
mode:
authorunknown <ram@mysql.r18.ru>2003-01-08 11:53:09 +0400
committerunknown <ram@mysql.r18.ru>2003-01-08 11:53:09 +0400
commitadd72d57f11dc1496f223e2f263706b00e28794d (patch)
tree33e5cbbfae8e729607771116034bfa848a019905 /mysql-test/r/order_by.result
parent7ffc2004a810ccd497c7adac5e92673fd9cd11d5 (diff)
parent60cf17cb361ad519f9e1e69c2f4d49ce6243e4c7 (diff)
downloadmariadb-git-add72d57f11dc1496f223e2f263706b00e28794d.tar.gz
Merge rkalimullin@work.mysql.com:/home/bk/mysql-4.1
into mysql.r18.ru:/usr/home/ram/work/mysql-4.1 mysql-test/r/order_by.result: Auto merged mysql-test/t/order_by.test: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'mysql-test/r/order_by.result')
-rw-r--r--mysql-test/r/order_by.result34
1 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index 62db8bf367a..1f6f958b5b0 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -505,3 +505,37 @@ SELECT titre,t1.numeropost,auteur,icone,nbrep,'0',date,vue,ouvert,lastauteur,des
titre numeropost auteur icone nbrep 0 date vue ouvert lastauteur dest
test 1 joce 0 0 0 0000-00-00 00:00:00 0 1 bug
drop table t1,t2;
+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'),('1',2,'1'),('1',1,'3'), ('1',0,'2');
+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 2 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 > '0' 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 3 Using where; Using filesort
+SELECT * FROM t1 WHERE FieldKey > '0' ORDER BY LongVal;
+FieldKey LongVal StringVal
+1 0 2
+1 1 3
+1 2 1
+EXPLAIN SELECT * FROM t1 WHERE FieldKey > '0' 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 3 Using where
+SELECT * FROM t1 WHERE FieldKey > '0' ORDER BY FieldKey, LongVal;
+FieldKey LongVal StringVal
+1 0 2
+1 1 3
+1 2 1
+DROP TABLE t1;