Commit e174d923 authored by Marko Mäkelä's avatar Marko Mäkelä

innodb.innodb-get-fk: Actually test --innodb-read-only.

parent 1d725c81
...@@ -35,7 +35,14 @@ if ($shutdown_timeout == 0) ...@@ -35,7 +35,14 @@ if ($shutdown_timeout == 0)
shutdown_server $server_shutdown_timeout; shutdown_server $server_shutdown_timeout;
# Write file to make mysql-test-run.pl start up the server again # Write file to make mysql-test-run.pl start up the server again
--exec echo "restart" > $_expect_file_name if ($restart_parameters)
{
--exec echo "restart: $restart_parameters" > $_expect_file_name
}
if (!$restart_parameters)
{
--exec echo "restart" > $_expect_file_name
}
# Turn on reconnect # Turn on reconnect
--enable_reconnect --enable_reconnect
......
...@@ -26,7 +26,8 @@ KEY `fk_crewRoleAssigned_roleCode` (`role_code`), ...@@ -26,7 +26,8 @@ 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_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 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"; ) ENGINE=InnoDB COMMENT="This is a comment about tables";
# Restart mysqld --innodb_read_only_mode=1 ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only';
ERROR HY000: Can't lock file (errno: 165 "Table is read only")
SHOW CREATE TABLE `repro`.`crew_role_assigned`; SHOW CREATE TABLE `repro`.`crew_role_assigned`;
Table Create Table Table Create Table
crew_role_assigned CREATE TABLE `crew_role_assigned` ( crew_role_assigned CREATE TABLE `crew_role_assigned` (
...@@ -52,7 +53,6 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` ( ...@@ -52,7 +53,6 @@ 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_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 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 new comment about tables' ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a new comment about tables'
# Restart mysqld --innodb_read_only_mode=1
SHOW CREATE TABLE `repro`.`crew_role_assigned`; SHOW CREATE TABLE `repro`.`crew_role_assigned`;
Table Create Table Table Create Table
crew_role_assigned CREATE TABLE `crew_role_assigned` ( crew_role_assigned CREATE TABLE `crew_role_assigned` (
......
...@@ -33,19 +33,20 @@ CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `repr ...@@ -33,19 +33,20 @@ CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `repr
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`pilot` (`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"; ) ENGINE=InnoDB COMMENT="This is a comment about tables";
--echo # Restart mysqld --innodb_read_only_mode=1 -- let $restart_parameters=--innodb-read-only
-- let $restart_parameters=--innodb-read-only-mode=1
-- source include/restart_mysqld.inc -- source include/restart_mysqld.inc
--error ER_CANT_LOCK
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only';
SHOW CREATE TABLE `repro`.`crew_role_assigned`; SHOW CREATE TABLE `repro`.`crew_role_assigned`;
-- let $restart_parameters=
-- source include/restart_mysqld.inc -- source include/restart_mysqld.inc
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables"; ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables";
SHOW CREATE TABLE `repro`.`crew_role_assigned`; SHOW CREATE TABLE `repro`.`crew_role_assigned`;
--echo # Restart mysqld --innodb_read_only_mode=1 -- let $restart_parameters=--innodb-read-only
-- let $restart_parameters=--innodb-read-only-mode=1
-- source include/restart_mysqld.inc -- source include/restart_mysqld.inc
# #
...@@ -53,6 +54,7 @@ SHOW CREATE TABLE `repro`.`crew_role_assigned`; ...@@ -53,6 +54,7 @@ SHOW CREATE TABLE `repro`.`crew_role_assigned`;
# #
SHOW CREATE TABLE `repro`.`crew_role_assigned`; SHOW CREATE TABLE `repro`.`crew_role_assigned`;
-- let $restart_parameters=
-- source include/restart_mysqld.inc -- source include/restart_mysqld.inc
DROP TABLE `repro`.`crew_role_assigned`; DROP TABLE `repro`.`crew_role_assigned`;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment