[MDEV-6068] Upgrade removes all changes to 'mysql' database Created: 2014-04-10 Updated: 2014-04-28 Resolved: 2014-04-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.36, 10.0.10 |
| Fix Version/s: | 5.5.37, 10.0.11 |
| Type: | Bug | Priority: | Critical |
| Reporter: | azurit | Assignee: | Elena Stepanova |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian Wheezy, 64bit |
||
| Issue Links: |
|
||||||||||||
| Description |
|
Every server upgrade or downgrade removes (probably) all changes done to 'mysql' database including changes used to increase login length described here: |
| Comments |
| Comment by Elena Stepanova [ 2014-04-10 ] | |||||||||||||||||||||||||
|
Hi, | |||||||||||||||||||||||||
| Comment by azurit [ 2014-04-10 ] | |||||||||||||||||||||||||
|
I observed that changes made to increase login length were all removed - logins are, again, char(16). | |||||||||||||||||||||||||
| Comment by azurit [ 2014-04-10 ] | |||||||||||||||||||||||||
|
Is 5.5.37 really going to be released on 14.4.2014? Will fix for this bug get into it? Thank you. | |||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-04-10 ] | |||||||||||||||||||||||||
You are right. There is an ancient logic in the upgrade SQL, which modifies system tables' columns on a totally unrelated reason, but since MODIFY includes the column definition, it ends up to be reverted to the old one.
April 14 is the current plan, yes. | |||||||||||||||||||||||||
| Comment by azurit [ 2014-04-10 ] | |||||||||||||||||||||||||
|
Maybe you should warn users that upgrade can results in truncated logins which can results in broken applications. | |||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-04-10 ] | |||||||||||||||||||||||||
|
azurit, serg, With 5.5, the only idea I have at the moment is doing it via prepared statements, something like the example below. Unfortunately, it will have to be done in different places, so it's going to look ugly.
| |||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2014-04-10 ] | |||||||||||||||||||||||||
|
An alternative would be to stop pretending that we support direct upgrades from 3.23 and remove these ALTER TABLE statements. | |||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-04-11 ] | |||||||||||||||||||||||||
|
Fixed using the conservative approach. In 5.5: Fixed as suggested above, by checking the length of User column and using it to create a prepared statement. In 10.0: Tested by creating dumps before and after upgrade and comparing (diff-ing) them. Pushed into 5.5 and 10.0, accordingly. Also, created a new task |