diff options
author | tnurnberg@white.intern.koehntopp.de <> | 2007-12-17 09:45:36 +0100 |
---|---|---|
committer | tnurnberg@white.intern.koehntopp.de <> | 2007-12-17 09:45:36 +0100 |
commit | f7aa719268212bdbc7d48e55dd51cf47dc4e034a (patch) | |
tree | e4b2848c7525b508ab99249f5aa768c7b5061077 /sql/unireg.cc | |
parent | ca5f50788ed89d3155828984bef7e3898aba47e0 (diff) | |
parent | e131a412815767bb8590c3831fd2797c10112ab8 (diff) | |
download | mariadb-git-f7aa719268212bdbc7d48e55dd51cf47dc4e034a.tar.gz |
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into mysql.com:/misc/mysql/31752_/50-31752_
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r-- | sql/unireg.cc | 8 |
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)) |