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
d9241760
Commit
d9241760
authored
Aug 25, 2008
by
Matthias Leich
Browse files
Options
Browse Files
Download
Plain Diff
Merge of fix for
Bug#38270 Test "processlist_priv_ps" fails on varying "processlist" output
parents
38ef913b
b1dedc1d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
14 deletions
+35
-14
mysql-test/suite/funcs_1/datadict/processlist_priv.inc
mysql-test/suite/funcs_1/datadict/processlist_priv.inc
+33
-8
mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
+1
-3
mysql-test/suite/funcs_1/r/processlist_priv_ps.result
mysql-test/suite/funcs_1/r/processlist_priv_ps.result
+1
-3
No files found.
mysql-test/suite/funcs_1/datadict/processlist_priv.inc
View file @
d9241760
...
...
@@ -16,7 +16,7 @@
# That means our SHOW PROCESSLIST can come too early. #
# Solution: #
# Close the connections at the end of the test. #
# Example2
:
#
# Example2
(2008-08-14 again observed):
#
# 1. connection X: SHOW PROCESSLIST/GRANT ... etc. #
# 2. Switch to connection Y #
# 3. SHOW PROCESSLIST might present a record like #
...
...
@@ -53,9 +53,11 @@
# WL#3982 Test information_schema.processlist #
# #
# Last update: #
# 2008-04-14 pcrews replace HOST to account for Windows' use of #
# localhost (host:<port> causing diffs on Windows #
# test runs #
# 2008-08-14 mleich Bug#38270 Test "processlist_priv_ps" fails on #
# varying "processlist" output #
# - Replace one sleep by a poll routines #
# - Remove or disable superfluous sleeps #
# #
########################################################################
# The following variables are used in "datadict_priv.inc" and here.
...
...
@@ -87,15 +89,28 @@ USE information_schema;
--
echo
1
Prepare
test
.
--
echo
connection
default
(
user
=
root
)
--
echo
####################################################################################
if
(
`SELECT COUNT(*) <> 1 FROM processlist`
)
{
--
echo
This
test
expects
one
connection
to
the
server
.
--
echo
Expectation
:
USER
HOST
DB
COMMAND
STATE
INFO
--
echo
Expectation
:
root
localhost
information_schema
Query
executing
SELECT
USER
,
HOST
,
DB
,
COMMAND
,
STATE
,
INFO
FROM
processlist
ORDER
BY
ID
--
echo
But
we
found
in
the
moment
:
SELECT
USER
,
HOST
,
DB
,
COMMAND
,
STATE
,
INFO
FROM
processlist
ORDER
BY
ID
;
--
echo
Maybe
--
echo
-
the
base
configuration
(
no
of
parallel
auxiliary
sessions
)
of
the
server
has
changed
--
echo
-
a
parallel
test
intended
for
another
server
accidently
connected
to
our
current
one
--
echo
We
cannot
proceed
in
this
situation
.
Abort
exit
;
}
--
echo
####################################################################################
--
echo
1.1
Create
two
user
--
echo
####################################################################################
# access to info tables as normal user
--
disable_abort_on_error
--
error
0
,
ER_CANNOT_USER
DROP
USER
ddicttestuser1
@
'localhost'
;
--
error
0
,
ER_CANNOT_USER
DROP
USER
ddicttestuser2
@
'localhost'
;
--
enable_abort_on_error
CREATE
USER
ddicttestuser1
@
'localhost'
;
CREATE
USER
ddicttestuser2
@
'localhost'
;
SET
PASSWORD
FOR
ddicttestuser1
@
'localhost'
=
PASSWORD
(
'ddictpass'
);
...
...
@@ -112,6 +127,14 @@ connect (con100,localhost,ddicttestuser1,ddictpass,information_schema);
--
echo
SHOW
/
SELECT
shows
all
processes
/
threads
.
--
echo
####################################################################################
connection
default
;
# Avoid Bug#38270 Test "processlist_priv_ps" fails on varying "processlist" output
# This subtest expects that the connection con100 is in state 'Sleep'.
# Poll till the connection con100 is in state COMMAND = 'Sleep'.
let
$wait_timeout
=
10
;
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
DB
=
'information_schema'
AND
COMMAND
=
'Sleep'
AND
USER
=
'ddicttestuser1'
;
--
source
include
/
wait_condition
.
inc
eval
SHOW
CREATE
TABLE
$table
;
--
replace_column
1
ID
3
HOST_NAME
6
TIME
eval
SHOW
$table
;
...
...
@@ -120,7 +143,6 @@ eval SELECT * FROM $table $select_where ORDER BY id;
--
replace_column
1
ID
3
HOST_NAME
6
TIME
eval
SELECT
$columns
FROM
$table
$select_where
ORDER
BY
id
;
--
source
suite
/
funcs_1
/
datadict
/
datadict_priv
.
inc
--
real_sleep
0.3
--
echo
####################################################################################
...
...
@@ -128,6 +150,9 @@ eval SELECT $columns FROM $table $select_where ORDER BY id;
connection
con100
;
--
echo
SHOW
/
SELECT
shows
only
the
processes
(
1
)
of
the
user
.
--
echo
####################################################################################
# No need for poll routine here.
# The current state of the default session might depend on load of testing box
# but "ddicttestuser1" must not see anything of the root session.
eval
SHOW
CREATE
TABLE
$table
;
--
replace_column
1
ID
3
HOST_NAME
6
TIME
eval
SHOW
$table
;
...
...
@@ -219,7 +244,7 @@ SELECT * FROM information_schema.processlist;
--
echo
####################################################################################
--
echo
7
Revoke
PROCESS
privilege
from
anonymous
user
+
disconnect
ddicttestuser1
--
echo
7
Revoke
PROCESS
privilege
from
anonymous
user
--
echo
connection
default
(
user
=
root
)
--
echo
####################################################################################
connection
default
;
...
...
mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
View file @
d9241760
...
...
@@ -7,9 +7,7 @@ connection default (user=root)
1.1 Create two user
####################################################################################
DROP USER ddicttestuser1@'localhost';
ERROR HY000: Operation DROP USER failed for 'ddicttestuser1'@'localhost'
DROP USER ddicttestuser2@'localhost';
ERROR HY000: Operation DROP USER failed for 'ddicttestuser2'@'localhost'
CREATE USER ddicttestuser1@'localhost';
CREATE USER ddicttestuser2@'localhost';
SET PASSWORD FOR ddicttestuser1@'localhost' = PASSWORD('ddictpass');
...
...
@@ -240,7 +238,7 @@ ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FRO
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
####################################################################################
7 Revoke PROCESS privilege from anonymous user
+ disconnect ddicttestuser1
7 Revoke PROCESS privilege from anonymous user
connection default (user=root)
####################################################################################
REVOKE PROCESS ON *.* FROM ''@'localhost';
...
...
mysql-test/suite/funcs_1/r/processlist_priv_ps.result
View file @
d9241760
...
...
@@ -7,9 +7,7 @@ connection default (user=root)
1.1 Create two user
####################################################################################
DROP USER ddicttestuser1@'localhost';
ERROR HY000: Operation DROP USER failed for 'ddicttestuser1'@'localhost'
DROP USER ddicttestuser2@'localhost';
ERROR HY000: Operation DROP USER failed for 'ddicttestuser2'@'localhost'
CREATE USER ddicttestuser1@'localhost';
CREATE USER ddicttestuser2@'localhost';
SET PASSWORD FOR ddicttestuser1@'localhost' = PASSWORD('ddictpass');
...
...
@@ -240,7 +238,7 @@ ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * F
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
####################################################################################
7 Revoke PROCESS privilege from anonymous user
+ disconnect ddicttestuser1
7 Revoke PROCESS privilege from anonymous user
connection default (user=root)
####################################################################################
REVOKE PROCESS ON *.* FROM ''@'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