diff options
author | svoj@may.pils.ru <> | 2006-08-14 18:08:33 +0500 |
---|---|---|
committer | svoj@may.pils.ru <> | 2006-08-14 18:08:33 +0500 |
commit | 91e94d781fa8f7f09ef9771e18b2c0032a51f413 (patch) | |
tree | 1efaf1760a4ca01f8f126b48d7f935b972bba254 /myisam/sort.c | |
parent | 07a1ed651fb28946ace14bb8ee44b0107c09cf3c (diff) | |
parent | d4bdba176f0377c8bff29856e69e7847f0fd3074 (diff) | |
download | mariadb-git-91e94d781fa8f7f09ef9771e18b2c0032a51f413.tar.gz |
Merge may.pils.ru:/home/svoj/devel/mysql/BUG18874/mysql-4.1
into may.pils.ru:/home/svoj/devel/mysql/BUG18874/mysql-5.0
Diffstat (limited to 'myisam/sort.c')
-rw-r--r-- | myisam/sort.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/myisam/sort.c b/myisam/sort.c index c9562461f56..00fbfe768dc 100644 --- a/myisam/sort.c +++ b/myisam/sort.c @@ -483,13 +483,6 @@ int thr_write_keys(MI_SORT_PARAM *sort_param) if (!got_error) { mi_set_key_active(share->state.key_map, sinfo->key); - if (param->testflag & T_STATISTICS) - update_key_parts(sinfo->keyinfo, rec_per_key_part, sinfo->unique, - param->stats_method == MI_STATS_METHOD_IGNORE_NULLS? - sinfo->notnull: NULL, - (ulonglong) info->state->records); - - if (!sinfo->buffpek.elements) { if (param->testflag & T_VERBOSE) @@ -501,6 +494,11 @@ int thr_write_keys(MI_SORT_PARAM *sort_param) flush_ft_buf(sinfo) || flush_pending_blocks(sinfo)) got_error=1; } + if (!got_error && param->testflag & T_STATISTICS) + update_key_parts(sinfo->keyinfo, rec_per_key_part, sinfo->unique, + param->stats_method == MI_STATS_METHOD_IGNORE_NULLS? + sinfo->notnull: NULL, + (ulonglong) info->state->records); } my_free((gptr) sinfo->sort_keys,MYF(0)); my_free(mi_get_rec_buff_ptr(info, sinfo->rec_buff), |