mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 02:30:06 +01:00
row0upd.c:
Add UNIV_UNLIKELY hint. lock0lock.c: Correct the prototypes of lock_deadlock_recursive() and lock_deadlock_occurs(). data0data.c: dtuple_convert_big_rec(): Add UNIV_UNLIKELY hint. ha_innodb.cc: ha_innobase::write_row(): Correct the type of 'mode'.
This commit is contained in:
parent
14cf8a55c8
commit
ba4f386765
4 changed files with 16 additions and 7 deletions
|
@ -502,7 +502,7 @@ dtuple_convert_big_rec(
|
|||
|
||||
size = rec_get_converted_size(index, entry);
|
||||
|
||||
if (size > 1000000000) {
|
||||
if (UNIV_UNLIKELY(size > 1000000000)) {
|
||||
fprintf(stderr,
|
||||
"InnoDB: Warning: tuple size very big: %lu\n", (ulong) size);
|
||||
fputs("InnoDB: Tuple contents: ", stderr);
|
||||
|
|
|
@ -348,17 +348,26 @@ static
|
|||
ibool
|
||||
lock_deadlock_occurs(
|
||||
/*=================*/
|
||||
/* out: TRUE if a deadlock was detected */
|
||||
/* out: TRUE if a deadlock was detected and we
|
||||
chose trx as a victim; FALSE if no deadlock, or
|
||||
there was a deadlock, but we chose other
|
||||
transaction(s) as victim(s) */
|
||||
lock_t* lock, /* in: lock the transaction is requesting */
|
||||
trx_t* trx); /* in: transaction */
|
||||
/************************************************************************
|
||||
Looks recursively for a deadlock. */
|
||||
static
|
||||
ibool
|
||||
ulint
|
||||
lock_deadlock_recursive(
|
||||
/*====================*/
|
||||
/* out: TRUE if a deadlock was detected
|
||||
or the calculation took too long */
|
||||
/* out: 0 if no deadlock found,
|
||||
LOCK_VICTIM_IS_START if there was a deadlock
|
||||
and we chose 'start' as the victim,
|
||||
LOCK_VICTIM_IS_OTHER if a deadlock
|
||||
was found and we chose some other trx as a
|
||||
victim: we must do the search again in this
|
||||
last case because there may be another
|
||||
deadlock! */
|
||||
trx_t* start, /* in: recursion starting point */
|
||||
trx_t* trx, /* in: a transaction waiting for a lock */
|
||||
lock_t* wait_lock, /* in: the lock trx is waiting to be granted */
|
||||
|
|
|
@ -1270,7 +1270,7 @@ row_upd_sec_index_entry(
|
|||
|
||||
rec = btr_cur_get_rec(btr_cur);
|
||||
|
||||
if (!found) {
|
||||
if (UNIV_UNLIKELY(!found)) {
|
||||
fputs("InnoDB: error in sec index entry update in\n"
|
||||
"InnoDB: ", stderr);
|
||||
dict_index_name_print(stderr, trx, index);
|
||||
|
|
|
@ -2834,7 +2834,7 @@ ha_innobase::write_row(
|
|||
being blocked by a MySQL table lock TL_WRITE_ALLOW_READ. */
|
||||
|
||||
dict_table_t* src_table;
|
||||
ibool mode;
|
||||
ulint mode;
|
||||
|
||||
num_write_row = 0;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue