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
2f00bb2b
Commit
2f00bb2b
authored
Nov 10, 2009
by
Kristofer Pettersson
Browse files
Options
Browse Files
Download
Plain Diff
automerge
parents
5302b4e5
3b880c0e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
31 deletions
+29
-31
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+1
-0
mysql-test/t/lock_multi.test
mysql-test/t/lock_multi.test
+0
-2
sql/sql_show.cc
sql/sql_show.cc
+28
-29
No files found.
libmysqld/lib_sql.cc
View file @
2f00bb2b
...
@@ -138,6 +138,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
...
@@ -138,6 +138,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
result
=
dispatch_command
(
command
,
thd
,
(
char
*
)
arg
,
arg_length
);
result
=
dispatch_command
(
command
,
thd
,
(
char
*
)
arg
,
arg_length
);
thd
->
cur_data
=
0
;
thd
->
cur_data
=
0
;
thd
->
mysys_var
=
NULL
;
if
(
!
skip_check
)
if
(
!
skip_check
)
result
=
thd
->
is_error
()
?
-
1
:
0
;
result
=
thd
->
is_error
()
?
-
1
:
0
;
...
...
mysql-test/t/lock_multi.test
View file @
2f00bb2b
--
source
include
/
not_embedded
.
inc
# Save the initial number of concurrent sessions
# Save the initial number of concurrent sessions
--
source
include
/
count_sessions
.
inc
--
source
include
/
count_sessions
.
inc
...
...
sql/sql_show.cc
View file @
2f00bb2b
...
@@ -1697,6 +1697,32 @@ class thread_info :public ilink {
...
@@ -1697,6 +1697,32 @@ class thread_info :public ilink {
template
class
I_List
<
thread_info
>;
template
class
I_List
<
thread_info
>;
#endif
#endif
static
const
char
*
thread_state_info
(
THD
*
tmp
)
{
if
(
tmp
->
locked
)
return
"Locked"
;
#ifndef EMBEDDED_LIBRARY
if
(
tmp
->
net
.
reading_or_writing
)
{
if
(
tmp
->
net
.
reading_or_writing
==
2
)
return
"Writing to net"
;
else
if
(
tmp
->
command
==
COM_SLEEP
)
return
""
;
else
return
"Reading from net"
;
}
else
#endif
{
if
(
tmp
->
proc_info
)
return
tmp
->
proc_info
;
else
if
(
tmp
->
mysys_var
&&
tmp
->
mysys_var
->
current_cond
)
return
"Waiting on cond"
;
else
return
NULL
;
}
}
void
mysqld_list_processes
(
THD
*
thd
,
const
char
*
user
,
bool
verbose
)
void
mysqld_list_processes
(
THD
*
thd
,
const
char
*
user
,
bool
verbose
)
{
{
Item
*
field
;
Item
*
field
;
...
@@ -1758,20 +1784,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
...
@@ -1758,20 +1784,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
if
((
mysys_var
=
tmp
->
mysys_var
))
if
((
mysys_var
=
tmp
->
mysys_var
))
pthread_mutex_lock
(
&
mysys_var
->
mutex
);
pthread_mutex_lock
(
&
mysys_var
->
mutex
);
thd_info
->
proc_info
=
(
char
*
)
(
tmp
->
killed
==
THD
::
KILL_CONNECTION
?
"Killed"
:
0
);
thd_info
->
proc_info
=
(
char
*
)
(
tmp
->
killed
==
THD
::
KILL_CONNECTION
?
"Killed"
:
0
);
#ifndef EMBEDDED_LIBRARY
thd_info
->
state_info
=
thread_state_info
(
tmp
);
thd_info
->
state_info
=
(
char
*
)
(
tmp
->
locked
?
"Locked"
:
tmp
->
net
.
reading_or_writing
?
(
tmp
->
net
.
reading_or_writing
==
2
?
"Writing to net"
:
thd_info
->
command
==
COM_SLEEP
?
""
:
"Reading from net"
)
:
tmp
->
proc_info
?
tmp
->
proc_info
:
tmp
->
mysys_var
&&
tmp
->
mysys_var
->
current_cond
?
"Waiting on cond"
:
NullS
);
#else
thd_info
->
state_info
=
(
char
*
)
"Writing to net"
;
#endif
if
(
mysys_var
)
if
(
mysys_var
)
pthread_mutex_unlock
(
&
mysys_var
->
mutex
);
pthread_mutex_unlock
(
&
mysys_var
->
mutex
);
...
@@ -1883,21 +1896,7 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond)
...
@@ -1883,21 +1896,7 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond)
table
->
field
[
5
]
->
store
((
longlong
)(
tmp
->
start_time
?
table
->
field
[
5
]
->
store
((
longlong
)(
tmp
->
start_time
?
now
-
tmp
->
start_time
:
0
),
FALSE
);
now
-
tmp
->
start_time
:
0
),
FALSE
);
/* STATE */
/* STATE */
#ifndef EMBEDDED_LIBRARY
if
((
val
=
thread_state_info
(
tmp
)))
val
=
(
char
*
)
(
tmp
->
locked
?
"Locked"
:
tmp
->
net
.
reading_or_writing
?
(
tmp
->
net
.
reading_or_writing
==
2
?
"Writing to net"
:
tmp
->
command
==
COM_SLEEP
?
""
:
"Reading from net"
)
:
tmp
->
proc_info
?
tmp
->
proc_info
:
tmp
->
mysys_var
&&
tmp
->
mysys_var
->
current_cond
?
"Waiting on cond"
:
NullS
);
#else
val
=
(
char
*
)
(
tmp
->
proc_info
?
tmp
->
proc_info
:
NullS
);
#endif
if
(
val
)
{
{
table
->
field
[
6
]
->
store
(
val
,
strlen
(
val
),
cs
);
table
->
field
[
6
]
->
store
(
val
,
strlen
(
val
),
cs
);
table
->
field
[
6
]
->
set_notnull
();
table
->
field
[
6
]
->
set_notnull
();
...
...
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