mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-28866: mariadb-upgrade to 10.8 mysql.column_stats hist_type + histogram errors
The incorrect type of mysql.column_stats caused the server during the upgrade of every other table to complain: [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 and expected column 'histogram' at position 10 to have type longblob. To prevent these verbose server errors, we upgrade the mysql.column_stats table first. Consequently limit "Incorrect definition of table mysql.*" to the appropriate set of limited test cases. The rpl_gtid_errorhandling.result changes the GTID number by one because of the added early suppression (adding a table row). Reviewer: Vicențiu Ciorbaru Fixes MariaDB/mariadb-docker#438
This commit is contained in:
@@ -29,6 +29,18 @@ set default_storage_engine=Aria;
|
||||
set enforce_storage_engine=NULL;
|
||||
set alter_algorithm=DEFAULT;
|
||||
|
||||
|
||||
--
|
||||
-- Upgrade mysql.column_stats table early because its quite noisy otherwise
|
||||
--
|
||||
|
||||
ALTER TABLE column_stats
|
||||
modify min_value varbinary(255) DEFAULT NULL,
|
||||
modify max_value varbinary(255) DEFAULT NULL,
|
||||
modify hist_type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'),
|
||||
modify histogram longblob,
|
||||
ENGINE=Aria transactional=0;
|
||||
|
||||
set @have_innodb= (select count(engine) from information_schema.engines where engine='INNODB' and support != 'NO');
|
||||
|
||||
# MDEV-21873: 10.2 to 10.3 upgrade doesn't remove semi-sync reference from
|
||||
@@ -66,7 +78,6 @@ ALTER TABLE help_category ENGINE=Aria transactional=0;
|
||||
ALTER TABLE help_relation ENGINE=Aria transactional=0;
|
||||
ALTER TABLE help_keyword ENGINE=Aria transactional=0;
|
||||
ALTER TABLE table_stats ENGINE=Aria transactional=0;
|
||||
ALTER TABLE column_stats ENGINE=Aria transactional=0;
|
||||
ALTER TABLE index_stats ENGINE=Aria transactional=0;
|
||||
|
||||
ALTER TABLE user add File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
|
||||
@@ -780,9 +791,6 @@ flush privileges;
|
||||
ALTER TABLE help_category MODIFY url TEXT NOT NULL;
|
||||
ALTER TABLE help_topic MODIFY url TEXT NOT NULL;
|
||||
|
||||
# MDEV-7383 - varbinary on mix/max of column_stats
|
||||
alter table column_stats modify min_value varbinary(255) DEFAULT NULL, modify max_value varbinary(255) DEFAULT NULL;
|
||||
|
||||
DELIMITER //
|
||||
IF 'BASE TABLE' = (select table_type from information_schema.tables where table_schema=database() and table_name='user') THEN
|
||||
CREATE TABLE IF NOT EXISTS global_priv (Host char(255) binary DEFAULT '', User char(128) binary DEFAULT '', Priv JSON NOT NULL DEFAULT '{}' CHECK(JSON_VALID(Priv)), PRIMARY KEY Host (Host,User)) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges'
|
||||
@@ -842,11 +850,3 @@ IF 1 = (SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def
|
||||
END IF//
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
--
|
||||
-- Upgrade mysql.column_stats table
|
||||
--
|
||||
|
||||
ALTER TABLE column_stats
|
||||
modify hist_type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'),
|
||||
modify histogram longblob;
|
||||
|
Reference in New Issue
Block a user