diff options
author | Alexander Barkov <bar@mariadb.org> | 2013-08-07 10:57:45 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2013-08-07 10:57:45 +0400 |
commit | 1a9f6b1d89a170571d617c001b3a056c9bcf9939 (patch) | |
tree | 5d4945097e639d6315892b4d4a9f036bf89482e2 /storage/myisam | |
parent | 5997156b9b5381c5dba9f782fec2a7347689a831 (diff) | |
download | mariadb-git-1a9f6b1d89a170571d617c001b3a056c9bcf9939.tar.gz |
MDEV-4819 Upgrade from MySQL 5.6 does not work
Diffstat (limited to 'storage/myisam')
-rw-r--r-- | storage/myisam/ha_myisam.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 3d1dca2d9e5..0445abd8d99 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -355,12 +355,23 @@ int table2myisam(TABLE *table_arg, MI_KEYDEF **keydef_out, if (found->flags & BLOB_FLAG) recinfo_pos->type= FIELD_BLOB; - else if (found->type() == MYSQL_TYPE_TIMESTAMP) + else if (found->real_type() == MYSQL_TYPE_TIMESTAMP) + { + /* pre-MySQL-5.6.4 TIMESTAMP, or MariaDB-5.3+ TIMESTAMP */ recinfo_pos->type= FIELD_NORMAL; + } else if (found->type() == MYSQL_TYPE_VARCHAR) recinfo_pos->type= FIELD_VARCHAR; else if (!(options & HA_OPTION_PACK_RECORD)) recinfo_pos->type= FIELD_NORMAL; + else if (found->real_type() == MYSQL_TYPE_TIMESTAMP2) + { + /* + MySQL-5.6.4+ erroneously marks Field_timestampf as FIELD_SKIP_PRESPACE, + but only if HA_OPTION_PACK_RECORD is set. + */ + recinfo_pos->type= FIELD_SKIP_PRESPACE; + } else if (found->zero_pack()) recinfo_pos->type= FIELD_SKIP_ZERO; else |