diff options
author | unknown <bar@mysql.com/bar.myoffice.izhnet.ru> | 2007-08-03 15:25:23 +0500 |
---|---|---|
committer | unknown <bar@mysql.com/bar.myoffice.izhnet.ru> | 2007-08-03 15:25:23 +0500 |
commit | 53df09a9a6a99b82e2a8869eb16737a78772b29e (patch) | |
tree | 01c0ee2f5244a4d68fc6cdfb6555fa1af4589a8c /mysys/charset.c | |
parent | b307fc4d8fd5380cec948c07550b5ae73624e274 (diff) | |
download | mariadb-git-53df09a9a6a99b82e2a8869eb16737a78772b29e.tar.gz |
Bug#28875 Conversion between ASCII and LATIN1 charsets does not function
(Regression, caused by a patch for the bug 22646).
Problem: when result type of date_format() was changed from
binary string to character string, mixing date_format()
with a ascii column in CONCAT() stopped to work.
Fix:
- adding "repertoire" flag into DTCollation class,
to mark items which can return only pure ASCII strings.
- allow character set conversion from pure ASCII to other character sets.
include/m_ctype.h:
Defining new flags.
Adding new function prototypes.
mysql-test/r/ctype_ucs.result:
Adding tests.
mysql-test/r/ctype_utf8.result:
Adding tests.
mysql-test/r/func_time.result:
Adding tests.
mysql-test/t/ctype_ucs.test:
Adding tests.
mysql-test/t/ctype_utf8.test:
Adding tests.
mysql-test/t/func_time.test:
Adding test.
mysys/charset.c:
Adding pure ASCII detection when loading a dynamic character set.
sql/item.cc:
- Moving detection of a Unicode superset into function.
- Adding detection of a ASCII subset.
- Adding creation of to-ASCII character set convertor when
safe_charset_converter() failed and when the argument.
repertoire is know to be pure ASCII.
sql/item.h:
- Adding "repertoire" member into DTCollation class.
- Adding "repertoire" argument to constructors.
- Adding new methods:
set_repertoire_from_charset()
set_repertoire_from_value()
sql/item_func.cc:
Adding "repertoire" argument.
sql/item_strfunc.cc:
Adding "repertoire" argument.
sql/item_timefunc.cc:
Initializing the result repertoire taking into account the "is_ascii"
flag of the current locale.
sql/sql_lex.cc:
Detect 7bit strings, return in Lex->text_string_is_7bit.
sql/sql_lex.h:
Adding new member into LEX structure.
Adding new member into Lex_input_stream
sql/sql_string.cc:
Allow simple copy from pure ASCII to a ASCII-based character set.
sql/sql_yacc.yy:
Depening on Lex->text_string_is_7bit and character set features,
create Item_string with MY_REPERTOIRE_ASCII when it is possible.
strings/conf_to_src.c:
- Adding printing of the "MY_CS_PUREASCII" flag
- Adding printing of copyright
strings/ctype-extra.c:
Recreating ctype-extra.c: ascii_general_ci and ascii_bin
are now marked with MY_CS_PUREASCII flag.
strings/ctype.c:
Adding new functions.
Diffstat (limited to 'mysys/charset.c')
-rw-r--r-- | mysys/charset.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mysys/charset.c b/mysys/charset.c index 9ea17c6515c..4c3f2d0ab71 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -277,6 +277,9 @@ static int add_collation(CHARSET_INFO *cs) if (sort_order && sort_order['A'] < sort_order['a'] && sort_order['a'] < sort_order['B']) all_charsets[cs->number]->state|= MY_CS_CSSORT; + + if (my_charset_is_8bit_pure_ascii(all_charsets[cs->number])) + all_charsets[cs->number]->state|= MY_CS_PUREASCII; } } else |