From 7e73af6342bd436fc505084f868ec19378b79d5c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Oct 2006 20:22:56 +0200 Subject: [PATCH 1/6] rpl_empty_master_crash need a master restart so that all log files are deleted mysql-test/t/rpl_empty_master_crash-master.opt: New BitKeeper file ``mysql-test/t/rpl_empty_master_crash-master.opt'' --- mysql-test/t/rpl_empty_master_crash-master.opt | 1 + 1 file changed, 1 insertion(+) create mode 100644 mysql-test/t/rpl_empty_master_crash-master.opt diff --git a/mysql-test/t/rpl_empty_master_crash-master.opt b/mysql-test/t/rpl_empty_master_crash-master.opt new file mode 100644 index 00000000000..cef79bc8585 --- /dev/null +++ b/mysql-test/t/rpl_empty_master_crash-master.opt @@ -0,0 +1 @@ +--force-restart From 00e327ed88a9cecd683a3fa3ec393b6be9f43854 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Oct 2006 20:29:27 +0200 Subject: [PATCH 2/6] Look for client bindirs client_release and client_debug before other directories. --- mysql-test/mysql-test-run.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 24cdedce712..3cc0110ed05 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -468,11 +468,11 @@ sub initial_setup () { # # Look for the path where to find the client binaries - $path_client_bindir= mtr_path_exists("$glob_basedir/client/release", + $path_client_bindir= mtr_path_exists("$glob_basedir/client_release", + "$glob_basedir/client_debug", + "$glob_basedir/client/release", "$glob_basedir/client/debug", "$glob_basedir/client", - "$glob_basedir/client_release", - "$glob_basedir/client_debug", "$glob_basedir/bin"); # Look for the mysqld executable @@ -484,6 +484,7 @@ sub initial_setup () { "$path_client_bindir/mysqld-debug", "$path_client_bindir/mysqld-max", "$glob_basedir/libexec/mysqld", + "$glob_basedir/bin/mysqld", "$glob_basedir/sql/release/mysqld", "$glob_basedir/sql/debug/mysqld"); From 0d9e6366a82b5e9a8606ac332aeacc5cb9c54923 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 14 Oct 2006 16:31:20 +0200 Subject: [PATCH 3/6] Skip looking for mysql_client_test in 4.1 on windows as it's not built by default --- mysql-test/mysql-test-run.pl | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 3cc0110ed05..79f01c3cb68 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1417,18 +1417,27 @@ sub executable_setup () { } - # Look for mysql_client_test executable - if ( $glob_use_embedded_server ) + if ( $glob_win32 and $mysql_version_id < 50000 ) { - $exe_mysql_client_test= - mtr_exe_exists("$glob_basedir/libmysqld/examples/mysql_client_test_embedded"); + # Skip looking for exe_mysql_client_test as its not built by default + # in 4.1 for windows. + exe_mysql_client_test= "unavailable"; } else { - $exe_mysql_client_test= - mtr_exe_exists("$glob_basedir/tests/mysql_client_test", - "$glob_basedir/tests/release/mysql_client_test", - "$glob_basedir/tests/debug/mysql_client_test"); + # Look for mysql_client_test executable + if ( $glob_use_embedded_server ) + { + $exe_mysql_client_test= + mtr_exe_exists("$glob_basedir/libmysqld/examples/mysql_client_test_embedded"); + } + else + { + $exe_mysql_client_test= + mtr_exe_exists("$glob_basedir/tests/mysql_client_test", + "$glob_basedir/tests/release/mysql_client_test", + "$glob_basedir/tests/debug/mysql_client_test"); + } } } From b0a4ec859faaf985d9e28fa443af9316729843be Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 14 Oct 2006 17:02:43 +0200 Subject: [PATCH 4/6] Improving debugging support in 'read_line' function --- client/mysqltest.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index e46f22de4df..7029e0af3e1 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -3346,7 +3346,7 @@ int read_line(char *buf, int size) LINT_INIT(last_quote); start_lineno= cur_file->lineno; - DBUG_PRINT("info", ("start_lineno: %d", start_lineno)); + DBUG_PRINT("info", ("Starting to read at lineno: %d", start_lineno)); for (; p < buf_end ;) { skip_char= 0; @@ -3370,7 +3370,7 @@ int read_line(char *buf, int size) die("Missing end of block"); *p= 0; - DBUG_PRINT("info", ("end of file")); + DBUG_PRINT("info", ("end of file at line %d", cur_file->lineno)); DBUG_RETURN(1); } cur_file--; @@ -3393,7 +3393,8 @@ int read_line(char *buf, int size) if (end_of_query(c)) { *p= 0; - DBUG_PRINT("exit", ("Found delimiter '%s'", delimiter)); + DBUG_PRINT("exit", ("Found delimiter '%s' at line %d", + delimiter, cur_file->lineno)); DBUG_RETURN(0); } else if ((c == '{' && @@ -3405,7 +3406,8 @@ int read_line(char *buf, int size) /* Only if and while commands can be terminated by { */ *p++= c; *p= 0; - DBUG_PRINT("exit", ("Found '{' indicating begining of block")); + DBUG_PRINT("exit", ("Found '{' indicating start of block at line %d", + cur_file->lineno)); DBUG_RETURN(0); } else if (c == '\'' || c == '"' || c == '`') @@ -3420,7 +3422,8 @@ int read_line(char *buf, int size) { /* Comments are terminated by newline */ *p= 0; - DBUG_PRINT("exit", ("Found newline in comment")); + DBUG_PRINT("exit", ("Found newline in comment at line: %d", + cur_file->lineno)); DBUG_RETURN(0); } break; @@ -3435,13 +3438,19 @@ int read_line(char *buf, int size) { /* Skip all space at begining of line */ if (c == '\n') - start_lineno= cur_file->lineno; /* Query hasn't started yet */ + { + /* Query hasn't started yet */ + start_lineno= cur_file->lineno; + DBUG_PRINT("info", ("Query hasn't started yet, start_lineno: %d", + start_lineno)); + } skip_char= 1; } else if (end_of_query(c)) { *p= 0; - DBUG_PRINT("exit", ("Found delimiter '%s'", delimiter)); + DBUG_PRINT("exit", ("Found delimiter '%s' at line: %d", + delimiter, cur_file->lineno)); DBUG_RETURN(0); } else if (c == '}') @@ -3449,7 +3458,8 @@ int read_line(char *buf, int size) /* A "}" need to be by itself in the begining of a line to terminate */ *p++= c; *p= 0; - DBUG_PRINT("exit", ("Found '}' in begining of a line")); + DBUG_PRINT("exit", ("Found '}' in begining of a line at line: %d", + cur_file->lineno)); DBUG_RETURN(0); } else if (c == '\'' || c == '"' || c == '`') From 8ec4020e2534e7b26721bb07c89d77eb11482c77 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 14 Oct 2006 17:09:06 +0200 Subject: [PATCH 5/6] Use char as datatype for the byte that are read with my_fgetc, fixes problem with mysqltest.test on Solaris and Mac. write_file produced nice files with all zeroes. client/mysqltest.c: Use char as datatype for the byte that are read with my_fgetc mysql-test/mysql-test-run.pl: Fix typo, add missing $ --- client/mysqltest.c | 2 +- mysql-test/mysql-test-run.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 7029e0af3e1..efb5f1915f4 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1810,7 +1810,7 @@ void my_ungetc(int c) void read_until_delimiter(DYNAMIC_STRING *ds, DYNAMIC_STRING *ds_delimiter) { - int c; + char c; DBUG_ENTER("read_until_delimiter"); DBUG_PRINT("enter", ("delimiter: %s, length: %d", ds_delimiter->str, ds_delimiter->length)); diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 79f01c3cb68..35782733b20 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1421,7 +1421,7 @@ sub executable_setup () { { # Skip looking for exe_mysql_client_test as its not built by default # in 4.1 for windows. - exe_mysql_client_test= "unavailable"; + $exe_mysql_client_test= "unavailable"; } else { From ad4d813024b6e6ec8e0b9f0796f2a304edf218e2 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 14 Oct 2006 17:14:03 +0200 Subject: [PATCH 6/6] No need to continue in 'mtr_report_test_failed' after timeout detected, return immediately after --- mysql-test/lib/mtr_report.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index ec1bed9671b..b173896d48a 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -133,6 +133,7 @@ sub mtr_report_test_failed ($) { if ( $tinfo->{'timeout'} ) { print "[ fail ] timeout\n"; + return; } elsif ( $tinfo->{'ndb_test'} and $::cluster->[0]->{'installed_ok'} eq "NO") {