mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
BUG#35701: please allow test language variables in connection and sync_slave_with_master
Problem: In the mysqltest language, it was not possible to set the current connection from a variable, and it was not possible to read the current connection. Fix: Allow setting the connection from a variable, like: connection $variable; and introduce the mysqltest language variable $CURRENT_CONNECTION, which holds the name of the current connection. client/mysqltest.cc: - Made select_connection use the common argument parser instead of its own home-rolled version. That allows variable expansion, for instance. - Made select_connection_name set the variable $CURRENT_CONNECTION, so that test scripts can use that. - Refactored a bit so that stuff that needs to be done when changing connection is located to one place. mysql-test/t/mysqltest.test: Added test case for $CURRENT_CONNECTION and "connection $variable"
This commit is contained in:
@ -740,4 +740,9 @@ select 1;
|
||||
1
|
||||
-- a comment for the server;
|
||||
mysqltest: At line 1: Found line beginning with -- that didn't contain a valid mysqltest command, check your syntax or use # if you intended to write a comment
|
||||
con1
|
||||
default
|
||||
con1
|
||||
default
|
||||
con1
|
||||
End of tests
|
||||
|
Reference in New Issue
Block a user