Description:
ALTER TABLE with copying and BLOB columns doesn't respect the
TRANS_TRANSACTIONS_OFF setting.
How to repeat:
Run this test case:
-- source include/have_ndb.inc
create table t1 (a int NOT NULL PRIMARY KEY, b int, c text) engine=ndb;
let $1=25001;
disable_query_log;
while ($1)
{
eval insert into t1 values($1, 1, 'abc');
dec $1;
}
enable_query_log;
alter table t1 modify column b bigint NOT NULL;
drop table t1;
Suggested fix:
diff --git a/storage/ndb/plugin/ha_ndbcluster.cc b/storage/ndb/plugin/ha_ndbcluster.cc
index 477aa4f67e2..f4f468a039f 100644
--- a/storage/ndb/plugin/ha_ndbcluster.cc
+++ b/storage/ndb/plugin/ha_ndbcluster.cc
@@ -3190,6 +3190,9 @@ inline int ha_ndbcluster::fetch_next(NdbScanOperation *cursor) {
if (m_thd_ndb->m_unsent_blob_ops) {
if (execute_no_commit(m_thd_ndb, trans, m_ignore_no_key) != 0)
return ndb_err(trans);
+ if (m_thd_ndb->check_trans_option(Thd_ndb::TRANS_TRANSACTIONS_OFF)) {
+ m_thd_ndb->m_unsent_bytes = 12;
+ }
}
/* Should be no unexamined completed operations
Description: ALTER TABLE with copying and BLOB columns doesn't respect the TRANS_TRANSACTIONS_OFF setting. How to repeat: Run this test case: -- source include/have_ndb.inc create table t1 (a int NOT NULL PRIMARY KEY, b int, c text) engine=ndb; let $1=25001; disable_query_log; while ($1) { eval insert into t1 values($1, 1, 'abc'); dec $1; } enable_query_log; alter table t1 modify column b bigint NOT NULL; drop table t1; Suggested fix: diff --git a/storage/ndb/plugin/ha_ndbcluster.cc b/storage/ndb/plugin/ha_ndbcluster.cc index 477aa4f67e2..f4f468a039f 100644 --- a/storage/ndb/plugin/ha_ndbcluster.cc +++ b/storage/ndb/plugin/ha_ndbcluster.cc @@ -3190,6 +3190,9 @@ inline int ha_ndbcluster::fetch_next(NdbScanOperation *cursor) { if (m_thd_ndb->m_unsent_blob_ops) { if (execute_no_commit(m_thd_ndb, trans, m_ignore_no_key) != 0) return ndb_err(trans); + if (m_thd_ndb->check_trans_option(Thd_ndb::TRANS_TRANSACTIONS_OFF)) { + m_thd_ndb->m_unsent_bytes = 12; + } } /* Should be no unexamined completed operations