Commit f01f7216 authored by konstantin@mysql.com's avatar konstantin@mysql.com

manual merge

parents 77fae118 8b33aad4
...@@ -191,7 +191,7 @@ if ( cd "$fs_ndb" ; $exec_mgmtsrvr -f config.ini ) ; then :; else ...@@ -191,7 +191,7 @@ if ( cd "$fs_ndb" ; $exec_mgmtsrvr -f config.ini ) ; then :; else
echo "Unable to start $exec_mgmtsrvr from `pwd`" echo "Unable to start $exec_mgmtsrvr from `pwd`"
exit 1 exit 1
fi fi
if sleep_until_file_created $fs_ndb/ndb_3.pid 30 if sleep_until_file_created $fs_ndb/ndb_3.pid 120
then :; else then :; else
exit 1 exit 1
fi fi
...@@ -201,7 +201,7 @@ cat `find "$fs_ndb" -name 'ndb_*.pid'` > "$fs_ndb/$pidfile" ...@@ -201,7 +201,7 @@ cat `find "$fs_ndb" -name 'ndb_*.pid'` > "$fs_ndb/$pidfile"
echo "Starting ndbd" echo "Starting ndbd"
( cd "$fs_ndb" ; $exec_ndb $flags_ndb & ) ( cd "$fs_ndb" ; $exec_ndb $flags_ndb & )
if sleep_until_file_created $fs_ndb/ndb_1.pid 30 if sleep_until_file_created $fs_ndb/ndb_1.pid 120
then :; else then :; else
stop_default_ndbcluster stop_default_ndbcluster
exit 1 exit 1
...@@ -212,7 +212,7 @@ cat `find "$fs_ndb" -name 'ndb_*.pid'` > "$fs_ndb/$pidfile" ...@@ -212,7 +212,7 @@ cat `find "$fs_ndb" -name 'ndb_*.pid'` > "$fs_ndb/$pidfile"
echo "Starting ndbd" echo "Starting ndbd"
( cd "$fs_ndb" ; $exec_ndb $flags_ndb & ) ( cd "$fs_ndb" ; $exec_ndb $flags_ndb & )
if sleep_until_file_created $fs_ndb/ndb_2.pid 30 if sleep_until_file_created $fs_ndb/ndb_2.pid 120
then :; else then :; else
stop_default_ndbcluster stop_default_ndbcluster
exit 1 exit 1
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
0, 0, \ 0, 0, \
0, \ 0, \
(desc), \ (desc), \
(void *)(value) } (value) }
#define CPC_ARG(name, type, opt, desc) \ #define CPC_ARG(name, type, opt, desc) \
{ (name), \ { (name), \
...@@ -351,17 +351,12 @@ SimpleCpcClient::define_process(Process & p, Properties& reply){ ...@@ -351,17 +351,12 @@ SimpleCpcClient::define_process(Process & p, Properties& reply){
int int
SimpleCpcClient::list_processes(Vector<Process> &procs, Properties& reply) { SimpleCpcClient::list_processes(Vector<Process> &procs, Properties& reply) {
enum Proclist { int start, end, entry;
Proclist_Start,
Proclist_End,
Proclist_Entry
};
const ParserRow_t list_reply[] = { const ParserRow_t list_reply[] = {
CPC_CMD("start processes", Proclist_Start, ""), CPC_CMD("start processes", &start, ""),
CPC_CMD("end processes", &end, ""),
CPC_CMD("end processes", Proclist_End, ""),
CPC_CMD("process", Proclist_Entry, ""), CPC_CMD("process", &entry, ""),
CPC_ARG("id", Int, Mandatory, "Id of process."), CPC_ARG("id", Int, Mandatory, "Id of process."),
CPC_ARG("name", String, Mandatory, "Name of process"), CPC_ARG("name", String, Mandatory, "Name of process"),
CPC_ARG("group", String, Mandatory, "Group of process"), CPC_ARG("group", String, Mandatory, "Group of process"),
...@@ -390,26 +385,29 @@ SimpleCpcClient::list_processes(Vector<Process> &procs, Properties& reply) { ...@@ -390,26 +385,29 @@ SimpleCpcClient::list_processes(Vector<Process> &procs, Properties& reply) {
bool done = false; bool done = false;
while(!done) { while(!done) {
const Properties *proc; const Properties *proc;
enum Proclist p; void *p;
cpc_recv(list_reply, &proc, (void **)&p); cpc_recv(list_reply, &proc, &p);
switch(p) { if(p == &start)
case Proclist_Start: {
/* do nothing */ /* do nothing */
break; }
case Proclist_End: else if(p == &end)
{
done = true; done = true;
break; }
case Proclist_Entry: else if(p == &entry)
{
if(proc != NULL){ if(proc != NULL){
Process p; Process p;
convert(* proc, p); convert(* proc, p);
procs.push_back(p); procs.push_back(p);
} }
break; }
default: else
/* ignore */ {
break; ndbout_c("internal error: %d", __LINE__);
return -1;
} }
} }
return 0; return 0;
......
...@@ -1613,7 +1613,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, ...@@ -1613,7 +1613,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
table_list.schema_table= schema_table; table_list.schema_table= schema_table;
} }
/* command not cachable => no gap for data base name */ thd->query_length= strlen(packet); // for simplicity: don't optimize
if (!(thd->query=fields=thd->memdup(packet,thd->query_length+1))) if (!(thd->query=fields=thd->memdup(packet,thd->query_length+1)))
break; break;
mysql_log.write(thd,command,"%s %s",table_list.table_name, fields); mysql_log.write(thd,command,"%s %s",table_list.table_name, fields);
......
...@@ -12481,6 +12481,30 @@ static void test_truncation_option() ...@@ -12481,6 +12481,30 @@ static void test_truncation_option()
mysql_stmt_close(stmt); mysql_stmt_close(stmt);
} }
/* Bug#6761 - mysql_list_fields doesn't work */
static void test_bug6761(void)
{
const char *stmt_text;
MYSQL_RES *res;
int rc;
myheader("test_bug6761");
stmt_text= "CREATE TABLE t1 (a int, b char(255), c decimal)";
rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
myquery(rc);
res= mysql_list_fields(mysql, "t1", "%");
DIE_UNLESS(res && mysql_num_fields(res) == 3);
mysql_free_result(res);
stmt_text= "DROP TABLE t1";
rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
myquery(rc);
}
/* /*
Read and parse arguments and MySQL options from my.cnf Read and parse arguments and MySQL options from my.cnf
*/ */
...@@ -12687,6 +12711,7 @@ static struct my_tests_st my_tests[]= { ...@@ -12687,6 +12711,7 @@ static struct my_tests_st my_tests[]= {
{ "test_bug4172", test_bug4172 }, { "test_bug4172", test_bug4172 },
{ "test_conversion", test_conversion }, { "test_conversion", test_conversion },
{ "test_rewind", test_rewind }, { "test_rewind", test_rewind },
{ "test_bug6761", test_bug6761 },
{ "test_view", test_view }, { "test_view", test_view },
{ "test_view_where", test_view_where }, { "test_view_where", test_view_where },
{ "test_view_2where", test_view_2where }, { "test_view_2where", test_view_2where },
......
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