[MDEV-14573] Upgrade from previous versions is broken for procedures Created: 2017-12-05  Updated: 2019-12-17  Resolved: 2017-12-12

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Procedure
Affects Version/s: 10.3
Fix Version/s: 10.3.3

Type: Bug Priority: Blocker
Reporter: Elena Stepanova Assignee: Vicențiu Ciorbaru
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-21332 Error message when upgrading from 10.... Confirmed

 Description   
  • start an old version, e.g. 10.2 (same for 10.3.2, but it's less important since we don't guarantee a working upgrade from Alphas);
  • create a procedure, e.g.

    create procedure pr() begin end;
    

  • shut down the server properly;
  • start the new 10.3 server on the same datadir;
  • try to use the procedure

    10.3 1af2d7ba2353

    MariaDB [test]> call pr();
    ERROR 1558 (HY000): Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100212, now running 100303. Please use mysql_upgrade to fix this error
    

Running mysql_upgrade does not work and does not help

...
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables'
ERROR 1805 (HY000) at line 574: Column count of mysql.proc is wrong. Expected 21, found 20. The table is probably corrupted
ERROR 1805 (HY000) at line 576: Column count of mysql.proc is wrong. Expected 21, found 20. The table is probably corrupted
ERROR 1805 (HY000) at line 584: Column count of mysql.proc is wrong. Expected 21, found 20. The table is probably corrupted
ERROR 1805 (HY000) at line 586: Column count of mysql.proc is wrong. Expected 21, found 20. The table is probably corrupted
FATAL ERROR: Upgrade failed



 Comments   
Comment by Sergei Golubchik [ 2017-12-05 ]

mysql_upgrade needs to be fixed to work.

The actual change goes into scripts/mysql_fix_privilege_tables.sql

Comment by Vicențiu Ciorbaru [ 2017-12-05 ]

serg Now we seem to have mysql_system_tables_fix.sql instead.

Actually mysql_fix_privilege_tables.sql is generated based on mysql_system_tables_fix.sql

Generated at Thu Feb 08 08:14:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.