mirror of
https://github.com/MariaDB/server.git
synced 2025-07-24 19:42:23 +03:00
MDEV-19452 - fix incorrect push_warning_printf
String is not guaranteed to be null-terminated, thus push_warning_printf also needs to specify the length.
This commit is contained in:
@ -711,11 +711,14 @@ bool Item_subselect::exec()
|
||||
DBUG_ASSERT(fixed);
|
||||
|
||||
DBUG_EXECUTE_IF("Item_subselect",
|
||||
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
|
||||
ER_UNKNOWN_ERROR, "DBUG: Item_subselect::exec %s",
|
||||
Item::Print(this,
|
||||
enum_query_type(QT_TO_SYSTEM_CHARSET |
|
||||
QT_WITHOUT_INTRODUCERS)).ptr()););
|
||||
Item::Print print(this,
|
||||
enum_query_type(QT_TO_SYSTEM_CHARSET |
|
||||
QT_WITHOUT_INTRODUCERS));
|
||||
|
||||
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
|
||||
ER_UNKNOWN_ERROR, "DBUG: Item_subselect::exec %.*s",
|
||||
print.length(),print.ptr());
|
||||
);
|
||||
/*
|
||||
Do not execute subselect in case of a fatal error
|
||||
or if the query has been killed.
|
||||
|
Reference in New Issue
Block a user