summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2014-05-06 23:44:02 +0300
committerMichael Widenius <monty@mariadb.org>2014-05-06 23:44:02 +0300
commit554fd30ba3f118d1ec2b89c0437bfd7f3cab9995 (patch)
tree8c93bcd08aec06c699b4f4b47e482aa2c6bf3f02
parent890982192a7962f2a453b8d61cbb876c0891853a (diff)
downloadmariadb-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.cc3
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)
{