mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 10.3 into 10.4
This commit is contained in:
@ -1721,7 +1721,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
|
||||
int error, trg_error= 0;
|
||||
char *key=0;
|
||||
MY_BITMAP *save_read_set, *save_write_set;
|
||||
table->file->store_auto_increment();
|
||||
ulonglong prev_insert_id= table->file->next_insert_id;
|
||||
ulonglong insert_id_for_cur_row= 0;
|
||||
ulonglong prev_insert_id_for_cur_row= 0;
|
||||
DBUG_ENTER("write_record");
|
||||
@ -1870,7 +1870,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
|
||||
if (res == VIEW_CHECK_ERROR)
|
||||
goto before_trg_err;
|
||||
|
||||
table->file->restore_auto_increment();
|
||||
table->file->restore_auto_increment(prev_insert_id);
|
||||
info->touched++;
|
||||
if (different_records)
|
||||
{
|
||||
@ -2064,7 +2064,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
|
||||
if (!(thd->variables.old_behavior &
|
||||
OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE))
|
||||
table->file->print_error(error, MYF(ME_WARNING));
|
||||
table->file->restore_auto_increment();
|
||||
table->file->restore_auto_increment(prev_insert_id);
|
||||
goto ok_or_after_trg_err;
|
||||
}
|
||||
|
||||
@ -2087,7 +2087,7 @@ err:
|
||||
table->file->print_error(error,MYF(0));
|
||||
|
||||
before_trg_err:
|
||||
table->file->restore_auto_increment();
|
||||
table->file->restore_auto_increment(prev_insert_id);
|
||||
if (key)
|
||||
my_safe_afree(key, table->s->max_unique_length);
|
||||
table->column_bitmaps_set(save_read_set, save_write_set);
|
||||
@ -3061,7 +3061,7 @@ pthread_handler_t handle_delayed_insert(void *arg)
|
||||
if (thd->mdl_context.clone_ticket(&di->grl_protection) ||
|
||||
thd->mdl_context.clone_ticket(&di->table_list.mdl_request))
|
||||
{
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
di->handler_thread_initialized= TRUE;
|
||||
goto err;
|
||||
}
|
||||
@ -3276,7 +3276,7 @@ pthread_handler_t handle_delayed_insert(void *arg)
|
||||
thd->set_killed(KILL_CONNECTION_HARD); // If error
|
||||
|
||||
close_thread_tables(thd); // Free the table
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
mysql_cond_broadcast(&di->cond_client); // Safety
|
||||
|
||||
mysql_mutex_lock(&LOCK_delayed_create); // Because of delayed_get_table
|
||||
@ -4766,6 +4766,7 @@ bool select_create::send_eof()
|
||||
WSREP_ERROR("Appending table key for CTAS failed: %s, %d",
|
||||
(wsrep_thd_query(thd)) ?
|
||||
wsrep_thd_query(thd) : "void", rcode);
|
||||
abort_result_set();
|
||||
DBUG_RETURN(true);
|
||||
}
|
||||
/* If commit fails, we should be able to reset the OK status. */
|
||||
|
Reference in New Issue
Block a user