mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Fix test cases
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
This commit is contained in:
parent
bd2064e820
commit
5866c4d084
3 changed files with 72 additions and 1 deletions
67
mysql-test/include/diff_servers.inc
Normal file
67
mysql-test/include/diff_servers.inc
Normal file
|
@ -0,0 +1,67 @@
|
|||
# ==== Purpose ====
|
||||
#
|
||||
# Check that two or more servers have identical databases; fail if not.
|
||||
#
|
||||
# ==== Usage ====
|
||||
#
|
||||
# --let $diff_servers= 1 2
|
||||
# [--let $databases= db1 db2 ...]
|
||||
# [--let $rpl_debug= 1]
|
||||
# --source include/diff_servers.inc
|
||||
|
||||
# pretty-print header
|
||||
--let $_ds_info= servers=$diff_servers
|
||||
if ($databases != '')
|
||||
{
|
||||
--let $_ds_info= $_ds_info databases=$databases
|
||||
}
|
||||
--let $include_filename= diff_servers.inc [$_ds_info]
|
||||
--source include/begin_include_file.inc
|
||||
|
||||
# get databases
|
||||
--let $_ds_databases= $diff_database
|
||||
if ($_ds_databases == '')
|
||||
{
|
||||
--let $_ds_databases= `SELECT GROUP_CONCAT(SCHEMA_NAME SEPARATOR ' ') FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('information_schema', 'mtr', 'mysql', 'performance_schema')`
|
||||
}
|
||||
|
||||
# generate command line
|
||||
--let $_ds_arg= --defaults-group-suffix=.
|
||||
--let $_ds_number_pos= `SELECT LOCATE('$_ds_arg', '$MYSQL_DUMP') + LENGTH('$_ds_arg')`
|
||||
--let $_ds_pre_command= `SELECT SUBSTR('$MYSQL_DUMP', 1, $_ds_number_pos - 1)`
|
||||
--let $_ds_post_command= `SELECT SUBSTR('$MYSQL_DUMP', $_ds_number_pos + 1)`
|
||||
--let $_ds_post_command= $_ds_post_command --compact --order-by-primary --skip-extended-insert --no-create-info --databases $_ds_databases
|
||||
--let $_ds_prev_outfile=
|
||||
|
||||
# iterate over servers
|
||||
--let $_ds_servers= $diff_servers
|
||||
while ($_ds_servers != '')
|
||||
{
|
||||
--let $_ds_server_number= `SELECT SUBSTRING_INDEX('$_ds_servers', ' ', 1)`
|
||||
--let $_ds_servers= `SELECT TRIM(SUBSTRING('$_ds_servers', 1 + LENGTH('_$ds_server_number')))`
|
||||
--let $_ds_outfile= $MYSQLTEST_VARDIR/tmp/diff_servers_$_ds_server_number
|
||||
|
||||
if ($rpl_debug)
|
||||
{
|
||||
--echo generating dump from server '$_ds_server_number' using command '$_ds_pre_command$_ds_server_number $_ds_post_command > $_ds_outfile'
|
||||
--echo remaining servers: '$_ds_servers'
|
||||
}
|
||||
--exec $_ds_pre_command$_ds_server_number $_ds_post_command > $_ds_outfile
|
||||
|
||||
if ($_ds_prev_outfile != '')
|
||||
{
|
||||
if ($rpl_debug)
|
||||
{
|
||||
--echo diffing files '$_ds_prev_outfile' and '$_ds_outfile'
|
||||
}
|
||||
--diff_files $_ds_prev_outfile $_ds_outfile
|
||||
|
||||
--remove_file $_ds_prev_outfile
|
||||
}
|
||||
--let $_ds_prev_outfile= $_ds_outfile
|
||||
}
|
||||
|
||||
--remove_file $_ds_prev_outfile
|
||||
|
||||
--let $include_filename= diff_servers.inc [servers=$_ds_info]
|
||||
--source include/end_include_file.inc
|
|
@ -41,4 +41,6 @@ MW-44 : MDEV-11229
|
|||
galera_gcs_fc_limit : MDEV-11229
|
||||
galera_roles : MDEV-11229
|
||||
galera_lock_table : MDEV-11229
|
||||
|
||||
GAL-480 : Investigate
|
||||
galera_fk_no_pk :Investigate
|
||||
galera_account_management : Investigate
|
||||
|
|
|
@ -36,6 +36,7 @@ GRANT SELECT (a) ON test1.t2 TO role1;
|
|||
--connect(foo_node_1,127.0.0.1,foo,,test,$port_1,)
|
||||
|
||||
--let $port_2= \$NODE_MYPORT_2
|
||||
--sleep 1
|
||||
--connect(foo_node_2,127.0.0.1,foo,,test,$port_2,)
|
||||
|
||||
--echo
|
||||
|
@ -101,6 +102,7 @@ REVOKE EXECUTE ON PROCEDURE test1.pr1 FROM role1;
|
|||
--echo # Connect with foo_node_1
|
||||
--connection foo_node_1
|
||||
|
||||
--sleep 1
|
||||
--error ER_PROCACCESS_DENIED_ERROR
|
||||
CALL test1.pr1();
|
||||
|
||||
|
|
Loading…
Reference in a new issue