summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/narttu.mysql.fi>2006-08-10 22:41:19 +0300
committerunknown <monty@mysql.com/narttu.mysql.fi>2006-08-10 22:41:19 +0300
commitdcb665900136fb4015589680c612add8abf1deca (patch)
tree646dde4e78f50732e480c83d04296548ed4e1249 /mysql-test/t
parent189a6879715ca293a560e37a17984c8b3a952e49 (diff)
downloadmariadb-git-dcb665900136fb4015589680c612add8abf1deca.tar.gz
Better bug fix for #14400 "Query joins wrong rows from table which is subject of "concurrent insert""
The previous bug fix didn't work when using partial keys. Don't use GNUC min/max operations are they are depricated. Fixed valgrind warning BitKeeper/etc/ignore: Added */.libs/* include/my_global.h: Don't use GNUC min/max operations are they are depricated myisam/mi_rkey.c: Better bug fix for #14400 "Query joins wrong rows from table which is subject of "concurrent insert"" The previous bug fix didn't work when using partial keys. myisam/mi_test_all.res: Updated results to match mi_test_all.sh myisam/mi_test_all.sh: Removed confusing warning mysql-test/r/myisam.result: Added test case for #14400 mysql-test/t/myisam.test: Added test case for #14400 sql/sql_select.cc: Fixed valgrind warning (in field_string::val_int())
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/myisam.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index a502002d30e..bb8dc30395b 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -458,3 +458,20 @@ insert into t1 values ('a'), ('b');
select c1 from t1 order by c1 limit 1;
drop table t1;
+#
+# Bug #14400 Join could miss concurrently inserted row
+#
+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;
+
+# end of 4.0 tests