diff options
author | unknown <jpipes@shakedown.(none)> | 2006-11-27 14:58:57 -0500 |
---|---|---|
committer | unknown <jpipes@shakedown.(none)> | 2006-11-27 14:58:57 -0500 |
commit | 5a0b54fd13e413eee1fbe2fc9176330d2daeb6fa (patch) | |
tree | 8000ea4cede29d098cc2e485d08d1f337ec4fa9f /client | |
parent | f3c26f7d9c180fb2b220ee7a11a7419ada2a06bf (diff) | |
parent | 89220d074773ce768c044ba6042c9bebe7935acb (diff) | |
download | mariadb-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.cc | 27 |
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; |