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
077f0812
Commit
077f0812
authored
20 years ago
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ha_innodb.cc:
innobase_mysql_print_thd(): protect thd with LOCK_thread_count (Bug #3596)
parent
bd8901fd
Branches unavailable
Tags unavailable
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
sql/ha_innodb.cc
sql/ha_innodb.cc
+9
-2
No files found.
sql/ha_innodb.cc
View file @
077f0812
...
@@ -328,6 +328,8 @@ innobase_mysql_print_thd(
...
@@ -328,6 +328,8 @@ innobase_mysql_print_thd(
thd
=
(
const
THD
*
)
input_thd
;
thd
=
(
const
THD
*
)
input_thd
;
VOID
(
pthread_mutex_lock
(
&
LOCK_thread_count
));
fprintf
(
f
,
"MySQL thread id %lu, query id %lu"
,
fprintf
(
f
,
"MySQL thread id %lu, query id %lu"
,
thd
->
thread_id
,
thd
->
query_id
);
thd
->
thread_id
,
thd
->
query_id
);
if
(
thd
->
host
)
{
if
(
thd
->
host
)
{
...
@@ -351,11 +353,16 @@ innobase_mysql_print_thd(
...
@@ -351,11 +353,16 @@ innobase_mysql_print_thd(
}
}
if
((
s
=
thd
->
query
))
{
if
((
s
=
thd
->
query
))
{
putc
(
' '
,
f
);
/* determine the length of the query string */
fputs
(
s
,
f
);
uint32
i
,
len
=
thd
->
query_length
;
for
(
i
=
0
;
i
<
len
&&
s
[
i
];
i
++
);
putc
(
'\n'
,
f
);
fwrite
(
s
,
1
,
i
,
f
);
}
}
putc
(
'\n'
,
f
);
putc
(
'\n'
,
f
);
VOID
(
pthread_mutex_unlock
(
&
LOCK_thread_count
));
}
}
/*************************************************************************
/*************************************************************************
...
...
This diff is collapsed.
Click to expand it.
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