diff options
author | unknown <jimw@mysql.com> | 2005-06-23 18:29:56 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-06-23 18:29:56 -0700 |
commit | 86d8abdb26e35a5920eea0e55fadd89295f05df6 (patch) | |
tree | b5f6e8ddaa771fd03ce4b741cc2723ea99b358ca /include/mysql_com.h | |
parent | d34e2ccb3ea51811552f3e87ad68ee8673804da1 (diff) | |
download | mariadb-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/mysql_com.h')
-rw-r--r-- | include/mysql_com.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mysql_com.h b/include/mysql_com.h index 2293476c76c..8da17d21b2d 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -148,6 +148,7 @@ enum enum_server_command */ #define SERVER_STATUS_LAST_ROW_SENT 128 #define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */ +#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512 #define MYSQL_ERRMSG_SIZE 512 #define NET_READ_TIMEOUT 30 /* Timeout on read */ |