mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-29914: Fix maridab-upgrade when sql_safe_updates = on is set in my.cnf
Tested multiple major version upgrades with sql_safe_updates enabled, and confirmed the issue is resolved. Reviewer: Daniel Black
This commit is contained in:
parent
179424db5f
commit
babd833685
3 changed files with 63 additions and 0 deletions
|
@ -1006,4 +1006,56 @@ disconnect con1;
|
|||
connection default;
|
||||
drop table mysql.global_priv;
|
||||
rename table mysql.global_priv_bak to mysql.global_priv;
|
||||
#
|
||||
# mariadb-upgrade fails with sql_safe_updates = on
|
||||
#
|
||||
set @orig_sql_safe_updates = @@GLOBAL.sql_safe_updates;
|
||||
set global sql_safe_updates=ON;
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
mysql.columns_priv OK
|
||||
mysql.db OK
|
||||
mysql.event OK
|
||||
mysql.func OK
|
||||
mysql.global_priv OK
|
||||
mysql.gtid_slave_pos OK
|
||||
mysql.help_category OK
|
||||
mysql.help_keyword OK
|
||||
mysql.help_relation OK
|
||||
mysql.help_topic OK
|
||||
mysql.index_stats OK
|
||||
mysql.innodb_index_stats OK
|
||||
mysql.innodb_table_stats OK
|
||||
mysql.plugin OK
|
||||
mysql.proc OK
|
||||
mysql.procs_priv OK
|
||||
mysql.proxies_priv OK
|
||||
mysql.roles_mapping OK
|
||||
mysql.servers OK
|
||||
mysql.table_stats OK
|
||||
mysql.tables_priv OK
|
||||
mysql.time_zone OK
|
||||
mysql.time_zone_leap_second OK
|
||||
mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.transaction_registry OK
|
||||
Phase 2/7: Installing used storage engines... Skipped
|
||||
Phase 3/7: Fixing views
|
||||
mysql.user OK
|
||||
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
||||
Phase 5/7: Fixing table and database names
|
||||
Phase 6/7: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
set global sql_safe_updates=@orig_sql_safe_updates;
|
||||
# End of 10.4 tests
|
||||
|
|
|
@ -485,4 +485,14 @@ drop table mysql.global_priv;
|
|||
rename table mysql.global_priv_bak to mysql.global_priv;
|
||||
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
|
||||
|
||||
--echo #
|
||||
--echo # mariadb-upgrade fails with sql_safe_updates = on
|
||||
--echo #
|
||||
|
||||
set @orig_sql_safe_updates = @@GLOBAL.sql_safe_updates;
|
||||
set global sql_safe_updates=ON;
|
||||
--exec $MYSQL_UPGRADE --force 2>&1
|
||||
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
|
||||
set global sql_safe_updates=@orig_sql_safe_updates;
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
# adding a 'SHOW WARNINGS' after the statement.
|
||||
|
||||
set sql_mode='';
|
||||
set sql_safe_updates='OFF';
|
||||
set storage_engine=Aria;
|
||||
set enforce_storage_engine=NULL;
|
||||
set alter_algorithm='DEFAULT';
|
||||
|
|
Loading…
Add table
Reference in a new issue