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
9a6e05d8
Commit
9a6e05d8
authored
Jan 15, 2009
by
Alexander Nozdrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport patch for Bug#31222 (com_% global status counters behave randomly
with mysql_change_user) to 5.0.
parent
a08460b8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
mysql-test/r/not_embedded_server.result
mysql-test/r/not_embedded_server.result
+7
-0
mysql-test/t/not_embedded_server.test
mysql-test/t/not_embedded_server.test
+28
-0
sql/sql_class.cc
sql/sql_class.cc
+4
-0
No files found.
mysql-test/r/not_embedded_server.result
View file @
9a6e05d8
...
@@ -3,3 +3,10 @@ execute stmt1;
...
@@ -3,3 +3,10 @@ execute stmt1;
Id User Host db Command Time State Info
Id User Host db Command Time State Info
number root localhost test Query time NULL show full processlist
number root localhost test Query time NULL show full processlist
deallocate prepare stmt1;
deallocate prepare stmt1;
FLUSH STATUS;
SHOW GLOBAL STATUS LIKE 'com_select';
Variable_name Value
Com_select 101
SHOW GLOBAL STATUS LIKE 'com_select';
Variable_name Value
Com_select 101
mysql-test/t/not_embedded_server.test
View file @
9a6e05d8
...
@@ -16,3 +16,31 @@ execute stmt1;
...
@@ -16,3 +16,31 @@ execute stmt1;
deallocate
prepare
stmt1
;
deallocate
prepare
stmt1
;
# End of 4.1 tests
# End of 4.1 tests
#
# Bug#31222: com_% global status counters behave randomly with
# mysql_change_user.
#
FLUSH
STATUS
;
--
disable_result_log
--
disable_query_log
let
$i
=
100
;
while
(
$i
)
{
dec
$i
;
SELECT
1
;
}
--
enable_query_log
--
enable_result_log
SHOW
GLOBAL
STATUS
LIKE
'com_select'
;
--
change_user
SHOW
GLOBAL
STATUS
LIKE
'com_select'
;
sql/sql_class.cc
View file @
9a6e05d8
...
@@ -391,6 +391,10 @@ void THD::init_for_queries()
...
@@ -391,6 +391,10 @@ void THD::init_for_queries()
void
THD
::
change_user
(
void
)
void
THD
::
change_user
(
void
)
{
{
pthread_mutex_lock
(
&
LOCK_status
);
add_to_status
(
&
global_status_var
,
&
status_var
);
pthread_mutex_unlock
(
&
LOCK_status
);
cleanup
();
cleanup
();
cleanup_done
=
0
;
cleanup_done
=
0
;
init
();
init
();
...
...
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