diff options
author | unknown <heikki@hundin.mysql.fi> | 2002-07-01 02:19:58 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2002-07-01 02:19:58 +0300 |
commit | ea13cafbfe83b1aba0c2dd6582eebd2acc5c6729 (patch) | |
tree | 7e85b106228a6cda3b895b69fd143f12c99b4f44 | |
parent | fbaede459b0e6e0a4e77930cf345d44f05547d1a (diff) | |
download | mariadb-git-ea13cafbfe83b1aba0c2dd6582eebd2acc5c6729.tar.gz |
row0ins.c:
The UNIV_DEBUG version asserted if a foreign key check failed because of a lock wait timeout
btr0cur.c:
Fix a bug: if the primary key was updated (or delete + insert) so that only the case of characters changed, we were left with a dangling adaptive hash index pointer, often causing an assertion failure in page0page.ic line 515
innobase/btr/btr0cur.c:
Fix a bug: if the primary key was updated (or delete + insert) so that only the case of characters changed, we were left with a dangling adaptive hash index pointer, often causing an assertion failure in page0page.ic line 515
innobase/row/row0ins.c:
The UNIV_DEBUG version asserted if a foreign key check failed because of a lock wait timeout
-rw-r--r-- | innobase/btr/btr0cur.c | 6 | ||||
-rw-r--r-- | innobase/row/row0ins.c | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/innobase/btr/btr0cur.c b/innobase/btr/btr0cur.c index 67b74967e8d..f3aebb7f96f 100644 --- a/innobase/btr/btr0cur.c +++ b/innobase/btr/btr0cur.c @@ -1355,6 +1355,12 @@ btr_cur_update_in_place( block = buf_block_align(rec); if (block->is_hashed) { + if (row_upd_changes_ord_field_binary(NULL, index, update)) { + + /* Remove possible hash index pointer to this record */ + btr_search_update_hash_on_delete(cursor); + } + rw_lock_x_lock(&btr_search_latch); } diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c index bbec004176b..ee4805d51d2 100644 --- a/innobase/row/row0ins.c +++ b/innobase/row/row0ins.c @@ -627,6 +627,7 @@ row_ins_check_foreign_constraint( dict_table_t* check_table; dict_index_t* check_index; ulint n_fields_cmp; + ibool timeout_expired; rec_t* rec; btr_pcur_t pcur; ibool moved; @@ -790,10 +791,15 @@ do_possible_lock_wait: thr_get_trx(thr)->error_state = err; que_thr_stop_for_mysql(thr); + + timeout_expired = srv_suspend_mysql_thread(thr); - row_mysql_handle_errors(&err, thr_get_trx(thr), thr, NULL); + if (!timeout_expired) { + + goto run_again; + } - goto run_again; + err = DB_LOCK_WAIT_TIMEOUT; } return(err); |