diff options
author | unknown <elliot@mysql.com> | 2005-08-17 04:26:32 -0400 |
---|---|---|
committer | unknown <elliot@mysql.com> | 2005-08-17 04:26:32 -0400 |
commit | a29b1d7151497b4777e4b4917f0eee001705a928 (patch) | |
tree | b76748cc6afbe1d56a804e77de0da089c9098565 /strings/ctype-latin1.c | |
parent | bf07693148f916b27e8a520965fdd556ad054806 (diff) | |
download | mariadb-git-a29b1d7151497b4777e4b4917f0eee001705a928.tar.gz |
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.
Diffstat (limited to 'strings/ctype-latin1.c')
-rw-r--r-- | strings/ctype-latin1.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 }; |