summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-07-01 02:50:30 +0300
committerunknown <monty@hundin.mysql.fi>2002-07-01 02:50:30 +0300
commit05939f456bad9d245b3887fd280833b72beb8c14 (patch)
tree0dcb801bf2b4efb080067fbd898f7e2333e6f375
parent854814ad223962396a8c65a1be8a7c45c0b45256 (diff)
downloadmariadb-git-05939f456bad9d245b3887fd280833b72beb8c14.tar.gz
Removed purify warning
myisam/mi_check.c: Clear memory after keys to avoid warnings when using purify. (The keys will be written to file, so they are kind of used). mysql-test/r/myisam.result: Check repaired table mysql-test/t/myisam.test: Check repaired table
-rw-r--r--myisam/mi_check.c16
-rw-r--r--mysql-test/r/myisam.result3
-rw-r--r--mysql-test/t/myisam.test2
3 files changed, 17 insertions, 4 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index 3c1d090f53d..d72a38d336c 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -2495,6 +2495,10 @@ static int sort_key_read(MI_SORT_PARAM *sort_param, void *key)
(info->s->rec_reflength+
_mi_make_key(info, sort_param->key, (uchar*) key,
sort_param->record, sort_param->filepos));
+#ifdef HAVE_purify
+ bzero(key+sort_param->real_key_length,
+ (sort_param->key_length-sort_param->real_key_length));
+#endif
DBUG_RETURN(sort_write_record(sort_param));
} /* sort_key_read */
@@ -2528,8 +2532,14 @@ static int sort_ft_key_read(MI_SORT_PARAM *sort_param, void *key)
wptr=(FT_WORD*)(sort_param->wordptr);
}
- sort_param->real_key_length=info->s->rec_reflength+_ft_make_key(info,
- sort_param->key,key,wptr++,sort_param->filepos);
+ sort_param->real_key_length=(info->s->rec_reflength+
+ _ft_make_key(info, sort_param->key,
+ key, wptr++, sort_param->filepos));
+#ifdef HAVE_purify
+ if (sort_param->key_length > sort_param->real_key_length)
+ bzero(key+sort_param->real_key_length,
+ (sort_param->key_length-sort_param->real_key_length));
+#endif
if (!wptr->pos)
{
my_free((char*) sort_param->wordlist, MYF(0));
@@ -2538,10 +2548,10 @@ static int sort_ft_key_read(MI_SORT_PARAM *sort_param, void *key)
else
sort_param->wordptr=(void*)wptr;
-
DBUG_RETURN(error);
} /* sort_ft_key_read */
+
/* Read next record from file using parameters in sort_info */
/* Return -1 if end of file, 0 if ok and > 0 if error */
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index ac9665ad906..8750ea94125 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -96,4 +96,7 @@ INSERT INTO t1 (post_text) VALUES ('ceci est un test'),('ceci est un test'),('ce
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
drop table t1;
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 8a65ffcc72f..c607cb4d63e 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -91,5 +91,5 @@ CREATE TABLE `t1` (
INSERT INTO t1 (post_text) VALUES ('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test');
REPAIR TABLE t1;
+CHECK TABLE t1;
drop table t1;
-