Loading client/mysql.cc +2 −1 Original line number Diff line number Diff line Loading @@ -1221,7 +1221,8 @@ static bool add_line(String &buffer,char *line,char *in_string, continue; } #endif if (!*ml_comment && inchar == '\\') if (!*ml_comment && inchar == '\\' && !(mysql.server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES)) { // Found possbile one character command like \c Loading mysql-test/r/mysql_client.result +4 −0 Original line number Diff line number Diff line Loading @@ -2,3 +2,7 @@ 1 ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR at line 1: USE must be followed by a database name \ \\ '; '; mysql-test/t/mysql_client.test +11 −0 Original line number Diff line number Diff line Loading @@ -27,3 +27,14 @@ # client comment recognized, but parameter missing => error --exec echo "use" > $MYSQLTEST_VARDIR/tmp/bug20432.sql --exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1 # # Bug #20103: Escaping with backslash does not work # --exec echo "SET SQL_MODE = 'NO_BACKSLASH_ESCAPES';" > $MYSQLTEST_VARDIR/tmp/bug20103.sql --exec echo "SELECT '\';" >> $MYSQLTEST_VARDIR/tmp/bug20103.sql --exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20103.sql 2>&1 --exec echo "SET SQL_MODE = '';" > $MYSQLTEST_VARDIR/tmp/bug20103.sql --exec echo "SELECT '\';';" >> $MYSQLTEST_VARDIR/tmp/bug20103.sql --exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20103.sql 2>&1 Loading
client/mysql.cc +2 −1 Original line number Diff line number Diff line Loading @@ -1221,7 +1221,8 @@ static bool add_line(String &buffer,char *line,char *in_string, continue; } #endif if (!*ml_comment && inchar == '\\') if (!*ml_comment && inchar == '\\' && !(mysql.server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES)) { // Found possbile one character command like \c Loading
mysql-test/r/mysql_client.result +4 −0 Original line number Diff line number Diff line Loading @@ -2,3 +2,7 @@ 1 ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR at line 1: USE must be followed by a database name \ \\ '; ';
mysql-test/t/mysql_client.test +11 −0 Original line number Diff line number Diff line Loading @@ -27,3 +27,14 @@ # client comment recognized, but parameter missing => error --exec echo "use" > $MYSQLTEST_VARDIR/tmp/bug20432.sql --exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1 # # Bug #20103: Escaping with backslash does not work # --exec echo "SET SQL_MODE = 'NO_BACKSLASH_ESCAPES';" > $MYSQLTEST_VARDIR/tmp/bug20103.sql --exec echo "SELECT '\';" >> $MYSQLTEST_VARDIR/tmp/bug20103.sql --exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20103.sql 2>&1 --exec echo "SET SQL_MODE = '';" > $MYSQLTEST_VARDIR/tmp/bug20103.sql --exec echo "SELECT '\';';" >> $MYSQLTEST_VARDIR/tmp/bug20103.sql --exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20103.sql 2>&1