diff options
-rw-r--r-- | cmake/submodules.cmake | 4 | ||||
-rw-r--r-- | mysql-test/r/locale.result | 18 | ||||
-rw-r--r-- | mysql-test/t/locale.test | 17 | ||||
-rw-r--r-- | sql/item_strfunc.cc | 14 | ||||
-rw-r--r-- | sql/item_strfunc.h | 18 | ||||
-rw-r--r-- | sql/item_timefunc.h | 4 |
6 files changed, 44 insertions, 31 deletions
diff --git a/cmake/submodules.cmake b/cmake/submodules.cmake index 86e3d41eb77..672a3affc1d 100644 --- a/cmake/submodules.cmake +++ b/cmake/submodules.cmake @@ -7,7 +7,7 @@ IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git") IF(git_config_get_result EQUAL 128 OR cmake_update_submodules MATCHES no) SET(update_result 0) ELSEIF (cmake_update_submodules MATCHES force) - MESSAGE("-- Updating submodules (forced)") + MESSAGE(STATUS "Updating submodules (forced)") EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init --force WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" RESULT_VARIABLE update_result) @@ -16,7 +16,7 @@ IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git") WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" RESULT_VARIABLE update_result) ELSE() - MESSAGE("-- Updating submodules") + MESSAGE(STATUS "Updating submodules") EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" RESULT_VARIABLE update_result) diff --git a/mysql-test/r/locale.result b/mysql-test/r/locale.result index 95c1f51fd87..a02e80ed21e 100644 --- a/mysql-test/r/locale.result +++ b/mysql-test/r/locale.result @@ -223,5 +223,21 @@ SELECT * FROM non_existent; ERROR 42S02: Table 'test.non_existent' doesn't exist SET lc_time_names=@old_50915_lc_time_names; # -# End of 5.6 tests +# End of 10.0 tests +# +# +# End of 10.1 tests +# +create view v1 as select +format(123456789,2) as b, +format(123456789,2,'rm_CH') as b1; +select * from v1; +b b1 +123,456,789.00 123'456'789,00 +show create view v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select format(123456789,2) AS `b`,format(123456789,2,'rm_CH') AS `b1` utf8 utf8_general_ci +drop view v1; +# +# End of 10.2 tests # diff --git a/mysql-test/t/locale.test b/mysql-test/t/locale.test index b1fbc40f0c8..4570b968ecf 100644 --- a/mysql-test/t/locale.test +++ b/mysql-test/t/locale.test @@ -134,7 +134,22 @@ SELECT * FROM non_existent; SET lc_time_names=@old_50915_lc_time_names; +--echo # +--echo # End of 10.0 tests +--echo # + +--echo # +--echo # End of 10.1 tests +--echo # + +# Item::print +create view v1 as select + format(123456789,2) as b, + format(123456789,2,'rm_CH') as b1; +select * from v1; +show create view v1; +drop view v1; --echo # ---echo # End of 5.6 tests +--echo # End of 10.2 tests --echo # diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index a109737bc6e..02bfc98b293 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -2707,20 +2707,6 @@ String *Item_func_format::val_str_ascii(String *str) } -void Item_func_format::print(String *str, enum_query_type query_type) -{ - str->append(STRING_WITH_LEN("format(")); - args[0]->print(str, query_type); - str->append(','); - args[1]->print(str, query_type); - if(arg_count > 2) - { - str->append(','); - args[2]->print(str,query_type); - } - str->append(')'); -} - void Item_func_elt::fix_length_and_dec() { uint32 char_length= 0; diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index f469b60c344..9c7dfc03aa3 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -93,7 +93,7 @@ public: { return val_str_from_val_str_ascii(str, &ascii_buf); } - virtual String *val_str_ascii(String *)= 0; + String *val_str_ascii(String *)= 0; }; @@ -490,7 +490,7 @@ public: String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "trim"; } - virtual void print(String *str, enum_query_type query_type); + void print(String *str, enum_query_type query_type); virtual const char *mode_name() const { return "both"; } Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return get_item_copy<Item_func_trim>(thd, mem_root, this); } @@ -853,7 +853,6 @@ public: String *val_str_ascii(String *); void fix_length_and_dec(); const char *func_name() const { return "format"; } - virtual void print(String *str, enum_query_type query_type); Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return get_item_copy<Item_func_format>(thd, mem_root, this); } }; @@ -914,7 +913,6 @@ public: const char *func_name() const { return "binlog_gtid_pos"; } bool check_vcol_func_processor(void *arg) { - return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } Item *get_copy(THD *thd, MEM_ROOT *mem_root) @@ -1070,7 +1068,7 @@ public: collation.set(&my_charset_bin); max_length=args[0]->max_length; } - virtual void print(String *str, enum_query_type query_type); + void print(String *str, enum_query_type query_type); const char *func_name() const { return "cast_as_binary"; } bool need_parentheses_in_default() { return true; } Item *get_copy(THD *thd, MEM_ROOT *mem_root) @@ -1214,7 +1212,7 @@ public: } void fix_length_and_dec(); const char *func_name() const { return "convert"; } - virtual void print(String *str, enum_query_type query_type); + void print(String *str, enum_query_type query_type); Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return get_item_copy<Item_func_conv_charset>(thd, mem_root, this); } }; @@ -1230,7 +1228,7 @@ public: const char *func_name() const { return "collate"; } enum precedence precedence() const { return COLLATE_PRECEDENCE; } enum Functype functype() const { return COLLATE_FUNC; } - virtual void print(String *str, enum_query_type query_type); + void print(String *str, enum_query_type query_type); Item_field *field_for_view_update() { /* this function is transparent for view updating */ @@ -1412,8 +1410,8 @@ public: void fix_length_and_dec(); const char *func_name() const{ return "column_create"; } String *val_str(String *); - virtual void print(String *str, enum_query_type query_type); - virtual enum Functype functype() const { return DYNCOL_FUNC; } + void print(String *str, enum_query_type query_type); + enum Functype functype() const { return DYNCOL_FUNC; } Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return get_item_copy<Item_func_dyncol_create>(thd, mem_root, this); } }; @@ -1427,7 +1425,7 @@ public: {} const char *func_name() const{ return "column_add"; } String *val_str(String *); - virtual void print(String *str, enum_query_type query_type); + void print(String *str, enum_query_type query_type); Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return get_item_copy<Item_func_dyncol_add>(thd, mem_root, this); } }; diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 77b596c9eba..b0a083bf24f 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -199,7 +199,6 @@ public: } bool check_vcol_func_processor(void *arg) { - return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); } Item *get_copy(THD *thd, MEM_ROOT *mem_root) @@ -693,8 +692,7 @@ public: virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time)=0; bool check_vcol_func_processor(void *arg) { - return mark_unsupported_function(func_name(), "()", arg, - VCOL_TIME_FUNC); + return mark_unsupported_function(func_name(), "()", arg, VCOL_TIME_FUNC); } }; |