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
92c05a39
Commit
92c05a39
authored
Mar 13, 2020
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a race condition in the main.grant_kill test
also remove redundant --connection commands
parent
df25d67d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
mysql-test/main/grant_kill.result
mysql-test/main/grant_kill.result
+0
-5
mysql-test/main/grant_kill.test
mysql-test/main/grant_kill.test
+5
-5
No files found.
mysql-test/main/grant_kill.result
View file @
92c05a39
...
...
@@ -14,7 +14,6 @@ GRANT ALL PRIVILEGES ON *.* TO bar@localhost;
REVOKE CONNECTION ADMIN, SUPER ON *.* FROM bar@localhost;
connect foo,localhost,foo,,;
connect bar,localhost,bar,,;
connection bar;
SELECT user FROM information_schema.processlist ORDER BY user;
user
bar
...
...
@@ -36,7 +35,6 @@ CREATE USER bar@localhost;
GRANT PROCESS, CONNECTION ADMIN ON *.* TO bar@localhost;
connect foo,localhost,foo,,;
connect bar,localhost,bar,,;
connection bar;
SELECT user FROM information_schema.processlist ORDER BY user;
user
bar
...
...
@@ -46,7 +44,6 @@ KILL ID;
connection default;
disconnect foo;
disconnect bar;
connection default;
DROP USER foo@localhost;
DROP USER bar@localhost;
#
...
...
@@ -58,7 +55,6 @@ CREATE USER bar@localhost;
GRANT PROCESS, SUPER ON *.* TO bar@localhost;
connect foo,localhost,foo,,;
connect bar,localhost,bar,,;
connection bar;
SELECT user FROM information_schema.processlist ORDER BY user;
user
bar
...
...
@@ -68,7 +64,6 @@ KILL ID;
connection default;
disconnect foo;
disconnect bar;
connection default;
DROP USER foo@localhost;
DROP USER bar@localhost;
#
...
...
mysql-test/main/grant_kill.test
View file @
92c05a39
...
...
@@ -8,6 +8,8 @@
--
echo
# MDEV-21743 Split up SUPER privilege to smaller privileges
--
echo
#
--
let
$count_sessions
=
1
--
echo
#
--
echo
# Test that KILL is not allowed without CONNECTION ADMIN or SUPER
--
echo
#
...
...
@@ -20,7 +22,6 @@ REVOKE CONNECTION ADMIN, SUPER ON *.* FROM bar@localhost;
--
connect
(
foo
,
localhost
,
foo
,,)
let
$id
=
`(SELECT id FROM INFORMATION_SCHEMA.PROCESSLIST WHERE user='foo')`
;
--
connect
(
bar
,
localhost
,
bar
,,)
--
connection
bar
SELECT
user
FROM
information_schema
.
processlist
ORDER
BY
user
;
--
replace_result
$id
ID
--
error
ER_KILL_DENIED_ERROR
...
...
@@ -28,6 +29,7 @@ SELECT user FROM information_schema.processlist ORDER BY user;
--
disconnect
foo
--
disconnect
bar
--
connection
default
--
source
include
/
wait_until_count_sessions
.
inc
DROP
USER
foo
@
localhost
;
DROP
USER
bar
@
localhost
;
...
...
@@ -42,7 +44,6 @@ GRANT PROCESS, CONNECTION ADMIN ON *.* TO bar@localhost;
--
connect
(
foo
,
localhost
,
foo
,,)
let
$id
=
`(SELECT id FROM INFORMATION_SCHEMA.PROCESSLIST WHERE user='foo')`
;
--
connect
(
bar
,
localhost
,
bar
,,)
--
connection
bar
SELECT
user
FROM
information_schema
.
processlist
ORDER
BY
user
;
--
replace_result
$id
ID
--
eval
KILL
$id
...
...
@@ -53,7 +54,7 @@ let $wait_condition=
--
source
include
/
wait_condition
.
inc
--
disconnect
foo
--
disconnect
bar
--
connection
default
--
source
include
/
wait_until_count_sessions
.
inc
DROP
USER
foo
@
localhost
;
DROP
USER
bar
@
localhost
;
...
...
@@ -68,7 +69,6 @@ GRANT PROCESS, SUPER ON *.* TO bar@localhost;
--
connect
(
foo
,
localhost
,
foo
,,)
let
$id
=
`(SELECT id FROM INFORMATION_SCHEMA.PROCESSLIST WHERE user='foo')`
;
--
connect
(
bar
,
localhost
,
bar
,,)
--
connection
bar
SELECT
user
FROM
information_schema
.
processlist
ORDER
BY
user
;
--
replace_result
$id
ID
--
eval
KILL
$id
...
...
@@ -79,7 +79,7 @@ let $wait_condition=
--
source
include
/
wait_condition
.
inc
--
disconnect
foo
--
disconnect
bar
--
connection
default
--
source
include
/
wait_until_count_sessions
.
inc
DROP
USER
foo
@
localhost
;
DROP
USER
bar
@
localhost
;
...
...
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