mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 15:54:37 +01:00
Fix Bug #20493 : we must prepare prebuilt->trx to point to the trx of this thd before using it
This commit is contained in:
parent
e1eee49c1d
commit
8681eafc37
1 changed files with 6 additions and 2 deletions
|
@ -6980,10 +6980,11 @@ ha_innobase::innobase_read_and_init_auto_inc(
|
|||
int error;
|
||||
|
||||
ut_a(prebuilt);
|
||||
ut_a(prebuilt->trx ==
|
||||
(trx_t*) current_thd->ha_data[innobase_hton.slot]);
|
||||
ut_a(prebuilt->table);
|
||||
|
||||
/* Prepare prebuilt->trx in the table handle */
|
||||
update_thd(current_thd);
|
||||
|
||||
if (prebuilt->trx->conc_state == TRX_NOT_STARTED) {
|
||||
trx_was_not_started = TRUE;
|
||||
}
|
||||
|
@ -7118,6 +7119,9 @@ void ha_innobase::get_auto_increment(
|
|||
longlong nr;
|
||||
int error;
|
||||
|
||||
/* Prepare prebuilt->trx in the table handle */
|
||||
update_thd(current_thd);
|
||||
|
||||
error = innobase_read_and_init_auto_inc(&nr);
|
||||
|
||||
if (error) {
|
||||
|
|
Loading…
Add table
Reference in a new issue