mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -282,6 +282,8 @@ void THD::init(void)
|
||||
#endif
|
||||
pthread_mutex_unlock(&LOCK_global_system_variables);
|
||||
server_status= SERVER_STATUS_AUTOCOMMIT;
|
||||
if (variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES)
|
||||
server_status|= SERVER_STATUS_NO_BACKSLASH_ESCAPES;
|
||||
options= thd_startup_options;
|
||||
open_options=ha_open_options;
|
||||
update_lock_default= (variables.low_priority_updates ?
|
||||
|
Reference in New Issue
Block a user