From bcc517cb3751296d131ed27fa776a0f0ba87eb6f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 17 Aug 2007 14:32:39 +0800 Subject: [PATCH 1/9] BUG#30271 NDB_LE_MemoryUsage.page_size_kb actually returns page size in bytes, not kilobyte ndb/include/mgmapi/ndb_logevent.h: Add page_size_bytes member variable for MemoryUsage. And don't remove page_size_kb member variable at present for the compatibility backward. ndb/src/mgmapi/ndb_logevent.cpp: change the page_size_kb member variable of MemoryUsage to page_size_bytes --- ndb/include/mgmapi/ndb_logevent.h | 8 +++++++- ndb/src/mgmapi/ndb_logevent.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ndb/include/mgmapi/ndb_logevent.h b/ndb/include/mgmapi/ndb_logevent.h index 76e4c31baa2..389004da06b 100644 --- a/ndb/include/mgmapi/ndb_logevent.h +++ b/ndb/include/mgmapi/ndb_logevent.h @@ -551,7 +551,13 @@ extern "C" { /** Log event specific data for for corresponding NDB_LE_ log event */ struct { int gth; - unsigned page_size_kb; + /* union is for compatibility backward. + * page_size_kb member variable should be removed in the future + */ + union { + unsigned page_size_kb; + unsigned page_size_bytes; + }; unsigned pages_used; unsigned pages_total; unsigned block; diff --git a/ndb/src/mgmapi/ndb_logevent.cpp b/ndb/src/mgmapi/ndb_logevent.cpp index 3885bb79536..f0b7c26cf78 100644 --- a/ndb/src/mgmapi/ndb_logevent.cpp +++ b/ndb/src/mgmapi/ndb_logevent.cpp @@ -256,7 +256,7 @@ struct Ndb_logevent_body_row ndb_logevent_body[]= { ROW( ReceiveBytesStatistic, "mean_received_bytes", 2, mean_received_bytes), ROW( MemoryUsage, "gth", 1, gth), - ROW( MemoryUsage, "page_size_kb", 2, page_size_kb), + ROW( MemoryUsage, "page_size_bytes", 2, page_size_bytes), ROW( MemoryUsage, "pages_used", 3, pages_used), ROW( MemoryUsage, "pages_total", 4, pages_total), ROW( MemoryUsage, "block", 5, block), From dfc14639682d573c620b1b4d6d58788274f8f7ad Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Sep 2007 22:18:20 +0800 Subject: [PATCH 2/9] BUG#28647 Stop backup if disk full storage/ndb/src/kernel/blocks/backup/Backup.cpp: Close files when disk full storage/ndb/src/ndbapi/ndberror.c: Add error messages for backup failure storage/ndb/test/src/NdbBackup.cpp: Add test case for disk full --- mysql-test/r/bdb_notembedded.result | 35 +++++++++++ mysql-test/t/bdb_notembedded.test | 38 ++++++++++++ .../ndb/src/kernel/blocks/backup/Backup.cpp | 59 ++++++++++++++++++- storage/ndb/src/ndbapi/ndberror.c | 2 + storage/ndb/test/src/NdbBackup.cpp | 3 +- 5 files changed, 134 insertions(+), 3 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/storage/ndb/src/kernel/blocks/backup/Backup.cpp b/storage/ndb/src/kernel/blocks/backup/Backup.cpp index 64e2c41aa69..fb234c2afef 100644 --- a/storage/ndb/src/kernel/blocks/backup/Backup.cpp +++ b/storage/ndb/src/kernel/blocks/backup/Backup.cpp @@ -967,6 +967,7 @@ Backup::checkNodeFail(Signal* signal, ref->backupPtr = ptr.i; ref->backupId = ptr.p->backupId; ref->errorCode = AbortBackupOrd::BackupFailureDueToNodeFail; + ref->nodeId = getOwnNodeId(); gsn= GSN_STOP_BACKUP_REF; len= StopBackupRef::SignalLength; pos= &ref->nodeId - signal->getDataPtr(); @@ -2080,6 +2081,15 @@ Backup::sendDropTrig(Signal* signal, BackupRecordPtr ptr) /** * Insert footers */ + //if backup error, we needn't insert footers + if(ptr.p->checkError()) + { + jam(); + closeFiles(signal, ptr); + ptr.p->errorCode = 0; + return; + } + { BackupFilePtr filePtr LINT_SET_PTR; ptr.p->files.getPtr(filePtr, ptr.p->logFilePtr); @@ -4186,6 +4196,37 @@ Backup::checkFile(Signal* signal, BackupFilePtr filePtr) #if 0 ndbout << "Ptr to data = " << hex << tmp << endl; #endif + BackupRecordPtr ptr LINT_SET_PTR; + c_backupPool.getPtr(ptr, filePtr.p->backupPtr); + + if (ERROR_INSERTED(10036)) + { + jam(); + filePtr.p->m_flags &= ~(Uint32)BackupFile::BF_FILE_THREAD; + filePtr.p->errorCode = 2810; + ptr.p->setErrorCode(2810); + + if(ptr.p->m_gsn == GSN_STOP_BACKUP_REQ) + { + jam(); + closeFile(signal, ptr, filePtr); + } + return; + } + + if(filePtr.p->errorCode != 0) + { + jam(); + ptr.p->setErrorCode(filePtr.p->errorCode); + + if(ptr.p->m_gsn == GSN_STOP_BACKUP_REQ) + { + jam(); + closeFile(signal, ptr, filePtr); + } + return; + } + if (!ready_to_write(ready, sz, eof, filePtr.p)) { jam(); @@ -4217,8 +4258,6 @@ Backup::checkFile(Signal* signal, BackupFilePtr filePtr) ndbrequire(flags & BackupFile::BF_OPEN); ndbrequire(flags & BackupFile::BF_FILE_THREAD); - BackupRecordPtr ptr LINT_SET_PTR; - c_backupPool.getPtr(ptr, filePtr.p->backupPtr); closeFile(signal, ptr, filePtr); } @@ -4581,6 +4620,22 @@ Backup::closeFilesDone(Signal* signal, BackupRecordPtr ptr) jam(); + //error when do insert footer or close file + if(ptr.p->checkError()) + { + StopBackupRef * ref = (StopBackupRef*)signal->getDataPtr(); + ref->backupPtr = ptr.i; + ref->backupId = ptr.p->backupId; + ref->errorCode = ptr.p->errorCode; + ref->nodeId = getOwnNodeId(); + sendSignal(ptr.p->masterRef, GSN_STOP_BACKUP_REF, signal, + StopBackupConf::SignalLength, JBB); + + ptr.p->m_gsn = GSN_STOP_BACKUP_REF; + ptr.p->slaveState.setState(CLEANING); + return; + } + StopBackupConf* conf = (StopBackupConf*)signal->getDataPtrSend(); conf->backupId = ptr.p->backupId; conf->backupPtr = ptr.i; diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c index a0417e5b118..e05b9c41b77 100644 --- a/storage/ndb/src/ndbapi/ndberror.c +++ b/storage/ndb/src/ndbapi/ndberror.c @@ -624,6 +624,8 @@ ErrorBundle ErrorCodes[] = { { 4273, DMEC, IE, "No blob table in dict cache" }, { 4274, DMEC, IE, "Corrupted main table PK in blob operation" }, { 4275, DMEC, AE, "The blob method is incompatible with operation type or lock mode" }, + { 2810, DMEC, TR, "No space left on the device" }, + { 2815, DMEC, TR, "Error in reading files, please check file system" }, { NO_CONTACT_WITH_PROCESS, DMEC, AE, "No contact with the process (dead ?)."}, diff --git a/storage/ndb/test/src/NdbBackup.cpp b/storage/ndb/test/src/NdbBackup.cpp index 42b15885089..3fb4de461f0 100644 --- a/storage/ndb/test/src/NdbBackup.cpp +++ b/storage/ndb/test/src/NdbBackup.cpp @@ -350,7 +350,8 @@ FailS_codes[] = { 10025, 10027, 10033, - 10035 + 10035, + 10036 }; int From bafa5fe8aa6a79ab5f28a9275d71647049709863 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Sep 2007 09:16:41 +0800 Subject: [PATCH 3/9] BUG#29851 TRUNCATE causes error 4350 from cluster in INSERT... ON DUPLICATE KEY UPDATE mysql-test/r/ndb_alter_table2.result: Add test case for BUG#29851 mysql-test/t/ndb_alter_table2.test: Add test case for BUG#29851 sql/ha_ndbcluster.cc: Indexes are dropped also when dropping table in GlobalDictCache --- mysql-test/r/ndb_alter_table2.result | 19 +++++++++++++++++ mysql-test/t/ndb_alter_table2.test | 31 ++++++++++++++++++++++++++++ sql/ha_ndbcluster.cc | 10 ++++++++- 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/ndb_alter_table2.result b/mysql-test/r/ndb_alter_table2.result index 399578dc97b..886c300d53d 100644 --- a/mysql-test/r/ndb_alter_table2.result +++ b/mysql-test/r/ndb_alter_table2.result @@ -40,3 +40,22 @@ a b c select * from t1; a b c drop table t1; +DROP TABLE IF EXISTS truncate_test; +CREATE TABLE truncate_test ( +i INT PRIMARY KEY, +a INT, +b VARCHAR(11), +UNIQUE KEY (a) +) ENGINE = NDB; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +TRUNCATE truncate_test; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +SELECT * FROM truncate_test; +i a b +1 1 test +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +SELECT * FROM truncate_test; +i a b +1 1 new +DROP TABLE truncate_test; diff --git a/mysql-test/t/ndb_alter_table2.test b/mysql-test/t/ndb_alter_table2.test index 3861fcc6c9d..99c201f7370 100644 --- a/mysql-test/t/ndb_alter_table2.test +++ b/mysql-test/t/ndb_alter_table2.test @@ -81,3 +81,34 @@ select * from t1; select * from t1; drop table t1; + +#For BUG#29851 TRUNCATE causes error 4350 from cluster in INSERT... ON DUPLICATE KEY UPDATE + +connection con1; + +--disable_warnings +DROP TABLE IF EXISTS truncate_test; +--enable_warnings + +CREATE TABLE truncate_test ( + i INT PRIMARY KEY, + a INT, + b VARCHAR(11), + UNIQUE KEY (a) +) ENGINE = NDB; + +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; + +connection con2; +TRUNCATE truncate_test; + +connection con1; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +SELECT * FROM truncate_test; + +connection con2; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +SELECT * FROM truncate_test; + +DROP TABLE truncate_test; diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 03b6bcf3242..76857900ea2 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -439,7 +439,8 @@ void ha_ndbcluster::no_uncommitted_rows_reset(THD *thd) void ha_ndbcluster::invalidate_dictionary_cache(bool global) { - NDBDICT *dict= get_ndb()->getDictionary(); + Ndb * ndb= get_ndb(); + NDBDICT *dict= ndb->getDictionary(); DBUG_ENTER("invalidate_dictionary_cache"); DBUG_PRINT("info", ("invalidating %s", m_tabname)); @@ -459,6 +460,7 @@ void ha_ndbcluster::invalidate_dictionary_cache(bool global) } else dict->removeCachedTable(m_tabname); + build_index_list(ndb, table, ILBP_OPEN); table->s->version=0L; /* Free when thread is ready */ /* Invalidate indexes */ for (uint i= 0; i < table->s->keys; i++) @@ -470,17 +472,23 @@ void ha_ndbcluster::invalidate_dictionary_cache(bool global) switch (idx_type) { case PRIMARY_KEY_ORDERED_INDEX: case ORDERED_INDEX: + if (!index) + break; if (global) dict->invalidateIndex(index->getName(), m_tabname); else dict->removeCachedIndex(index->getName(), m_tabname); break; case UNIQUE_ORDERED_INDEX: + if (!index) + break; if (global) dict->invalidateIndex(index->getName(), m_tabname); else dict->removeCachedIndex(index->getName(), m_tabname); case UNIQUE_INDEX: + if (!unique_index) + break; if (global) dict->invalidateIndex(unique_index->getName(), m_tabname); else From 3a3e2c796c9a3555b445b940de5670ca683fee2f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Sep 2007 09:49:16 +0800 Subject: [PATCH 4/9] BUG#28298 Node Id larger than MAX_NDB_NODES in config file doesn't generate error ndb/include/kernel/ndb_limits.h: 1) define a macro MAX_DATA_NODE_ID to set the max ID of data nodes to be MAX_NDB_NODES - 1 2) define a macro MAX_NODES_ID to set the max ID of API and MGM to be MAX_NODES -1 ndb/src/mgmsrv/ConfigInfo.cpp: 1) replace MAX_NODES with MAX_DATA_NODE_ID (= MAX_NDB_NODES - 1) when the NodeId represents data nodes. 2) replace MAX_NODES with MAX_NODES_ID (= MAX_NODES -1) when the NodeId represents API or MGM nodes. --- ndb/include/kernel/ndb_limits.h | 11 +++++++++++ ndb/src/mgmsrv/ConfigInfo.cpp | 12 ++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ndb/include/kernel/ndb_limits.h b/ndb/include/kernel/ndb_limits.h index c82288c762a..82fd0bd5d51 100644 --- a/ndb/include/kernel/ndb_limits.h +++ b/ndb/include/kernel/ndb_limits.h @@ -27,6 +27,17 @@ #define MAX_NDB_NODES 49 #define MAX_NODES 64 +/************************************************************************** + * IT SHOULD BE (MAX_NDB_NODES - 1). + * WHEN MAX_NDB_NODE IS CHANGED, IT SHOULD BE CHANGED ALSO + **************************************************************************/ +#define MAX_DATA_NODE_ID 48 +/************************************************************************** + * IT SHOULD BE (MAX_NODES - 1). + * WHEN MAX_NODES IS CHANGED, IT SHOULD BE CHANGED ALSO + **************************************************************************/ +#define MAX_NODES_ID 63 + /** * MAX_API_NODES = MAX_NODES - No of NDB Nodes in use */ diff --git a/ndb/src/mgmsrv/ConfigInfo.cpp b/ndb/src/mgmsrv/ConfigInfo.cpp index 0cf37b5f874..657dccb0d98 100644 --- a/ndb/src/mgmsrv/ConfigInfo.cpp +++ b/ndb/src/mgmsrv/ConfigInfo.cpp @@ -398,7 +398,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "1", - STR_VALUE(MAX_NODES) }, + STR_VALUE(MAX_DATA_NODE_ID) }, { CFG_NODE_ID, @@ -410,7 +410,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "1", - STR_VALUE(MAX_NODES) }, + STR_VALUE(MAX_DATA_NODE_ID) }, { KEY_INTERNAL, @@ -1261,7 +1261,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "1", - STR_VALUE(MAX_NODES) }, + STR_VALUE(MAX_NODES_ID) }, { CFG_NODE_ID, @@ -1273,7 +1273,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "1", - STR_VALUE(MAX_NODES) }, + STR_VALUE(MAX_NODES_ID) }, { KEY_INTERNAL, @@ -1404,7 +1404,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "1", - STR_VALUE(MAX_NODES) }, + STR_VALUE(MAX_NODES_ID) }, { CFG_NODE_ID, @@ -1416,7 +1416,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "1", - STR_VALUE(MAX_NODES) }, + STR_VALUE(MAX_NODES_ID) }, { CFG_LOG_DESTINATION, From dc7ee1f3cb213c9169e0fd7939d01b8e3fccf095 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 12 Nov 2007 14:53:25 +0000 Subject: [PATCH 5/9] BUG#29186 Return error to client in the following condition: 1: Create a log file which is larger than 4G in 32-bit host. 2: Create a data file (tablespace) which is larger than 4G in 32-bit host. storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp: Add error code for log file too large storage/ndb/src/kernel/blocks/ERROR_codes.txt: Add error insert code in lgman and tsman storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Add error code definination of lgman and tsman storage/ndb/src/kernel/blocks/lgman.cpp: Return REF when log file more than 4G in 32-bits host storage/ndb/src/kernel/blocks/tsman.cpp: return FER when data file larger than 4G in 32-bits host storage/ndb/src/ndbapi/ndberror.c: Add describe of new errorCode storage/ndb/test/ndbapi/testDict.cpp: Add test case for bug29186 --- mysql-test/r/bdb_notembedded.result | 35 ++++ mysql-test/t/bdb_notembedded.test | 38 ++++ .../kernel/signaldata/CreateFilegroupImpl.hpp | 3 +- storage/ndb/src/kernel/blocks/ERROR_codes.txt | 10 ++ .../ndb/src/kernel/blocks/dbdih/DbdihMain.cpp | 6 + storage/ndb/src/kernel/blocks/lgman.cpp | 16 ++ storage/ndb/src/kernel/blocks/tsman.cpp | 16 ++ storage/ndb/src/ndbapi/ndberror.c | 1 + storage/ndb/test/ndbapi/testDict.cpp | 166 ++++++++++++++++++ 9 files changed, 290 insertions(+), 1 deletion(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp b/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp index 6140e78cc5a..bbd3e818681 100644 --- a/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp @@ -163,7 +163,8 @@ struct CreateFileImplRef { InvalidFileMetadata = 1510, OutOfMemory = 1511, FileReadError = 1512, - FilegroupNotOnline = 1513 + FilegroupNotOnline = 1513, + FileSizeTooLarge = 1515 }; Uint32 senderData; diff --git a/storage/ndb/src/kernel/blocks/ERROR_codes.txt b/storage/ndb/src/kernel/blocks/ERROR_codes.txt index acfbf649522..5ed4f5b0663 100644 --- a/storage/ndb/src/kernel/blocks/ERROR_codes.txt +++ b/storage/ndb/src/kernel/blocks/ERROR_codes.txt @@ -12,6 +12,8 @@ Next BACKUP 10038 Next DBUTIL 11002 Next DBTUX 12008 Next SUMA 13001 +Next LGMAN 15001 +Next TSMAN 16001 TESTING NODE FAILURE, ARBITRATION --------------------------------- @@ -535,3 +537,11 @@ NDBCNTR: 1000: Crash insertion on SystemError::CopyFragRef 1001: Delay sending NODE_FAILREP (to own node), until error is cleared + +LGMAN: +----- +15000: Fail to create log file + +TSMAN: +----- +16000: Fail to create data file diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp index 762d4ea5141..d2d989ce5b9 100644 --- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp +++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp @@ -8286,6 +8286,12 @@ void Dbdih::execDIHNDBTAMPER(Signal* signal) } else if (tuserpointer < 15000) { jam(); tuserblockref = DBDICT_REF; + } else if (tuserpointer < 16000) { + jam(); + tuserblockref = LGMAN_REF; + } else if (tuserpointer < 17000) { + jam(); + tuserblockref = TSMAN_REF; } else if (tuserpointer < 30000) { /*--------------------------------------------------------------------*/ // Ignore errors in the 20000-range. diff --git a/storage/ndb/src/kernel/blocks/lgman.cpp b/storage/ndb/src/kernel/blocks/lgman.cpp index 23738717580..b5e3b55dba5 100644 --- a/storage/ndb/src/kernel/blocks/lgman.cpp +++ b/storage/ndb/src/kernel/blocks/lgman.cpp @@ -547,6 +547,22 @@ Lgman::execCREATE_FILE_REQ(Signal* signal) break; } + if(ERROR_INSERTED(15000) || + (sizeof(void*) == 4 && req->file_size_hi & 0xFFFFFFFF)) + { + jam(); + if(signal->getNoOfSections()) + releaseSections(signal); + + CreateFileImplRef* ref= (CreateFileImplRef*)signal->getDataPtr(); + ref->senderData = senderData; + ref->senderRef = reference(); + ref->errorCode = CreateFileImplRef::FileSizeTooLarge; + sendSignal(senderRef, GSN_CREATE_FILE_REF, signal, + CreateFileImplRef::SignalLength, JBB); + return; + } + new (file_ptr.p) Undofile(req, ptr.i); Local_undofile_list tmp(m_file_pool, ptr.p->m_meta_files); diff --git a/storage/ndb/src/kernel/blocks/tsman.cpp b/storage/ndb/src/kernel/blocks/tsman.cpp index 8f61ec0cf7b..62d169a0081 100644 --- a/storage/ndb/src/kernel/blocks/tsman.cpp +++ b/storage/ndb/src/kernel/blocks/tsman.cpp @@ -523,6 +523,22 @@ Tsman::execCREATE_FILE_REQ(Signal* signal){ break; } + if(ERROR_INSERTED(16000) || + (sizeof(void*) == 4 && req->file_size_hi & 0xFFFFFFFF)) + { + jam(); + if(signal->getNoOfSections()) + releaseSections(signal); + + CreateFileImplRef* ref= (CreateFileImplRef*)signal->getDataPtr(); + ref->senderData = senderData; + ref->senderRef = reference(); + ref->errorCode = CreateFileImplRef::FileSizeTooLarge; + sendSignal(senderRef, GSN_CREATE_FILE_REF, signal, + CreateFileImplRef::SignalLength, JBB); + return; + } + new (file_ptr.p) Datafile(req); Local_datafile_list tmp(m_file_pool, ptr.p->m_meta_files); tmp.add(file_ptr); diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c index a0417e5b118..d1b77152b00 100644 --- a/storage/ndb/src/ndbapi/ndberror.c +++ b/storage/ndb/src/ndbapi/ndberror.c @@ -426,6 +426,7 @@ ErrorBundle ErrorCodes[] = { { 1512, DMEC, SE, "File read error" }, { 1513, DMEC, IE, "Filegroup not online" }, { 1514, DMEC, SE, "Currently there is a limit of one logfile group" }, + { 1515, DMEC, SE, "Currently there is a 4G limit of one undo/data-file in 32-bit host" }, { 773, DMEC, SE, "Out of string memory, please modify StringMemory config parameter" }, { 775, DMEC, SE, "Create file is not supported when Diskless=1" }, diff --git a/storage/ndb/test/ndbapi/testDict.cpp b/storage/ndb/test/ndbapi/testDict.cpp index 13c071f968e..22b795a8dba 100644 --- a/storage/ndb/test/ndbapi/testDict.cpp +++ b/storage/ndb/test/ndbapi/testDict.cpp @@ -2357,6 +2357,168 @@ runBug24631(NDBT_Context* ctx, NDBT_Step* step) return NDBT_OK; } +int +runBug29186(NDBT_Context* ctx, NDBT_Step* step) +{ + int lgError = 15000; + int tsError = 16000; + int res; + char lgname[256]; + char ufname[256]; + char tsname[256]; + char dfname[256]; + + NdbRestarter restarter; + + if (restarter.getNumDbNodes() < 2){ + ctx->stopTest(); + return NDBT_OK; + } + + Ndb* pNdb = GETNDB(step); + NdbDictionary::Dictionary* pDict = pNdb->getDictionary(); + NdbDictionary::Dictionary::List list; + + if (pDict->listObjects(list) == -1) + return NDBT_FAILED; + + // 1.create logfile group + const char * lgfound = 0; + + for (Uint32 i = 0; icreateLogfileGroup(lg) != 0) + { + g_err << "Failed to create logfilegroup:" + << endl << pDict->getNdbError() << endl; + return NDBT_FAILED; + } + } + else + { + BaseString::snprintf(lgname, sizeof(lgname), "%s", lgfound); + } + + if(restarter.waitClusterStarted(60)){ + g_err << "waitClusterStarted failed"<< endl; + return NDBT_FAILED; + } + + if(restarter.insertErrorInAllNodes(lgError) != 0){ + g_err << "failed to set error insert"<< endl; + return NDBT_FAILED; + } + + g_info << "error inserted" << endl; + g_info << "waiting some before add log file" << endl; + g_info << "starting create log file group" << endl; + + NdbDictionary::Undofile uf; + BaseString::snprintf(ufname, sizeof(ufname), "%s-%u", lgname, rand()); + uf.setPath(ufname); + uf.setSize(2*1024*1024); + uf.setLogfileGroup(lgname); + + if(pDict->createUndofile(uf) == 0) + { + g_err << "Create log file group should fail on error_insertion " << lgError << endl; + return NDBT_FAILED; + } + + //clear lg error + if(restarter.insertErrorInAllNodes(15099) != 0){ + g_err << "failed to set error insert"<< endl; + return NDBT_FAILED; + } + NdbSleep_SecSleep(5); + + //lg error has been cleared, so we can add undo file + if(pDict->createUndofile(uf) != 0) + { + g_err << "Failed to create undofile:" + << endl << pDict->getNdbError() << endl; + return NDBT_FAILED; + } + + if(restarter.waitClusterStarted(60)){ + g_err << "waitClusterStarted failed"<< endl; + return NDBT_FAILED; + } + + if(restarter.insertErrorInAllNodes(tsError) != 0){ + g_err << "failed to set error insert"<< endl; + return NDBT_FAILED; + } + g_info << "error inserted" << endl; + g_info << "waiting some before create table space" << endl; + g_info << "starting create table space" << endl; + + //r = runCreateTablespace(ctx, step); + BaseString::snprintf(tsname, sizeof(tsname), "TS-%u", rand()); + BaseString::snprintf(dfname, sizeof(dfname), "%s-%u-1.dat", tsname, rand()); + + NdbDictionary::Tablespace ts; + ts.setName(tsname); + ts.setExtentSize(1024*1024); + ts.setDefaultLogfileGroup(lgname); + + if(pDict->createTablespace(ts) != 0) + { + g_err << "Failed to create tablespace:" + << endl << pDict->getNdbError() << endl; + return NDBT_FAILED; + } + + NdbDictionary::Datafile df; + df.setPath(dfname); + df.setSize(1*1024*1024); + df.setTablespace(tsname); + + if(pDict->createDatafile(df) == 0) + { + g_err << "Create table space should fail on error_insertion " << tsError << endl; + return NDBT_FAILED; + } + //Clear the inserted error + if(restarter.insertErrorInAllNodes(16099) != 0){ + g_err << "failed to set error insert"<< endl; + return NDBT_FAILED; + } + NdbSleep_SecSleep(5); + + if (pDict->dropTablespace(pDict->getTablespace(tsname)) != 0) + { + g_err << "Failed to drop tablespace: " << pDict->getNdbError() << endl; + return NDBT_FAILED; + } + + if (lgfound == 0) + { + if (pDict->dropLogfileGroup(pDict->getLogfileGroup(lgname)) != 0) + return NDBT_FAILED; + } + + return NDBT_OK; +} + struct RandSchemaOp { struct Obj @@ -2864,6 +3026,10 @@ TESTCASE("Bug24631", ""){ INITIALIZER(runBug24631); } +TESTCASE("Bug29186", + ""){ + INITIALIZER(runBug29186); +} NDBT_TESTSUITE_END(testDict); int main(int argc, const char** argv){ From 37b188cdffee19d77769ba99a719d436633f6e5b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Nov 2007 19:19:55 +0800 Subject: [PATCH 6/9] BUG#30417 Cluster misbehaves on auto-inc w/o PK. storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: The check that how many auto_increment columns in table are there should be preceded creating the table. If there are more than one auto_increment columns, the table shouldn't be created. mysql-test/suite/ndb/r/ndb_autoinc.result: Adding test case for auto_increment isn't the default primary key columns mysql-test/suite/ndb/t/ndb_autoinc.test: Adding test case for auto_increment isn't the default primary key columns --- mysql-test/suite/ndb/r/ndb_autoinc.result | 38 +++++++++++++++++ mysql-test/suite/ndb/t/ndb_autoinc.test | 43 ++++++++++++++++++++ storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp | 31 +++++++------- 3 files changed, 97 insertions(+), 15 deletions(-) create mode 100644 mysql-test/suite/ndb/r/ndb_autoinc.result create mode 100644 mysql-test/suite/ndb/t/ndb_autoinc.test diff --git a/mysql-test/suite/ndb/r/ndb_autoinc.result b/mysql-test/suite/ndb/r/ndb_autoinc.result new file mode 100644 index 00000000000..7ba5ab8def7 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_autoinc.result @@ -0,0 +1,38 @@ +DROP TABLE IF EXISTS t1,t2,t3; +USE test; +CREATE TABLE t1 ( +id INT AUTO_INCREMENT, +PRIMARY KEY(id) +) ENGINE=NDBCLUSTER; +CREATE TABLE t2 ( +id INT AUTO_INCREMENT, +KEY(id) +) ENGINE=NDBCLUSTER; +ERROR HY000: Can't create table 'test.t2' (errno: 4335) +SHOW TABLES; +Tables_in_test +t1 +CREATE TABLE t3 ( +id INT AUTO_INCREMENT, +KEY(id) +) ENGINE=MYISAM; +ALTER TABLE t3 +ENGINE NDBCLUSTER; +ERROR HY000: Can't create table 'test.#sql-7b9e_3' (errno: 4335) +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + KEY `id` (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +ALTER TABLE t3 +ADD PRIMARY KEY (id); +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1, t3; +End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_autoinc.test b/mysql-test/suite/ndb/t/ndb_autoinc.test new file mode 100644 index 00000000000..3e7ba7bdf6a --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_autoinc.test @@ -0,0 +1,43 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3; +--enable_warnings + +USE test; + +CREATE TABLE t1 ( + id INT AUTO_INCREMENT, + PRIMARY KEY(id) +) ENGINE=NDBCLUSTER; + +# Test For bug#30417 +--error 1005 + +CREATE TABLE t2 ( + id INT AUTO_INCREMENT, + KEY(id) +) ENGINE=NDBCLUSTER; + +SHOW TABLES; + +CREATE TABLE t3 ( + id INT AUTO_INCREMENT, + KEY(id) +) ENGINE=MYISAM; + +--error 1005 +ALTER TABLE t3 +ENGINE NDBCLUSTER; + +SHOW CREATE TABLE t3; + +ALTER TABLE t3 +ADD PRIMARY KEY (id); + +SHOW CREATE TABLE t3; + +DROP TABLE t1, t3; + +--echo End of 5.1 tests diff --git a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp index ab6d90ad59e..953cfffd73b 100644 --- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -2340,6 +2340,22 @@ NdbDictionaryImpl::createTable(NdbTableImpl &t) { DBUG_ENTER("NdbDictionaryImpl::createTable"); + + bool autoIncrement = false; + Uint64 initialValue = 0; + for (Uint32 i = 0; i < t.m_columns.size(); i++) { + const NdbColumnImpl* c = t.m_columns[i]; + assert(c != NULL); + if (c->m_autoIncrement) { + if (autoIncrement) { + m_error.code = 4335; + DBUG_RETURN(-1); + } + autoIncrement = true; + initialValue = c->m_autoIncrementInitialValue; + } + } + // if the new name has not been set, use the copied name if (t.m_newExternalName.empty()) { @@ -2377,21 +2393,6 @@ NdbDictionaryImpl::createTable(NdbTableImpl &t) // auto-increment - use "t" because initial value is not in DICT { - bool autoIncrement = false; - Uint64 initialValue = 0; - for (Uint32 i = 0; i < t.m_columns.size(); i++) { - const NdbColumnImpl* c = t.m_columns[i]; - assert(c != NULL); - if (c->m_autoIncrement) { - if (autoIncrement) { - m_error.code = 4335; - delete t2; - DBUG_RETURN(-1); - } - autoIncrement = true; - initialValue = c->m_autoIncrementInitialValue; - } - } if (autoIncrement) { // XXX unlikely race condition - t.m_id may no longer be same table // the tuple id range is not used on input From 93af2d9dc144f87ee6cb09e738a417d88f591d8c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Nov 2007 09:56:04 +0800 Subject: [PATCH 7/9] BUG#31245 Stress test fails on NDB:"Unknow prepared statement handler" mysql-test/suite/stress/t/ddl_ndb.test: The default connection should be "default connection". If there is no this statement added, the default connection is server1. --- mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++++++++ mysql-test/suite/stress/t/ddl_ndb.test | 2 ++ mysql-test/t/bdb_notembedded.test | 38 ++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/suite/stress/t/ddl_ndb.test b/mysql-test/suite/stress/t/ddl_ndb.test index 7eb45da8739..1e0a3680f8a 100644 --- a/mysql-test/suite/stress/t/ddl_ndb.test +++ b/mysql-test/suite/stress/t/ddl_ndb.test @@ -10,6 +10,8 @@ # Storage engine to be used in CREATE TABLE --source include/have_ndb.inc +connection default; + let $engine_type= NDB; diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests From 9b14ac8d0199e0f53fa857e85af78a7b1d715e36 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Jan 2008 14:51:08 +0800 Subject: [PATCH 8/9] Fix for view.test. the result should be added by 1 by the year(now()) function. mysql-test/r/view.result: SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75; the above statement in test file has a year(now()) function, the result should increase by 1 from 2007 year to 2008 year. --- mysql-test/r/view.result | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 8d9d802949d..1a1a5f68c6c 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2698,12 +2698,12 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(now()) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75) SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75; Age -43 -39 +44 +40 SELECT * FROM v1; Age -43 -39 +44 +40 DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, a char(6) DEFAULT 'xxx'); From b048153128e3fff4a8cb280be75c14c913b13acf Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Jan 2008 17:39:50 +0800 Subject: [PATCH 9/9] Shouldn't let the non-deterministic temperary filename output in result file for bug#30417 mysql-test/suite/ndb/r/ndb_autoinc.result: Temperory table name shouldn't output in result file for its name is non-deterministic mysql-test/suite/ndb/t/ndb_autoinc.test: don't output temperary file name --- mysql-test/suite/ndb/r/ndb_autoinc.result | 1 - mysql-test/suite/ndb/t/ndb_autoinc.test | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/ndb/r/ndb_autoinc.result b/mysql-test/suite/ndb/r/ndb_autoinc.result index 7ba5ab8def7..fe9d36393ad 100644 --- a/mysql-test/suite/ndb/r/ndb_autoinc.result +++ b/mysql-test/suite/ndb/r/ndb_autoinc.result @@ -18,7 +18,6 @@ KEY(id) ) ENGINE=MYISAM; ALTER TABLE t3 ENGINE NDBCLUSTER; -ERROR HY000: Can't create table 'test.#sql-7b9e_3' (errno: 4335) SHOW CREATE TABLE t3; Table Create Table t3 CREATE TABLE `t3` ( diff --git a/mysql-test/suite/ndb/t/ndb_autoinc.test b/mysql-test/suite/ndb/t/ndb_autoinc.test index 3e7ba7bdf6a..a5ae52c88d7 100644 --- a/mysql-test/suite/ndb/t/ndb_autoinc.test +++ b/mysql-test/suite/ndb/t/ndb_autoinc.test @@ -27,9 +27,11 @@ CREATE TABLE t3 ( KEY(id) ) ENGINE=MYISAM; +--disable_result_log --error 1005 ALTER TABLE t3 ENGINE NDBCLUSTER; +--enable_result_log SHOW CREATE TABLE t3;