summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-17 19:42:34 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-17 19:42:34 +0200
commit07315d36030bd1cbe6acfeb3e8f60c49ba876a10 (patch)
tree9c74de4bb97507ece945576df7073a7a28f07674 /client/mysqltest.cc
parent4656060f118caba30912cca2557d72fcea307283 (diff)
downloadmariadb-git-07315d36030bd1cbe6acfeb3e8f60c49ba876a10.tar.gz
strmake_buf(X,Y) helper, equivalent to strmake(X,Y,sizeof(X)-1)
with a bit of lame protection against abuse.
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r--client/mysqltest.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 8c6c1cb3408..2dde607a016 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -6335,8 +6335,7 @@ void do_delimiter(struct st_command* command)
if (!(*p))
die("Can't set empty delimiter");
- strmake(delimiter, p, sizeof(delimiter) - 1);
- delimiter_length= strlen(delimiter);
+ delimiter_length= strmake_buf(delimiter, p) - delimiter;
DBUG_PRINT("exit", ("delimiter: %s", delimiter));
command->last_argument= p + delimiter_length;