Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
Unexpected results
Description
Issue found in merge.merge test
Issue:
--------
Replay throws below error
MariaDB [m8]> REPLACE INTO m8.t2(a) VALUES (2);
ERROR 1036 (HY000): Table 't2' is read only
Case:
-------------
CREATE TABLE t1 (a int,primary key(a)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (2);
CREATE TABLE t2 (a int,primary key(a)) ENGINE=MRG_MyISAM UNION=(t1);
set optimizer_record_context=ON;
EXPLAIN SELECT * FROM t2 WHERE a = 2;
SELECT context INTO DUMPFILE 'context1.txt' FROM INFORMATION_SCHEMA.OPTIMIZER_CONTEXT;
source context1.txt;
First explain:
MariaDB [m8]> EXPLAIN SELECT * FROM t2 WHERE a = 2; |
+------+-------------+-------+-------+---------------+---------+---------+-------+------+-------------+ |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | |
+------+-------------+-------+-------+---------------+---------+---------+-------+------+-------------+ |
| 1 | SIMPLE | t2 | const | PRIMARY | PRIMARY | 4 | const | 1 | Using index | |
+------+-------------+-------+-------+---------------+---------+---------+-------+------+-------------+ |
Replay:
MariaDB [m8]> REPLACE INTO m8.t2(a) VALUES (2); |
ERROR 1036 (HY000): Table 't2' is read only |
 |
MariaDB [m8]> EXPLAIN SELECT * FROM t2 WHERE a = 2; |
+------+-------------+-------+------+---------------+------+---------+------+------+-----------------------------------------------------+ |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | |
+------+-------------+-------+------+---------------+------+---------+------+------+-----------------------------------------------------+ |
| 1 | SIMPLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | Impossible WHERE noticed after reading const tables | |
+------+-------------+-------+------+---------------+------+---------+------+------+-----------------------------------------------------+ |
|
Attachments
Issue Links
- relates to
-
MDEV-39368 Add mtr option to test Optimizer Context Replay
-
- Open
-