summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2011-05-18 15:17:26 +0200
committerunknown <knielsen@knielsen-hq.org>2011-05-18 15:17:26 +0200
commit4ea53bc29b1e3069ba72720412016e01b7d7382c (patch)
tree7d1a0b239665ef8d5c14c472101c9c5f3388b21b
parent19f0d6b2d9930f83688943b8f98a8b7397584df9 (diff)
parente55fb3bbe844dcc5f53ea7bdb6f13b5b79ff56ec (diff)
downloadmariadb-git-4ea53bc29b1e3069ba72720412016e01b7d7382c.tar.gz
automerge
-rw-r--r--client/mysqltest.cc11
-rw-r--r--mysql-test/r/mysqltest.result10
2 files changed, 13 insertions, 8 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 6f18deb990f..772dd69c089 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -1276,12 +1276,17 @@ static void cleanup_and_exit(int exit_code)
void print_file_stack()
{
- for (struct st_test_file* err_file= cur_file;
- err_file != file_stack;
- err_file--)
+ struct st_test_file* err_file= cur_file;
+ if (err_file == file_stack)
+ return;
+
+ for (;;)
{
+ err_file--;
fprintf(stderr, "included from %s at line %d:\n",
err_file->file_name, err_file->lineno);
+ if (err_file == file_stack)
+ break;
}
}
diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result
index 34adadbe6ba..c32553f077e 100644
--- a/mysql-test/r/mysqltest.result
+++ b/mysql-test/r/mysqltest.result
@@ -339,11 +339,11 @@ included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
-included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
+included from <stdin> at line 1:
At line 1: Source directives are nesting too deep
garbage ;
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql":
-included from MYSQLTEST_VARDIR/tmp/error.sql at line 1:
+included from <stdin> at line 1:
At line 1: query 'garbage ' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
2 = outer loop variable after while
@@ -439,7 +439,7 @@ while with string, only once
1
Testing while with not
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc":
-included from MYSQLTEST_VARDIR/tmp/mysqltest_while.inc at line 65:
+included from <stdin> at line 1:
At line 64: Nesting too deeply
mysqltest: At line 1: missing '(' in while
mysqltest: At line 1: missing ')' in while
@@ -491,10 +491,10 @@ mysqltest: At line 1: Illegal argument for port: 'illegal_port'
mysqltest: At line 1: Illegal option to connect: SMTP
200 connects succeeded
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql":
-included from MYSQLTEST_VARDIR/tmp/mysqltest.sql at line 3:
+included from <stdin> at line 1:
At line 3: connection 'test_con1' not found in connection pool
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql":
-included from MYSQLTEST_VARDIR/tmp/mysqltest.sql at line 2:
+included from <stdin> at line 1:
At line 2: Connection test_con1 already exists
show tables;
ERROR 3D000: No database selected