diff options
author | Michael Widenius <monty@mariadb.org> | 2014-05-06 23:44:02 +0300 |
---|---|---|
committer | Michael Widenius <monty@mariadb.org> | 2014-05-06 23:44:02 +0300 |
commit | 554fd30ba3f118d1ec2b89c0437bfd7f3cab9995 (patch) | |
tree | 8c93bcd08aec06c699b4f4b47e482aa2c6bf3f02 | |
parent | 890982192a7962f2a453b8d61cbb876c0891853a (diff) | |
download | mariadb-git-554fd30ba3f118d1ec2b89c0437bfd7f3cab9995.tar.gz |
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.
-rw-r--r-- | storage/myisam/ha_myisam.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 35353dfc9a3..04879f4b26c 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -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) { |