summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <brian@zim.(none)>2006-08-14 09:45:41 -0700
committerunknown <brian@zim.(none)>2006-08-14 09:45:41 -0700
commit61d5563ba413c18b2674e97016093c082b9918d0 (patch)
tree529a4de4c79b61d082700c7ca2a594f5755d4eb1
parentba8be73946c35852cf296c2d30bbf2a0fe06f87f (diff)
parent492e7b081168f1922ef6409ebba77dbf30638185 (diff)
downloadmariadb-git-61d5563ba413c18b2674e97016093c082b9918d0.tar.gz
Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into zim.(none):/home/brian/mysql/dep-5.0
-rw-r--r--myisam/sort.c12
-rw-r--r--mysql-test/r/mysqldump.result4
-rw-r--r--mysql-test/r/repair.result11
-rw-r--r--mysql-test/t/mysqldump.test4
-rw-r--r--mysql-test/t/repair.test11
5 files changed, 31 insertions, 11 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),
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index 4c684be0a3c..6669b33e1bb 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -2876,7 +2876,7 @@ drop view v1;
drop table t1;
drop database mysqldump_dbb;
use test;
-create user mysqltest_1;
+create user mysqltest_1@localhost;
create table t1(a int, b varchar(34));
reset master;
mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need the RELOAD privilege for this operation (1227)
@@ -2891,4 +2891,4 @@ CREATE TABLE `t1` (
`b` varchar(34) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
drop table t1;
-drop user mysqltest_1;
+drop user mysqltest_1@localhost;
diff --git a/mysql-test/r/repair.result b/mysql-test/r/repair.result
index d8fa4dbbb72..9b07281aa7b 100644
--- a/mysql-test/r/repair.result
+++ b/mysql-test/r/repair.result
@@ -41,3 +41,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/mysqldump.test b/mysql-test/t/mysqldump.test
index 4cdfabd4484..848c5360db7 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -1273,7 +1273,7 @@ drop database mysqldump_dbb;
use test;
# Create user without sufficient privs to perform the requested operation
-create user mysqltest_1;
+create user mysqltest_1@localhost;
create table t1(a int, b varchar(34));
# To get consistent output, reset the master, starts over from first log
@@ -1308,4 +1308,4 @@ grant REPLICATION CLIENT on *.* to mysqltest_1@localhost;
# Clean up
drop table t1;
-drop user mysqltest_1;
+drop user mysqltest_1@localhost;
diff --git a/mysql-test/t/repair.test b/mysql-test/t/repair.test
index 16e1d76d460..91a7442226a 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