[MDEV-4650] show variables; ERROR 1946 (HY000): Failed to load replication slave GTID position Created: 2013-06-13 Updated: 2013-08-26 Resolved: 2013-08-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.3 |
| Fix Version/s: | 10.0.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | John Smith | Assignee: | Kristian Nielsen |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Environment: |
Fedora 17 x86_64 |
||
| Description |
|
example: |
| Comments |
| Comment by Elena Stepanova [ 2013-06-13 ] | ||||||||||||||||||||
|
From your description in the blog, you re-used the old datadir remaining from 5.5, but didn't run mysql_upgrade after installing 10.0.3. If you check the error log, you're likely to see a number of errors caused by that. Please run mysql_upgrade and restart the server. | ||||||||||||||||||||
| Comment by Sergei Golubchik [ 2013-06-13 ] | ||||||||||||||||||||
|
elenst I still think that SHOW VARIABLES as a whole should not fail, if there's a error reading a value of a specific variable, it should affect only that variable. | ||||||||||||||||||||
| Comment by Elena Stepanova [ 2013-06-13 ] | ||||||||||||||||||||
|
serg Right, and there is also a question why even after mysql_upgrade it requires restarting the server. So far I'm just trying to provide a workaround so John could proceed with his testing. In regard to affecting only the "bad" variable, I'm not sure if we have the mechanism in place, do we? How would it look in show variables output? Upd: maybe showing the variable value as NULL and throwing a warning on SHOW VARIABLES would do. | ||||||||||||||||||||
| Comment by Elena Stepanova [ 2013-06-13 ] | ||||||||||||||||||||
|
Hi Kristian, So there are two questions / problems in here: 1) is it possible not to fail the whole "SHOW VARIABLES" query when gtid position cannot be read on whatever reason? 2) it seems wrong that SHOW VARIABLES keeps failing even after mysql_upgrade, until the server is restarted, is it possible to avoid that? Usually the server becomes functional right after mysql_upgrade, although there are cases when restart is needed (e.g. when event scheduler fails on startup). I hope GTID is not one of such cases. | ||||||||||||||||||||
| Comment by John Smith [ 2013-06-14 ] | ||||||||||||||||||||
|
Hello, [root@Fedora64 src]# /etc/init.d/mysql restart Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> show variables; Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> show variables; MariaDB [(none)]> show variables; MariaDB [(none)]> show variables like 'g%';
---------------------
--------------------- | ||||||||||||||||||||
| Comment by John Smith [ 2013-06-14 ] | ||||||||||||||||||||
|
I have updated the blog and point your solution and my mistake out as well. | ||||||||||||||||||||
| Comment by Kristian Nielsen [ 2013-08-26 ] | ||||||||||||||||||||
|
Pushed to 10.0-base. Revision: revid:knielsen@knielsen-hq.org-20130826105109-fuzmdpnn6k93nf0k When trying to set the variables, it will first try again to reload the table, and succeed if it had been restored with mysql_upgrade. When trying to read the variable we cannot easily retry loading the table due to table locking issues if done from a SELECT eg. But I made such cases return the empty string (the value will be empty if the table is not there, and we've already complained about the table in the error log anyway). |