diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index 0584bb934e2..4f767cfb136 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -105,7 +105,6 @@ INSERT INTO global_suppressions VALUES */ ("Got error [0-9]* when reading table"), - ("Incorrect definition of table"), ("Incorrect information in file"), ("InnoDB: Warning: we did not need to do crash recovery"), /*("Invalid \\(old\\?\\) table or database name"),*/ diff --git a/mysql-test/main/events_1.result b/mysql-test/main/events_1.result index c425f88eab2..2f2a951158c 100644 --- a/mysql-test/main/events_1.result +++ b/mysql-test/main/events_1.result @@ -1,5 +1,6 @@ set sql_mode=""; call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted"); +call mtr.add_suppression("Incorrect definition of table mysql.event:.*"); drop database if exists events_test; drop database if exists db_x; drop database if exists mysqltest_db2; diff --git a/mysql-test/main/events_1.test b/mysql-test/main/events_1.test index 33b82730783..ba8a2059e2d 100644 --- a/mysql-test/main/events_1.test +++ b/mysql-test/main/events_1.test @@ -8,6 +8,7 @@ set sql_mode=""; --source include/default_charset.inc call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted"); +call mtr.add_suppression("Incorrect definition of table mysql.event:.*"); --disable_warnings drop database if exists events_test; diff --git a/mysql-test/main/events_restart.result b/mysql-test/main/events_restart.result index 47092beed0e..58401c7be80 100644 --- a/mysql-test/main/events_restart.result +++ b/mysql-test/main/events_restart.result @@ -21,6 +21,7 @@ insert into event_like select * from mysql.event; alter table mysql.event change column body body longtext character set utf8 collate utf8_bin; "Now we restart the server" +call mtr.add_suppression("Incorrect definition of table mysql.event:.*"); # restart use events_test; select @@event_scheduler; diff --git a/mysql-test/main/events_restart.test b/mysql-test/main/events_restart.test index 624c4188f9a..6f7c01d81c2 100644 --- a/mysql-test/main/events_restart.test +++ b/mysql-test/main/events_restart.test @@ -45,6 +45,7 @@ alter table mysql.event change column body body longtext character set utf8 collate utf8_bin; --echo "Now we restart the server" +call mtr.add_suppression("Incorrect definition of table mysql.event:.*"); --source include/restart_mysqld.inc use events_test; diff --git a/mysql-test/main/mysql_upgrade.result b/mysql-test/main/mysql_upgrade.result index 0649c9139fd..6bb922f8d42 100644 --- a/mysql-test/main/mysql_upgrade.result +++ b/mysql-test/main/mysql_upgrade.result @@ -1,4 +1,5 @@ set sql_mode=""; +call mtr.add_suppression("Incorrect definition of table mysql.column_stats:.*"); Run mysql_upgrade once Phase 1/7: Checking and upgrading mysql database Processing databases diff --git a/mysql-test/main/mysql_upgrade.test b/mysql-test/main/mysql_upgrade.test index 083f033daf5..47b07a6968b 100644 --- a/mysql-test/main/mysql_upgrade.test +++ b/mysql-test/main/mysql_upgrade.test @@ -5,6 +5,7 @@ set sql_mode=""; +call mtr.add_suppression("Incorrect definition of table mysql.column_stats:.*"); # # Basic test that we can run mysql_upgrde and that it finds the # expected binaries it uses. diff --git a/mysql-test/main/statistics_upgrade.result b/mysql-test/main/statistics_upgrade.result index 6e287115245..7b2828982f3 100644 --- a/mysql-test/main/statistics_upgrade.result +++ b/mysql-test/main/statistics_upgrade.result @@ -85,3 +85,7 @@ db_name table_name hist_type_equal histogram_equal test t1 1 1 test t2 1 1 drop table t1,t2,t4; +# +# MDEV-28866 mariadb-upgrade to 10.8 mysql.column_stats hist_type + histogram errors +# +FOUND 2 /Incorrect definition of table mysql.column_stats:/ in mysqld.1.err diff --git a/mysql-test/main/statistics_upgrade.test b/mysql-test/main/statistics_upgrade.test index 705cf65e053..9f47ab1a83b 100644 --- a/mysql-test/main/statistics_upgrade.test +++ b/mysql-test/main/statistics_upgrade.test @@ -65,3 +65,13 @@ from A.column_name=B.column_name; drop table t1,t2,t4; + +--echo # +--echo # MDEV-28866 mariadb-upgrade to 10.8 mysql.column_stats hist_type + histogram errors +--echo # +# There should only be two count here corresponding the test creation of mysql.column_stats, and +# none generated by the $MYSQL_UPGRADE run. +--let $error_log= $MYSQLTEST_VARDIR/log/mysqld.1.err +--let SEARCH_FILE= $error_log +--let SEARCH_PATTERN= Incorrect definition of table mysql.column_stats: +--source include/search_pattern_in_file.inc diff --git a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result index 54156685806..4c35d42d90a 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result @@ -3,6 +3,7 @@ include/master-slave.inc *** Test that we check against incorrect table definition for mysql.gtid_slave_pos *** connection master; CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; +call mtr.add_suppression("Incorrect definition of table mysql.gtid_slave_pos:.*"); connection slave; connection slave; include/stop_slave.inc @@ -83,16 +84,16 @@ ERROR 25000: You are not allowed to execute this command in a transaction ROLLBACK; SET GLOBAL gtid_strict_mode= 1; SET GLOBAL gtid_slave_pos = "0-1-1"; -ERROR HY000: Specified GTID 0-1-1 conflicts with the binary log which contains a more recent GTID 0-2-11. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos +ERROR HY000: Specified GTID 0-1-1 conflicts with the binary log which contains a more recent GTID 0-2-12. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos SET GLOBAL gtid_slave_pos = ""; -ERROR HY000: Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-11. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos +ERROR HY000: Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-12. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos SET GLOBAL gtid_strict_mode= 0; SET GLOBAL gtid_slave_pos = "0-1-1"; Warnings: -Warning 1947 Specified GTID 0-1-1 conflicts with the binary log which contains a more recent GTID 0-2-11. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos +Warning 1947 Specified GTID 0-1-1 conflicts with the binary log which contains a more recent GTID 0-2-12. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos SET GLOBAL gtid_slave_pos = ""; Warnings: -Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-11. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos +Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-12. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos RESET MASTER; SET GLOBAL gtid_slave_pos = "0-1-1"; START SLAVE; diff --git a/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test b/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test index c02e2670c92..412489b3ee3 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test @@ -5,6 +5,7 @@ --echo *** Test that we check against incorrect table definition for mysql.gtid_slave_pos *** --connection master CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; +call mtr.add_suppression("Incorrect definition of table mysql.gtid_slave_pos:.*"); --sync_slave_with_master --connection slave diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index 4a29b94e6f5..8d2c254babd 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -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;