mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
Merge akeremidarski@work.mysql.com:/home/bk/mysql
into geopard.(none):/storage/bk/mysql-3.23
This commit is contained in:
commit
cbc851c605
2 changed files with 23 additions and 6 deletions
|
@ -1000,8 +1000,8 @@ row_update_cascade_for_mysql(
|
|||
or set null operation */
|
||||
dict_table_t* table) /* in: table where we do the operation */
|
||||
{
|
||||
ulint err;
|
||||
trx_t* trx;
|
||||
ulint err;
|
||||
trx_t* trx;
|
||||
|
||||
trx = thr_get_trx(thr);
|
||||
run_again:
|
||||
|
@ -1012,11 +1012,26 @@ run_again:
|
|||
|
||||
err = trx->error_state;
|
||||
|
||||
if (err == DB_LOCK_WAIT) {
|
||||
que_thr_stop_for_mysql(thr);
|
||||
|
||||
row_mysql_handle_errors(&err, trx, thr, NULL);
|
||||
/* Note that the cascade node is a subnode of another InnoDB
|
||||
query graph node. We do a normal lock wait in this node, but
|
||||
all errors are handled by the parent node. */
|
||||
|
||||
if (err == DB_LOCK_WAIT) {
|
||||
/* Handle lock wait here */
|
||||
|
||||
que_thr_stop_for_mysql(thr);
|
||||
|
||||
srv_suspend_mysql_thread(thr);
|
||||
|
||||
/* Note that a lock wait may also end in a lock wait timeout */
|
||||
|
||||
if (trx->error_state != DB_SUCCESS) {
|
||||
|
||||
return(trx->error_state);
|
||||
}
|
||||
|
||||
/* Retry operation after a normal lock wait */
|
||||
|
||||
goto run_again;
|
||||
}
|
||||
|
||||
|
|
|
@ -4970,6 +4970,8 @@ end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
|
|||
}
|
||||
else
|
||||
{
|
||||
if (end_of_records)
|
||||
DBUG_RETURN(0);
|
||||
join->first_record=1;
|
||||
VOID(test_if_group_changed(join->group_fields));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue