summaryrefslogtreecommitdiff
path: root/mysql-test/main/key_diff.result
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2018-03-09 14:05:35 +0200
committerMonty <monty@mariadb.org>2018-03-29 13:59:44 +0300
commita7abddeffa6a760ce948c2dfb007cdf3f1a369d5 (patch)
tree70eb743fa965a17380bbc0ac88ae79ca1075b896 /mysql-test/main/key_diff.result
parentab1941266c59a19703a74b5593cf3f508a5752d7 (diff)
downloadmariadb-git-a7abddeffa6a760ce948c2dfb007cdf3f1a369d5.tar.gz
Create 'main' test directory and move 't' and 'r' there
Diffstat (limited to 'mysql-test/main/key_diff.result')
-rw-r--r--mysql-test/main/key_diff.result52
1 files changed, 52 insertions, 0 deletions
diff --git a/mysql-test/main/key_diff.result b/mysql-test/main/key_diff.result
new file mode 100644
index 00000000000..af928fcb203
--- /dev/null
+++ b/mysql-test/main/key_diff.result
@@ -0,0 +1,52 @@
+drop table if exists t1;
+CREATE TABLE t1 (
+a char(5) NOT NULL,
+b char(4) NOT NULL,
+KEY (a),
+KEY (b)
+);
+INSERT INTO t1 VALUES ('A','B'),('b','A'),('C','c'),('D','E'),('a','a');
+select * from t1,t1 as t2;
+a b a b
+A B A B
+b A A B
+C c A B
+D E A B
+a a A B
+A B b A
+b A b A
+C c b A
+D E b A
+a a b A
+A B C c
+b A C c
+C c C c
+D E C c
+a a C c
+A B D E
+b A D E
+C c D E
+D E D E
+a a D E
+A B a a
+b A a a
+C c a a
+D E a a
+a a a a
+explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL a NULL NULL NULL 5
+1 SIMPLE t2 ALL b NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a;
+a b a b
+A B a a
+A B b A
+C c C c
+a a a a
+a a b A
+b A A B
+select * from t1 where a='a';
+a b
+A B
+a a
+drop table t1;