mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 07:45:44 +00:00
MDEV-36638 Some optimizer hint warnings are returned as errors
With strict SQL_MODE warnings generated during DDL statements are threated as errors. This is done to prevent potential data corruption. However, optimizer hints cannot affect the integrity of data, so warnings during their parsing or application should not be escalated to the level of errors. This commit introduces `push_warning_safe()` method that guarantees that a warning is not treated as an error, and generation of warnings during hints processing now uses this method instead of traditional `push_warning_printf()`
This commit is contained in:
@ -1335,6 +1335,10 @@ void push_warning_printf(THD *thd, Sql_condition::enum_warning_level level,
|
||||
uint code, const char *format, ...)
|
||||
ATTRIBUTE_FORMAT(printf, 4, 5);
|
||||
|
||||
void push_warning_printf_va_list(THD *thd,
|
||||
Sql_condition::enum_warning_level level,
|
||||
uint code, const char *format, va_list args);
|
||||
|
||||
bool mysqld_show_warnings(THD *thd, ulong levels_to_show);
|
||||
|
||||
size_t convert_error_message(char *to, size_t to_length,
|
||||
|
Reference in New Issue
Block a user