mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
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
This commit is contained in:
parent
d11d6d6971
commit
a37b15c6b0
2 changed files with 16 additions and 6 deletions
|
@ -540,7 +540,6 @@ static void free_used_memory()
|
|||
mysql_server_end();
|
||||
if (ps_protocol)
|
||||
ps_free_reg();
|
||||
my_end(MY_CHECK_ERROR);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
@ -558,6 +557,7 @@ static void die(const char* fmt, ...)
|
|||
}
|
||||
va_end(args);
|
||||
free_used_memory();
|
||||
my_end(MY_CHECK_ERROR);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -570,6 +570,7 @@ static void abort_not_supported_test()
|
|||
if (!silent)
|
||||
printf("skipped\n");
|
||||
free_used_memory();
|
||||
my_end(MY_CHECK_ERROR);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
@ -668,6 +669,7 @@ static int check_result(DYNAMIC_STRING* ds, const char* fname,
|
|||
{
|
||||
int error = 0;
|
||||
int res=dyn_string_cmp(ds, fname);
|
||||
DBUG_ENTER("check_result");
|
||||
|
||||
if (res && require_option)
|
||||
abort_not_supported_test();
|
||||
|
@ -687,7 +689,7 @@ static int check_result(DYNAMIC_STRING* ds, const char* fname,
|
|||
}
|
||||
if (error)
|
||||
reject_dump(fname, ds->str, ds->length);
|
||||
return error;
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1841,7 +1843,10 @@ int read_line(char* buf, int size)
|
|||
cur_file--;
|
||||
lineno--;
|
||||
if (cur_file == file_stack)
|
||||
{
|
||||
DBUG_PRINT("info", ("end of file"));
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2011,7 +2016,6 @@ int read_query(struct st_query** q_ptr)
|
|||
q->query_buf= q->query= 0;
|
||||
if (read_line(read_query_buf, sizeof(read_query_buf)))
|
||||
{
|
||||
DBUG_PRINT("warning",("too long query"));
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
DBUG_PRINT("info", ("query: %s", read_query_buf));
|
||||
|
@ -3366,8 +3370,6 @@ int main(int argc, char **argv)
|
|||
my_bool require_file=0, q_send_flag=0, abort_flag= 0;
|
||||
char save_file[FN_REFLEN];
|
||||
MY_INIT(argv[0]);
|
||||
{
|
||||
DBUG_ENTER("main");
|
||||
|
||||
/* Use all time until exit if no explicit 'start_timer' */
|
||||
timer_start= timer_now();
|
||||
|
@ -3394,6 +3396,8 @@ int main(int argc, char **argv)
|
|||
*block_ok = 1;
|
||||
init_dynamic_string(&ds_res, "", 0, 65536);
|
||||
parse_args(argc, argv);
|
||||
|
||||
DBUG_PRINT("info",("result_file: '%s'", result_file ? result_file : ""));
|
||||
if (mysql_server_init(embedded_server_arg_count,
|
||||
embedded_server_args,
|
||||
(char**) embedded_server_groups))
|
||||
|
@ -3659,9 +3663,9 @@ int main(int argc, char **argv)
|
|||
if (!got_end_timer)
|
||||
timer_output(); /* No end_timer cmd, end it */
|
||||
free_used_memory();
|
||||
my_end(MY_CHECK_ERROR);
|
||||
exit(error ? 1 : 0);
|
||||
return error ? 1 : 0; /* Keep compiler happy */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ use test;
|
|||
|
||||
# create system tables as in mysql-3.20
|
||||
|
||||
--disable_warnings
|
||||
CREATE TABLE db (
|
||||
Host char(60) binary DEFAULT '' NOT NULL,
|
||||
Db char(32) binary DEFAULT '' NOT NULL,
|
||||
|
@ -23,10 +24,12 @@ CREATE TABLE db (
|
|||
KEY User (User)
|
||||
)
|
||||
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');
|
||||
|
||||
--disable_warnings
|
||||
CREATE TABLE host (
|
||||
Host char(60) binary DEFAULT '' NOT NULL,
|
||||
Db char(32) binary DEFAULT '' NOT NULL,
|
||||
|
@ -39,7 +42,9 @@ CREATE TABLE host (
|
|||
PRIMARY KEY Host (Host,Db)
|
||||
)
|
||||
type=ISAM;
|
||||
--enable-warnings
|
||||
|
||||
--disable_warnings
|
||||
CREATE TABLE user (
|
||||
Host char(60) binary DEFAULT '' NOT NULL,
|
||||
User char(16) binary DEFAULT '' NOT NULL,
|
||||
|
@ -56,6 +61,7 @@ CREATE TABLE user (
|
|||
PRIMARY KEY Host (Host,User)
|
||||
)
|
||||
type=ISAM;
|
||||
--enable-warnings
|
||||
|
||||
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');
|
||||
|
|
Loading…
Reference in a new issue