summaryrefslogtreecommitdiff
path: root/sql/mysql_priv.h
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2008-12-23 18:08:04 +0400
committerSergey Glukhov <Sergey.Glukhov@sun.com>2008-12-23 18:08:04 +0400
commit43ee0f9f972a10ca888fcf509c2a0e6ad1e66d6d (patch)
tree6e4d53e89ddfb94f9a4c162bc2a2cffb3cede106 /sql/mysql_priv.h
parentddaa8259cf68c8e0d7275d2efcd9c838974a4110 (diff)
downloadmariadb-git-43ee0f9f972a10ca888fcf509c2a0e6ad1e66d6d.tar.gz
Bug#37575 UCASE fails on monthname
The MONTHNAME/DAYNAME functions returns binary string, so the LOWER/UPPER functions are not effective on the result of MONTHNAME/DAYNAME call. Character set of the MONTHNAME/DAYNAME function result has been changed to connection character set. include/m_ctype.h: added my_charset_repertoire function mysql-test/r/ctype_ucs.result: test result mysql-test/r/func_time.result: test result mysql-test/t/ctype_ucs.test: test case mysql-test/t/func_time.test: test case sql/item_timefunc.cc: Item_func_monthname::fix_length_and_dec and Item_func_dayname::fix_length_and_dec methods have been modified to use connection character set sql/item_timefunc.h: Item_func_monthname::fix_length_and_dec and Item_func_dayname::fix_length_and_dec methods have been modified to use connection character set sql/mysql_priv.h: added max_month_name_length, max_day_name_length fields into MY_LOCALE struct sql/mysqld.cc: The test_lc_time_sz function controls modifications of the locale database in debugging mode. sql/sql_locale.cc: initialization of max_month_name_length, max_day_name_length fields strings/ctype.c: added my_charset_repertoire function
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r--sql/mysql_priv.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 520d97b5e9f..a06a7e7d6e3 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -132,15 +132,20 @@ typedef struct my_locale_st
TYPELIB *ab_month_names;
TYPELIB *day_names;
TYPELIB *ab_day_names;
+ uint max_month_name_length;
+ uint max_day_name_length;
#ifdef __cplusplus
my_locale_st(uint number_par,
const char *name_par, const char *descr_par, bool is_ascii_par,
TYPELIB *month_names_par, TYPELIB *ab_month_names_par,
- TYPELIB *day_names_par, TYPELIB *ab_day_names_par) :
+ TYPELIB *day_names_par, TYPELIB *ab_day_names_par,
+ uint max_month_name_length_par, uint max_day_name_length_par) :
number(number_par),
name(name_par), description(descr_par), is_ascii(is_ascii_par),
month_names(month_names_par), ab_month_names(ab_month_names_par),
- day_names(day_names_par), ab_day_names(ab_day_names_par)
+ day_names(day_names_par), ab_day_names(ab_day_names_par),
+ max_month_name_length(max_month_name_length_par),
+ max_day_name_length(max_day_name_length_par)
{}
#endif
} MY_LOCALE;