Commit c0223de9 authored by unknown's avatar unknown

Merge bk-internal:/home/bk/mysql-5.1-rpl

into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-rpl


client/mysqltest.c:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
parents 41a80039 9c0cd886
...@@ -1887,6 +1887,18 @@ void var_set_errno(int sql_errno) ...@@ -1887,6 +1887,18 @@ void var_set_errno(int sql_errno)
var_set_int("$mysql_errno", sql_errno); var_set_int("$mysql_errno", sql_errno);
} }
/*
Update $mysql_get_server_version variable with version
of the currently connected server
*/
void var_set_mysql_get_server_version(MYSQL* mysql)
{
var_set_int("$mysql_get_server_version", mysql_get_server_version(mysql));
}
/* /*
Set variable from the result of a query Set variable from the result of a query
...@@ -2196,7 +2208,7 @@ int open_file(const char *name) ...@@ -2196,7 +2208,7 @@ int open_file(const char *name)
if (!(cur_file->file = my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0)))) if (!(cur_file->file = my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0))))
{ {
cur_file--; cur_file--;
die("Could not open file '%s'", buff); die("Could not open '%s' for reading", buff);
} }
cur_file->file_name= my_strdup(buff, MYF(MY_FAE)); cur_file->file_name= my_strdup(buff, MYF(MY_FAE));
cur_file->lineno=1; cur_file->lineno=1;
...@@ -4016,6 +4028,10 @@ int select_connection_name(const char *name) ...@@ -4016,6 +4028,10 @@ int select_connection_name(const char *name)
if (!(cur_con= find_connection_by_name(name))) if (!(cur_con= find_connection_by_name(name)))
die("connection '%s' not found in connection pool", name); die("connection '%s' not found in connection pool", name);
/* Update $mysql_get_server_version to that of current connection */
var_set_mysql_get_server_version(&cur_con->mysql);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -4403,6 +4419,9 @@ void do_connect(struct st_command *command) ...@@ -4403,6 +4419,9 @@ void do_connect(struct st_command *command)
next_con++; /* if we used the next_con slot, advance the pointer */ next_con++; /* if we used the next_con slot, advance the pointer */
} }
/* Update $mysql_get_server_version to that of current connection */
var_set_mysql_get_server_version(&cur_con->mysql);
dynstr_free(&ds_connection_name); dynstr_free(&ds_connection_name);
dynstr_free(&ds_host); dynstr_free(&ds_host);
dynstr_free(&ds_user); dynstr_free(&ds_user);
...@@ -5245,7 +5264,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -5245,7 +5264,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
DBUG_ASSERT(cur_file == file_stack && cur_file->file == 0); DBUG_ASSERT(cur_file == file_stack && cur_file->file == 0);
if (!(cur_file->file= if (!(cur_file->file=
my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0)))) my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0))))
die("Could not open %s: errno = %d", buff, errno); die("Could not open '%s' for reading: errno = %d", buff, errno);
cur_file->file_name= my_strdup(buff, MYF(MY_FAE)); cur_file->file_name= my_strdup(buff, MYF(MY_FAE));
cur_file->lineno= 1; cur_file->lineno= 1;
break; break;
...@@ -5362,9 +5381,9 @@ void str_to_file2(const char *fname, char *str, int size, my_bool append) ...@@ -5362,9 +5381,9 @@ void str_to_file2(const char *fname, char *str, int size, my_bool append)
flags|= O_TRUNC; flags|= O_TRUNC;
if ((fd= my_open(buff, flags, if ((fd= my_open(buff, flags,
MYF(MY_WME | MY_FFNF))) < 0) MYF(MY_WME | MY_FFNF))) < 0)
die("Could not open %s: errno = %d", buff, errno); die("Could not open '%s' for writing: errno = %d", buff, errno);
if (append && my_seek(fd, 0, SEEK_END, MYF(0)) == MY_FILEPOS_ERROR) if (append && my_seek(fd, 0, SEEK_END, MYF(0)) == MY_FILEPOS_ERROR)
die("Could not find end of file %s: errno = %d", buff, errno); die("Could not find end of file '%s': errno = %d", buff, errno);
if (my_write(fd, (uchar*)str, size, MYF(MY_WME|MY_FNABP))) if (my_write(fd, (uchar*)str, size, MYF(MY_WME|MY_FNABP)))
die("write failed"); die("write failed");
my_close(fd, MYF(0)); my_close(fd, MYF(0));
...@@ -6928,6 +6947,9 @@ int main(int argc, char **argv) ...@@ -6928,6 +6947,9 @@ int main(int argc, char **argv)
*/ */
var_set_errno(-1); var_set_errno(-1);
/* Update $mysql_get_server_version to that of current connection */
var_set_mysql_get_server_version(&cur_con->mysql);
if (opt_include) if (opt_include)
{ {
open_file(opt_include); open_file(opt_include);
......
...@@ -293,7 +293,7 @@ var5 from query that returns no row ...@@ -293,7 +293,7 @@ var5 from query that returns no row
failing query in let failing query in let
mysqltest: At line 1: Error running query 'failing query': 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 'failing query' at line 1 mysqltest: At line 1: Error running query 'failing query': 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 'failing query' at line 1
mysqltest: At line 1: Missing required argument 'filename' to command 'source' mysqltest: At line 1: Missing required argument 'filename' to command 'source'
mysqltest: At line 1: Could not open file './non_existingFile' mysqltest: At line 1: Could not open './non_existingFile' for reading
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql": 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 mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql": 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
...@@ -443,7 +443,7 @@ ERROR 3D000: No database selected ...@@ -443,7 +443,7 @@ ERROR 3D000: No database selected
Output from mysqltest-x.inc Output from mysqltest-x.inc
Output from mysqltest-x.inc Output from mysqltest-x.inc
Output from mysqltest-x.inc Output from mysqltest-x.inc
mysqltest: Could not open ./non_existing_file.inc: errno = 2 mysqltest: Could not open './non_existing_file.inc' for reading: errno = 2
failing_statement; failing_statement;
ERROR 42000: 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 'failing_statement' at line 1 ERROR 42000: 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 'failing_statement' at line 1
failing_statement; failing_statement;
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
user_limits : Bug#23921 random failure of user_limits.test user_limits : Bug#23921 random failure of user_limits.test
concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences
ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Double Whopper
federated_transactions : Bug#29523 Transactions do not work federated_transactions : Bug#29523 Transactions do not work
lowercase_table3 : Bug#32667 lowercase_table3.test reports to error log lowercase_table3 : Bug#32667 lowercase_table3.test reports to error log
innodb_mysql : Bug#32724: innodb_mysql.test fails randomly innodb_mysql : Bug#32724: innodb_mysql.test fails randomly
......
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