diff --git a/mysql-test/r/ndb_dd_basic.result b/mysql-test/r/ndb_dd_basic.result index 470c2cb9c0e..7aeb156869b 100644 --- a/mysql-test/r/ndb_dd_basic.result +++ b/mysql-test/r/ndb_dd_basic.result @@ -468,6 +468,13 @@ insert into t1 values(7,'x'); insert into t1 values(8,'x'); delete from t1 where a = 0; commit; +delete from t1; +begin; +insert into t1 values (1, 'x'); +select * from t1; +a b +1 x +rollback; set autocommit = 1; drop table t1; create table test.t1 (f1 varchar(50) primary key, f2 text,f3 int) diff --git a/mysql-test/t/ndb_dd_basic.test b/mysql-test/t/ndb_dd_basic.test index 81286d3121f..3acf4669868 100644 --- a/mysql-test/t/ndb_dd_basic.test +++ b/mysql-test/t/ndb_dd_basic.test @@ -407,8 +407,16 @@ insert into t1 values(7,'x'); insert into t1 values(8,'x'); delete from t1 where a = 0; commit; + +delete from t1; +begin; +insert into t1 values (1, 'x'); +select * from t1; +rollback; + set autocommit = 1; + drop table t1; ############################# # Customer posted order by test case diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp index 1334cbebe3e..107633b3adf 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp @@ -62,11 +62,15 @@ Dbtup::execACC_SCANREQ(Signal* signal) jam(); break; } + +#if BUG_27776_FIXED if (!AccScanReq::getNoDiskScanFlag(req->requestInfo) && tablePtr.p->m_no_of_disk_attributes) { bits |= ScanOp::SCAN_DD; } +#endif + bool mm = (bits & ScanOp::SCAN_DD); if (tablePtr.p->m_attributes[mm].m_no_of_varsize > 0) { bits |= ScanOp::SCAN_VS; @@ -594,7 +598,6 @@ Dbtup::scanNext(Signal* signal, ScanOpPtr scanPtr) const bool mm = (bits & ScanOp::SCAN_DD); const bool lcp = (bits & ScanOp::SCAN_LCP); - const bool dirty = (bits & ScanOp::SCAN_LOCK) == 0; Uint32 lcp_list = fragPtr.p->m_lcp_keep_list; Uint32 size = table.m_offsets[mm].m_fix_header_size + @@ -765,8 +768,7 @@ Dbtup::scanNext(Signal* signal, ScanOpPtr scanPtr) jam(); if (! (thbits & Tuple_header::FREE)) { - if (! ((thbits & Tuple_header::ALLOC) && dirty)) - goto found_tuple; + goto found_tuple; } } else