summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
authorunknown <tnurnberg@white.intern.koehntopp.de>2007-12-17 09:45:36 +0100
committerunknown <tnurnberg@white.intern.koehntopp.de>2007-12-17 09:45:36 +0100
commit607941de2e96bef5cc88e53c93d700aca0cff840 (patch)
treee4b2848c7525b508ab99249f5aa768c7b5061077 /sql/unireg.cc
parentfe28526ba14cfe5ea073c37eda4d351cf723ef69 (diff)
parent02cdb7eccab6fe262d4a9d430f9d23eb51ac4839 (diff)
downloadmariadb-git-607941de2e96bef5cc88e53c93d700aca0cff840.tar.gz
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into mysql.com:/misc/mysql/31752_/50-31752_ client/mysql.cc: Auto merged sql/log.cc: Auto merged sql/set_var.cc: Auto merged sql/sp.cc: Auto merged sql/unireg.cc: Auto merged
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc
index 9e6c77d7b62..b581ad4655a 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -165,6 +165,14 @@ bool mysql_create_frm(THD *thd, my_string file_name,
strmake((char*) forminfo+47, create_info->comment.str ?
create_info->comment.str : "", create_info->comment.length);
forminfo[46]=(uchar) create_info->comment.length;
+#ifdef EXTRA_DEBUG
+ /*
+ EXTRA_DEBUG causes strmake() to initialize its buffer behind the
+ payload with a magic value to detect wrong buffer-sizes. We
+ explicitly zero that segment again.
+ */
+ memset((char*) forminfo+47 + forminfo[46], 0, 61 - forminfo[46]);
+#endif
if (my_pwrite(file,(byte*) fileinfo,64,0L,MYF_RW) ||
my_pwrite(file,(byte*) keybuff,key_info_length,
(ulong) uint2korr(fileinfo+6),MYF_RW))