Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
Q3/2026 Server Maintenance
Description
Issue:
-------------
Setting sql_notes to 0 , disables the warning for explain extended
So while capturing context ,there is no warnings.
Since variable change is not recorded in context , Replay shows warnings for explain extended.
How to repro
-------------------------
CREATE TABLE t1 (a int); |
set sql_notes=0; |
|
|
set optimizer_record_context=ON; |
EXPLAIN SELECT * FROM t1; |
SELECT context INTO DUMPFILE 'context1.txt' FROM INFORMATION_SCHEMA.OPTIMIZER_CONTEXT; |
source context1.txt;
|
First explain:
MariaDB [m8]> explain extended select * from t1; |
+------+-------------+-------+------+---------------+------+---------+------+------+----------+-------+ |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra | |
+------+-------------+-------+------+---------------+------+---------+------+------+----------+-------+ |
| 1 | SIMPLE | t1 | ALL | NULL | NULL | NULL | NULL | 1 | 100.00 | | |
+------+-------------+-------+------+---------------+------+---------+------+------+----------+-------+ |
1 row in set (0.001 sec) |
Replay:
MariaDB [m8]> explain extended select * from t1; |
+------+-------------+-------+------+---------------+------+---------+------+------+----------+-------+ |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra | |
+------+-------------+-------+------+---------------+------+---------+------+------+----------+-------+ |
| 1 | SIMPLE | t1 | ALL | NULL | NULL | NULL | NULL | 1 | 100.00 | | |
+------+-------------+-------+------+---------------+------+---------+------+------+----------+-------+ |
1 row in set, 1 warning (0.001 sec) |
|
|
MariaDB [m8]> show warnings;
|
+-------+------+--------------------------------------------+ |
| Level | Code | Message | |
+-------+------+--------------------------------------------+ |
| Note | 1003 | select `m8`.`t1`.`a` AS `a` from `m8`.`t1` | |
+-------+------+--------------------------------------------+ |
1 row in set (0.001 sec) |
Attachments
Issue Links
- relates to
-
MDEV-38701 Optimizer Trace Replay: Q1 2026 Dev Sprint Work 1
-
- In Testing
-