Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e174d923
Commit
e174d923
authored
Feb 03, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
innodb.innodb-get-fk: Actually test --innodb-read-only.
parent
1d725c81
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
mysql-test/include/restart_mysqld.inc
mysql-test/include/restart_mysqld.inc
+8
-1
mysql-test/suite/innodb/r/innodb-get-fk.result
mysql-test/suite/innodb/r/innodb-get-fk.result
+2
-2
mysql-test/suite/innodb/t/innodb-get-fk.test
mysql-test/suite/innodb/t/innodb-get-fk.test
+6
-4
No files found.
mysql-test/include/restart_mysqld.inc
View file @
e174d923
...
...
@@ -35,7 +35,14 @@ if ($shutdown_timeout == 0)
shutdown_server $server_shutdown_timeout
;
# 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
--
enable_reconnect
...
...
mysql-test/suite/innodb/r/innodb-get-fk.result
View file @
e174d923
...
...
@@ -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_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) 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`;
Table Create Table
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_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'
# Restart mysqld --innodb_read_only_mode=1
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
Table Create Table
crew_role_assigned CREATE TABLE `crew_role_assigned` (
...
...
mysql-test/suite/innodb/t/innodb-get-fk.test
View file @
e174d923
...
...
@@ -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
)
ENGINE
=
InnoDB
COMMENT
=
"This is a comment about tables"
;
--
echo
# Restart mysqld --innodb_read_only_mode=1
--
let
$restart_parameters
=--
innodb
-
read
-
only
-
mode
=
1
--
let
$restart_parameters
=--
innodb
-
read
-
only
--
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`
;
--
let
$restart_parameters
=
--
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`
;
--
echo
# Restart mysqld --innodb_read_only_mode=1
--
let
$restart_parameters
=--
innodb
-
read
-
only
-
mode
=
1
--
let
$restart_parameters
=--
innodb
-
read
-
only
--
source
include
/
restart_mysqld
.
inc
#
...
...
@@ -53,6 +54,7 @@ SHOW CREATE TABLE `repro`.`crew_role_assigned`;
#
SHOW
CREATE
TABLE
`repro`
.
`crew_role_assigned`
;
--
let
$restart_parameters
=
--
source
include
/
restart_mysqld
.
inc
DROP
TABLE
`repro`
.
`crew_role_assigned`
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment