mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-27238: Assertion `got_name == named_item_expected()' failed in Json_writer
make_join_select() calls const_cond->val_int(). There are edge cases where const_cond may have a not-yet optimized subquery. (The subquery will have used_tables() covered by join->const_tables. It will still have const_item()==false, so other parts of the optimizer will not try to evaluate it. We should probably mark such subqueries as constant but that is outside the scope of this MDEV)
This commit is contained in:
@@ -643,6 +643,16 @@ SELECT 'a\0' LIMIT 0;
|
||||
SELECT query, trace FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
|
||||
SET optimizer_trace=DEFAULT;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-27238: Assertion `got_name == named_item_expected()' failed in Json_writer::on_start_object
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT KEY,b INT,KEY(b)) ENGINE=MEMORY;
|
||||
SET optimizer_trace=1;
|
||||
INSERT INTO t1 VALUES (0,0);
|
||||
SELECT a FROM t1 WHERE (a,b) in (SELECT @c,@d);
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user