summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
authorunknown <kent@mysql.com>2005-05-26 01:38:29 +0200
committerunknown <kent@mysql.com>2005-05-26 01:38:29 +0200
commit5752ecea9585df2f85316ed04bd099b75147b2e1 (patch)
treeea6df6ee9b194aba99588c363c13c4692dd8135d /sql/unireg.cc
parent865b8917d68d806a30f1f420e23d5ed9549841e2 (diff)
parent55301a10b48b18982c4d569742416cd8fab7f7a6 (diff)
downloadmariadb-git-5752ecea9585df2f85316ed04bd099b75147b2e1.tar.gz
Merge mysql.com:/Users/kent/mysql/bk/mysql-5.0-build
into mysql.com:/Users/kent/mysql/bk/mysql-5.0 myisammrg/myrg_open.c: Auto merged mysys/my_getwd.c: Auto merged sql/unireg.cc: Auto merged
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc7
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);