summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/key_diff.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/key_diff.test
parentInitial commit. (diff)
downloadmariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz
mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/key_diff.test')
-rw-r--r--mysql-test/main/key_diff.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/main/key_diff.test b/mysql-test/main/key_diff.test
new file mode 100644
index 00000000..b490c613
--- /dev/null
+++ b/mysql-test/main/key_diff.test
@@ -0,0 +1,24 @@
+#
+# Check on condition on different length keys.
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+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;
+explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
+#select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
+select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a;
+select * from t1 where a='a';
+drop table t1;
+
+# End of 4.1 tests