Commit edfd875f authored by Sergei Golubchik's avatar Sergei Golubchik

Fix myisam checksum patch to check for HA_OPTION_CHECKSUM after it was set, not before

parent e14291c1
......@@ -175,13 +175,6 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
}
}
/*
Don't set HA_OPTION_NULL_FIELDS if no checksums, as this flag makes
that file incompatible with MySQL. This is ok, as this flag is only
used if one specifics table level checksums.
*/
if (!(options & HA_OPTION_CHECKSUM))
options&= ~HA_OPTION_NULL_FIELDS;
if (packed || (flags & HA_PACK_RECORD))
options|=HA_OPTION_PACK_RECORD; /* Must use packed records */
/* We can't use checksum with static length rows */
......@@ -199,6 +192,13 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
options|= HA_OPTION_CHECKSUM;
min_pack_length++;
}
/*
Don't set HA_OPTION_NULL_FIELDS if no checksums, as this flag makes
that file incompatible with MySQL. This is ok, as this flag is only
used if one specifics table level checksums.
*/
if (!(options & HA_OPTION_CHECKSUM))
options&= ~HA_OPTION_NULL_FIELDS;
if (flags & HA_CREATE_DELAY_KEY_WRITE)
options|= HA_OPTION_DELAY_KEY_WRITE;
if (flags & HA_CREATE_RELIES_ON_SQL_LAYER)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment