diff options
author | unknown <monty@mysql.com> | 2005-05-13 11:11:50 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-05-13 11:11:50 +0300 |
commit | d19e05851bcbdd8fec78e5e219e088c1dfa95fc7 (patch) | |
tree | 73232c559401b8ffbb872eefe21ed050519ec0c5 /sql/handler.h | |
parent | 95ab9ed38389a8ad9803fde36ed306df13e8f0db (diff) | |
download | mariadb-git-d19e05851bcbdd8fec78e5e219e088c1dfa95fc7.tar.gz |
Change create_field->offset to store offset from start of fields, independent of null bits.
Count null_bits separately from field offsets and adjust them in case of primary key parts.
(Previously a CREATE TABLE with a lot of null fields that was part of a primary key caused MySQL to wrongly count the number of bytes needed to store null bits)
This is a more complete bug fix for #6236
mysql-test/r/alter_table.result:
More test for bug #6236 (CREATE TABLE didn't properly count not null columns for primary keys)
mysql-test/t/alter_table.test:
More test for bug #6236 (CREATE TABLE didn't properly count not null columns for primary keys)
sql/handler.h:
Add counter for null fields
sql/sql_table.cc:
Change create_field->offset to store offset from start of fields, independent of null bits.
Count null_bits separately from field offsets and adjust them in case of primary key parts.
sql/unireg.cc:
Change create_field->offset to store offset from start of fields, independent of null bits.
Count null_bits separately from field offsets and adjust them in case of primary key parts.
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/handler.h b/sql/handler.h index ac00050b777..e52164a871a 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -164,6 +164,7 @@ typedef struct st_ha_create_information SQL_LIST merge_list; enum db_type db_type; enum row_type row_type; + uint null_bits; /* NULL bits at start of record */ uint options; /* OR of HA_CREATE_ options */ uint raid_type,raid_chunks; uint merge_insert_method; |