diff options
author | Marc Alff <marc.alff@sun.com> | 2008-10-06 14:36:15 -0600 |
---|---|---|
committer | Marc Alff <marc.alff@sun.com> | 2008-10-06 14:36:15 -0600 |
commit | ff4fde18c40fa92caabff596100357c2b411116f (patch) | |
tree | 21983f574849b98ac46959575f1a0410aeae950f /sql/partition_info.cc | |
parent | 1fd6774b3df26a8e2f6b05878d23859796e21c2f (diff) | |
download | mariadb-git-ff4fde18c40fa92caabff596100357c2b411116f.tar.gz |
Bug#36768 (partition_info::check_partition_info() reports mal formed
warnings)
Before this fix, several places in the code would raise a warning with an
error code 0, making it impossible for a stored procedure, a connector,
or a client application to trigger logic to handle the warning.
Also, the warning text was hard coded, and therefore not translated.
With this fix, new errors numbers have been created to represent these
warnings, and the warning text is coded in the errmsg.txt file.
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r-- | sql/partition_info.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 8feac884c77..bd30d0b5540 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -956,11 +956,13 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, #endif { if (part_elem->data_file_name) - push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, - "DATA DIRECTORY option ignored"); + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + WARN_OPTION_IGNORED, ER(WARN_OPTION_IGNORED), + "DATA DIRECTORY"); if (part_elem->index_file_name) - push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, - "INDEX DIRECTORY option ignored"); + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + WARN_OPTION_IGNORED,ER(WARN_OPTION_IGNORED), + "INDEX DIRECTORY"); part_elem->data_file_name= part_elem->index_file_name= NULL; } if (!is_sub_partitioned()) |