[MDEV-2964] LP:944422 - mysql_upgrade destroys Maria tables? Created: 2012-03-01 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | nbrnhardt (Inactive) | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Upgrading tables from 5.2 to 5.3.5 with mysql_upgrade seems to cause MySQL to zerofill tables... [Note] Zerofilling moved table: '.\database\technikervermerke' which then seems to destroy some tables. At least when you run a check, it states: Found row with transaction id 808 when max transaction id according to maria_control_file is 84 — This issue might be linked to: Attached is an archive with the 5.2-state as well as 5.3-state table `technikervermerke`. If the upgrade causes corrupt tables, this bug should be fixed. If it is an erroneus message, it should be disabled. |
| Comments |
| Comment by nbrnhardt (Inactive) [ 2012-03-01 ] | ||||||||||||
|
Re: mysql_upgrade destroys Maria tables? | ||||||||||||
| Comment by nbrnhardt (Inactive) [ 2012-03-01 ] | ||||||||||||
|
Error or erroneous message after mysql_upgrade and CHECK TABLE | ||||||||||||
| Comment by Elena Stepanova [ 2012-03-05 ] | ||||||||||||
|
Re: mysql_upgrade destroys Maria tables? In the provided archive, the 5.2.10-before_upgrade/database folder is empty, there are no tables: Processing archive: bug.7z Extracting bug/5.3.5-after_upgrade/database/technikervermerke.frm Everything is Ok Folders: 5 | ||||||||||||
| Comment by nbrnhardt (Inactive) [ 2012-03-06 ] | ||||||||||||
|
Re: mysql_upgrade destroys Maria tables? | ||||||||||||
| Comment by nbrnhardt (Inactive) [ 2012-03-06 ] | ||||||||||||
|
Sorry, was a "bug" in my brain. | ||||||||||||
| Comment by Elena Stepanova [ 2012-03-13 ] | ||||||||||||
|
Re: mysql_upgrade destroys Maria tables? Could you please describe in more details how exactly you perform the upgrade? I tried the following with your data: 1.
To my understanding, the message about 'transaction id' caused by the fact that I don't have the old aria_control_file. 2.
Here I have aria_control_file synchronized with the table, so no error. As you can see, in both cases I am not getting the zerofill message, so you apparently do something differently, could you please point it out? | ||||||||||||
| Comment by nbrnhardt (Inactive) [ 2012-03-14 ] | ||||||||||||
|
Re: mysql_upgrade destroys Maria tables? 1. Backup datadir It seems that (3) causes the "Found row..." message. When I stop the server, rename the database folder and restart the server, the result of CHECK TABLE is "ok". It seems to me that the transaction id (in the table) should be reset when aria_control_file is deleted. I attach the complete datadir (w/o mysql database). | ||||||||||||
| Comment by nbrnhardt (Inactive) [ 2012-03-14 ] | ||||||||||||
|
I do the following: 1. Backup datadir It seems that (3) causes the "Found row..." message. When I stop the server, rename the database folder and restart the server, the result of CHECK TABLE is "ok". It seems to me that the transaction id (in the table) should be reset when aria_control_file is deleted. I attach the complete datadir (w/o mysql database). | ||||||||||||
| Comment by Elena Stepanova [ 2012-03-16 ] | ||||||||||||
|
Re: mysql_upgrade destroys Maria tables? Thank you, I can now see all the quoted error messages. The remaining question is, you mentioned earlier that this sequence of events destroys some tables. Did you have any evidence of the data being actually corrupt, or do you base your suspicions on all these warnings and records produced in the CHECK output and/or error log? Thank you. | ||||||||||||
| Comment by nbrnhardt (Inactive) [ 2012-03-18 ] | ||||||||||||
|
Re: mysql_upgrade destroys Maria tables? We have additional problems filed as separate bug reports where the server says "bye" as soon as there is some load on the server. I try to compile a debug version for Windows next mid-week to get more specific details. | ||||||||||||
| Comment by Vladislav Vaintroub [ 2012-03-18 ] | ||||||||||||
|
Re: mysql_upgrade destroys Maria tables? | ||||||||||||
| Comment by Vladislav Vaintroub [ 2012-03-18 ] | ||||||||||||
|
Re: mysql_upgrade destroys Maria tables? | ||||||||||||
| Comment by nbrnhardt (Inactive) [ 2012-03-27 ] | ||||||||||||
|
Re: mysql_upgrade destroys Maria tables? Following scenario to set up / sync new slave servers (5.2.10):
On the MASTER following happens: As soon as the first user uses a a table, MariaDB seems to notice some differences (between table and (non-existing) log?), and issues in the error log: 120327 7:04:52 [Note] Zerofilling moved table: '.\dbv\belegliste' 120327 7:04:54 [Warning] Checking table: '.\dbv\belegliste' Not only limited to this table, but here it does so here hundreds of times during the next hour. Then the server got restarted and an REPAIR TABLE belegliste was issued: 120327 8:10:23 [Warning] Checking table: '.\dbv\belegliste' 120327 8:10:23 [Warning] Recovering table: '.\dbv\belegliste' 120327 8:10:23 [Note] Retrying repair of: '.\dbv\belegliste' with keycache 120327 8:10:23 [ERROR] Couldn't repair table: dbv.belegliste After another restart, the error log tells: 120327 8:11:10 [ERROR] MySQL: Table '.\dbv\belegliste' is marked as crashed and last (automatic?) repair failed On another REPAIR TABLE, the result is: 120327 8:11:37 [Note] Found 6004 of 0 rows when repairing '.\dbv\belegliste' After issuing a REPAIR TABLE to all Maria tables, the database is working fine again. On the SLAVE, `belegliste` gives a "Got error: 176 when reading datafile". Couldn't find anything on Google. It seems that on a read or write of a MariaDB table, the database server compares the table to the log file that isn't there anymore. Is there any sort of counter that tells MariaDB that a table is 'corrupt'? More specificly, is there a counter stored in the table to sync the position of the log files? If the log files change or get deleted, this counter should automatically re-synced with the new logs. Any ideas? If you need the table `belegliste`, I would upload it on FTP. | ||||||||||||
| Comment by Michael Widenius [ 2012-03-27 ] | ||||||||||||
|
Re: mysql_upgrade destroys Maria tables? If the aria_log_control file is removed, the Aria engine is re-initialized and transaction id's are starting from 1 again. Zerofilling means that all transaction id's are removed from the table and that all unused data is set to 0. In no case should one get the error: Found row with transaction id 808; This is a bug and we will fix it as soon as I get a repeatable test case for it (Elena said she can repeat it and will produce one for me). | ||||||||||||
| Comment by Elena Stepanova [ 2012-03-27 ] | ||||||||||||
|
Re: mysql_upgrade destroys Maria tables?
------
------
------ (the actual transaction id in the message might be different depending on the pre-conditions of your test). Please note that it's important either to use MySQL client in the batch mode (with -e, as described), or start it in interactive mode with -A. | ||||||||||||
| Comment by Michael Widenius [ 2012-03-28 ] | ||||||||||||
|
Re: mysql_upgrade destroys Maria tables? This is pushed into 5.1 and I will merge it to 5.2 and 5.3. | ||||||||||||
| Comment by Rasmus Johansson (Inactive) [ 2012-03-29 ] | ||||||||||||
|
Launchpad bug id: 944422 |