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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
85515b57
Commit
85515b57
authored
Jun 17, 2005
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: remove flag lock_print_waits from non-debug builds.
parent
a5025b8e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
innobase/include/lock0lock.h
innobase/include/lock0lock.h
+2
-0
innobase/lock/lock0lock.c
innobase/lock/lock0lock.c
+24
-2
innobase/trx/trx0roll.c
innobase/trx/trx0roll.c
+2
-0
No files found.
innobase/include/lock0lock.h
View file @
85515b57
...
...
@@ -19,7 +19,9 @@ Created 5/7/1996 Heikki Tuuri
#include "read0types.h"
#include "hash0hash.h"
#ifdef UNIV_DEBUG
extern
ibool
lock_print_waits
;
#endif
/* UNIV_DEBUG */
/* Buffer for storing information about the most recent deadlock error */
extern
FILE
*
lock_latest_err_file
;
...
...
innobase/lock/lock0lock.c
View file @
85515b57
...
...
@@ -292,7 +292,25 @@ waiting, in its lock queue. Solution: We can copy the locks as gap type
locks, so that also the waiting locks are transformed to granted gap type
locks on the inserted record. */
/* LOCK COMPATIBILITY MATRIX
* IS IX S X AI
* IS + + + - +
* IX + + - - +
* S + - + - -
* X - - - - -
* AI + + - - -
*
* Note that for rows, InnoDB only acquires S or X locks.
* For tables, InnoDB normally acquires IS or IX locks.
* S or X table locks are only acquired for LOCK TABLES.
* Auto-increment (AI) locks are needed because of
* statement-level MySQL binlog.
* See also lock_mode_compatible().
*/
#ifdef UNIV_DEBUG
ibool
lock_print_waits
=
FALSE
;
#endif
/* UNIV_DEBUG */
/* The lock system */
lock_sys_t
*
lock_sys
=
NULL
;
...
...
@@ -1842,11 +1860,13 @@ lock_rec_enqueue_waiting(
ut_a
(
que_thr_stop
(
thr
));
#ifdef UNIV_DEBUG
if
(
lock_print_waits
)
{
fprintf
(
stderr
,
"Lock wait for trx %lu in index "
,
(
ulong
)
ut_dulint_get_low
(
trx
->
id
));
ut_print_name
(
stderr
,
trx
,
index
->
name
);
}
#endif
/* UNIV_DEBUG */
return
(
DB_LOCK_WAIT
);
}
...
...
@@ -2204,10 +2224,12 @@ lock_grant(
lock
->
trx
->
auto_inc_lock
=
lock
;
}
#ifdef UNIV_DEBUG
if
(
lock_print_waits
)
{
fprintf
(
stderr
,
"Lock wait for trx %lu ends
\n
"
,
(
ulong
)
ut_dulint_get_low
(
lock
->
trx
->
id
));
}
#endif
/* UNIV_DEBUG */
/* If we are resolving a deadlock by choosing another transaction
as a victim, then our original transaction may not be in the
...
...
@@ -3303,11 +3325,11 @@ lock_deadlock_recursive(
}
else
{
lock_table_print
(
ef
,
start
->
wait_lock
);
}
#ifdef UNIV_DEBUG
if
(
lock_print_waits
)
{
fputs
(
"Deadlock detected
\n
"
,
stderr
);
}
#endif
/* UNIV_DEBUG */
if
(
ut_dulint_cmp
(
wait_lock
->
trx
->
undo_no
,
start
->
undo_no
)
>=
0
)
{
/* Our recursion starting point
...
...
innobase/trx/trx0roll.c
View file @
85515b57
...
...
@@ -1237,10 +1237,12 @@ trx_finish_rollback_off_kernel(
return
;
}
#ifdef UNIV_DEBUG
if
(
lock_print_waits
)
{
fprintf
(
stderr
,
"Trx %lu rollback finished
\n
"
,
(
ulong
)
ut_dulint_get_low
(
trx
->
id
));
}
#endif
/* UNIV_DEBUG */
trx_commit_off_kernel
(
trx
);
...
...
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