Below is the list of changes that have just been committed into a local
5.0 repository of kgeorge. When kgeorge does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-07-28 10:37:27+03:00, gkodinov@stripped +3 -0
Bug #20103: Escaping with backslash does not work
- don't forget to switch off string mode in mysql
client program even if the closing quote is after a backslash.
this will allow proper interpretation of statements like (e.g):
select '<anything>\';
client/mysql.cc@stripped, 2006-07-28 10:37:20+03:00, gkodinov@stripped +2 -0
Bug #20103: Escaping with backslash does not work
- don't forget to switch off string mode even if the
closing quote is after a backslash
mysql-test/r/mysql_client.result@stripped, 2006-07-28 10:37:21+03:00, gkodinov@stripped +2
-0
Bug #20103: Escaping with backslash does not work
- test case
mysql-test/t/mysql_client.test@stripped, 2006-07-28 10:37:21+03:00, gkodinov@stripped +7
-0
Bug #20103: Escaping with backslash does not work
- test case
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: gkodinov
# Host: macbook.gmz
# Root: /Users/kgeorge/mysql/work/B20103-5.0-opt
--- 1.209/client/mysql.cc 2006-07-28 10:37:45 +03:00
+++ 1.210/client/mysql.cc 2006-07-28 10:37:45 +03:00
@@ -1231,6 +1231,8 @@ static bool add_line(String &buffer,char
{ // Don't allow commands in string
*out++='\\';
*out++= (char) inchar;
+ if (inchar == *in_string)
+ *in_string= 0;
continue;
}
if ((com=find_command(NullS,(char) inchar)))
--- 1.1/mysql-test/r/mysql_client.result 2006-07-28 10:37:45 +03:00
+++ 1.2/mysql-test/r/mysql_client.result 2006-07-28 10:37:45 +03:00
@@ -2,3 +2,5 @@
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
+\
+\\
--- 1.1/mysql-test/t/mysql_client.test 2006-07-28 10:37:45 +03:00
+++ 1.2/mysql-test/t/mysql_client.test 2006-07-28 10:37:45 +03:00
@@ -27,3 +27,10 @@
# 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
| Thread |
|---|
| • bk commit into 5.0 tree (gkodinov:1.2222) BUG#20103 | kgeorge | 28 Jul |