Loading mysql-test/r/query_cache.result +25 −0 Original line number Diff line number Diff line Loading @@ -1287,3 +1287,28 @@ Variable_name Value Last_query_cost 0.000000 drop table t1; SET GLOBAL query_cache_size=0; create table t1 (a int); flush status; (select a from t1) union (select a from t1); a show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 show status like "Qcache_inserts"; Variable_name Value Qcache_inserts 1 show status like "Qcache_hits"; Variable_name Value Qcache_hits 0 (select a from t1) union (select a from t1); a show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 show status like "Qcache_inserts"; Variable_name Value Qcache_inserts 1 show status like "Qcache_hits"; Variable_name Value Qcache_hits 1 drop table t1; mysql-test/r/update.result +13 −0 Original line number Diff line number Diff line Loading @@ -345,3 +345,16 @@ f1 2000-01-01 2002-02-02 drop table t1; create table t1 (f1 int); create table t2 (f2 int); insert into t1 values(1),(2); insert into t2 values(1),(1); update t1,t2 set f1=3,f2=3 where f1=f2 and f1=1; affected rows: 3 info: Rows matched: 3 Changed: 3 Warnings: 0 update t2 set f2=1; update t1 set f1=1 where f1=3; update t2,t1 set f1=3,f2=3 where f1=f2 and f1=1; affected rows: 3 info: Rows matched: 3 Changed: 3 Warnings: 0 drop table t1,t2; mysql-test/t/query_cache.test +14 −0 Original line number Diff line number Diff line Loading @@ -743,6 +743,20 @@ show status like "Qcache_hits"; drop table t1; # # BUG#14652: Queries with leading '(' characters. # create table t1 (a int); flush status; (select a from t1) union (select a from t1); show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts"; show status like "Qcache_hits"; (select a from t1) union (select a from t1); show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts"; show status like "Qcache_hits"; drop table t1; # SP cursors and selects with query cache (BUG#9715) # create table t1 (a int); Loading mysql-test/t/update.test +17 −0 Original line number Diff line number Diff line Loading @@ -270,4 +270,21 @@ insert into t1 values('2000-01-01'),('0000-00-00'); update t1 set f1='2002-02-02' where f1 is null; select * from t1; drop table t1; # # Bug#15028 Multitable update returns different numbers of matched rows # depending on table order create table t1 (f1 int); create table t2 (f2 int); insert into t1 values(1),(2); insert into t2 values(1),(1); --enable_info update t1,t2 set f1=3,f2=3 where f1=f2 and f1=1; --disable_info update t2 set f2=1; update t1 set f1=1 where f1=3; --enable_info update t2,t1 set f1=3,f2=3 where f1=f2 and f1=1; --disable_info drop table t1,t2; # End of 4.1 tests ndb/src/kernel/blocks/backup/Backup.cpp +10 −5 Original line number Diff line number Diff line Loading @@ -886,13 +886,17 @@ Backup::checkNodeFail(Signal* signal, pos= &ref->nodeId - signal->getDataPtr(); break; } case GSN_WAIT_GCP_REQ: case GSN_DROP_TRIG_REQ: case GSN_CREATE_TRIG_REQ: case GSN_ALTER_TRIG_REQ: case GSN_WAIT_GCP_REQ: ptr.p->setErrorCode(AbortBackupOrd::BackupFailureDueToNodeFail); return; case GSN_UTIL_SEQUENCE_REQ: case GSN_UTIL_LOCK_REQ: case GSN_DROP_TRIG_REQ: return; default: ndbrequire(false); } for(Uint32 i = 0; (i = mask.find(i+1)) != NdbNodeBitmask::NotFound; ) Loading Loading @@ -1980,7 +1984,7 @@ Backup::execBACKUP_FRAGMENT_REF(Signal* signal) } } } ndbrequire(false); goto err; done: ptr.p->masterData.sendCounter--; Loading @@ -1993,6 +1997,7 @@ Backup::execBACKUP_FRAGMENT_REF(Signal* signal) return; }//if err: AbortBackupOrd *ord = (AbortBackupOrd*)signal->getDataPtrSend(); ord->backupId = ptr.p->backupId; ord->backupPtr = ptr.i; Loading Loading
mysql-test/r/query_cache.result +25 −0 Original line number Diff line number Diff line Loading @@ -1287,3 +1287,28 @@ Variable_name Value Last_query_cost 0.000000 drop table t1; SET GLOBAL query_cache_size=0; create table t1 (a int); flush status; (select a from t1) union (select a from t1); a show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 show status like "Qcache_inserts"; Variable_name Value Qcache_inserts 1 show status like "Qcache_hits"; Variable_name Value Qcache_hits 0 (select a from t1) union (select a from t1); a show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 show status like "Qcache_inserts"; Variable_name Value Qcache_inserts 1 show status like "Qcache_hits"; Variable_name Value Qcache_hits 1 drop table t1;
mysql-test/r/update.result +13 −0 Original line number Diff line number Diff line Loading @@ -345,3 +345,16 @@ f1 2000-01-01 2002-02-02 drop table t1; create table t1 (f1 int); create table t2 (f2 int); insert into t1 values(1),(2); insert into t2 values(1),(1); update t1,t2 set f1=3,f2=3 where f1=f2 and f1=1; affected rows: 3 info: Rows matched: 3 Changed: 3 Warnings: 0 update t2 set f2=1; update t1 set f1=1 where f1=3; update t2,t1 set f1=3,f2=3 where f1=f2 and f1=1; affected rows: 3 info: Rows matched: 3 Changed: 3 Warnings: 0 drop table t1,t2;
mysql-test/t/query_cache.test +14 −0 Original line number Diff line number Diff line Loading @@ -743,6 +743,20 @@ show status like "Qcache_hits"; drop table t1; # # BUG#14652: Queries with leading '(' characters. # create table t1 (a int); flush status; (select a from t1) union (select a from t1); show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts"; show status like "Qcache_hits"; (select a from t1) union (select a from t1); show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts"; show status like "Qcache_hits"; drop table t1; # SP cursors and selects with query cache (BUG#9715) # create table t1 (a int); Loading
mysql-test/t/update.test +17 −0 Original line number Diff line number Diff line Loading @@ -270,4 +270,21 @@ insert into t1 values('2000-01-01'),('0000-00-00'); update t1 set f1='2002-02-02' where f1 is null; select * from t1; drop table t1; # # Bug#15028 Multitable update returns different numbers of matched rows # depending on table order create table t1 (f1 int); create table t2 (f2 int); insert into t1 values(1),(2); insert into t2 values(1),(1); --enable_info update t1,t2 set f1=3,f2=3 where f1=f2 and f1=1; --disable_info update t2 set f2=1; update t1 set f1=1 where f1=3; --enable_info update t2,t1 set f1=3,f2=3 where f1=f2 and f1=1; --disable_info drop table t1,t2; # End of 4.1 tests
ndb/src/kernel/blocks/backup/Backup.cpp +10 −5 Original line number Diff line number Diff line Loading @@ -886,13 +886,17 @@ Backup::checkNodeFail(Signal* signal, pos= &ref->nodeId - signal->getDataPtr(); break; } case GSN_WAIT_GCP_REQ: case GSN_DROP_TRIG_REQ: case GSN_CREATE_TRIG_REQ: case GSN_ALTER_TRIG_REQ: case GSN_WAIT_GCP_REQ: ptr.p->setErrorCode(AbortBackupOrd::BackupFailureDueToNodeFail); return; case GSN_UTIL_SEQUENCE_REQ: case GSN_UTIL_LOCK_REQ: case GSN_DROP_TRIG_REQ: return; default: ndbrequire(false); } for(Uint32 i = 0; (i = mask.find(i+1)) != NdbNodeBitmask::NotFound; ) Loading Loading @@ -1980,7 +1984,7 @@ Backup::execBACKUP_FRAGMENT_REF(Signal* signal) } } } ndbrequire(false); goto err; done: ptr.p->masterData.sendCounter--; Loading @@ -1993,6 +1997,7 @@ Backup::execBACKUP_FRAGMENT_REF(Signal* signal) return; }//if err: AbortBackupOrd *ord = (AbortBackupOrd*)signal->getDataPtrSend(); ord->backupId = ptr.p->backupId; ord->backupPtr = ptr.i; Loading