Commit 554fd30b authored by Michael Widenius's avatar Michael Widenius

Fixed bug where CHECK TABLE for a MYISAM table before 5.5.38 wrongly gave warning:

"Table upgrade required..."

The row format is only different for the case where we have a very old MyISAM table with varchar fields, null fields and created with CHECKSUM=1
The table is usable, except that CHECKSUM TABLE will give a wrong result and CHECK TABLE will warn about this.

I added a test for this to warn when a table needs to be upgraded, but forgot to add a test that this was only relevant for tables with CHECKSUM=1
This is now fixed.



storage/myisam/ha_myisam.cc:
  Fixed wrong test.
parent 89098219
......@@ -2160,7 +2160,8 @@ bool ha_myisam::check_if_incompatible_data(HA_CREATE_INFO *info,
int ha_myisam::check_for_upgrade(HA_CHECK_OPT *check_opt)
{
if (!(file->s->options & HA_OPTION_NULL_FIELDS) &&
if ((file->s->options & HA_OPTION_CHECKSUM) &&
!(file->s->options & HA_OPTION_NULL_FIELDS) &&
!(file->s->options & HA_OPTION_PACK_RECORD) &&
file->s->has_varchar_fields)
{
......
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