Re: [Maria-developers] 126a9b6db25: MDEV-18875 Assertion `thd->transaction.stmt.ha_list == __null || trans == &thd->transaction.stmt' failed or bogus ER_DUP_ENTRY upon ALTER TABLE with versioning
Hi, Nikita! On Apr 02, Nikita Malyavin wrote:
Why there's a special check for SQLCOM_ALTER_TABLE + ALTER_ADD_SYSTEM_VERSIONING in the first place? Does it mean that ALTER TABLE ... ADD SYSTEM VERSIONING does not marks a transaction as read/write? That's be weird. Regards, Sergei Chief Architect MariaDB and security@mariadb.org
Hi! IIRC, rw_trans is false when the table was empty On Tue, 2 Apr 2019 at 20:07, Sergei Golubchik <serg@mariadb.org> wrote:
-- Yours truly, Nikita Malyavin
Hi, Nikita! On Apr 03, Nikita Malyavin wrote:
Hi!
IIRC, rw_trans is false when the table was empty
the code inside the if() is for (Ha_trx_info *ha_info= trans->ha_list; ha_info; ha_info= ha_info->next()) { if (ha_info->ht()->prepare_commit_versioned) { trx_end_id= ha_info->ht()->prepare_commit_versioned(thd, &trx_start_id); if (trx_end_id) break; // FIXME: use a common ID for cross-engine transactions } } Are you saying that when the table was empty, rw_trans is false, but ha_list is not empty and innodb->prepare_commit_versioned() returns a non-zero trx_end_id (that is, inside InnoDB, trx->mod_tables is not empty either)?
Regards, Sergei Chief Architect MariaDB and security@mariadb.org
participants (2)
-
Nikita Malyavin
-
Sergei Golubchik