Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
10.11, 11.4, 11.8, 12.3, 13.0, 13.1, 13.2
-
Can result in unexpected behaviour
Description
Statements executed under LOCK TABLES are binlogged as committed but are not committed in Aria until UNLOCK TABLES
--source include/have_log_bin.inc
|
--source include/not_valgrind.inc
|
RESET MASTER;
|
CREATE TABLE t1 (a INT) ENGINE=Aria; |
INSERT INTO t1 VALUES (1),(2); |
LOCK TABLES t1 WRITE;
|
INSERT INTO t1 VALUES (3),(4); |
SELECT COUNT(*) FROM t1; # 4 |
--source include/kill_mysqld.inc
|
--source include/start_mysqld.inc
|
SELECT COUNT(*) FROM t1; # 2 <-- rows 3,4 lost |
CHECK TABLE t1; # status OK |
--let $binlog_file= master-bin.000001
|
--source include/show_binlog_events.inc # INSERT INTO t1 VALUES (3),(4) is there, BEGIN ... COMMIT
|
DROP TABLE t1; |
MTR Output
LOCK TABLES t1 WRITE;
|
INSERT INTO t1 VALUES (3),(4);
|
SELECT COUNT(*) FROM t1;
|
COUNT(*)
|
4
|
# Kill the server
|
# restart
|
SELECT COUNT(*) FROM t1;
|
COUNT(*)
|
2
|
CHECK TABLE t1;
|
Table Op Msg_type Msg_text
|
test.t1 check status OK
|
include/show_binlog_events.inc
|
Log_name Pos Event_type Server_id End_log_pos Info
|
master-bin.000001 # Gtid # # GTID #-#-#
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) ENGINE=Aria
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1),(2)
|
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3),(4)
|
master-bin.000001 # Query # # COMMIT
|