Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
13058fd5
Commit
13058fd5
authored
Feb 25, 2013
by
Akhila Maddukuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#16103072 TEST MYSQL_PLUGIN USES UNSAFE WRITE_FILE TO WRITE
TO EXPECT FILE
parent
698d2f10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
50 deletions
+16
-50
mysql-test/t/mysql_plugin.test
mysql-test/t/mysql_plugin.test
+16
-50
No files found.
mysql-test/t/mysql_plugin.test
View file @
13058fd5
...
...
@@ -110,13 +110,8 @@ SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
--
echo
#
--
echo
# Enable the plugin...
--
echo
#
let
$expect_file
=
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
;
# MTR will remove this file later, but this might be too late.
--
error
0
,
1
--
remove_file
$expect_file
--
write_file
$expect_file
wait
EOF
--
exec
echo
"wait"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
shutdown_server
10
--
source
include
/
wait_until_disconnected
.
inc
...
...
@@ -132,9 +127,8 @@ EOF
#
# Restart the server
#
--
append_file
$expect_file
restart
EOF
--
exec
echo
"restart"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
enable_reconnect
--
source
include
/
wait_until_connected_again
.
inc
...
...
@@ -155,12 +149,7 @@ eval INSERT INTO mysql.plugin VALUES ('wonky', '$DAEMONEXAMPLE');
--
replace_regex
/
\
.
dll
/.
so
/
SELECT
*
FROM
mysql
.
plugin
WHERE
dl
like
'libdaemon%'
ORDER
BY
name
;
# MTR will remove this file later, but this might be too late.
--
error
0
,
1
--
remove_file
$expect_file
--
write_file
$expect_file
wait
EOF
--
exec
echo
"wait"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
shutdown_server
10
--
source
include
/
wait_until_disconnected
.
inc
...
...
@@ -177,9 +166,7 @@ EOF
#
# Restart the server
#
--
append_file
$expect_file
restart
EOF
--
exec
echo
"restart"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
enable_reconnect
--
source
include
/
wait_until_connected_again
.
inc
...
...
@@ -189,12 +176,7 @@ EOF
--
replace_regex
/
\
.
dll
/.
so
/
SELECT
*
FROM
mysql
.
plugin
WHERE
dl
like
'%libdaemon%'
ORDER
BY
name
;
# MTR will remove this file later, but this might be too late.
--
error
0
,
1
--
remove_file
$expect_file
--
write_file
$expect_file
wait
EOF
--
exec
echo
"wait"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
shutdown_server
10
--
source
include
/
wait_until_disconnected
.
inc
...
...
@@ -211,9 +193,7 @@ let $DAEMON_RELOAD = lib$DAEMONEXAMPLE;
#
# Restart the server
#
--
append_file
$expect_file
restart
EOF
--
exec
echo
"restart"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
enable_reconnect
--
source
include
/
wait_until_connected_again
.
inc
...
...
@@ -226,12 +206,8 @@ SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
--
echo
#
--
echo
# Disable the plugin...
--
echo
#
# MTR will remove this file later, but this might be too late.
--
error
0
,
1
--
remove_file
$expect_file
--
write_file
$expect_file
wait
EOF
--
exec
echo
"wait"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
shutdown_server
10
--
source
include
/
wait_until_disconnected
.
inc
...
...
@@ -248,9 +224,7 @@ EOF
#
# Restart the server
#
--
append_file
$expect_file
restart
EOF
--
exec
echo
"restart"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
enable_reconnect
--
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
#
let
$expect_file
=
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
;
# MTR will remove this file later, but this might be too late.
--
error
0
,
1
--
remove_file
$expect_file
--
write_file
$expect_file
wait
EOF
--
exec
echo
"wait"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
shutdown_server
10
--
source
include
/
wait_until_disconnected
.
inc
...
...
@@ -382,17 +351,14 @@ replace_result $MYSQL_PLUGIN mysql_plugin;
#
# Restart the server
#
--
append_file
$expect_file
restart
EOF
--
exec
echo
"restart"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
enable_reconnect
--
source
include
/
wait_until_connected_again
.
inc
#
# Cleanup
# MTR will remove this file later, but this might be too late.
--
error
0
,
1
--
remove_file
$expect_file
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
# Cleanup the share folder in the binary path.
--
remove_file
$MYSQLD_BASEDIR
/
share
/
errmsg
.
sys
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment