summaryrefslogtreecommitdiff
path: root/mysql-test/t/myisam.test
diff options
context:
space:
mode:
authoristruewing@chilla.local <>2006-09-07 18:46:37 +0200
committeristruewing@chilla.local <>2006-09-07 18:46:37 +0200
commit50192889a485a60c54d6899aaf6649ef50291c41 (patch)
tree2efb311a53d15bd22068e55eeb357f25403dac9e /mysql-test/t/myisam.test
parent6b9629422323fdfa1709776d63b0eae1bd72cd1f (diff)
parent45ceab9ec5f143321a30513bdcf6083f77d9c651 (diff)
downloadmariadb-git-50192889a485a60c54d6899aaf6649ef50291c41.tar.gz
Merge chilla.local:/home/mydev/mysql-4.1-bug14400
into chilla.local:/home/mydev/mysql-5.0-bug14400
Diffstat (limited to 'mysql-test/t/myisam.test')
-rw-r--r--mysql-test/t/myisam.test36
1 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 7dee5ebdf41..5ec4edea8c7 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -489,6 +489,42 @@ select c1 from t1 order by c1 limit 1;
drop table t1;
#
+# Bug #14400 Join could miss concurrently inserted row
+#
+# Partial key.
+create table t1 (a int not null, primary key(a));
+create table t2 (a int not null, b int not null, primary key(a,b));
+insert into t1 values (1),(2),(3),(4),(5),(6);
+insert into t2 values (1,1),(2,1);
+lock tables t1 read local, t2 read local;
+select straight_join * from t1,t2 force index (primary) where t1.a=t2.a;
+connect (root,localhost,root,,test,$MASTER_MYPORT,master.sock);
+insert into t2 values(2,0);
+disconnect root;
+connection default;
+select straight_join * from t1,t2 force index (primary) where t1.a=t2.a;
+drop table t1,t2;
+#
+# Full key.
+CREATE TABLE t1 (c1 varchar(250) NOT NULL);
+CREATE TABLE t2 (c1 varchar(250) NOT NULL, PRIMARY KEY (c1));
+INSERT INTO t1 VALUES ('test000001'), ('test000002'), ('test000003');
+INSERT INTO t2 VALUES ('test000002'), ('test000003'), ('test000004');
+LOCK TABLES t1 READ LOCAL, t2 READ LOCAL;
+SELECT t1.c1 AS t1c1, t2.c1 AS t2c1 FROM t1, t2
+ WHERE t1.c1 = t2.c1 HAVING t1c1 != t2c1;
+connect (con1,localhost,root,,);
+connection con1;
+INSERT INTO t2 VALUES ('test000001'), ('test000005');
+disconnect con1;
+connection default;
+SELECT t1.c1 AS t1c1, t2.c1 AS t2c1 FROM t1, t2
+ WHERE t1.c1 = t2.c1 HAVING t1c1 != t2c1;
+DROP TABLE t1,t2;
+
+# End of 4.0 tests
+
+#
# Test RTREE index
#
--error 1235, 1289