mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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:
@ -11409,7 +11409,11 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
|
||||
}
|
||||
else
|
||||
{
|
||||
const bool const_cond_result = const_cond->val_int() != 0;
|
||||
bool const_cond_result;
|
||||
{
|
||||
Json_writer_array a(thd, "computing_condition");
|
||||
const_cond_result= const_cond->val_int() != 0;
|
||||
}
|
||||
if (!const_cond_result)
|
||||
{
|
||||
DBUG_PRINT("info",("Found impossible WHERE condition"));
|
||||
|
Reference in New Issue
Block a user