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, 2008-02-03 21:24:59+01:00, jonas@stripped +3 -0
ndb - bug#33619
make sure to alloc logspace and set bits
if doing delete after previous update wo/ touching DD part
mysql-test/suite/ndb/r/ndb_dd_basic.result@stripped, 2008-02-03 21:24:57+01:00,
jonas@stripped +10 -0
testcase
mysql-test/suite/ndb/t/ndb_dd_basic.test@stripped, 2008-02-03 21:24:57+01:00,
jonas@stripped +10 -0
testcase
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp@stripped, 2008-02-03 21:24:57+01:00,
jonas@stripped +17 -25
ndb - bug#33619
make sure to alloc logspace and set bits
if doing delete after previous update wo/ touching DD part
diff -Nrup a/mysql-test/suite/ndb/r/ndb_dd_basic.result
b/mysql-test/suite/ndb/r/ndb_dd_basic.result
--- a/mysql-test/suite/ndb/r/ndb_dd_basic.result 2008-01-29 15:24:26 +01:00
+++ b/mysql-test/suite/ndb/r/ndb_dd_basic.result 2008-02-03 21:24:57 +01:00
@@ -406,6 +406,16 @@ a b c
1 7 7
2 2 2
3 3 3
+DELETE FROM t1;
+INSERT INTO t1 VALUES (3,'1','1');
+BEGIN;
+UPDATE t1 SET b = b + 2 WHERE A = 3;
+DELETE FROM t1 WHERE A = 3;
+INSERT INTO t1 VALUES (3,'0','0');
+COMMIT;
+SELECT * from t1 ORDER BY 1;
+a b c
+3 0 0
DROP TABLE t1;
CREATE TABLE t1 (
a INT NOT NULL PRIMARY KEY,
diff -Nrup a/mysql-test/suite/ndb/t/ndb_dd_basic.test
b/mysql-test/suite/ndb/t/ndb_dd_basic.test
--- a/mysql-test/suite/ndb/t/ndb_dd_basic.test 2008-01-29 15:24:27 +01:00
+++ b/mysql-test/suite/ndb/t/ndb_dd_basic.test 2008-02-03 21:24:57 +01:00
@@ -346,6 +346,16 @@ UPDATE t1 SET c = '6' WHERE b = '7';
SELECT * FROM t1 ORDER BY 1;
UPDATE t1 SET c = '7' WHERE c = '6';
SELECT * FROM t1 ORDER BY 1;
+
+DELETE FROM t1;
+INSERT INTO t1 VALUES (3,'1','1');
+BEGIN;
+UPDATE t1 SET b = b + 2 WHERE A = 3;
+DELETE FROM t1 WHERE A = 3;
+INSERT INTO t1 VALUES (3,'0','0');
+COMMIT;
+SELECT * from t1 ORDER BY 1;
+
DROP TABLE t1;
########################
diff -Nrup a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2008-01-31 14:38:11 +01:00
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2008-02-03 21:24:57 +01:00
@@ -1503,32 +1503,22 @@ int Dbtup::handleDeleteReq(Signal* signa
else
{
regOperPtr->tupVersion= req_struct->m_tuple_ptr->get_tuple_version();
- if(regTabPtr->m_no_of_disk_attributes)
+ }
+
+ if(disk && regOperPtr->m_undo_buffer_space == 0)
+ {
+ regOperPtr->op_struct.m_wait_log_buffer = 1;
+ regOperPtr->op_struct.m_load_diskpage_on_commit = 1;
+ Uint32 sz= regOperPtr->m_undo_buffer_space=
+ (sizeof(Dbtup::Disk_undo::Free) >> 2) +
+ regTabPtr->m_offsets[DD].m_fix_header_size - 1;
+
+ terrorCode= c_lgman->alloc_log_space(regFragPtr->m_logfile_group_id,
+ sz);
+ if(unlikely(terrorCode))
{
- Uint32 sz;
- if(regTabPtr->m_attributes[DD].m_no_of_varsize)
- {
- /**
- * Need to have page in memory to read size
- * to alloc undo space
- */
- abort();
- }
- else
- sz= (sizeof(Dbtup::Disk_undo::Free) >> 2) +
- regTabPtr->m_offsets[DD].m_fix_header_size - 1;
-
- regOperPtr->m_undo_buffer_space= sz;
-
- int res;
- if((res= c_lgman->alloc_log_space(regFragPtr->m_logfile_group_id,
- sz)))
- {
- terrorCode= res;
- regOperPtr->m_undo_buffer_space= 0;
- goto error;
- }
-
+ regOperPtr->m_undo_buffer_space= 0;
+ goto error;
}
}
if (req_struct->attrinfo_len == 0)
@@ -1537,7 +1527,9 @@ int Dbtup::handleDeleteReq(Signal* signa
}
if (regTabPtr->need_expand(disk))
+ {
prepare_read(req_struct, regTabPtr, disk);
+ }
{
Uint32 RlogSize;
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2675) BUG#33619 | jonas | 3 Feb 2008 |