diff options
author | Bjorn Munch <bjorn.munch@oracle.com> | 2010-12-09 15:32:39 +0100 |
---|---|---|
committer | Bjorn Munch <bjorn.munch@oracle.com> | 2010-12-09 15:32:39 +0100 |
commit | f072749e06dafd907d1322c63dd93b96de8f06c6 (patch) | |
tree | 2de08a40c135b7c5bdf3a5cfa97ee88b06fe643b /client | |
parent | 899a49bcc2efd1598c49c507d548faf048690718 (diff) | |
parent | bff782d0f0c8a71b826932cb1eec956184c96312 (diff) | |
download | mariadb-git-f072749e06dafd907d1322c63dd93b96de8f06c6.tar.gz |
upmerge 58511,58522,58608,58092
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.cc | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 9806d9bed0f..6a1b2255b0d 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -1169,8 +1169,8 @@ void handle_command_error(struct st_command *command, uint error) int i; if (command->abort_on_error) - die("command \"%.*s\" failed with error %d", - command->first_word_len, command->query, error); + die("command \"%.*s\" failed with error %d. my_errno=%d", + command->first_word_len, command->query, error, my_errno); i= match_expected_error(command, error, NULL); @@ -1181,8 +1181,8 @@ void handle_command_error(struct st_command *command, uint error) DBUG_VOID_RETURN; } if (command->expected_errors.count > 0) - die("command \"%.*s\" failed with wrong error: %d", - command->first_word_len, command->query, error); + die("command \"%.*s\" failed with wrong error: %d. my_errno=%d", + command->first_word_len, command->query, error, my_errno); } else if (command->expected_errors.err[0].type == ERR_ERRNO && command->expected_errors.err[0].code.errnum != 0) @@ -2077,7 +2077,7 @@ VAR *var_init(VAR *v, const char *name, int name_len, const char *val, val_len= 0; val_alloc_len = val_len + 16; /* room to grow */ if (!(tmp_var=v) && !(tmp_var = (VAR*)my_malloc(sizeof(*tmp_var) - + name_len+1, MYF(MY_WME)))) + + name_len+2, MYF(MY_WME)))) die("Out of memory"); if (name != NULL) @@ -7934,6 +7934,16 @@ void init_re(void) int match_re(my_regex_t *re, char *str) { + while (my_isspace(charset_info, *str)) + str++; + if (str[0] == '/' && str[1] == '*') + { + char *comm_end= strstr (str, "*/"); + if (! comm_end) + die("Statement is unterminated comment"); + str= comm_end + 2; + } + int err= my_regexec(re, str, (size_t)0, NULL, 0); if (err == 0) |