summaryrefslogtreecommitdiff
path: root/sql/filesort.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-04-06 12:13:43 +0300
committerunknown <monty@mysql.com>2004-04-06 12:13:43 +0300
commit6a868cca91198c14999f26b5da8a137bb320d7ba (patch)
tree509557fea33580a9b087dce685c789de3664b19e /sql/filesort.cc
parent66de313563a74099d416767fec884ab590530d31 (diff)
downloadmariadb-git-6a868cca91198c14999f26b5da8a137bb320d7ba.tar.gz
Fixed warnings from valgrind (not a bug)
Don't add -debug to server version if MYSQL_SERVER_PREFIX is used Indentation cleanups myisam/mi_write.c: Indentation cleanup mysql-test/r/lowercase_table2.result: Fixed test results sql/filesort.cc: Fixed warnings from valgrind (not a bug) sql/ha_myisam.cc: Indentation cleanup sql/mysqld.cc: Don't add -debug to server if MYSQL_SERVER_PREFIX is used sql/sql_base.cc: Indentation cleanup sql/sql_show.cc: Fixed typo in comment sql/sql_table.cc: Indentation cleanup
Diffstat (limited to 'sql/filesort.cc')
-rw-r--r--sql/filesort.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc
index a15ffb43f6f..8699a517661 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -663,9 +663,22 @@ static void make_sortkey(register SORTPARAM *param,
for ( ; (field= addonf->field) ; addonf++)
{
if (addonf->null_bit && field->is_null())
+ {
nulls[addonf->null_offset]|= addonf->null_bit;
+#ifdef HAVE_purify
+ bzero(to, addonf->length);
+#endif
+ }
else
- field->pack((char *) to, field->ptr);
+ {
+ uchar *end= (uchar*) field->pack((char *) to, field->ptr);
+#ifdef HAVE_purify
+ uint length= (uint) ((to + addonf->length) - end);
+ DBUG_ASSERT((int) length >= 0);
+ if (length)
+ bzero(end, length);
+#endif
+ }
to+= addonf->length;
}
}