Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.7
-
None
Description
InnoDB in MariaDB 10.2 fails to refuse UPDATE if the server is in read-only mode, and will hit a debug assertion failure because trx->id is 0 due to the read-only mode. This can be repeated with a slightly modified test:
diff --git a/mysql-test/suite/innodb/t/read_only_recovery.test b/mysql-test/suite/innodb/t/read_only_recovery.test
|
index a1a69be724b..aea676d3644 100644
|
--- a/mysql-test/suite/innodb/t/read_only_recovery.test
|
+++ b/mysql-test/suite/innodb/t/read_only_recovery.test
|
@@ -4,9 +4,10 @@
|
|
--connect(con1, localhost, root)
|
CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB;
|
+INSERT INTO t VALUES(1);
|
BEGIN;
|
# Generate insert_undo log.
|
-INSERT INTO t VALUES(1),(2);
|
+INSERT INTO t VALUES(2);
|
# Generate update_undo log.
|
DELETE FROM t WHERE a=2;
|
--connection default
|
@@ -27,6 +28,7 @@ ROLLBACK;
|
SELECT * FROM t;
|
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
SELECT * FROM t;
|
+UPDATE t SET a=3 WHERE a=1;
|
--let $restart_parameters= --innodb-read-only
|
--source include/restart_mysqld.inc
|
--echo # Starting with MariaDB 10.2, innodb_read_only implies READ UNCOMMITTED. |
10.0 and 10.1 are behaving correctly:
CURRENT_TEST: innodb.read_only_recovery
|
mysqltest: At line 29: query 'UPDATE t SET a=3 WHERE a=1' failed: 1036: Table 't' is read only
|
Attachments
Issue Links
- relates to
-
MDEV-13269 Upgrade tests for InnoDB undo log
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Summary | InnoDB fails to refuse UPDATE if innodb_force_recovery=3 | InnoDB attempts UPDATE with DB_TRX_ID=0 if innodb_force_recovery=3 |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Assignee | Marko Mäkelä [ marko ] | Jan Lindström [ jplindst ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Jan Lindström [ jplindst ] | Marko Mäkelä [ marko ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
issue.field.resolutiondate | 2017-08-15 08:06:59.0 | 2017-08-15 08:06:59.685 |
Fix Version/s | 10.2.8 [ 22544 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Affects Version/s | 10.2.7 [ 22543 ] | |
Affects Version/s | 10.2 [ 14601 ] |
Workflow | MariaDB v3 [ 82071 ] | MariaDB v4 [ 152614 ] |
bb-10.2-marko will continue to allow the UPDATE, and start to allow the read-write transaction creation even if innodb_force_recovery=3.