[MDEV-510] assert triggered by ./mtr --ps-protocol rpl_mdev382 Created: 2012-09-06  Updated: 2012-09-06  Resolved: 2012-09-06

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.25
Fix Version/s: 5.5.27

Type: Bug Priority: Major
Reporter: Sergei Golubchik Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-493 Assertion thd->transaction.stmt.is_em... Closed

 Description   

rpl_mdev382 tests, besides other things, binlogging of implicitly emptied MEMORY tables.

The assert that fires is here:

3275 bool Prepared_statement::prepare(const char *packet, uint packet_len)
3276 {
...
3361     error= check_prepared_statement(this);
...
3372   /* No need to commit statement transaction, it's not started. */
3373   DBUG_ASSERT(thd->transaction.stmt.is_empty());
...

Indeed, the "statement transaction" is not supposed to be started. But the check_prepared_statement call above opens all tables, and the "implicitly emptied" MEMORY table too, which triggers binlog write, which starts the transaction.

Besides an assert it might be wrong on other layers too. What if the transaction is rolled back? What if the statement fails and is rolled back? DELETE must still be in binlog, strictly speaking it's not part of the transaction.



 Comments   
Comment by Sergei Golubchik [ 2012-09-06 ]

pushed

Comment by Kristian Nielsen [ 2012-09-06 ]

Jira is stupid, or I am: I didn't see how to log time without reopening issue.

Generated at Thu Feb 08 06:29:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.