diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-23 14:52:59 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-23 14:52:59 +0200 |
commit | 0aa02567dd62d96467f84ba96cc67b103f63c9e0 (patch) | |
tree | 6c379b5f7d84fdb8e724907448a4f015d89881f6 /sql/sql_insert.cc | |
parent | 04741dc736e803b0a91c76d19de464e25b4a1977 (diff) | |
parent | fa1aef39ebc7d84d24d4e3d2124f982526632ee9 (diff) | |
download | mariadb-git-0aa02567dd62d96467f84ba96cc67b103f63c9e0.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 01e5752def7..8c0e5f0c0ee 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2701,7 +2701,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)); @@ -2735,7 +2735,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) { @@ -2744,11 +2744,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); @@ -2768,7 +2768,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; |