summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2018-01-24 15:18:36 +0200
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2018-01-24 15:18:36 +0200
commitb20f821e0723c27d6ce121aafb2eb6c6d89bcd57 (patch)
treec04492f4535f7e3c84427f0b5ad5381cfdf1c4b6
parentd833bb65d53b9a4375fa71cc485b4719fdb0ee53 (diff)
downloadmariadb-git-b20f821e0723c27d6ce121aafb2eb6c6d89bcd57.tar.gz
Fix Innodb ASAN error on init
Backport 7c03edf2fe66855a8ce8f2575c3aaf66af975377 from xtradb to innodb
-rw-r--r--storage/innobase/buf/buf0dump.cc1
-rw-r--r--storage/innobase/dict/dict0mem.cc4
-rw-r--r--storage/innobase/handler/ha_innodb.cc2
3 files changed, 4 insertions, 3 deletions
diff --git a/storage/innobase/buf/buf0dump.cc b/storage/innobase/buf/buf0dump.cc
index 83f870692a9..b2b8733c8ce 100644
--- a/storage/innobase/buf/buf0dump.cc
+++ b/storage/innobase/buf/buf0dump.cc
@@ -604,6 +604,7 @@ buf_load()
if (dump_n == 0) {
ut_free(dump);
+ ut_free(dump_tmp);
ut_sprintf_timestamp(now);
buf_load_status(STATUS_NOTICE,
"Buffer pool(s) load completed at %s "
diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc
index 2a98fa13473..81a4cd9c6c6 100644
--- a/storage/innobase/dict/dict0mem.cc
+++ b/storage/innobase/dict/dict0mem.cc
@@ -319,8 +319,8 @@ dict_mem_table_col_rename_low(
ut_ad(from_len <= NAME_LEN);
ut_ad(to_len <= NAME_LEN);
- char from[NAME_LEN];
- strncpy(from, s, NAME_LEN);
+ char from[NAME_LEN + 1];
+ strncpy(from, s, NAME_LEN + 1);
if (from_len == to_len) {
/* The easy case: simply replace the column name in
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 59a8aedd266..ac43bd6eed3 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -2781,13 +2781,13 @@ innobase_convert_identifier(
ibool file_id)/*!< in: TRUE=id is a table or database name;
FALSE=id is an UTF-8 string */
{
+ char nz2[MAX_TABLE_NAME_LEN + 1];
const char* s = id;
int q;
if (file_id) {
char nz[MAX_TABLE_NAME_LEN + 1];
- char nz2[MAX_TABLE_NAME_LEN + 1];
/* Decode the table name. The MySQL function expects
a NUL-terminated string. The input and output strings