[MDEV-6178] [PATCH] mysql_upgrade breaks databases with long user names Created: 2014-04-26  Updated: 2014-04-28  Resolved: 2014-04-28

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.37, 10.0.10
Fix Version/s: 5.5.38, 10.0.11

Type: Bug Priority: Major
Reporter: Pavel Ivanov Assignee: Elena Stepanova
Resolution: Fixed Votes: 0
Labels: None

Attachments: Text File upgrade_breaks_db.txt    
Issue Links:
Relates
relates to MDEV-4332 Increase username length from 16 char... Closed
relates to MDEV-6068 Upgrade removes all changes to 'mysql... Closed

 Description   

mysql_upgrade is supposed to be a no-op on databases that are fully upgraded already. But scripts/mysql_system_tables_fix.sql has lots of old statements including those that try to modify User column in different tables to be char(16) instead of char(80). That breaks databases that already have users with names longer than 16 characters.

In the attachment is a patch that fixes the problem (with a test).



 Comments   
Comment by Elena Stepanova [ 2014-04-26 ]

Hi Pavel,
Thanks.

The bug has been already fixed by this commit: http://bazaar.launchpad.net/~maria-captains/maria/10.0/revision/4148 (there were a couple more lines that needed fixing).
And we also have the open task MDEV-6069 to remove redundant ALTERs from the script.

However, there was no test in that commit, which of course is wrong. Thanks for providing one.

Comment by Elena Stepanova [ 2014-04-28 ]

Pushed the test into 10.0 tree as
http://bazaar.launchpad.net/~maria-captains/maria/10.0/revision/4165

and a separate test for 5.5 into 5.5 tree as
http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/4166
(the test is different because in 5.5 the logic requires manual modification of system tables).

Generated at Thu Feb 08 07:09:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.