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/ut | |
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/ut')
-rw-r--r-- | storage/innobase/ut/ut0ut.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/storage/innobase/ut/ut0ut.c b/storage/innobase/ut/ut0ut.c index a9c0d381e16..1ef1a082bb2 100644 --- a/storage/innobase/ut/ut0ut.c +++ b/storage/innobase/ut/ut0ut.c @@ -674,8 +674,6 @@ ut_strerr( return("Cannot add constraint"); case DB_CORRUPTION: return("Data structure corruption"); - case DB_COL_APPEARS_TWICE_IN_INDEX: - return("Column appears twice in index"); case DB_CANNOT_DROP_CONSTRAINT: return("Cannot drop constraint"); case DB_NO_SAVEPOINT: |