2019-08-30 16:06:54 +03:00
|
|
|
--source include/have_innodb.inc
|
|
|
|
--source include/default_charset.inc
|
2015-12-14 14:34:32 +02:00
|
|
|
# need to restart server
|
2019-08-30 16:06:54 +03:00
|
|
|
--source include/not_embedded.inc
|
2022-10-05 15:18:58 +03:00
|
|
|
--source include/no_valgrind_without_big.inc
|
|
|
|
|
2015-12-14 14:34:32 +02:00
|
|
|
CREATE SCHEMA `repro`;
|
|
|
|
|
|
|
|
CREATE TABLE `repro`.`crew` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`code` varchar(50) NOT NULL,
|
|
|
|
`name` varchar(50) NOT NULL,
|
|
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `code` (`code`)
|
|
|
|
) ENGINE=InnoDB;
|
|
|
|
|
|
|
|
CREATE TABLE `repro`.`pilot` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`code` varchar(50) NOT NULL,
|
|
|
|
`name` varchar(50) NOT NULL,
|
|
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `code` (`code`)
|
|
|
|
) ENGINE=InnoDB;
|
|
|
|
|
|
|
|
CREATE TABLE `repro`.`crew_role_assigned` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`crew_id` int(11) NOT NULL,
|
|
|
|
`role_code` varchar(50) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `fk_crewRoleAssigned_roleCode` (`role_code`),
|
|
|
|
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
|
|
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
|
|
|
) ENGINE=InnoDB COMMENT="This is a comment about tables";
|
|
|
|
|
2017-02-03 19:33:09 +02:00
|
|
|
-- let $restart_parameters=--innodb-read-only
|
2015-12-14 14:34:32 +02:00
|
|
|
-- source include/restart_mysqld.inc
|
|
|
|
|
2017-07-31 00:31:23 +03:00
|
|
|
--error ER_OPEN_AS_READONLY
|
2017-02-03 19:33:09 +02:00
|
|
|
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only';
|
2015-12-14 14:34:32 +02:00
|
|
|
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
|
|
|
|
2017-10-18 06:35:11 +03:00
|
|
|
# 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;
|
|
|
|
|
2017-02-03 19:33:09 +02:00
|
|
|
-- let $restart_parameters=
|
2015-12-14 14:34:32 +02:00
|
|
|
-- source include/restart_mysqld.inc
|
|
|
|
|
|
|
|
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables";
|
|
|
|
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
|
|
|
|
2017-02-03 19:33:09 +02:00
|
|
|
-- let $restart_parameters=--innodb-read-only
|
2015-12-14 14:34:32 +02:00
|
|
|
-- source include/restart_mysqld.inc
|
|
|
|
|
|
|
|
#
|
|
|
|
# Below create table should contain also fk definitions
|
|
|
|
#
|
|
|
|
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
|
|
|
|
2017-02-03 19:33:09 +02:00
|
|
|
-- let $restart_parameters=
|
2015-12-14 14:34:32 +02:00
|
|
|
-- source include/restart_mysqld.inc
|
|
|
|
|
|
|
|
DROP TABLE `repro`.`crew_role_assigned`;
|
|
|
|
DROP TABLE `repro`.`pilot`;
|
|
|
|
DROP TABLE `repro`.`crew`;
|
|
|
|
DROP SCHEMA `repro`;
|