twindb / undrop-for-innodb

TwinDB data recovery toolkit for MySQL/InnoDB
https://twindb.com
GNU General Public License v2.0
384 stars 148 forks source link

datetime column problem #29

Closed wayuki closed 1 year ago

wayuki commented 2 years ago

Hello, I try to restore a table with two datetime columns, one column restores the correct data, but the other is wrong, correct column "2022-09-14 12:31:20.0" wrong column "9265-80-81 12:64:00", Why?

akuzminsky commented 1 year ago

It couldn't be due to many reasons:

I know that's probably not helpful but without additional data I cannot be more specific.

josespinal commented 1 year ago

@akuzminsky Do you offer restore service for database?

akuzminsky commented 1 year ago

I don't but Undrop for InnoDB overview https://youtu.be/-1LeLhGjAWM might be helpful.

sapzxc commented 1 year ago

Hi! I have similar issue Incorrect datetime value: '1970-01-01 00:00:00' for column and fixed by this: sed -i -e 's/1970-01-01 00:00:00/0000-00-00 00:00:00/g' dumps/.../*

Better to fix it in source code if it possible. UPD: I using mariadb 10.4

akuzminsky commented 1 year ago

Here we go again :/

Better to fix it in source code if it possible.

First of all, it's not a fix. Second, the only right solution in this situation is:

a) you provide c_parser with the accurate structure. (it sounds like I didn't stress this enough). b) ensure c_parser is provided with a correct flag - -5 or -6. Which flag to provide solely depends on the MySQL version the page was created.

If it happened so that the page is corrupted at the place where datatime field is, then there is nothing you can do about it.

I'm going to close this issue as I don't foresee productive discussion here.