diff --git a/mysql-test/std_data/ndb_backup50/BACKUP-2-0.1.Data b/mysql-test/std_data/ndb_backup50/BACKUP-2-0.1.Data new file mode 100644 index 00000000000..09e63064666 Binary files /dev/null and b/mysql-test/std_data/ndb_backup50/BACKUP-2-0.1.Data differ diff --git a/mysql-test/std_data/ndb_backup50/BACKUP-2-0.2.Data b/mysql-test/std_data/ndb_backup50/BACKUP-2-0.2.Data new file mode 100644 index 00000000000..a8332239d8f Binary files /dev/null and b/mysql-test/std_data/ndb_backup50/BACKUP-2-0.2.Data differ diff --git a/mysql-test/std_data/ndb_backup50/BACKUP-2.1.ctl b/mysql-test/std_data/ndb_backup50/BACKUP-2.1.ctl new file mode 100644 index 00000000000..f54103a2a44 Binary files /dev/null and b/mysql-test/std_data/ndb_backup50/BACKUP-2.1.ctl differ diff --git a/mysql-test/std_data/ndb_backup50/BACKUP-2.1.log b/mysql-test/std_data/ndb_backup50/BACKUP-2.1.log new file mode 100644 index 00000000000..5564f952e66 Binary files /dev/null and b/mysql-test/std_data/ndb_backup50/BACKUP-2.1.log differ diff --git a/mysql-test/std_data/ndb_backup50/BACKUP-2.2.ctl b/mysql-test/std_data/ndb_backup50/BACKUP-2.2.ctl new file mode 100644 index 00000000000..f54103a2a44 Binary files /dev/null and b/mysql-test/std_data/ndb_backup50/BACKUP-2.2.ctl differ diff --git a/mysql-test/std_data/ndb_backup50/BACKUP-2.2.log b/mysql-test/std_data/ndb_backup50/BACKUP-2.2.log new file mode 100644 index 00000000000..5564f952e66 Binary files /dev/null and b/mysql-test/std_data/ndb_backup50/BACKUP-2.2.log differ diff --git a/mysql-test/suite/ndb/r/ndb_restore_compat.result b/mysql-test/suite/ndb/r/ndb_restore_compat.result index db17f9af32b..f2630573220 100644 --- a/mysql-test/suite/ndb/r/ndb_restore_compat.result +++ b/mysql-test/suite/ndb/r/ndb_restore_compat.result @@ -111,4 +111,9 @@ SYSTEM_VALUES_ID VALUE SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; server_id epoch log_name start_pos end_pos 0 331 0 0 +SELECT * FROM DESCRIPTION ORDER BY USERNAME; +USERNAME ADDRESS +Guangbao Ni Suite 503, 5F NCI Tower, A12 Jianguomenwai Avenue Chaoyang District, Beijing, 100022 PRC +USERNAME Varchar(255;latin1_swedish_ci) NULL AT=SHORT_VAR ST=MEMORY +ADDRESS Longvarchar(2002;latin1_swedish_ci) NULL AT=MEDIUM_VAR ST=MEMORY DROP DATABASE BANK; diff --git a/mysql-test/suite/ndb/t/ndb_restore_compat.test b/mysql-test/suite/ndb/t/ndb_restore_compat.test index 2622aec1d50..8e5b30aa6fd 100644 --- a/mysql-test/suite/ndb/t/ndb_restore_compat.test +++ b/mysql-test/suite/ndb/t/ndb_restore_compat.test @@ -58,4 +58,10 @@ SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; SELECT COUNT(*) FROM TRANSACTION; SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 2 -n 1 -m -p 1 -s -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 2 -n 2 -p 1 -s -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT +SELECT * FROM DESCRIPTION ORDER BY USERNAME; +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK DESCRIPTION | grep SHORT_VAR +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK DESCRIPTION | grep MEDIUM_VAR + DROP DATABASE BANK; diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index d46d162bd3f..9bb0d75fa90 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -229,14 +229,12 @@ static int ndb_to_mysql_error(const NdbError *ndberr) */ case HA_ERR_NO_SUCH_TABLE: case HA_ERR_KEY_NOT_FOUND: - case HA_ERR_FOUND_DUPP_KEY: return error; /* Mapping missing, go with the ndb error code*/ case -1: error= ndberr->code; break; - /* Mapping exists, go with the mapped code */ default: break; diff --git a/storage/ndb/src/common/debugger/EventLogger.cpp b/storage/ndb/src/common/debugger/EventLogger.cpp index 0964a54f906..c7f9a42f39e 100644 --- a/storage/ndb/src/common/debugger/EventLogger.cpp +++ b/storage/ndb/src/common/debugger/EventLogger.cpp @@ -90,8 +90,6 @@ void getRestartAction(Uint32 action, BaseString &str) if (action == 0) return; str.appfmt(", restarting"); - if (action & 2) - str.appfmt(", no start"); if (action & 4) str.appfmt(", initial"); } diff --git a/storage/ndb/src/mgmclient/CommandInterpreter.cpp b/storage/ndb/src/mgmclient/CommandInterpreter.cpp index 00ea882a49d..8d9197574dd 100644 --- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp @@ -2086,7 +2086,7 @@ CommandInterpreter::executeRestart(Vector &command_list, return -1; } - if (!nostart) + if (nostart) ndbout_c("Shutting down nodes with \"-n, no start\" option, to subsequently start the nodes."); result= ndb_mgm_restart3(m_mgmsrv, no_of_nodes, node_ids, @@ -2106,7 +2106,15 @@ CommandInterpreter::executeRestart(Vector &command_list, ndbout << "Node"; for (int i= 0; i < no_of_nodes; i++) ndbout << " " << node_ids[i]; - ndbout_c(" is being restarted"); + ndbout_c(": Is being restarted"); + + ndbout << "Node"; + for (int i= 0; i < no_of_nodes; i++) + ndbout << " " << node_ids[i]; + if (nostart) + ndbout_c(": No start"); + else + ndbout_c(": Is rejoining the cluster"); } if(need_disconnect) disconnect(); diff --git a/storage/ndb/tools/restore/restore_main.cpp b/storage/ndb/tools/restore/restore_main.cpp index c12dc4dd0e8..7db77524ad8 100644 --- a/storage/ndb/tools/restore/restore_main.cpp +++ b/storage/ndb/tools/restore/restore_main.cpp @@ -138,7 +138,7 @@ static struct my_option my_long_options[] = "(parallelism can be 1 to 1024)", (uchar**) &ga_nParallelism, (uchar**) &ga_nParallelism, 0, GET_INT, REQUIRED_ARG, 128, 1, 1024, 0, 1, 0 }, - { "print", OPT_PRINT, "Print data and log to stdout", + { "print", OPT_PRINT, "Print metadata, data and log to stdout", (uchar**) &_print, (uchar**) &_print, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, { "print_data", OPT_PRINT_DATA, "Print data to stdout",