List:Commits« Previous MessageNext Message »
From:kgeorge Date:August 1 2006 8:06am
Subject:bk commit into 5.0 tree (gkodinov:1.2222) BUG#20103
View as plain text  
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-08-01 11:05:54+03:00, gkodinov@stripped +3 -0
  Bug #20103: Escaping with backslash does not work
   - make the client to respect the server-side 
     no_backslash_escapes option and disable the 
     special meaning of backslash also at client side.

  client/mysql.cc@stripped, 2006-08-01 11:05:47+03:00, gkodinov@stripped +2 -1
    Bug #20103: Escaping with backslash does not work
     - make the client to respect the server-side 
       no_backslash_escapes option and disable the 
       special meaning of backslash also at client side.

  mysql-test/r/mysql_client.result@stripped, 2006-08-01 11:05:48+03:00, gkodinov@stripped +4 -0
    Bug #20103: Escaping with backslash does not work
     - test case

  mysql-test/t/mysql_client.test@stripped, 2006-08-01 11:05:48+03:00, gkodinov@stripped +11 -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-08-01 11:06:09 +03:00
+++ 1.210/client/mysql.cc	2006-08-01 11:06:09 +03:00
@@ -1221,7 +1221,8 @@ static bool add_line(String &buffer,char
       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
 

--- 1.1/mysql-test/r/mysql_client.result	2006-08-01 11:06:09 +03:00
+++ 1.2/mysql-test/r/mysql_client.result	2006-08-01 11:06:09 +03:00
@@ -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
+\
+\\
+';
+';

--- 1.1/mysql-test/t/mysql_client.test	2006-08-01 11:06:09 +03:00
+++ 1.2/mysql-test/t/mysql_client.test	2006-08-01 11:06:09 +03:00
@@ -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
Thread
bk commit into 5.0 tree (gkodinov:1.2222) BUG#20103kgeorge1 Aug