List:Commits« Previous MessageNext Message »
From:kgeorge Date:April 29 2008 4:08pm
Subject:bk commit into 5.1 tree (gkodinov:1.2572) BUG#36041
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of gkodinov.  When gkodinov 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, 2008-04-29 19:08:52+03:00, gkodinov@stripped +3 -0
  Bug #36041: mysql-test-run doesn't seem to string match 
    100% effectively on Windows
  
  The mysqltest docs state that the 'replace_result' command
  doesn't perform any escape processing.
  However the current implementation was processing backslash 
  escapes in the from/to strings.
  This prevents replacing e.g. patch on windows (where backslash
  is used as a path separator).
  Fixed by removing the backslash escape processing from 
  'replace_result'.

  client/mysqltest.c@stripped, 2008-04-29 19:08:49+03:00, gkodinov@stripped +1 -31
    Bug #36041: remove the escape processing from --replace_result

  mysql-test/r/mysqltest.result@stripped, 2008-04-29 19:08:50+03:00, gkodinov@stripped +3 -0
    Bug #36041: test case

  mysql-test/t/mysqltest.test@stripped, 2008-04-29 19:08:50+03:00, gkodinov@stripped +7 -0
    Bug #36041: test case

diff -Nrup a/client/mysqltest.c b/client/mysqltest.c
--- a/client/mysqltest.c	2008-03-30 14:12:23 +03:00
+++ b/client/mysqltest.c	2008-04-29 19:08:49 +03:00
@@ -8094,8 +8094,6 @@ uint replace_len(char * str)
   uint len=0;
   while (*str)
   {
-    if (str[0] == '\\' && str[1])
-      str++;
     str++;
     len++;
   }
@@ -8194,35 +8192,7 @@ REPLACE *init_replace(char * *from, char
     }
     for (pos=from[i], len=0; *pos ; pos++)
     {
-      if (*pos == '\\' && *(pos+1))
-      {
-	pos++;
-	switch (*pos) {
-	case 'b':
-	  follow_ptr->chr = SPACE_CHAR;
-	  break;
-	case '^':
-	  follow_ptr->chr = START_OF_LINE;
-	  break;
-	case '$':
-	  follow_ptr->chr = END_OF_LINE;
-	  break;
-	case 'r':
-	  follow_ptr->chr = '\r';
-	  break;
-	case 't':
-	  follow_ptr->chr = '\t';
-	  break;
-	case 'v':
-	  follow_ptr->chr = '\v';
-	  break;
-	default:
-	  follow_ptr->chr = (uchar) *pos;
-	  break;
-	}
-      }
-      else
-	follow_ptr->chr= (uchar) *pos;
+      follow_ptr->chr= (uchar) *pos;
       follow_ptr->table_offset=i;
       follow_ptr->len= ++len;
       follow_ptr++;
diff -Nrup a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result
--- a/mysql-test/r/mysqltest.result	2008-02-28 16:06:56 +02:00
+++ b/mysql-test/r/mysqltest.result	2008-04-29 19:08:50 +03:00
@@ -725,4 +725,7 @@ drop table t1;
 mysqltest: At line 1: change user failed: Unknown database 'inexistent'
 mysqltest: At line 1: change user failed: Access denied for user 'inexistent'@'localhost' (using password: NO)
 mysqltest: At line 1: change user failed: Access denied for user 'root'@'localhost' (using password: YES)
+SELECT 'c:\\a.txt' AS col;
+col
+z
 End of tests
diff -Nrup a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
--- a/mysql-test/t/mysqltest.test	2007-11-01 17:47:55 +02:00
+++ b/mysql-test/t/mysqltest.test	2008-04-29 19:08:50 +03:00
@@ -2123,6 +2123,13 @@ rmdir $MYSQLTEST_VARDIR/tmp/testdir;
 remove_file $MYSQLTEST_VARDIR/tmp/testdir/file1.txt;
 rmdir $MYSQLTEST_VARDIR/tmp/testdir;
 
+#
+# Bug #36041: mysql-test-run doesn't seem to string match 100% effectively
+# on Windows
+#
+
+--replace_result c:\\a.txt z
+SELECT 'c:\\a.txt' AS col;
 
 --echo End of tests
 
Thread
bk commit into 5.1 tree (gkodinov:1.2572) BUG#36041kgeorge29 Apr