diff options
author | Marko Mäkelä <marko.makela@oracle.com> | 2011-06-28 15:28:21 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@oracle.com> | 2011-06-28 15:28:21 +0300 |
commit | 8c988dc61b92e0dffcf1158175acd7326b9df08a (patch) | |
tree | 95a9643e85d406c74cdc02ad9ddc8ec35e97a552 /storage/innobase/include/db0err.h | |
parent | cdecb9140427965562d0d59ccadd3b47dcc12f77 (diff) | |
download | mariadb-git-8c988dc61b92e0dffcf1158175acd7326b9df08a.tar.gz |
Bug#12699505 Memory leak in row_create_index_for_mysql()
DB_COL_APPEARS_TWICE_IN_INDEX: Remove. This condition is already
checked and reported by MySQL before passing the index definition to
the storage engine.
row_create_index_for_mysql(): Remove the redundant check for
DB_COL_APPEARS_TWICE_IN_INDEX. When enforcing the column prefix index
limit, invoke dict_mem_index_free(index) to plug the memory leak. In
the loop, use index->n_def instead of dict_index_get_n_fields(index),
because the latter would be 0 for indexes that have not been copied to
the data dictionary cache.
innodb-use-sys-malloc.test:
Add test cases for attempting to trigger the error checks in
row_create_index_for_mysql(). Before MySQL 5.5 and WL#5743, the leak
is only reproducible if ha_innobase::max_supported_key_part_length()
returned a higher limit than the one used in
row_create_index_for_mysql().
In MySQL 5.5 and later, the leak is reproducible with
innodb_large_prefix=true.
rb:688 approved by Jimmy Yang
Diffstat (limited to 'storage/innobase/include/db0err.h')
-rw-r--r-- | storage/innobase/include/db0err.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/storage/innobase/include/db0err.h b/storage/innobase/include/db0err.h index 74a2354bce3..28ef64500cc 100644 --- a/storage/innobase/include/db0err.h +++ b/storage/innobase/include/db0err.h @@ -64,8 +64,6 @@ enum db_err { DB_CANNOT_ADD_CONSTRAINT, /* adding a foreign key constraint to a table failed */ DB_CORRUPTION, /* data structure corruption noticed */ - DB_COL_APPEARS_TWICE_IN_INDEX, /* InnoDB cannot handle an index - where same column appears twice */ DB_CANNOT_DROP_CONSTRAINT, /* dropping a foreign key constraint from a table failed */ DB_NO_SAVEPOINT, /* no savepoint exists with the given |