• Alexander Barkov's avatar
    MDEV-32025 Crashes in MDL_key::mdl_key_init with lower-case-table-names=2 · 179424db
    Alexander Barkov authored
    Backporting a part of MDEV-32026 (which also fixed MDEV-32025 in 11.3)
    from 11.3 to 10.4.
    
    The reported crash happened with --lower-case-table-names=2
    on statements like:
    
    ALTER DATABASE Db1 DEFAULT CHARACTER SET utf8;
    ALTER DATABASE `#mysql50#D+b1` UPGRADE DATA DIRECTORY NAME;
    
    lock_schema_name() expects a normalized database name
    and assert if a non-normalized name comes.
    
    mysql_alter_db_internal() and mysql_upgrade_db() get
    a non-normalized database name in the parameter.
    Fixing them to normalize the database name before passing
    it to lock_schema_name().
    179424db
lowercase_table2.result 11.7 KB