summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtienne Guesnet <etienne.guesnet.external@atos.net>2020-12-16 08:44:58 +1100
committerDaniel Black <daniel@mariadb.org>2020-12-16 08:46:58 +1100
commit8de323f81acd830035a11058d5b76127d71616a4 (patch)
tree32a7f7d1e27175af0ee9e142c0375cb1bce0eaa3
parent71806bf37c45d5490d8382cba6a5cca6879fa0db (diff)
downloadmariadb-git-bb-10.3-danielblack-MDEV-24099-aix-ip_len-conflict.tar.gz
MDEV-24099: sql/sql_insert ip_len issue on AIXbb-10.3-danielblack-MDEV-24099-aix-ip_len-conflict
ip_len has a different meaning on AIX so we use a different variable name here not to conflict. Backport from MDEV-20178 2f5d372444cff53914cfcd118e92a91f575cec35
-rw-r--r--sql/sql_insert.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index b203fffaa72..8115b3c6397 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -2690,7 +2690,7 @@ int write_delayed(THD *thd, TABLE *table, enum_duplicates duplic,
delayed_row *row= 0;
Delayed_insert *di=thd->di;
const Discrete_interval *forced_auto_inc;
- size_t user_len, host_len, ip_len;
+ size_t user_len, host_len, ip_length;
DBUG_ENTER("write_delayed");
DBUG_PRINT("enter", ("query = '%s' length %lu", query.str,
(ulong) query.length));
@@ -2724,7 +2724,7 @@ int write_delayed(THD *thd, TABLE *table, enum_duplicates duplic,
goto err;
}
- user_len= host_len= ip_len= 0;
+ user_len= host_len= ip_length= 0;
row->user= row->host= row->ip= NULL;
if (thd->security_ctx)
{
@@ -2733,11 +2733,11 @@ int write_delayed(THD *thd, TABLE *table, enum_duplicates duplic,
if (thd->security_ctx->host)
host_len= strlen(thd->security_ctx->host) + 1;
if (thd->security_ctx->ip)
- ip_len= strlen(thd->security_ctx->ip) + 1;
+ ip_length= strlen(thd->security_ctx->ip) + 1;
}
/* This can't be THREAD_SPECIFIC as it's freed in delayed thread */
if (!(row->record= (char*) my_malloc(table->s->reclength +
- user_len + host_len + ip_len,
+ user_len + host_len + ip_length,
MYF(MY_WME))))
goto err;
memcpy(row->record, table->record[0], table->s->reclength);
@@ -2757,7 +2757,7 @@ int write_delayed(THD *thd, TABLE *table, enum_duplicates duplic,
if (thd->security_ctx->ip)
{
row->ip= row->record + table->s->reclength + user_len + host_len;
- memcpy(row->ip, thd->security_ctx->ip, ip_len);
+ memcpy(row->ip, thd->security_ctx->ip, ip_length);
}
}
row->query_id= thd->query_id;