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