summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <jpipes@shakedown.(none)>2006-11-27 14:58:57 -0500
committerunknown <jpipes@shakedown.(none)>2006-11-27 14:58:57 -0500
commit5a0b54fd13e413eee1fbe2fc9176330d2daeb6fa (patch)
tree8000ea4cede29d098cc2e485d08d1f337ec4fa9f /client
parentf3c26f7d9c180fb2b220ee7a11a7419ada2a06bf (diff)
parent89220d074773ce768c044ba6042c9bebe7935acb (diff)
downloadmariadb-git-5a0b54fd13e413eee1fbe2fc9176330d2daeb6fa.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into shakedown.(none):/home/jpipes/dev/mysql-5.0-maint BitKeeper/etc/ignore: auto-union client/mysql.cc: Auto merged mysql-test/r/func_misc.result: Auto merged sql/item_func.h: Auto merged mysql-test/r/mysql.result: Manual merge mysql-test/t/mysql.test: Manual merge
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc27
1 files changed, 24 insertions, 3 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index d0965588b80..8d04a1b13a8 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -819,10 +819,23 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
default_charset_used= 1;
break;
case OPT_DELIMITER:
- if (argument == disabled_my_option)
+ if (argument == disabled_my_option)
+ {
strmov(delimiter, DEFAULT_DELIMITER);
- else
- strmake(delimiter, argument, sizeof(delimiter) - 1);
+ }
+ else
+ {
+ /* Check that delimiter does not contain a backslash */
+ if (!strstr(argument, "\\"))
+ {
+ strmake(delimiter, argument, sizeof(delimiter) - 1);
+ }
+ else
+ {
+ put_info("DELIMITER cannot contain a backslash character", INFO_ERROR);
+ return 0;
+ }
+ }
delimiter_length= (uint)strlen(delimiter);
delimiter_str= delimiter;
break;
@@ -3041,6 +3054,14 @@ com_delimiter(String *buffer __attribute__((unused)), char *line)
INFO_ERROR);
return 0;
}
+ else
+ {
+ if (strstr(tmp, "\\"))
+ {
+ put_info("DELIMITER cannot contain a backslash character", INFO_ERROR);
+ return 0;
+ }
+ }
strmake(delimiter, tmp, sizeof(delimiter) - 1);
delimiter_length= (int)strlen(delimiter);
delimiter_str= delimiter;