Is your feature request related to a problem? Please describe.
When sql_mode contains NO_BACKSLASH_ESCAPES, MySQL server does not allow the use of \ as an escape character. In this mode, we should not use \ to escape strings.
For example:
CREATE TABLE escape_test(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, value VARCHAR(50) NOT NULL);
INSERT INTO escape_test (`value`) VALUES ('my\ndata');
SELECT * FROM escape_test WHERE value = 'my
data'; -- 1 row
SELECT * FROM escape_test WHERE value = 'my\ndata'; -- 1 row
SET SESSION sql_mode = 'NO_BACKSLASH_ESCAPES';
SELECT * FROM escape_test WHERE value = 'my
data'; -- 1 row
SELECT * FROM escape_test WHERE value = 'my\ndata'; -- 0 row
Describe the solution you'd like
Make ServerStatuses.NO_BACKSLASH_ESCAPES available
If NO_BACKSLASH_ESCAPES is set, disable escape
For the innodb_lock_wait_timeout, use SHOW VARIABLES LIKE 'innodb\_lock\_wait\_timeout' instead of SHOW VARIABLES LIKE 'innodb\\_lock\\_wait\\_timeout'
Is your feature request related to a problem? Please describe.
When
sql_mode
containsNO_BACKSLASH_ESCAPES
, MySQL server does not allow the use of\
as an escape character. In this mode, we should not use\
to escape strings.For example:
Describe the solution you'd like
ServerStatuses.NO_BACKSLASH_ESCAPES
availableNO_BACKSLASH_ESCAPES
is set, disable escapeinnodb_lock_wait_timeout
, useSHOW VARIABLES LIKE 'innodb\_lock\_wait\_timeout'
instead ofSHOW VARIABLES LIKE 'innodb\\_lock\\_wait\\_timeout'