mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#16103072 TEST MYSQL_PLUGIN USES UNSAFE WRITE_FILE TO WRITE
TO EXPECT FILE
This commit is contained in:
@ -110,13 +110,8 @@ SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
|
|||||||
--echo #
|
--echo #
|
||||||
--echo # Enable the plugin...
|
--echo # Enable the plugin...
|
||||||
--echo #
|
--echo #
|
||||||
let $expect_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
|
|
||||||
# MTR will remove this file later, but this might be too late.
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
--error 0,1
|
|
||||||
--remove_file $expect_file
|
|
||||||
--write_file $expect_file
|
|
||||||
wait
|
|
||||||
EOF
|
|
||||||
--shutdown_server 10
|
--shutdown_server 10
|
||||||
--source include/wait_until_disconnected.inc
|
--source include/wait_until_disconnected.inc
|
||||||
|
|
||||||
@ -132,9 +127,8 @@ EOF
|
|||||||
#
|
#
|
||||||
# Restart the server
|
# Restart the server
|
||||||
#
|
#
|
||||||
--append_file $expect_file
|
|
||||||
restart
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
EOF
|
|
||||||
--enable_reconnect
|
--enable_reconnect
|
||||||
--source include/wait_until_connected_again.inc
|
--source include/wait_until_connected_again.inc
|
||||||
|
|
||||||
@ -155,12 +149,7 @@ eval INSERT INTO mysql.plugin VALUES ('wonky', '$DAEMONEXAMPLE');
|
|||||||
--replace_regex /\.dll/.so/
|
--replace_regex /\.dll/.so/
|
||||||
SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
|
SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
|
||||||
|
|
||||||
# MTR will remove this file later, but this might be too late.
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
--error 0,1
|
|
||||||
--remove_file $expect_file
|
|
||||||
--write_file $expect_file
|
|
||||||
wait
|
|
||||||
EOF
|
|
||||||
--shutdown_server 10
|
--shutdown_server 10
|
||||||
--source include/wait_until_disconnected.inc
|
--source include/wait_until_disconnected.inc
|
||||||
|
|
||||||
@ -177,9 +166,7 @@ EOF
|
|||||||
#
|
#
|
||||||
# Restart the server
|
# Restart the server
|
||||||
#
|
#
|
||||||
--append_file $expect_file
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
restart
|
|
||||||
EOF
|
|
||||||
--enable_reconnect
|
--enable_reconnect
|
||||||
--source include/wait_until_connected_again.inc
|
--source include/wait_until_connected_again.inc
|
||||||
|
|
||||||
@ -189,12 +176,7 @@ EOF
|
|||||||
--replace_regex /\.dll/.so/
|
--replace_regex /\.dll/.so/
|
||||||
SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
|
SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
|
||||||
|
|
||||||
# MTR will remove this file later, but this might be too late.
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
--error 0,1
|
|
||||||
--remove_file $expect_file
|
|
||||||
--write_file $expect_file
|
|
||||||
wait
|
|
||||||
EOF
|
|
||||||
--shutdown_server 10
|
--shutdown_server 10
|
||||||
--source include/wait_until_disconnected.inc
|
--source include/wait_until_disconnected.inc
|
||||||
|
|
||||||
@ -211,9 +193,7 @@ let $DAEMON_RELOAD = lib$DAEMONEXAMPLE;
|
|||||||
#
|
#
|
||||||
# Restart the server
|
# Restart the server
|
||||||
#
|
#
|
||||||
--append_file $expect_file
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
restart
|
|
||||||
EOF
|
|
||||||
--enable_reconnect
|
--enable_reconnect
|
||||||
--source include/wait_until_connected_again.inc
|
--source include/wait_until_connected_again.inc
|
||||||
|
|
||||||
@ -226,12 +206,8 @@ SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
|
|||||||
--echo #
|
--echo #
|
||||||
--echo # Disable the plugin...
|
--echo # Disable the plugin...
|
||||||
--echo #
|
--echo #
|
||||||
# MTR will remove this file later, but this might be too late.
|
|
||||||
--error 0,1
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
--remove_file $expect_file
|
|
||||||
--write_file $expect_file
|
|
||||||
wait
|
|
||||||
EOF
|
|
||||||
--shutdown_server 10
|
--shutdown_server 10
|
||||||
--source include/wait_until_disconnected.inc
|
--source include/wait_until_disconnected.inc
|
||||||
|
|
||||||
@ -248,9 +224,7 @@ EOF
|
|||||||
#
|
#
|
||||||
# Restart the server
|
# Restart the server
|
||||||
#
|
#
|
||||||
--append_file $expect_file
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
restart
|
|
||||||
EOF
|
|
||||||
--enable_reconnect
|
--enable_reconnect
|
||||||
--source include/wait_until_connected_again.inc
|
--source include/wait_until_connected_again.inc
|
||||||
|
|
||||||
@ -262,13 +236,8 @@ SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
|
|||||||
#
|
#
|
||||||
# Stop the server for error conditions
|
# Stop the server for error conditions
|
||||||
#
|
#
|
||||||
let $expect_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
|
|
||||||
# MTR will remove this file later, but this might be too late.
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
--error 0,1
|
|
||||||
--remove_file $expect_file
|
|
||||||
--write_file $expect_file
|
|
||||||
wait
|
|
||||||
EOF
|
|
||||||
--shutdown_server 10
|
--shutdown_server 10
|
||||||
--source include/wait_until_disconnected.inc
|
--source include/wait_until_disconnected.inc
|
||||||
|
|
||||||
@ -382,17 +351,14 @@ replace_result $MYSQL_PLUGIN mysql_plugin;
|
|||||||
#
|
#
|
||||||
# Restart the server
|
# Restart the server
|
||||||
#
|
#
|
||||||
--append_file $expect_file
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
restart
|
|
||||||
EOF
|
|
||||||
--enable_reconnect
|
--enable_reconnect
|
||||||
--source include/wait_until_connected_again.inc
|
--source include/wait_until_connected_again.inc
|
||||||
|
|
||||||
#
|
#
|
||||||
# Cleanup
|
# Cleanup
|
||||||
# MTR will remove this file later, but this might be too late.
|
|
||||||
--error 0,1
|
--remove_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
--remove_file $expect_file
|
|
||||||
|
|
||||||
# Cleanup the share folder in the binary path.
|
# Cleanup the share folder in the binary path.
|
||||||
--remove_file $MYSQLD_BASEDIR/share/errmsg.sys
|
--remove_file $MYSQLD_BASEDIR/share/errmsg.sys
|
||||||
|
Reference in New Issue
Block a user