Loading mysql-test/r/ndb_lock.result +12 −0 Original line number Diff line number Diff line Loading @@ -63,3 +63,15 @@ pk u o 5 5 5 insert into t1 values (1,1,1); drop table t1; create table t3 (id2 int) engine=ndb; lock tables t3 write; unlock tables; id2 drop table t3; create table t2 (id int, j int) engine=ndb; insert into t2 values (2, 2); create table t3 (id int) engine=ndb; lock tables t3 read; delete t2 from t2, t3 where t2.id = t3.id; unlock tables; drop table t2, t3; mysql-test/t/ndb_lock.test +36 −0 Original line number Diff line number Diff line Loading @@ -70,3 +70,39 @@ insert into t1 values (1,1,1); drop table t1; # End of 4.1 tests # # Bug #17812 Previous lock table for write causes "stray" lock # although table is recreated # # this creating, locking, and dropping causes a subsequent hang # on the delete below waiting for table t2 the locking in the # "other" connection is relevant, as without it there is no problem # connection con1; create table t3 (id2 int) engine=ndb; connection con2; lock tables t3 write; unlock tables; connection con1; drop table t3; connection con1; create table t2 (id int, j int) engine=ndb; insert into t2 values (2, 2); create table t3 (id int) engine=ndb; connection con2; lock tables t3 read; connection con1; # here we get a hang before bugfix although we shouldn't delete t2 from t2, t3 where t2.id = t3.id; connection con2; unlock tables; connection con1; drop table t2, t3; sql/ha_ndbcluster.cc +1 −1 Original line number Diff line number Diff line Loading @@ -502,10 +502,10 @@ ha_ndbcluster::invalidate_dictionary_cache(TABLE_SHARE *share, Ndb *ndb, } else dict->invalidateTable(tabname); share->version=0L; /* Free when thread is ready */ } else dict->removeCachedTable(tabname); share->version=0L; /* Free when thread is ready */ DBUG_RETURN(0); } Loading Loading
mysql-test/r/ndb_lock.result +12 −0 Original line number Diff line number Diff line Loading @@ -63,3 +63,15 @@ pk u o 5 5 5 insert into t1 values (1,1,1); drop table t1; create table t3 (id2 int) engine=ndb; lock tables t3 write; unlock tables; id2 drop table t3; create table t2 (id int, j int) engine=ndb; insert into t2 values (2, 2); create table t3 (id int) engine=ndb; lock tables t3 read; delete t2 from t2, t3 where t2.id = t3.id; unlock tables; drop table t2, t3;
mysql-test/t/ndb_lock.test +36 −0 Original line number Diff line number Diff line Loading @@ -70,3 +70,39 @@ insert into t1 values (1,1,1); drop table t1; # End of 4.1 tests # # Bug #17812 Previous lock table for write causes "stray" lock # although table is recreated # # this creating, locking, and dropping causes a subsequent hang # on the delete below waiting for table t2 the locking in the # "other" connection is relevant, as without it there is no problem # connection con1; create table t3 (id2 int) engine=ndb; connection con2; lock tables t3 write; unlock tables; connection con1; drop table t3; connection con1; create table t2 (id int, j int) engine=ndb; insert into t2 values (2, 2); create table t3 (id int) engine=ndb; connection con2; lock tables t3 read; connection con1; # here we get a hang before bugfix although we shouldn't delete t2 from t2, t3 where t2.id = t3.id; connection con2; unlock tables; connection con1; drop table t2, t3;
sql/ha_ndbcluster.cc +1 −1 Original line number Diff line number Diff line Loading @@ -502,10 +502,10 @@ ha_ndbcluster::invalidate_dictionary_cache(TABLE_SHARE *share, Ndb *ndb, } else dict->invalidateTable(tabname); share->version=0L; /* Free when thread is ready */ } else dict->removeCachedTable(tabname); share->version=0L; /* Free when thread is ready */ DBUG_RETURN(0); } Loading