summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-10-18 06:35:11 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-10-18 06:35:11 +0300
commitdfd010ef906705165d6866377ebd4c937adc7716 (patch)
treefe3c029dff96af162f6a428e7c25a02ba9eab858 /mysql-test/suite/innodb
parent4090ef820e869608e6f67f8a590b9fea427b73d5 (diff)
downloadmariadb-git-dfd010ef906705165d6866377ebd4c937adc7716.tar.gz
MDEV-14086 Setting innodb_buffer_pool_load_now or innodb_buffer_load_abort will crash if innodb_read_only
When MySQL 5.6.10 introduced innodb_read_only mode, it skipped the creation of the InnoDB buffer pool dump/restore subsystem in that mode. Attempts to set the variable innodb_buf_pool_dump_now would have no effect in innodb_read_only mode, but the corresponding condition was forgotten in from the other two update functions. MySQL 5.7.20 would fix the innodb_buffer_pool_load_now, but not innodb_buffer_pool_load_abort. Let us fix both in MariaDB.
Diffstat (limited to 'mysql-test/suite/innodb')
-rw-r--r--mysql-test/suite/innodb/r/innodb-get-fk.result3
-rw-r--r--mysql-test/suite/innodb/t/innodb-get-fk.test5
2 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/innodb-get-fk.result b/mysql-test/suite/innodb/r/innodb-get-fk.result
index ee17f262854..aa1bff8f134 100644
--- a/mysql-test/suite/innodb/r/innodb-get-fk.result
+++ b/mysql-test/suite/innodb/r/innodb-get-fk.result
@@ -40,6 +40,9 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` (
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a comment about tables'
+SET GLOBAL innodb_buffer_pool_load_now = ON;
+SET GLOBAL innodb_buffer_pool_dump_now = ON;
+SET GLOBAL innodb_buffer_pool_load_abort = ON;
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables";
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
Table Create Table
diff --git a/mysql-test/suite/innodb/t/innodb-get-fk.test b/mysql-test/suite/innodb/t/innodb-get-fk.test
index 339a7968623..46eb7dd0273 100644
--- a/mysql-test/suite/innodb/t/innodb-get-fk.test
+++ b/mysql-test/suite/innodb/t/innodb-get-fk.test
@@ -40,6 +40,11 @@ CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `rep
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only';
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
+# These should be ignored in innodb_read_only mode.
+SET GLOBAL innodb_buffer_pool_load_now = ON;
+SET GLOBAL innodb_buffer_pool_dump_now = ON;
+SET GLOBAL innodb_buffer_pool_load_abort = ON;
+
-- let $restart_parameters=
-- source include/restart_mysqld.inc