[MDEV-30793] Error reported by the penultimate statement in a transaction is left over to COMMIT or ROLLBACK statements. Created: 2023-03-06  Updated: 2023-11-28

Status: Confirmed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.11.2, 10.7.8
Fix Version/s: 10.6, 10.11

Type: Bug Priority: Major
Reporter: John Jove Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: transactions
Environment:

OS: Ubuntu-20.04 LTS



 Description   

The error reported by the penultimate statement in a transaction is left over to COMMIT or ROLLBACK statements, and BEGIN statement of another transaction in the same session.

1. Test Case:

/* init */ CREATE TABLE t0(c0 BOOLEAN PRIMARY KEY NOT NULL);
 
/* tx1 */ BEGIN;
/* tx1 */ INSERT INTO t0 VALUES (2136509845);
-- ERROR 1264 (22003): Out of range value for column 'c0' at row 1
/* tx1 */ COMMIT;
/* tx1 */ SHOW WARNINGS;
+-------+------+---------------------------------------------+
| Level | Code | Message                                     |
+-------+------+---------------------------------------------+
| Error | 1264 | Out of range value for column 'c0' at row 1 |
+-------+------+---------------------------------------------+
 
In the same session
/* tx1 */ BEGIN;
/* tx1 */ SHOW WARNINGS;
+-------+------+---------------------------------------------+
| Level | Code | Message                                     |
+-------+------+---------------------------------------------+
| Error | 1264 | Out of range value for column 'c0' at row 1 |
+-------+------+---------------------------------------------+

We expect that COMMIT statement and BEGIN statement in the test case will not report a warning.


Generated at Thu Feb 08 10:18:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.