summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-10-05 12:42:39 +0200
committerunknown <msvensson@neptunus.(none)>2006-10-05 12:42:39 +0200
commitc69e8f009f859e883299d04353d0129e09628132 (patch)
tree62aa66159cde1e3aff752bb93aaf1def86ea37bd /client
parenta4b13f10f55b64e4b61d9ea19c950c98f33f6cfb (diff)
parentc3e8fb57a068cf192b273d94ff6ff0f267a08ce0 (diff)
downloadmariadb-git-c69e8f009f859e883299d04353d0129e09628132.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/same_tools/my41-same_tools
into neptunus.(none):/home/msvensson/mysql/same_tools/my50-same_tools client/mysqltest.c: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/mysqltest.result: Auto merged
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c44
1 files changed, 36 insertions, 8 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index f4fa95afeb1..87d8484dbf8 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -3578,17 +3578,15 @@ void scan_command_for_warnings(struct st_command *command)
/*
Check for unexpected "junk" after the end of query
- This is normally caused by missing delimiters
+ This is normally caused by missing delimiters or when
+ switching between different delimiters
*/
-void check_eol_junk(const char *eol)
+void check_eol_junk_line(const char *line)
{
- const char *p= eol;
- DBUG_ENTER("check_eol_junk");
- DBUG_PRINT("enter", ("eol: %s", eol));
- /* Remove all spacing chars except new line */
- while (*p && my_isspace(charset_info, *p) && (*p != '\n'))
- p++;
+ const char *p= line;
+ DBUG_ENTER("check_eol_junk_line");
+ DBUG_PRINT("enter", ("line: %s", line));
/* Check for extra delimiter */
if (*p && !strncmp(p, delimiter, delimiter_length))
@@ -3604,6 +3602,36 @@ void check_eol_junk(const char *eol)
DBUG_VOID_RETURN;
}
+void check_eol_junk(const char *eol)
+{
+ const char *p= eol;
+ DBUG_ENTER("check_eol_junk");
+ DBUG_PRINT("enter", ("eol: %s", eol));
+
+ /* Skip past all spacing chars and comments */
+ while (*p && (my_isspace(charset_info, *p) || *p == '#' || *p == '\n'))
+ {
+ /* Skip past comments started with # and ended with newline */
+ if (*p && *p == '#')
+ {
+ p++;
+ while (*p && *p != '\n')
+ p++;
+ }
+
+ /* Check this line */
+ if (*p && *p == '\n')
+ check_eol_junk_line(p);
+
+ if (*p)
+ p++;
+ }
+
+ check_eol_junk_line(p);
+
+ DBUG_VOID_RETURN;
+}
+
/*