Post-fix for 0a9633ee: Basic LEX::print function that supports UPDATEs

Backport this fix:
CLX-105: UPDATE query causes crash

LEX::print() should not crash when the UPDATE has no WHERE clause

Fixes CLX-373.
This commit is contained in:
Sergei Petrunia 2020-06-19 22:04:02 +03:00
parent 572e53d8cc
commit 9160e4aa95

View File

@ -3565,8 +3565,11 @@ void LEX::print(String *str, enum_query_type query_type)
value->print(str, query_type);
}
if (sel->where)
{
str->append(STRING_WITH_LEN(" WHERE "));
sel->where->print(str, query_type);
}
if (sel->order_list.elements)
{