| Bug #117865 | ALTER TABLE with copying and BLOB column uses too large transactions | ||
|---|---|---|---|
| Submitted: | 2 Apr 2025 17:41 | Modified: | 4 Jun 15:53 |
| Reporter: | Mikael Ronström | Email Updates: | |
| Status: | In progress | Impact on me: | |
| Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S3 (Non-critical) |
| Version: | 8.4.3 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[3 Apr 2025 6:06]
MySQL Verification Team
Hello Mikael, Thank you for the report and feedback. Sincerely, Umesh
[28 May 1:13]
MySQL Admin
Posted by developer: Bug status updated to 'Patch pending'
[4 Jun 15:53]
John Duncan
Posted by developer: I'm changing the status back to "In Progress." Here is the output from the test case that is suggested in the report. mysqltest: At line 12: Query 'alter table t1 modify column b bigint NOT NULL' failed. ERROR 1296 (HY000): Got error 261 'DML count in transaction exceeds config parameter MaxDMLOperationsPerTransaction/MaxNoOfConcurrentOp' from NDBCLUSTER

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