summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorunknown <bar@mysql.com/bar.myoffice.izhnet.ru>2008-02-29 17:56:50 +0400
committerunknown <bar@mysql.com/bar.myoffice.izhnet.ru>2008-02-29 17:56:50 +0400
commit1ed34fed3390e10ff67981c4470f46c6ce1e2a6e (patch)
tree383fd33306f77670825adcb8b08abae9dff732cc /sql/field.h
parent2583c281b67ae8cf470266c7438a5852a1bd2265 (diff)
downloadmariadb-git-1ed34fed3390e10ff67981c4470f46c6ce1e2a6e.tar.gz
Bug#23924 general_log truncates queries with character set introducers.
Problem: logging of utf8-incompatible binary strings didn't work Fix: hex-encoding of incompatible sequences. mysql-test/r/log_tables.result: Adding test mysql-test/t/log_tables.test: Adding test sql/field.cc: Copying with hex escaping sql/field.h: New field flag sql/log.cc: Marking the column "general_log.argument" as hex-escaping field. sql/sql_string.cc: New function to copy strings with hex-encoding of incompatible characters. sql/sql_string.h: Prototype for the new function
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h
index 38a0b1d5bbd..2e8a27e579a 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -2069,6 +2069,7 @@ int set_field_to_null_with_conversions(Field *field, bool no_conversions);
#define FIELDFLAG_NO_DEFAULT 16384 /* sql */
#define FIELDFLAG_SUM ((uint) 32768)// predit: +#fieldflag
#define FIELDFLAG_MAYBE_NULL ((uint) 32768)// sql
+#define FIELDFLAG_HEX_ESCAPE ((uint) 0x10000)
#define FIELDFLAG_PACK_SHIFT 3
#define FIELDFLAG_DEC_SHIFT 8
#define FIELDFLAG_MAX_DEC 31
@@ -2094,3 +2095,4 @@ int set_field_to_null_with_conversions(Field *field, bool no_conversions);
#define f_maybe_null(x) (x & FIELDFLAG_MAYBE_NULL)
#define f_no_default(x) (x & FIELDFLAG_NO_DEFAULT)
#define f_bit_as_char(x) ((x) & FIELDFLAG_TREAT_BIT_AS_CHAR)
+#define f_is_hex_escape(x) ((x) & FIELDFLAG_HEX_ESCAPE)