From: Date: November 7 2006 1:59pm Subject: bk commit into 5.1 tree (jonas:1.2325) BUG#24039 List-Archive: http://lists.mysql.com/commits/14957 X-Bug: 24039 Message-Id: <20061107125918.F00AA600144@perch.ndb.mysql.com> Below is the list of changes that have just been committed into a local 5.1 repository of jonas. When jonas does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2006-11-07 13:59:14+01:00, jonas@stripped +3 -0 ndb - bug#24039 Make sure index scan does not commitDelete mysql-test/r/ndb_index_ordered.result@stripped, 2006-11-07 13:59:12+01:00, jonas@stripped +39 -0 testcase mysql-test/t/ndb_index_ordered.test@stripped, 2006-11-07 13:59:12+01:00, jonas@stripped +25 -0 testcase storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp@stripped, 2006-11-07 13:59:12+01:00, jonas@stripped +2 -1 Make sure index scan does not commitDelete # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: jonas # Host: perch.ndb.mysql.com # Root: /home/jonas/src/51-work --- 1.24/mysql-test/r/ndb_index_ordered.result 2006-11-07 13:59:18 +01:00 +++ 1.25/mysql-test/r/ndb_index_ordered.result 2006-11-07 13:59:18 +01:00 @@ -796,3 +796,42 @@ ndb_index_stat_cache_entries 32 ndb_index_stat_enable OFF ndb_index_stat_update_freq 20 +create table t1 (a int primary key) engine = ndb; +insert into t1 values (1), (2), (3); +begin; +delete from t1 where a > 1; +rollback; +select * from t1 order by a; +a +1 +2 +3 +begin; +delete from t1 where a > 1; +rollback; +begin; +select * from t1 order by a; +a +1 +2 +3 +delete from t1 where a > 2; +select * from t1 order by a; +a +1 +2 +delete from t1 where a > 1; +select * from t1 order by a; +a +1 +delete from t1 where a > 0; +select * from t1 order by a; +a +rollback; +select * from t1 order by a; +a +1 +2 +3 +delete from t1; +drop table t1; --- 1.26/mysql-test/t/ndb_index_ordered.test 2006-11-07 13:59:18 +01:00 +++ 1.27/mysql-test/t/ndb_index_ordered.test 2006-11-07 13:59:18 +01:00 @@ -430,3 +430,28 @@ show session variables like 'ndb_index_stat_%'; # End of 4.1 tests + +# bug#24039 + +create table t1 (a int primary key) engine = ndb; +insert into t1 values (1), (2), (3); +begin; +delete from t1 where a > 1; +rollback; +select * from t1 order by a; +begin; +delete from t1 where a > 1; +rollback; + +begin; +select * from t1 order by a; +delete from t1 where a > 2; +select * from t1 order by a; +delete from t1 where a > 1; +select * from t1 order by a; +delete from t1 where a > 0; +select * from t1 order by a; +rollback; +select * from t1 order by a; +delete from t1; +drop table t1; --- 1.76/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp 2006-11-07 13:59:18 +01:00 +++ 1.77/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp 2006-11-07 13:59:18 +01:00 @@ -4394,7 +4394,8 @@ Uint32 opbits = operationRecPtr.p->m_op_bits; Uint32 op = opbits & Operationrec::OP_MASK; ndbrequire((opbits & Operationrec::OP_STATE_MASK) == Operationrec::OP_STATE_EXECUTED); - if ((opbits & Operationrec::OP_COMMIT_DELETE_CHECK) == 0 && (op != ZREAD)) + if ((opbits & Operationrec::OP_COMMIT_DELETE_CHECK) == 0 && + (op != ZREAD && op != ZSCAN_OP)) { jam(); /* This method is used to check whether the end result of the transaction