diff options
author | Jimmy Yang <jimmy.yang@oracle.com> | 2011-01-14 23:24:47 -0800 |
---|---|---|
committer | Jimmy Yang <jimmy.yang@oracle.com> | 2011-01-14 23:24:47 -0800 |
commit | 5a0138e250b9feccf1e8e6335ea861892e5b37dd (patch) | |
tree | 16c4aeaa65f1fac8cca4d0ff4f0b3353e0a5b492 /storage/innobase/dict/dict0dict.c | |
parent | c233065038be3016fcd981181671d3789c19d6ae (diff) | |
parent | 9cd4d4984025857782e12e53d32cea5e4b7684e5 (diff) | |
download | mariadb-git-5a0138e250b9feccf1e8e6335ea861892e5b37dd.tar.gz |
Merge from mysql-5.1-innodb to mysql-5.5-innodb
Diffstat (limited to 'storage/innobase/dict/dict0dict.c')
-rw-r--r-- | storage/innobase/dict/dict0dict.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index ee862d8c709..f98d3dbc639 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -1689,6 +1689,12 @@ undo_size_ok: new_index->heap, (1 + dict_index_get_n_unique(new_index)) * sizeof(ib_int64_t)); + + new_index->stat_n_non_null_key_vals = mem_heap_zalloc( + new_index->heap, + (1 + dict_index_get_n_unique(new_index)) + * sizeof(*new_index->stat_n_non_null_key_vals)); + /* Give some sensible values to stat_n_... in case we do not calculate statistics quickly enough */ @@ -4319,6 +4325,10 @@ dict_update_statistics( for (i = dict_index_get_n_unique(index); i; ) { index->stat_n_diff_key_vals[i--] = 1; } + + memset(index->stat_n_non_null_key_vals, 0, + (1 + dict_index_get_n_unique(index)) + * sizeof(*index->stat_n_non_null_key_vals)); } index = dict_table_get_next_index(index); |