Commit a37b15c6 authored by unknown's avatar unknown

Fixed that mysql-test-run --ps-protocol works with system_mysql_db_fix.test


client/mysqltest.c:
  More debugging
mysql-test/t/system_mysql_db_fix.test:
  Fixed that mysql-test-run --ps-protocol works
parent d11d6d69
...@@ -540,7 +540,6 @@ static void free_used_memory() ...@@ -540,7 +540,6 @@ static void free_used_memory()
mysql_server_end(); mysql_server_end();
if (ps_protocol) if (ps_protocol)
ps_free_reg(); ps_free_reg();
my_end(MY_CHECK_ERROR);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
...@@ -558,6 +557,7 @@ static void die(const char* fmt, ...) ...@@ -558,6 +557,7 @@ static void die(const char* fmt, ...)
} }
va_end(args); va_end(args);
free_used_memory(); free_used_memory();
my_end(MY_CHECK_ERROR);
exit(1); exit(1);
} }
...@@ -570,6 +570,7 @@ static void abort_not_supported_test() ...@@ -570,6 +570,7 @@ static void abort_not_supported_test()
if (!silent) if (!silent)
printf("skipped\n"); printf("skipped\n");
free_used_memory(); free_used_memory();
my_end(MY_CHECK_ERROR);
exit(2); exit(2);
} }
...@@ -668,6 +669,7 @@ static int check_result(DYNAMIC_STRING* ds, const char* fname, ...@@ -668,6 +669,7 @@ static int check_result(DYNAMIC_STRING* ds, const char* fname,
{ {
int error = 0; int error = 0;
int res=dyn_string_cmp(ds, fname); int res=dyn_string_cmp(ds, fname);
DBUG_ENTER("check_result");
if (res && require_option) if (res && require_option)
abort_not_supported_test(); abort_not_supported_test();
...@@ -687,7 +689,7 @@ static int check_result(DYNAMIC_STRING* ds, const char* fname, ...@@ -687,7 +689,7 @@ static int check_result(DYNAMIC_STRING* ds, const char* fname,
} }
if (error) if (error)
reject_dump(fname, ds->str, ds->length); reject_dump(fname, ds->str, ds->length);
return error; DBUG_RETURN(error);
} }
...@@ -1841,7 +1843,10 @@ int read_line(char* buf, int size) ...@@ -1841,7 +1843,10 @@ int read_line(char* buf, int size)
cur_file--; cur_file--;
lineno--; lineno--;
if (cur_file == file_stack) if (cur_file == file_stack)
{
DBUG_PRINT("info", ("end of file"));
DBUG_RETURN(1); DBUG_RETURN(1);
}
continue; continue;
} }
...@@ -2011,7 +2016,6 @@ int read_query(struct st_query** q_ptr) ...@@ -2011,7 +2016,6 @@ int read_query(struct st_query** q_ptr)
q->query_buf= q->query= 0; q->query_buf= q->query= 0;
if (read_line(read_query_buf, sizeof(read_query_buf))) if (read_line(read_query_buf, sizeof(read_query_buf)))
{ {
DBUG_PRINT("warning",("too long query"));
DBUG_RETURN(1); DBUG_RETURN(1);
} }
DBUG_PRINT("info", ("query: %s", read_query_buf)); DBUG_PRINT("info", ("query: %s", read_query_buf));
...@@ -3366,8 +3370,6 @@ int main(int argc, char **argv) ...@@ -3366,8 +3370,6 @@ int main(int argc, char **argv)
my_bool require_file=0, q_send_flag=0, abort_flag= 0; my_bool require_file=0, q_send_flag=0, abort_flag= 0;
char save_file[FN_REFLEN]; char save_file[FN_REFLEN];
MY_INIT(argv[0]); MY_INIT(argv[0]);
{
DBUG_ENTER("main");
/* Use all time until exit if no explicit 'start_timer' */ /* Use all time until exit if no explicit 'start_timer' */
timer_start= timer_now(); timer_start= timer_now();
...@@ -3394,6 +3396,8 @@ int main(int argc, char **argv) ...@@ -3394,6 +3396,8 @@ int main(int argc, char **argv)
*block_ok = 1; *block_ok = 1;
init_dynamic_string(&ds_res, "", 0, 65536); init_dynamic_string(&ds_res, "", 0, 65536);
parse_args(argc, argv); parse_args(argc, argv);
DBUG_PRINT("info",("result_file: '%s'", result_file ? result_file : ""));
if (mysql_server_init(embedded_server_arg_count, if (mysql_server_init(embedded_server_arg_count,
embedded_server_args, embedded_server_args,
(char**) embedded_server_groups)) (char**) embedded_server_groups))
...@@ -3659,9 +3663,9 @@ int main(int argc, char **argv) ...@@ -3659,9 +3663,9 @@ int main(int argc, char **argv)
if (!got_end_timer) if (!got_end_timer)
timer_output(); /* No end_timer cmd, end it */ timer_output(); /* No end_timer cmd, end it */
free_used_memory(); free_used_memory();
my_end(MY_CHECK_ERROR);
exit(error ? 1 : 0); exit(error ? 1 : 0);
return error ? 1 : 0; /* Keep compiler happy */ return error ? 1 : 0; /* Keep compiler happy */
}
} }
......
...@@ -9,6 +9,7 @@ use test; ...@@ -9,6 +9,7 @@ use test;
# create system tables as in mysql-3.20 # create system tables as in mysql-3.20
--disable_warnings
CREATE TABLE db ( CREATE TABLE db (
Host char(60) binary DEFAULT '' NOT NULL, Host char(60) binary DEFAULT '' NOT NULL,
Db char(32) binary DEFAULT '' NOT NULL, Db char(32) binary DEFAULT '' NOT NULL,
...@@ -23,10 +24,12 @@ CREATE TABLE db ( ...@@ -23,10 +24,12 @@ CREATE TABLE db (
KEY User (User) KEY User (User)
) )
type=ISAM; type=ISAM;
--enable-warnings
INSERT INTO db VALUES ('%','test', '','Y','Y','Y','Y','Y','Y'); INSERT INTO db VALUES ('%','test', '','Y','Y','Y','Y','Y','Y');
INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y'); INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y');
--disable_warnings
CREATE TABLE host ( CREATE TABLE host (
Host char(60) binary DEFAULT '' NOT NULL, Host char(60) binary DEFAULT '' NOT NULL,
Db char(32) binary DEFAULT '' NOT NULL, Db char(32) binary DEFAULT '' NOT NULL,
...@@ -39,7 +42,9 @@ CREATE TABLE host ( ...@@ -39,7 +42,9 @@ CREATE TABLE host (
PRIMARY KEY Host (Host,Db) PRIMARY KEY Host (Host,Db)
) )
type=ISAM; type=ISAM;
--enable-warnings
--disable_warnings
CREATE TABLE user ( CREATE TABLE user (
Host char(60) binary DEFAULT '' NOT NULL, Host char(60) binary DEFAULT '' NOT NULL,
User char(16) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL,
...@@ -56,6 +61,7 @@ CREATE TABLE user ( ...@@ -56,6 +61,7 @@ CREATE TABLE user (
PRIMARY KEY Host (Host,User) PRIMARY KEY Host (Host,User)
) )
type=ISAM; type=ISAM;
--enable-warnings
INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y'); INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y');
INSERT INTO user VALUES ('localhost','', '','N','N','N','N','N','N','N','N','N'); INSERT INTO user VALUES ('localhost','', '','N','N','N','N','N','N','N','N','N');
......
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