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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
124d5e73
Commit
124d5e73
authored
Mar 27, 2009
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Plain Diff
auto-merge
parents
1b74eac6
5d0564ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
21 deletions
+22
-21
mysql-test/suite/rpl/r/rpl_temporary.result
mysql-test/suite/rpl/r/rpl_temporary.result
+11
-8
mysql-test/suite/rpl/t/rpl_temporary.test
mysql-test/suite/rpl/t/rpl_temporary.test
+11
-13
No files found.
mysql-test/suite/rpl/r/rpl_temporary.result
View file @
124d5e73
...
...
@@ -108,13 +108,16 @@ select * from t1;
a
1
drop table t1;
Bug#43748
make a non-privileged user on slave
.
--
Bug#43748
-- make a user on the slave that can list but not kill system threads
.
FLUSH PRIVILEGES;
GRANT USAGE ON *.* TO user43748@127.0.0.1 IDENTIFIED BY 'meow';
try to KILL system-thread as non-privileged user.
KILL `select id from information_schema.processlist where command='Binlog Dump'`;
ERROR HY000: You are not owner of thread `select id from information_schema.processlist where command='Binlog Dump'`
throw out test-user on slave.
GRANT USAGE ON *.* TO user43748@127.0.0.1 IDENTIFIED BY 'meow';
GRANT PROCESS ON *.* TO user43748@127.0.0.1;
-- try to KILL system-thread as that non-privileged user (on slave).
SELECT id INTO @id FROM information_schema.processlist WHERE user='system user' LIMIT 1;
KILL @id;
Got one of the listed errors
-- throw out test-user on slave.
DROP USER user43748@127.0.0.1;
done. back to master.
-- done. back to master.
End of 5.1 tests
mysql-test/suite/rpl/t/rpl_temporary.test
View file @
124d5e73
...
...
@@ -228,36 +228,34 @@ source include/delete_anonymous_users.inc;
# Bug#43748: crash when non-super user tries to kill the replication threads
#
--
echo
Bug
#43748
--
echo
--
Bug
#43748
--
echo
--
make
a
user
on
the
slave
that
can
list
but
not
kill
system
threads
.
connection
slave
;
--
echo
make
a
non
-
privileged
user
on
slave
.
FLUSH
PRIVILEGES
;
GRANT
USAGE
ON
*.*
TO
user43748
@
127.0
.
0.1
IDENTIFIED
BY
'meow'
;
let
$id
=
`SELECT id FROM information_schema.processlist WHERE user='system user' LIMIT 1`
;
GRANT
USAGE
ON
*.*
TO
user43748
@
127.0
.
0.1
IDENTIFIED
BY
'meow'
;
GRANT
PROCESS
ON
*.*
TO
user43748
@
127.0
.
0.1
;
--
echo
--
try
to
KILL
system
-
thread
as
that
non
-
privileged
user
(
on
slave
)
.
connect
(
cont43748
,
127.0
.
0.1
,
user43748
,
meow
,
test
,
$SLAVE_MYPORT
,);
connection
cont43748
;
--
echo
try
to
KILL
system
-
thread
as
non
-
privileged
user
.
SELECT
id
INTO
@
id
FROM
information_schema
.
processlist
WHERE
user
=
'system user'
LIMIT
1
;
--
replace_result
$id
"`select id from information_schema.processlist where command='Binlog Dump'`"
--
error
ER_KILL_DENIED_ERROR
eval
KILL
$id
;
--
error
ER_KILL_DENIED_ERROR
,
ER_NO_SUCH_THREAD
KILL
@
id
;
disconnect
cont43748
;
--
echo
--
throw
out
test
-
user
on
slave
.
connection
slave
;
--
echo
throw
out
test
-
user
on
slave
.
DROP
USER
user43748
@
127.0
.
0.1
;
--
echo
--
done
.
back
to
master
.
connection
master
;
--
echo
done
.
back
to
master
.
# End of
tests
--
echo
End
of
5.1
tests
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