diff options
author | Bjorn Munch <bjorn.munch@oracle.com> | 2010-11-26 10:57:01 +0100 |
---|---|---|
committer | Bjorn Munch <bjorn.munch@oracle.com> | 2010-11-26 10:57:01 +0100 |
commit | 20851e401265e6203aed6a5d979e9ac89e93f5d5 (patch) | |
tree | 480b8b293100c58a415bdba7b0f48d490d086b89 /client | |
parent | 08c9f317eeaefd864186ec12ef82d9c57f516013 (diff) | |
download | mariadb-git-20851e401265e6203aed6a5d979e9ac89e93f5d5.tar.gz |
Bug #58412 mysqltest: allow quoting of strings in let and in if comparison
Stripping quotes in let was a bad idea, will not fix
Added code to strip quotes from rhs in comparisons
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 459abf8ffe1..dfd383cc714 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -5678,6 +5678,17 @@ void do_block(enum block_cmd cmd, struct st_command* command) while (my_isspace(charset_info, *curr_ptr)) curr_ptr++; + /* Strip off trailing white space */ + while (my_isspace(charset_info, expr_end[-1])) + expr_end--; + /* strip off ' or " around the string */ + if (*curr_ptr == '\'' || *curr_ptr == '"') + { + if (expr_end[-1] != *curr_ptr) + die("Unterminated string value"); + curr_ptr++; + expr_end--; + } VAR v2; var_init(&v2,0,0,0,0); eval_expr(&v2, curr_ptr, &expr_end); |