Loading mysql-test/r/ndb_alter_table.result +4 −2 Original line number Diff line number Diff line Loading @@ -75,9 +75,11 @@ drop table t1; DROP TABLE IF EXISTS t2; create table t2 (a int NOT NULL PRIMARY KEY) engine=myisam; alter table t2 engine=ndbcluster; select count(*) from t2; delete from t2; ERROR HY000: Got temporary error 1217 '1217' from ndbcluster select count(*) from t2 where a+0 > 0; count(*) 15001 12001 truncate table t2; select count(*) from t2; count(*) Loading mysql-test/t/ndb_alter_table.test +5 −2 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ DROP TABLE IF EXISTS t2; --enable_warnings create table t2 (a int NOT NULL PRIMARY KEY) engine=myisam; let $1=15001; let $1=12001; disable_query_log; while ($1) { Loading @@ -62,7 +62,10 @@ while ($1) } enable_query_log; alter table t2 engine=ndbcluster; select count(*) from t2; --error 1297 delete from t2; #to make sure we do a full table scan select count(*) from t2 where a+0 > 0; truncate table t2; select count(*) from t2; drop table t2; ndb/src/common/mgmcommon/ConfigRetriever.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -102,14 +102,13 @@ ConfigRetriever::do_connect(int exit_on_connect_failure){ if (ndb_mgm_connect(m_handle, tmp.c_str()) == 0) { return 0; } if (exit_on_connect_failure) return 1; setError(CR_RETRY, ndb_mgm_get_latest_error_desc(m_handle)); case MgmId_File: break; } } if (exit_on_connect_failure) return 1; if(latestErrorType == CR_RETRY){ REPORT_WARNING("Failed to retrieve cluster configuration"); ndbout << "(Cause of failure: " << getErrorString() << ")" << endl; Loading sql/ha_ndbcluster.cc +15 −1 Original line number Diff line number Diff line Loading @@ -2603,7 +2603,6 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type) (NdbConnection*)thd->transaction.all.ndb_tid: (NdbConnection*)thd->transaction.stmt.ndb_tid; DBUG_ASSERT(m_active_trans); // Start of transaction retrieve_all_fields= FALSE; ops_pending= 0; Loading @@ -2628,7 +2627,18 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type) thd->transaction.stmt.ndb_tid= 0; } } if (m_active_trans) DBUG_PRINT("warning", ("m_active_trans != NULL")); if (m_active_cursor) DBUG_PRINT("warning", ("m_active_cursor != NULL")); if (blobs_pending) DBUG_PRINT("warning", ("blobs_pending != 0")); if (ops_pending) DBUG_PRINT("warning", ("ops_pending != 0L")); m_active_trans= NULL; m_active_cursor= NULL; ops_pending= 0; blobs_pending= 0; } DBUG_RETURN(error); } Loading Loading @@ -3242,7 +3252,11 @@ ha_ndbcluster::~ha_ndbcluster() blobs_buffer= 0; // Check for open cursor/transaction if (m_active_cursor) { } DBUG_ASSERT(m_active_cursor == NULL); if (m_active_trans) { } DBUG_ASSERT(m_active_trans == NULL); DBUG_VOID_RETURN; Loading Loading
mysql-test/r/ndb_alter_table.result +4 −2 Original line number Diff line number Diff line Loading @@ -75,9 +75,11 @@ drop table t1; DROP TABLE IF EXISTS t2; create table t2 (a int NOT NULL PRIMARY KEY) engine=myisam; alter table t2 engine=ndbcluster; select count(*) from t2; delete from t2; ERROR HY000: Got temporary error 1217 '1217' from ndbcluster select count(*) from t2 where a+0 > 0; count(*) 15001 12001 truncate table t2; select count(*) from t2; count(*) Loading
mysql-test/t/ndb_alter_table.test +5 −2 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ DROP TABLE IF EXISTS t2; --enable_warnings create table t2 (a int NOT NULL PRIMARY KEY) engine=myisam; let $1=15001; let $1=12001; disable_query_log; while ($1) { Loading @@ -62,7 +62,10 @@ while ($1) } enable_query_log; alter table t2 engine=ndbcluster; select count(*) from t2; --error 1297 delete from t2; #to make sure we do a full table scan select count(*) from t2 where a+0 > 0; truncate table t2; select count(*) from t2; drop table t2;
ndb/src/common/mgmcommon/ConfigRetriever.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -102,14 +102,13 @@ ConfigRetriever::do_connect(int exit_on_connect_failure){ if (ndb_mgm_connect(m_handle, tmp.c_str()) == 0) { return 0; } if (exit_on_connect_failure) return 1; setError(CR_RETRY, ndb_mgm_get_latest_error_desc(m_handle)); case MgmId_File: break; } } if (exit_on_connect_failure) return 1; if(latestErrorType == CR_RETRY){ REPORT_WARNING("Failed to retrieve cluster configuration"); ndbout << "(Cause of failure: " << getErrorString() << ")" << endl; Loading
sql/ha_ndbcluster.cc +15 −1 Original line number Diff line number Diff line Loading @@ -2603,7 +2603,6 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type) (NdbConnection*)thd->transaction.all.ndb_tid: (NdbConnection*)thd->transaction.stmt.ndb_tid; DBUG_ASSERT(m_active_trans); // Start of transaction retrieve_all_fields= FALSE; ops_pending= 0; Loading @@ -2628,7 +2627,18 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type) thd->transaction.stmt.ndb_tid= 0; } } if (m_active_trans) DBUG_PRINT("warning", ("m_active_trans != NULL")); if (m_active_cursor) DBUG_PRINT("warning", ("m_active_cursor != NULL")); if (blobs_pending) DBUG_PRINT("warning", ("blobs_pending != 0")); if (ops_pending) DBUG_PRINT("warning", ("ops_pending != 0L")); m_active_trans= NULL; m_active_cursor= NULL; ops_pending= 0; blobs_pending= 0; } DBUG_RETURN(error); } Loading Loading @@ -3242,7 +3252,11 @@ ha_ndbcluster::~ha_ndbcluster() blobs_buffer= 0; // Check for open cursor/transaction if (m_active_cursor) { } DBUG_ASSERT(m_active_cursor == NULL); if (m_active_trans) { } DBUG_ASSERT(m_active_trans == NULL); DBUG_VOID_RETURN; Loading