From a29b1d7151497b4777e4b4917f0eee001705a928 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 17 Aug 2005 04:26:32 -0400 Subject: [PATCH] BUG#11338 (logging of prepared statement w/ blob type) In cp932, '\' character can be the second byte in a multi-byte character stream. This makes it difficult to use mysql_escape_string. Added flag to indicate which languages allow '\' as second byte of multibyte sequence so that when putting a prepared statement into the binlog we can decide at runtime whether hex encoding is really needed. include/m_ctype.h: Added bool to indicate character sets which allow '\' as the second byte of a multibyte character set (currently only cp932). For these character sets, escaping with '\' is dangerous and leads to corruption in replication. include/my_sys.h: Add function to enocde a string as hex with no prefix (bare) mysys/charset.c: Add function to encode string as hex with no prefix (bare). sql/item.cc: Check the connection character set to see if escape_string_for_mysql is safe, or if character set requires unambiguous (hex) encoding sql/item.h: Pass thd to query_val_str for access to charset() sql/sql_prepare.cc: Pass thd to query_val_str. strings/ctype-big5.c: Add escape_with_backslash_is_dangerous flag. strings/ctype-bin.c: Add escape_with_backslash_is_dangerous flag strings/ctype-cp932.c: Add escape_with_backslash_is_dangerous flag. strings/ctype-czech.c: Add escape_with_backslash_is_dangerous flag. strings/ctype-euc_kr.c: Add escape_with_backslash_is_dangerous flag. strings/ctype-extra.c: Add escape_with_backslash_is_dangerous flag. strings/ctype-gb2312.c: Add escape_with_backslash_is_dangerous flag. strings/ctype-gbk.c: Added escape_with_backslash_is_dangerous flag. strings/ctype-latin1.c: Added escape_with_backslash_is_dangerous flag. strings/ctype-sjis.c: Added escape_with_backslash_is_dangerous flag. strings/ctype-tis620.c: Added esacpe_with_backslash_character_is_dangerous flag. strings/ctype-uca.c: Added escape_with_backslash_is_dangerous flag. strings/ctype-ucs2.c: Added escape_with_backslash_is_dangerous. strings/ctype-ujis.c: Added escape_with_backslash_is_dangerous flag. strings/ctype-utf8.c: Added escape_with_backslash_is_dangerous. strings/ctype-win1250ch.c: Added escape_with_backslash_is_dangerous. --- include/m_ctype.h | 1 + include/my_sys.h | 1 + mysys/charset.c | 18 ++++++++++++++++++ sql/item.cc | 18 +++++++++++++----- sql/item.h | 2 +- sql/sql_prepare.cc | 4 ++-- strings/ctype-big5.c | 2 ++ strings/ctype-bin.c | 1 + strings/ctype-cp932.c | 2 ++ strings/ctype-czech.c | 1 + strings/ctype-euc_kr.c | 2 ++ strings/ctype-extra.c | 1 + strings/ctype-gb2312.c | 2 ++ strings/ctype-gbk.c | 2 ++ strings/ctype-latin1.c | 3 +++ strings/ctype-sjis.c | 2 ++ strings/ctype-tis620.c | 2 ++ strings/ctype-uca.c | 34 ++++++++++++++++++++++++++++++++++ strings/ctype-ucs2.c | 2 ++ strings/ctype-ujis.c | 2 ++ strings/ctype-utf8.c | 3 +++ strings/ctype-win1250ch.c | 1 + 22 files changed, 98 insertions(+), 8 deletions(-) diff --git a/include/m_ctype.h b/include/m_ctype.h index ab63a1e0db1..a5dc7cc00c6 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -220,6 +220,7 @@ typedef struct charset_info_st uint mbmaxlen; uint16 min_sort_char; uint16 max_sort_char; /* For LIKE optimization */ + my_bool escape_with_backslash_is_dangerous; MY_CHARSET_HANDLER *cset; MY_COLLATION_HANDLER *coll; diff --git a/include/my_sys.h b/include/my_sys.h index 8752aa30772..eafa41a05c8 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -788,6 +788,7 @@ extern my_bool init_compiled_charsets(myf flags); extern void add_compiled_collation(CHARSET_INFO *cs); extern ulong escape_string_for_mysql(CHARSET_INFO *charset_info, char *to, const char *from, ulong length); +extern char *bare_str_to_hex(char *to, const char *from, uint len); #ifdef __WIN__ #define BACKSLASH_MBTAIL /* File system character set */ diff --git a/mysys/charset.c b/mysys/charset.c index 3a39fce9437..df3f1cfa279 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -663,3 +663,21 @@ CHARSET_INFO *fs_character_set() return fs_cset_cache; } #endif + +/* + Transforms a string into hex form. + */ +char *bare_str_to_hex(char *to, const char *from, uint len) +{ + char *p= to; + uint i; + for (i= 0; i < len; i++, p+= 2) + { + /* val[i] is char. Casting to uchar helps greatly if val[i] < 0 */ + uint tmp= (uint) (uchar) from[i]; + p[0]= _dig_vec_upper[tmp >> 4]; + p[1]= _dig_vec_upper[tmp & 15]; + } + *p= 0; + return p; // pointer to end 0 of 'to' +} diff --git a/sql/item.cc b/sql/item.cc index b3d2932acf6..79579eeeb67 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1443,7 +1443,7 @@ String *Item_param::val_str(String* str) and avoid one more memcpy/alloc between str and log string. */ -const String *Item_param::query_val_str(String* str) const +const String *Item_param::query_val_str(String* str, THD *thd) const { switch (state) { case INT_VALUE: @@ -1482,10 +1482,18 @@ const String *Item_param::query_val_str(String* str) const buf= str->c_ptr_quick(); ptr= buf; - *ptr++= '\''; - ptr+= escape_string_for_mysql(str_value.charset(), ptr, - str_value.ptr(), str_value.length()); - *ptr++= '\''; + if (thd->charset()->escape_with_backslash_is_dangerous) + { + ptr= strmov(ptr, "x\'"); + ptr= bare_str_to_hex(ptr, str_value.ptr(), str_value.length()); + } + else + { + *ptr++= '\''; + ptr+= escape_string_for_mysql(str_value.charset(), ptr, + str_value.ptr(), str_value.length()); + } + *ptr++='\''; str->length(ptr - buf); break; } diff --git a/sql/item.h b/sql/item.h index 825b37fe64c..ee86fb80167 100644 --- a/sql/item.h +++ b/sql/item.h @@ -591,7 +591,7 @@ public: */ void (*set_param_func)(Item_param *param, uchar **pos, ulong len); - const String *query_val_str(String *str) const; + const String *query_val_str(String *str, THD *thd) const; bool convert_str_value(THD *thd); diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 6507de37a71..d0c06a3eaf7 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -601,7 +601,7 @@ static bool insert_params_withlog(Prepared_statement *stmt, uchar *null_array, param->set_param_func(param, &read_pos, data_end - read_pos); } } - res= param->query_val_str(&str); + res= param->query_val_str(&str, thd); if (param->convert_str_value(thd)) DBUG_RETURN(1); /* out of memory */ @@ -749,7 +749,7 @@ static bool emb_insert_params_withlog(Prepared_statement *stmt, String *query) client_param->buffer_length); } } - res= param->query_val_str(&str); + res= param->query_val_str(&str, thd); if (param->convert_str_value(thd)) DBUG_RETURN(1); /* out of memory */ diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index 73e3efd09a7..76a4e197405 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -6378,6 +6378,7 @@ CHARSET_INFO my_charset_big5_chinese_ci= 2, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_big5_handler, &my_collation_big5_chinese_ci_handler }; @@ -6406,6 +6407,7 @@ CHARSET_INFO my_charset_big5_bin= 2, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_big5_handler, &my_collation_mb_bin_handler }; diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index 425985e6bc1..1ac79ac9ca0 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -514,6 +514,7 @@ CHARSET_INFO my_charset_bin = 1, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_binary_handler }; diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c index be3526519cb..e476130b706 100644 --- a/strings/ctype-cp932.c +++ b/strings/ctype-cp932.c @@ -5520,6 +5520,7 @@ CHARSET_INFO my_charset_cp932_japanese_ci= 2, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 1, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_ci_handler }; @@ -5547,6 +5548,7 @@ CHARSET_INFO my_charset_cp932_bin= 2, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 1, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_mb_bin_handler }; diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c index 5725e81b15e..4bd2fbddbc4 100644 --- a/strings/ctype-czech.c +++ b/strings/ctype-czech.c @@ -612,6 +612,7 @@ CHARSET_INFO my_charset_latin2_czech_ci = 1, /* mbmaxlen */ 0, /* min_sort_char */ 0, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_8bit_handler, &my_collation_latin2_czech_ci_handler }; diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index ee792d9c3e4..f15e97de5be 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -8701,6 +8701,7 @@ CHARSET_INFO my_charset_euckr_korean_ci= 2, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_ci_handler }; @@ -8729,6 +8730,7 @@ CHARSET_INFO my_charset_euckr_bin= 2, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_mb_bin_handler }; diff --git a/strings/ctype-extra.c b/strings/ctype-extra.c index 3672dcd0b33..1c786c16ec5 100644 --- a/strings/ctype-extra.c +++ b/strings/ctype-extra.c @@ -40,6 +40,7 @@ CHARSET_INFO compiled_charsets[] = { 0, /* mbmaxlen */ 0, /* min_sort_ord */ 0, /* max_sort_ord */ + 0, /* escape_with_backslash_is_dangerous */ NULL, /* cset handler */ NULL /* coll handler */ } diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index f17cc94723f..0cbad2d1c55 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -5752,6 +5752,7 @@ CHARSET_INFO my_charset_gb2312_chinese_ci= 2, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_ci_handler }; @@ -5779,6 +5780,7 @@ CHARSET_INFO my_charset_gb2312_bin= 2, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_mb_bin_handler }; diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index 7196d004ad5..82c76b8ee96 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -10028,6 +10028,7 @@ CHARSET_INFO my_charset_gbk_chinese_ci= 2, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_ci_handler }; @@ -10055,6 +10056,7 @@ CHARSET_INFO my_charset_gbk_bin= 2, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_mb_bin_handler }; diff --git a/strings/ctype-latin1.c b/strings/ctype-latin1.c index 9b429fea95c..b6e3e300c34 100644 --- a/strings/ctype-latin1.c +++ b/strings/ctype-latin1.c @@ -438,6 +438,7 @@ CHARSET_INFO my_charset_latin1= 1, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_8bit_simple_ci_handler }; @@ -722,6 +723,7 @@ CHARSET_INFO my_charset_latin1_german2_ci= 1, /* mbmaxlen */ 0, /* min_sort_char */ 247, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_german2_ci_handler }; @@ -750,6 +752,7 @@ CHARSET_INFO my_charset_latin1_bin= 1, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_8bit_bin_handler }; diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index 900acefd4ea..4342fc670df 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -4676,6 +4676,7 @@ CHARSET_INFO my_charset_sjis_japanese_ci= 2, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_ci_handler }; @@ -4703,6 +4704,7 @@ CHARSET_INFO my_charset_sjis_bin= 2, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_mb_bin_handler }; diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index 6a6c55d214e..208168bb946 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -975,6 +975,7 @@ CHARSET_INFO my_charset_tis620_thai_ci= 1, /* mbmaxlen */ 0, /* min_sort_char */ 0, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_ci_handler }; @@ -1002,6 +1003,7 @@ CHARSET_INFO my_charset_tis620_bin= 1, /* mbmaxlen */ 0, /* min_sort_char */ 0, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_8bit_bin_handler }; diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c index 53c4fabaf08..010250521c7 100644 --- a/strings/ctype-uca.c +++ b/strings/ctype-uca.c @@ -8044,6 +8044,7 @@ CHARSET_INFO my_charset_ucs2_general_uca= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8071,6 +8072,7 @@ CHARSET_INFO my_charset_ucs2_icelandic_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8098,6 +8100,7 @@ CHARSET_INFO my_charset_ucs2_latvian_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8125,6 +8128,7 @@ CHARSET_INFO my_charset_ucs2_romanian_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8152,6 +8156,7 @@ CHARSET_INFO my_charset_ucs2_slovenian_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8179,6 +8184,7 @@ CHARSET_INFO my_charset_ucs2_polish_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8206,6 +8212,7 @@ CHARSET_INFO my_charset_ucs2_estonian_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8233,6 +8240,7 @@ CHARSET_INFO my_charset_ucs2_spanish_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8260,6 +8268,7 @@ CHARSET_INFO my_charset_ucs2_swedish_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8287,6 +8296,7 @@ CHARSET_INFO my_charset_ucs2_turkish_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8314,6 +8324,7 @@ CHARSET_INFO my_charset_ucs2_czech_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8342,6 +8353,7 @@ CHARSET_INFO my_charset_ucs2_danish_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8369,6 +8381,7 @@ CHARSET_INFO my_charset_ucs2_lithuanian_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8396,6 +8409,7 @@ CHARSET_INFO my_charset_ucs2_slovak_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8423,6 +8437,7 @@ CHARSET_INFO my_charset_ucs2_spanish2_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8451,6 +8466,7 @@ CHARSET_INFO my_charset_ucs2_roman_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8479,6 +8495,7 @@ CHARSET_INFO my_charset_ucs2_persian_uca_ci= 2, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_uca_handler }; @@ -8552,6 +8569,7 @@ CHARSET_INFO my_charset_utf8_general_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8580,6 +8598,7 @@ CHARSET_INFO my_charset_utf8_icelandic_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8607,6 +8626,7 @@ CHARSET_INFO my_charset_utf8_latvian_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8634,6 +8654,7 @@ CHARSET_INFO my_charset_utf8_romanian_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8661,6 +8682,7 @@ CHARSET_INFO my_charset_utf8_slovenian_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8688,6 +8710,7 @@ CHARSET_INFO my_charset_utf8_polish_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8715,6 +8738,7 @@ CHARSET_INFO my_charset_utf8_estonian_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8742,6 +8766,7 @@ CHARSET_INFO my_charset_utf8_spanish_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8769,6 +8794,7 @@ CHARSET_INFO my_charset_utf8_swedish_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8796,6 +8822,7 @@ CHARSET_INFO my_charset_utf8_turkish_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8823,6 +8850,7 @@ CHARSET_INFO my_charset_utf8_czech_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8851,6 +8879,7 @@ CHARSET_INFO my_charset_utf8_danish_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8878,6 +8907,7 @@ CHARSET_INFO my_charset_utf8_lithuanian_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8905,6 +8935,7 @@ CHARSET_INFO my_charset_utf8_slovak_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8932,6 +8963,7 @@ CHARSET_INFO my_charset_utf8_spanish2_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8959,6 +8991,7 @@ CHARSET_INFO my_charset_utf8_roman_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; @@ -8986,6 +9019,7 @@ CHARSET_INFO my_charset_utf8_persian_uca_ci= 3, /* mbmaxlen */ 9, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_any_uca_handler }; diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index 025fdd5a7f6..2761e781724 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -1583,6 +1583,7 @@ CHARSET_INFO my_charset_ucs2_general_ci= 2, /* mbmaxlen */ 0, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_general_ci_handler }; @@ -1610,6 +1611,7 @@ CHARSET_INFO my_charset_ucs2_bin= 2, /* mbmaxlen */ 0, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_ucs2_handler, &my_collation_ucs2_bin_handler }; diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c index f20e2756810..b3bba85968e 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -8571,6 +8571,7 @@ CHARSET_INFO my_charset_ujis_japanese_ci= 3, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_ci_handler }; @@ -8599,6 +8600,7 @@ CHARSET_INFO my_charset_ujis_bin= 3, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_handler, &my_collation_mb_bin_handler }; diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 0bf57967630..b3e78ce27e9 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -2345,6 +2345,7 @@ CHARSET_INFO my_charset_utf8_general_ci= 3, /* mbmaxlen */ 0, /* min_sort_char */ 0xFFFF, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_ci_handler }; @@ -2373,6 +2374,7 @@ CHARSET_INFO my_charset_utf8_bin= 3, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_mb_bin_handler }; @@ -2538,6 +2540,7 @@ CHARSET_INFO my_charset_utf8_general_cs= 3, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_utf8_handler, &my_collation_cs_handler }; diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c index 2a899dfd147..351af3de23e 100644 --- a/strings/ctype-win1250ch.c +++ b/strings/ctype-win1250ch.c @@ -647,6 +647,7 @@ CHARSET_INFO my_charset_cp1250_czech_ci = 1, /* mbmaxlen */ 0, /* min_sort_char */ 0, /* max_sort_char */ + 0, /* escape_with_backslash_is_dangerous */ &my_charset_8bit_handler, &my_collation_czech_ci_handler };