[MDEV-6389] DATETIME w/ transportable tablespaces from MySQL 5.6 to MariaDB 10.0 gives "precise type mismatch" error. Created: 2014-06-26 Updated: 2018-11-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.12 |
| Fix Version/s: | 10.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Kolbe Kegel (Inactive) | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Sprint: | 10.2.1-1, 10.2.1-2 | ||||||||||||||||||||||||||||
| Description |
|
|
| Comments |
| Comment by Elena Stepanova [ 2014-06-26 ] | ||||||||||||||||||||||||||
|
It looks related to what bar is working on in scope of | ||||||||||||||||||||||||||
| Comment by Kolbe Kegel (Inactive) [ 2014-07-09 ] | ||||||||||||||||||||||||||
|
Is there any update on this? This issue makes it impossible to import InnoDB tablespaces exported from MySQL 5.6. | ||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2014-08-05 ] | ||||||||||||||||||||||||||
|
Unfortunately, there isn't much we can do about it. MySQL-5.6 creates temporal fields that are binary incompatible with MariaDB-5.3 and later. MariaDB can read and write MySQL-5.6 temporal fields, but it cannot create them. But for import tablespace to work — see your example — one needs to create a table with the MySQL-5.6 temporal fields. We plan to add this in 10.1. | ||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2016-05-04 ] | ||||||||||||||||||||||||||
|
I do not fully follow the last comment, is column 'd' on example a temporal field and why ? | ||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2016-05-04 ] | ||||||||||||||||||||||||||
|
I tested with MySQL 5.6.29:
and MariaDB 10.0.24 really fails (I also tested MariaDB 10.1.14 and it worked)
| ||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2016-05-06 ] | ||||||||||||||||||||||||||
|
Can't fix easily inside InnoDB as there is different main types used (binary format is not exactly the same). Problem is how DATETIME data type is stored. In MariaDB 10.0 we have (ha_innodb.cc):
And key_type() != HA_KEYTYPE_BINARY so DATA_INT is selected. In MySQL 5.6 there is:
And it selects DATA_FIXBINARY. In row/row0import.cc we should somehow note that real type is e.g. DATETIME2 read it from page and somehow convert it to DATA_INT write back to page. Not sure if this is safe for 10.0. | ||||||||||||||||||||||||||
| Comment by Rafael Gallastegui [ 2017-03-28 ] | ||||||||||||||||||||||||||
|
I'm having a similar issue when exporting tables in MariaDB 10.1.22-1 (CentOS). And this is when trying to export data into the same server! Datetime field is the one that gave me the problem also. I'm just mentioning it since this JIRA refers to MySQL 5.6 -> MariaDB 10.0 and my issue is from MariaDB 10.1 to MariaDB 10.1. I can provide more details if needed. Update: my mistake. this was happening if I copied the .frm and the .ibd files. If I only copy the .ibd file it works correctly |