diff options
author | kent@mysql.com <> | 2005-05-26 01:38:29 +0200 |
---|---|---|
committer | kent@mysql.com <> | 2005-05-26 01:38:29 +0200 |
commit | 3d4a49418938702b7697f86aa6c3d5cbd6b44bec (patch) | |
tree | ea6df6ee9b194aba99588c363c13c4692dd8135d /sql/unireg.cc | |
parent | 7daf98db15dc2e203171dd50a915cff8b8c0fac4 (diff) | |
parent | 5905598e164d75ade5acdccd4765fc6ef69ac746 (diff) | |
download | mariadb-git-3d4a49418938702b7697f86aa6c3d5cbd6b44bec.tar.gz |
Merge mysql.com:/Users/kent/mysql/bk/mysql-5.0-build
into mysql.com:/Users/kent/mysql/bk/mysql-5.0
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r-- | sql/unireg.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc index 123079291c2..eda17d8f4a9 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -759,8 +759,11 @@ static bool make_empty_rec(THD *thd, File file,enum db_type table_type, } DBUG_ASSERT(data_offset == ((null_count + 7) / 8)); - /* Fill not used startpos */ - if (null_count) + /* + We need to set the unused bits to 1. If the number of bits is a multiple + of 8 there are no unused bits. + */ + if (null_count & 7) *(null_pos + null_count / 8)|= ~(((uchar) 1 << (null_count & 7)) - 1); error=(int) my_write(file,(byte*) buff, (uint) reclength,MYF_RW); |