Merge jhe@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb

into  dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.1/mysql-5.1-new-ndb-bj.merge
parents d14cba10 56902d52
...@@ -111,4 +111,9 @@ SYSTEM_VALUES_ID VALUE ...@@ -111,4 +111,9 @@ SYSTEM_VALUES_ID VALUE
SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; SELECT * FROM mysql.ndb_apply_status WHERE server_id=0;
server_id epoch log_name start_pos end_pos server_id epoch log_name start_pos end_pos
0 331 0 0 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; DROP DATABASE BANK;
...@@ -58,4 +58,10 @@ SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; ...@@ -58,4 +58,10 @@ SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID;
SELECT COUNT(*) FROM TRANSACTION; SELECT COUNT(*) FROM TRANSACTION;
SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; 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; DROP DATABASE BANK;
...@@ -229,14 +229,12 @@ static int ndb_to_mysql_error(const NdbError *ndberr) ...@@ -229,14 +229,12 @@ static int ndb_to_mysql_error(const NdbError *ndberr)
*/ */
case HA_ERR_NO_SUCH_TABLE: case HA_ERR_NO_SUCH_TABLE:
case HA_ERR_KEY_NOT_FOUND: case HA_ERR_KEY_NOT_FOUND:
case HA_ERR_FOUND_DUPP_KEY:
return error; return error;
/* Mapping missing, go with the ndb error code*/ /* Mapping missing, go with the ndb error code*/
case -1: case -1:
error= ndberr->code; error= ndberr->code;
break; break;
/* Mapping exists, go with the mapped code */ /* Mapping exists, go with the mapped code */
default: default:
break; break;
......
...@@ -90,8 +90,6 @@ void getRestartAction(Uint32 action, BaseString &str) ...@@ -90,8 +90,6 @@ void getRestartAction(Uint32 action, BaseString &str)
if (action == 0) if (action == 0)
return; return;
str.appfmt(", restarting"); str.appfmt(", restarting");
if (action & 2)
str.appfmt(", no start");
if (action & 4) if (action & 4)
str.appfmt(", initial"); str.appfmt(", initial");
} }
......
...@@ -2086,7 +2086,7 @@ CommandInterpreter::executeRestart(Vector<BaseString> &command_list, ...@@ -2086,7 +2086,7 @@ CommandInterpreter::executeRestart(Vector<BaseString> &command_list,
return -1; return -1;
} }
if (!nostart) if (nostart)
ndbout_c("Shutting down nodes with \"-n, no start\" option, to subsequently start the nodes."); 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, result= ndb_mgm_restart3(m_mgmsrv, no_of_nodes, node_ids,
...@@ -2106,7 +2106,15 @@ CommandInterpreter::executeRestart(Vector<BaseString> &command_list, ...@@ -2106,7 +2106,15 @@ CommandInterpreter::executeRestart(Vector<BaseString> &command_list,
ndbout << "Node"; ndbout << "Node";
for (int i= 0; i < no_of_nodes; i++) for (int i= 0; i < no_of_nodes; i++)
ndbout << " " << node_ids[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) if(need_disconnect)
disconnect(); disconnect();
......
...@@ -138,7 +138,7 @@ static struct my_option my_long_options[] = ...@@ -138,7 +138,7 @@ static struct my_option my_long_options[] =
"(parallelism can be 1 to 1024)", "(parallelism can be 1 to 1024)",
(uchar**) &ga_nParallelism, (uchar**) &ga_nParallelism, 0, (uchar**) &ga_nParallelism, (uchar**) &ga_nParallelism, 0,
GET_INT, REQUIRED_ARG, 128, 1, 1024, 0, 1, 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, (uchar**) &_print, (uchar**) &_print, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "print_data", OPT_PRINT_DATA, "Print data to stdout", { "print_data", OPT_PRINT_DATA, "Print data to stdout",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment