mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-7970: EXPLAIN FORMAT=JSON does not print HAVING
Printing non-trivial HAVING added.
This commit is contained in:
@ -862,7 +862,20 @@ void Explain_select::print_explain_json(Explain_query *query,
|
||||
writer->add_member("const_condition");
|
||||
write_item(writer, exec_const_cond);
|
||||
}
|
||||
|
||||
/* we do not print HAVING which always evaluates to TRUE */
|
||||
if (having || (having_value == Item::COND_FALSE))
|
||||
{
|
||||
writer->add_member("having_condition");
|
||||
if (likely(having))
|
||||
write_item(writer, having);
|
||||
else
|
||||
{
|
||||
/* Normally we should not go this branch, left just for safety */
|
||||
DBUG_ASSERT(having_value == Item::COND_FALSE);
|
||||
writer->add_str("0");
|
||||
}
|
||||
}
|
||||
|
||||
Filesort_tracker *first_table_sort= NULL;
|
||||
bool first_table_sort_used= false;
|
||||
int started_objects= 0;
|
||||
|
Reference in New Issue
Block a user