diff options
author | unknown <heikki@hundin.mysql.fi> | 2004-01-29 14:41:49 +0200 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2004-01-29 14:41:49 +0200 |
commit | 9fa2dc4a2284bd4959c5a45ae6477c014f92916d (patch) | |
tree | 867a3832a42c3ffc108a42276979f0ccedab1d95 | |
parent | 5bbb51788ddaafd11424c1e6be0cd31bad433beb (diff) | |
download | mariadb-git-9fa2dc4a2284bd4959c5a45ae6477c014f92916d.tar.gz |
btr0cur.c:
Fix bug: InnoDB row count and index cardinality estimates wrapped over at 512 million in 32-bit computers
innobase/btr/btr0cur.c:
Fix bug: InnoDB row count and index cardinality estimates wrapped over at 512 million in 32-bit computers
-rw-r--r-- | innobase/btr/btr0cur.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/innobase/btr/btr0cur.c b/innobase/btr/btr0cur.c index bfb4d042850..d506c5a91a7 100644 --- a/innobase/btr/btr0cur.c +++ b/innobase/btr/btr0cur.c @@ -2638,7 +2638,7 @@ btr_estimate_number_of_different_key_vals( ulint n_cols; ulint matched_fields; ulint matched_bytes; - ulint* n_diff; + ib_longlong* n_diff; ulint not_empty_flag = 0; ulint total_external_size = 0; ulint i; @@ -2710,7 +2710,8 @@ btr_estimate_number_of_different_key_vals( for (j = 0; j <= n_cols; j++) { index->stat_n_diff_key_vals[j] = - (n_diff[j] * index->stat_n_leaf_pages + (n_diff[j] + * (ib_longlong)index->stat_n_leaf_pages + BTR_KEY_VAL_ESTIMATE_N_PAGES - 1 + total_external_size + not_empty_flag) |