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.
This commit is contained in:
Michael Widenius 2014-05-06 23:44:02 +03:00
parent 890982192a
commit 554fd30ba3

View file

@ -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)
{