[MDEV-4453] Windows service fails with old data Created: 2013-04-29 Updated: 2013-05-01 Resolved: 2013-05-01 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.1, 10.0.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Axel Dörfler (Inactive) | Assignee: | Vladislav Vaintroub |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows 7 x64 |
||
| Attachments: |
|
| Description |
|
I've migrated my data from MySQL 5.5 to MariaDB 10.0.1|2 (one after the other) by replacing the data/ directory with the mysql data/ directory, and putting MariaDB's my.ini in there. Launching the service failed with error 1067 on first try (with 10.0.1), and error 1053 (I think) on the second try (with 10.0.2). I could launch mysqld from the command line without any issues (without admin rights), though, and could then run the mysql_upgrade commmand which successfully converted the databases. Afterwards, launching the service worked just fine. |
| Comments |
| Comment by Elena Stepanova [ 2013-04-29 ] |
|
Hi, Do you still have the error log from the failed start? Could you please send it, along with my.ini file? Thanks. |
| Comment by Axel Dörfler (Inactive) [ 2013-04-29 ] |
|
I'm not sure if this error is the one, but the time of the error might match: InnoDB: Error: log file .\ib_logfile0 is of different size 5242880 bytes The my.ini file has not been changed, and came straight from the installer: |
| Comment by Elena Stepanova [ 2013-04-29 ] |
|
Yes, that's exactly the kind of error which would cause the problem you described.
Thank you. |
| Comment by Axel Dörfler (Inactive) [ 2013-04-30 ] |
|
1) I just ran "mysqld" without any options at all. |
| Comment by Axel Dörfler (Inactive) [ 2013-04-30 ] |
|
Log file containing the error, and possibly startup information afterwards. |
| Comment by Elena Stepanova [ 2013-04-30 ] |
|
Thanks, it helps to understand the whole story. 1) you had a previous installation with innodb_log_file_size 5 Mb (default), so you had corresponding ib_logfile-s in your datadir; See here: That's your manual server went through the startup process and is up and running 130426 13:52:00 [Note] mysqld: ready for connections. Here you are running a check, or using the server 130426 13:52:32 [ERROR] mysqld: Table '.\mysql\proc' is marked as crashed and should be repaired And here is another server starts 5 min later. There is no indication that the previous one shut down: 130426 13:59:12 InnoDB: The InnoDB memory heap is disabled Of course it could have happened that you terminated it yourself, but the following tells us it's unlikely: 130426 13:59:12 InnoDB: Operating system error number 32 in a file operation. So that's the story. To have your service really work, you can do one of two things: Meanwhile, we need to check where the new setting in the config file comes from, it's not particularly user-friendly for sure. |
| Comment by Vladislav Vaintroub [ 2013-05-01 ] |
|
The story sounds a bit complicated to me and details are left out. 50MB logsize is something that initial installation has done (MariaDB MSI instalation would never create logfile that is 5MB big). How you got your logfile down to 5 MB is a mystery, perhaps you did not copy it , or maybe something else went wrong Now. to simplify the process of migration, and avoid mistakes while migrating manually, we created a utility mysql_upgrade_service.exe , which makes migration from version X to version Y as simple as mysql_upgrade_service.exe --service=Name (run this in elevated prompt) It does change service configuration to new mysqld.exe path (10.0 in your case), and it does run mysql_upgrade as well (compared to your scenario, it does not copy database files around). It is documented here : https://kb.askmonty.org/en/upgrading-mariadb-on-windows/ I would like to encourage anyone to use automatic migration, e.g with mysql_upgrade_service.exe, and report any errors about it. |
| Comment by Vladislav Vaintroub [ 2013-05-01 ] |
|
closing as "Can't reproduce", because well, I can't reproduce. Also see the previous note about mysql_upgrade_service.exe |
| Comment by Elena Stepanova [ 2013-05-01 ] |
|
>> 50MB logsize is something that initial installation has done (MariaDB MSI instalation would never create logfile that is 5MB big). It was a migration from MySQL 5.5 to MariaDB 10.0, so 5 Mb ib_logfiles were created by MySQL, not by MariaDB. Which is quite possible because, again, it's a default value, all that one needed to get it is not have a non-default setting in the config file. |
| Comment by Axel Dörfler (Inactive) [ 2013-05-01 ] |
|
Elena Stepanova wrote: Actually, I manually killed the server I manually started (CTRL-C did have no effect on it). However, for some reason the previous MySQL service was restarted, even though I removed it, and was running from the old config/data directory. The error messages must predate that event. I just can't understand how I missed that restarting MariaDB did not succeed. My previous installation actually did not run as a Windows service, so I could not use mysql_upgrade_service.exe. Anyway, I've now removed the logfiles manually (using "SET GLOBAL innodb_fast_shutdown = 0"), and starting the service now works as expected. I would still consider it a bug that InnoDB does not handle this case gracefully, but that's obviously your call. Thanks for the help and explanation! |