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
4754f88c
Commit
4754f88c
authored
May 16, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Never pass NULL to innobase_get_stmt()
parent
7972da8a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
30 deletions
+22
-30
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+3
-7
storage/innobase/lock/lock0lock.cc
storage/innobase/lock/lock0lock.cc
+5
-7
storage/innobase/trx/trx0i_s.cc
storage/innobase/trx/trx0i_s.cc
+3
-1
storage/xtradb/handler/ha_innodb.cc
storage/xtradb/handler/ha_innodb.cc
+3
-7
storage/xtradb/lock/lock0lock.cc
storage/xtradb/lock/lock0lock.cc
+5
-7
storage/xtradb/trx/trx0i_s.cc
storage/xtradb/trx/trx0i_s.cc
+3
-1
No files found.
storage/innobase/handler/ha_innodb.cc
View file @
4754f88c
...
...
@@ -1998,15 +1998,11 @@ innobase_get_stmt(
THD
*
thd
,
/*!< in: MySQL thread handle */
size_t
*
length
)
/*!< out: length of the SQL statement */
{
const
char
*
query
=
NULL
;
LEX_STRING
*
stmt
=
NULL
;
ut_ad
(
thd
!=
NULL
);
stmt
=
thd_query_string
(
thd
);
if
(
stmt
)
{
if
(
const
LEX_STRING
*
stmt
=
thd_query_string
(
thd
))
{
*
length
=
stmt
->
length
;
query
=
stmt
->
str
;
return
stmt
->
str
;
}
return
(
query
)
;
return
NULL
;
}
/**********************************************************************//**
...
...
storage/innobase/lock/lock0lock.cc
View file @
4754f88c
...
...
@@ -4742,13 +4742,11 @@ lock_rec_unlock(
trx_mutex_exit
(
trx
);
stmt
=
innobase_get_stmt
(
trx
->
mysql_thd
,
&
stmt_len
);
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: Error: unlock row could not"
" find a %lu mode lock on the record
\n
"
,
(
ulong
)
lock_mode
);
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: current statement: %.*s
\n
"
,
ib_logf
(
IB_LOG_LEVEL_ERROR
,
"unlock row could not find a %u mode lock on the record;"
" statement=%.*s"
,
lock_mode
,
(
int
)
stmt_len
,
stmt
);
return
;
...
...
storage/innobase/trx/trx0i_s.cc
View file @
4754f88c
...
...
@@ -503,7 +503,9 @@ fill_trx_row(
row
->
trx_mysql_thread_id
=
thd_get_thread_id
(
trx
->
mysql_thd
);
stmt
=
innobase_get_stmt
(
trx
->
mysql_thd
,
&
stmt_len
);
stmt
=
trx
->
mysql_thd
?
innobase_get_stmt
(
trx
->
mysql_thd
,
&
stmt_len
)
:
NULL
;
if
(
stmt
!=
NULL
)
{
char
query
[
TRX_I_S_TRX_QUERY_MAX_LEN
+
1
];
...
...
storage/xtradb/handler/ha_innodb.cc
View file @
4754f88c
...
...
@@ -2324,15 +2324,11 @@ innobase_get_stmt(
THD
*
thd
,
/*!< in: MySQL thread handle */
size_t
*
length
)
/*!< out: length of the SQL statement */
{
const
char
*
query
=
NULL
;
LEX_STRING
*
stmt
=
NULL
;
ut_ad
(
thd
!=
NULL
);
stmt
=
thd_query_string
(
thd
);
if
(
stmt
)
{
if
(
const
LEX_STRING
*
stmt
=
thd_query_string
(
thd
))
{
*
length
=
stmt
->
length
;
query
=
stmt
->
str
;
return
stmt
->
str
;
}
return
(
query
)
;
return
NULL
;
}
/**********************************************************************//**
...
...
storage/xtradb/lock/lock0lock.cc
View file @
4754f88c
...
...
@@ -4788,13 +4788,11 @@ lock_rec_unlock(
trx_mutex_exit
(
trx
);
stmt
=
innobase_get_stmt
(
trx
->
mysql_thd
,
&
stmt_len
);
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: Error: unlock row could not"
" find a %lu mode lock on the record
\n
"
,
(
ulong
)
lock_mode
);
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: current statement: %.*s
\n
"
,
ib_logf
(
IB_LOG_LEVEL_ERROR
,
"unlock row could not find a %u mode lock on the record;"
" statement=%.*s"
,
lock_mode
,
(
int
)
stmt_len
,
stmt
);
return
;
...
...
storage/xtradb/trx/trx0i_s.cc
View file @
4754f88c
...
...
@@ -507,7 +507,9 @@ fill_trx_row(
row
->
trx_mysql_thread_id
=
thd_get_thread_id
(
trx
->
mysql_thd
);
stmt
=
innobase_get_stmt
(
trx
->
mysql_thd
,
&
stmt_len
);
stmt
=
trx
->
mysql_thd
?
innobase_get_stmt
(
trx
->
mysql_thd
,
&
stmt_len
)
:
NULL
;
if
(
stmt
!=
NULL
)
{
char
query
[
TRX_I_S_TRX_QUERY_MAX_LEN
+
1
];
...
...
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