diff options
author | unknown <gkodinov/kgeorge@magare.gmz> | 2008-04-29 19:08:52 +0300 |
---|---|---|
committer | unknown <gkodinov/kgeorge@magare.gmz> | 2008-04-29 19:08:52 +0300 |
commit | 6e6d60732b3091e243b98fe79025c3c1dba70db7 (patch) | |
tree | a91d6d1af7bea5da984a116ca939eaf7faa0d902 /client/mysqltest.c | |
parent | 2ea403e19cee4ca7694fa9e882d017366abd2f13 (diff) | |
download | mariadb-git-6e6d60732b3091e243b98fe79025c3c1dba70db7.tar.gz |
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:
Bug #36041: remove the escape processing from --replace_result
mysql-test/r/mysqltest.result:
Bug #36041: test case
mysql-test/t/mysqltest.test:
Bug #36041: test case
Diffstat (limited to 'client/mysqltest.c')
-rw-r--r-- | client/mysqltest.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index c678f5e714d..3f24d23a13f 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -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 * *to,uint count, } 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++; |