summaryrefslogtreecommitdiff
path: root/storage/federated
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 /storage/federated
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 'storage/federated')
-rw-r--r--storage/federated/ha_federated.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index c0bf0acb523..55394e859c5 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -3243,7 +3243,7 @@ int ha_federated::stash_remote_error()
if (!mysql)
DBUG_RETURN(remote_error_number);
remote_error_number= mysql_errno(mysql);
- strmake(remote_error_buf, mysql_error(mysql), sizeof(remote_error_buf)-1);
+ strmake_buf(remote_error_buf, mysql_error(mysql));
if (remote_error_number == ER_DUP_ENTRY ||
remote_error_number == ER_DUP_KEY)
DBUG_RETURN(HA_ERR_FOUND_DUPP_KEY);