summaryrefslogtreecommitdiff
path: root/include/my_sys.h
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-06-23 18:29:56 -0700
committerunknown <jimw@mysql.com>2005-06-23 18:29:56 -0700
commit86d8abdb26e35a5920eea0e55fadd89295f05df6 (patch)
treeb5f6e8ddaa771fd03ce4b741cc2723ea99b358ca /include/my_sys.h
parentd34e2ccb3ea51811552f3e87ad68ee8673804da1 (diff)
downloadmariadb-git-86d8abdb26e35a5920eea0e55fadd89295f05df6.tar.gz
Make status of NO_BACKSLASH_ESCAPES mode known to the client so
it can use it to switch to only quoting apostrophes by doubling them when it is in effect. (Bug #10214) include/my_sys.h: Add new escape_quotes_for_mysql() function include/mysql_com.h: Add SERVER_STATUS_NO_BACKSLASH_ESCAPES libmysql/libmysql.c: Use SERVER_STATUS_NO_BACKSLASH_ESCAPES in server_status to determine how mysql_real_escape_string() should do quoting. mysys/charset.c: Add new escape_quotes_for_mysql() function that only quotes apostrophes by doubling them up. sql/set_var.cc: Set SERVER_STATUS_NO_BACKSLASH_ESCAPES when MODE_NO_BACKSLASH_ESCAPES changes. sql/sql_class.cc: Set SERVER_STATUS_NO_BACKSLASH_ESCAPES when necessary on thread creation. tests/mysql_client_test.c: Add new test for sending NO_BACKSLASH_ESCAPES as part of server_status.
Diffstat (limited to 'include/my_sys.h')
-rw-r--r--include/my_sys.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index ee4312be058..e7e90d6ed78 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -865,6 +865,9 @@ extern void add_compiled_collation(CHARSET_INFO *cs);
extern ulong escape_string_for_mysql(CHARSET_INFO *charset_info,
char *to, ulong to_length,
const char *from, ulong length);
+extern ulong escape_quotes_for_mysql(CHARSET_INFO *charset_info,
+ char *to, ulong to_length,
+ const char *from, ulong length);
extern void thd_increment_bytes_sent(ulong length);
extern void thd_increment_bytes_received(ulong length);