From 21479a6bb3cc37ffa1fb4f53a0ab71d22c7ad445 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 21 Jun 2016 21:26:31 +0400 Subject: MDEV-9524 Cannot load from mysql.event when sql_mode is set to PAD_CHAR_TO_FULL_LENGTH The patch fixes the problem with loading information from system tables (e.g. event and help related tables) when PAD_CHAR_TO_FULL_LENGTH is enabled, as well as includes some additional minor improvements: - refactoring in get_field() to return an error rather than success if strmake_root() failed - removing of duplicate code in similar functions: char *get_field(MEM_ROOT *mem, Field *field) bool get_field(MEM_ROOT *mem, Field *field, String *res) --- mysql-test/t/help.test | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mysql-test/t/help.test') diff --git a/mysql-test/t/help.test b/mysql-test/t/help.test index 71821e46771..881299a216c 100644 --- a/mysql-test/t/help.test +++ b/mysql-test/t/help.test @@ -61,6 +61,12 @@ help '%function_7'; help '%category_2'; help 'impossible_function_1'; help 'impossible_category_1'; + +--echo # MDEV-9524 Cannot load from mysql.event when sql_mode is set to PAD_CHAR_TO_FULL_LENGTH +help 'impossible_function_1'; +SET sql_mode=PAD_CHAR_TO_FULL_LENGTH; +help 'impossible_function_1'; +SET sql_mode=DEFAULT; ############## --disable_warnings -- cgit v1.2.1