diff options
author | svoj@april.(none) <> | 2006-08-14 18:13:50 +0500 |
---|---|---|
committer | svoj@april.(none) <> | 2006-08-14 18:13:50 +0500 |
commit | a55d18e7464fbd0a20de97a8a95b3f2376dc0ef6 (patch) | |
tree | b954031168a97d1d02d719338a2244679e2a4c0e | |
parent | dc4b2a4f1dc6ea2533e75f3eb8397c5c1ad9fbf8 (diff) | |
parent | d4bdba176f0377c8bff29856e69e7847f0fd3074 (diff) | |
download | mariadb-git-a55d18e7464fbd0a20de97a8a95b3f2376dc0ef6.tar.gz |
Merge april.(none):/home/svoj/devel/bk/mysql-4.1
into april.(none):/home/svoj/devel/mysql/BUG18874/mysql-4.1
-rw-r--r-- | myisam/sort.c | 12 | ||||
-rw-r--r-- | mysql-test/r/repair.result | 11 | ||||
-rw-r--r-- | mysql-test/t/repair.test | 11 |
3 files changed, 27 insertions, 7 deletions
diff --git a/myisam/sort.c b/myisam/sort.c index 96b55d599c8..1a3dc147cd9 100644 --- a/myisam/sort.c +++ b/myisam/sort.c @@ -480,13 +480,6 @@ int thr_write_keys(MI_SORT_PARAM *sort_param) if (!got_error) { share->state.key_map|=(ulonglong) 1 << 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) @@ -498,6 +491,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), diff --git a/mysql-test/r/repair.result b/mysql-test/r/repair.result index dbca5c39a6c..e0849452399 100644 --- a/mysql-test/r/repair.result +++ b/mysql-test/r/repair.result @@ -37,3 +37,14 @@ Table Op Msg_type Msg_text test.t1 repair warning Number of rows changed from 0 to 1 test.t1 repair status OK drop table t1; +CREATE TABLE t1(a INT, KEY(a)); +INSERT INTO t1 VALUES(1),(2),(3),(4),(5); +SET myisam_repair_threads=2; +REPAIR TABLE t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +SHOW INDEX FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a A 5 NULL NULL YES BTREE +SET myisam_repair_threads=@@global.myisam_repair_threads; +DROP TABLE t1; diff --git a/mysql-test/t/repair.test b/mysql-test/t/repair.test index 5e39e0b6a50..f086d5b0c2a 100644 --- a/mysql-test/t/repair.test +++ b/mysql-test/t/repair.test @@ -34,4 +34,15 @@ repair table t1; repair table t1 use_frm; drop table t1; +# +# BUG#18874 - Setting myisam_repair_threads > 1, index cardinality always 1 +# +CREATE TABLE t1(a INT, KEY(a)); +INSERT INTO t1 VALUES(1),(2),(3),(4),(5); +SET myisam_repair_threads=2; +REPAIR TABLE t1; +SHOW INDEX FROM t1; +SET myisam_repair_threads=@@global.myisam_repair_threads; +DROP TABLE t1; + # End of 4.1 tests |