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
65b4d745
Commit
65b4d745
authored
Dec 13, 2016
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge the test innodb.innodb_misc1 into innodb.innodb.
parent
d26b9f67
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
2166 deletions
+55
-2166
mysql-test/suite/innodb/r/innodb.result
mysql-test/suite/innodb/r/innodb.result
+17
-4
mysql-test/suite/innodb/r/innodb_misc1.result
mysql-test/suite/innodb/r/innodb_misc1.result
+0
-922
mysql-test/suite/innodb/t/innodb.test
mysql-test/suite/innodb/t/innodb.test
+38
-43
mysql-test/suite/innodb/t/innodb_misc1-master.opt
mysql-test/suite/innodb/t/innodb_misc1-master.opt
+0
-1
mysql-test/suite/innodb/t/innodb_misc1.test
mysql-test/suite/innodb/t/innodb_misc1.test
+0
-1196
No files found.
mysql-test/suite/innodb/r/innodb.result
View file @
65b4d745
...
@@ -2455,17 +2455,30 @@ drop table t1,t2;
...
@@ -2455,17 +2455,30 @@ drop table t1,t2;
CREATE TABLE t1 (
CREATE TABLE t1 (
id INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY (id)
id INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY (id)
)
ENGINE=InnoDB;
)
ENGINE=InnoDB;
CREATE TABLE t2 (
id INTEGER NOT NULL,
FOREIGN KEY (id) REFERENCES t1 (id)
)
ENGINE=InnoDB;
INSERT INTO t1 (id) VALUES (NULL);
INSERT INTO t1 (id) VALUES (NULL);
SELECT * FROM t1;
SELECT * FROM t1;
id
id
1
1
TRUNCATE t1;
TRUNCATE t1;
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`id`) REFERENCES `test`.`t1` (`id`))
INSERT INTO t1 (id) VALUES (NULL);
INSERT INTO t1 (id) VALUES (NULL);
SELECT * FROM t1;
SELECT * FROM t1;
id
id
1
1
2
DELETE FROM t1;
DELETE FROM t1;
TRUNCATE t1;
TRUNCATE t1;
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`id`) REFERENCES `test`.`t1` (`id`))
INSERT INTO t1 (id) VALUES (NULL);
SELECT * FROM t1;
id
3
DROP TABLE t2;
TRUNCATE t1;
INSERT INTO t1 (id) VALUES (NULL);
INSERT INTO t1 (id) VALUES (NULL);
SELECT * FROM t1;
SELECT * FROM t1;
id
id
...
@@ -2481,7 +2494,7 @@ id INT NOT NULL PRIMARY KEY,
...
@@ -2481,7 +2494,7 @@ id INT NOT NULL PRIMARY KEY,
b INT,
b INT,
FOREIGN KEY (b) REFERENCES test.t1(id)
FOREIGN KEY (b) REFERENCES test.t1(id)
)
ENGINE=InnoDB;
)
ENGINE=InnoDB;
Got one of the listed errors
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
DROP TABLE t1;
DROP TABLE t1;
create table t1 (col1 varchar(2000), index (col1(767)))
create table t1 (col1 varchar(2000), index (col1(767)))
character set = latin1 engine = innodb;
character set = latin1 engine = innodb;
...
@@ -2574,7 +2587,7 @@ INSERT INTO t2 VALUES(1);
...
@@ -2574,7 +2587,7 @@ INSERT INTO t2 VALUES(1);
DELETE FROM t1 WHERE id = 1;
DELETE FROM t1 WHERE id = 1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
DROP TABLE t1;
DROP TABLE t1;
Got one of the listed errors
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
SET FOREIGN_KEY_CHECKS=0;
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE t1;
DROP TABLE t1;
SET FOREIGN_KEY_CHECKS=1;
SET FOREIGN_KEY_CHECKS=1;
...
@@ -3089,7 +3102,7 @@ a BIGINT(20) NOT NULL,
...
@@ -3089,7 +3102,7 @@ a BIGINT(20) NOT NULL,
b VARCHAR(128) NOT NULL,
b VARCHAR(128) NOT NULL,
c TEXT NOT NULL,
c TEXT NOT NULL,
PRIMARY KEY (a,b),
PRIMARY KEY (a,b),
KEY idx_t2_b_c (b,c(
2
00)),
KEY idx_t2_b_c (b,c(
1
00)),
CONSTRAINT t_fk FOREIGN KEY (a) REFERENCES t1 (a)
CONSTRAINT t_fk FOREIGN KEY (a) REFERENCES t1 (a)
ON DELETE CASCADE
ON DELETE CASCADE
)
ENGINE=INNODB DEFAULT CHARSET=UTF8;
)
ENGINE=INNODB DEFAULT CHARSET=UTF8;
...
...
mysql-test/suite/innodb/r/innodb_misc1.result
deleted
100644 → 0
View file @
d26b9f67
This diff is collapsed.
Click to expand it.
mysql-test/suite/innodb/t/innodb.test
View file @
65b4d745
#######################################################################
# #
# Please, DO NOT TOUCH this file as well as the innodb.result file. #
# These files are to be modified ONLY BY INNOBASE guys. #
# #
# Use innodb_mysql.[test|result] files instead. #
# #
# If nevertheless you need to make some changes here, please, forward #
# your commit message #
# To: innodb_dev_ww@oracle.com #
# Cc: dev-innodb@mysql.com #
# (otherwise your changes may be erased). #
# #
#######################################################################
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_innodb_16k
.
inc
--
source
include
/
have_innodb_16k
.
inc
...
@@ -1521,15 +1506,25 @@ CREATE TABLE t1 (
...
@@ -1521,15 +1506,25 @@ CREATE TABLE t1 (
id
INTEGER
NOT
NULL
AUTO_INCREMENT
,
PRIMARY
KEY
(
id
)
id
INTEGER
NOT
NULL
AUTO_INCREMENT
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
InnoDB
;
)
ENGINE
=
InnoDB
;
CREATE
TABLE
t2
(
id
INTEGER
NOT
NULL
,
FOREIGN
KEY
(
id
)
REFERENCES
t1
(
id
)
)
ENGINE
=
InnoDB
;
INSERT
INTO
t1
(
id
)
VALUES
(
NULL
);
INSERT
INTO
t1
(
id
)
VALUES
(
NULL
);
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
--
error
ER_TRUNCATE_ILLEGAL_FK
TRUNCATE
t1
;
TRUNCATE
t1
;
INSERT
INTO
t1
(
id
)
VALUES
(
NULL
);
INSERT
INTO
t1
(
id
)
VALUES
(
NULL
);
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
# continued from above; test that doing a slow TRUNCATE on a table with 0
# continued from above; test that doing a TRUNCATE resets AUTO_INCREMENT
# rows resets autoincrement columns
DELETE
FROM
t1
;
DELETE
FROM
t1
;
--
error
ER_TRUNCATE_ILLEGAL_FK
TRUNCATE
t1
;
INSERT
INTO
t1
(
id
)
VALUES
(
NULL
);
SELECT
*
FROM
t1
;
DROP
TABLE
t2
;
TRUNCATE
t1
;
TRUNCATE
t1
;
INSERT
INTO
t1
(
id
)
VALUES
(
NULL
);
INSERT
INTO
t1
(
id
)
VALUES
(
NULL
);
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
...
@@ -1541,7 +1536,7 @@ CREATE TABLE t1
...
@@ -1541,7 +1536,7 @@ CREATE TABLE t1
id
INT
PRIMARY
KEY
id
INT
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
)
ENGINE
=
InnoDB
;
--
error
ER_CAN
NOT_ADD_FOREIGN
,
1005
--
error
ER_CAN
T_CREATE_TABLE
CREATE
TEMPORARY
TABLE
t2
CREATE
TEMPORARY
TABLE
t2
(
(
id
INT
NOT
NULL
PRIMARY
KEY
,
id
INT
NOT
NULL
PRIMARY
KEY
,
...
@@ -1630,7 +1625,7 @@ CREATE TABLE t2
...
@@ -1630,7 +1625,7 @@ CREATE TABLE t2
CONSTRAINT
c1
FOREIGN
KEY
(
v
)
REFERENCES
t1
(
id
)
CONSTRAINT
c1
FOREIGN
KEY
(
v
)
REFERENCES
t1
(
id
)
)
ENGINE
=
InnoDB
;
)
ENGINE
=
InnoDB
;
--
error
145
2
--
error
ER_NO_REFERENCED_ROW_
2
INSERT
INTO
t2
VALUES
(
2
);
INSERT
INTO
t2
VALUES
(
2
);
INSERT
INTO
t1
VALUES
(
1
);
INSERT
INTO
t1
VALUES
(
1
);
...
@@ -1639,14 +1634,14 @@ INSERT INTO t2 VALUES(1);
...
@@ -1639,14 +1634,14 @@ INSERT INTO t2 VALUES(1);
--
error
ER_ROW_IS_REFERENCED_2
--
error
ER_ROW_IS_REFERENCED_2
DELETE
FROM
t1
WHERE
id
=
1
;
DELETE
FROM
t1
WHERE
id
=
1
;
--
error
ER_ROW_IS_REFERENCED_2
,
1217
--
error
ER_ROW_IS_REFERENCED_2
DROP
TABLE
t1
;
DROP
TABLE
t1
;
SET
FOREIGN_KEY_CHECKS
=
0
;
SET
FOREIGN_KEY_CHECKS
=
0
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
SET
FOREIGN_KEY_CHECKS
=
1
;
SET
FOREIGN_KEY_CHECKS
=
1
;
--
error
145
2
--
error
ER_NO_REFERENCED_ROW_
2
INSERT
INTO
t2
VALUES
(
3
);
INSERT
INTO
t2
VALUES
(
3
);
DROP
TABLE
t2
;
DROP
TABLE
t2
;
...
@@ -1702,7 +1697,7 @@ set foreign_key_checks=0;
...
@@ -1702,7 +1697,7 @@ set foreign_key_checks=0;
create
table
t2
(
a
int
primary
key
,
b
int
,
foreign
key
(
b
)
references
t1
(
a
))
engine
=
innodb
;
create
table
t2
(
a
int
primary
key
,
b
int
,
foreign
key
(
b
)
references
t1
(
a
))
engine
=
innodb
;
# Embedded server doesn't chdir to data directory
# Embedded server doesn't chdir to data directory
--
replace_result
$MYSQLTEST_VARDIR
.
master
-
data
/
''
--
replace_result
$MYSQLTEST_VARDIR
.
master
-
data
/
''
--
error
1005
--
error
ER_CANT_CREATE_TABLE
create
table
t1
(
a
char
(
10
)
primary
key
,
b
varchar
(
20
))
engine
=
innodb
;
create
table
t1
(
a
char
(
10
)
primary
key
,
b
varchar
(
20
))
engine
=
innodb
;
set
foreign_key_checks
=
1
;
set
foreign_key_checks
=
1
;
drop
table
t2
;
drop
table
t2
;
...
@@ -1714,7 +1709,7 @@ set foreign_key_checks=0;
...
@@ -1714,7 +1709,7 @@ set foreign_key_checks=0;
create
table
t1
(
a
varchar
(
10
)
primary
key
)
engine
=
innodb
DEFAULT
CHARSET
=
latin1
;
create
table
t1
(
a
varchar
(
10
)
primary
key
)
engine
=
innodb
DEFAULT
CHARSET
=
latin1
;
# Embedded server doesn't chdir to data directory
# Embedded server doesn't chdir to data directory
--
replace_result
$MYSQLTEST_VARDIR
.
master
-
data
/
''
--
replace_result
$MYSQLTEST_VARDIR
.
master
-
data
/
''
--
error
1005
--
error
ER_CANT_CREATE_TABLE
create
table
t2
(
a
varchar
(
10
),
foreign
key
(
a
)
references
t1
(
a
))
engine
=
innodb
DEFAULT
CHARSET
=
utf8
;
create
table
t2
(
a
varchar
(
10
),
foreign
key
(
a
)
references
t1
(
a
))
engine
=
innodb
DEFAULT
CHARSET
=
utf8
;
set
foreign_key_checks
=
1
;
set
foreign_key_checks
=
1
;
drop
table
t1
;
drop
table
t1
;
...
@@ -2117,12 +2112,12 @@ set autocommit = 0;
...
@@ -2117,12 +2112,12 @@ set autocommit = 0;
#
#
# S-lock to records (2,2),(4,2), and (6,2) should not be released in a update
# S-lock to records (2,2),(4,2), and (6,2) should not be released in a update
#
#
--
error
1205
--
error
ER_LOCK_WAIT_TIMEOUT
select
*
from
t1
where
a
=
2
and
b
=
2
for
update
;
select
*
from
t1
where
a
=
2
and
b
=
2
for
update
;
#
#
# X-lock to record (1,1),(3,1),(5,1) should not be released in a update
# X-lock to record (1,1),(3,1),(5,1) should not be released in a update
#
#
--
error
1205
--
error
ER_LOCK_WAIT_TIMEOUT
connection
a
;
connection
a
;
commit
;
commit
;
connection
b
;
connection
b
;
...
@@ -2262,39 +2257,39 @@ SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
...
@@ -2262,39 +2257,39 @@ SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
create
table
t10
(
a
int
not
null
,
b
int
,
primary
key
(
a
))
engine
=
innodb
select
*
from
t2
for
update
;
create
table
t10
(
a
int
not
null
,
b
int
,
primary
key
(
a
))
engine
=
innodb
select
*
from
t2
for
update
;
connection
b
;
connection
b
;
--
error
1205
--
error
ER_LOCK_WAIT_TIMEOUT
reap
;
reap
;
connection
c
;
connection
c
;
--
error
1205
--
error
ER_LOCK_WAIT_TIMEOUT
reap
;
reap
;
connection
d
;
connection
d
;
--
error
1205
--
error
ER_LOCK_WAIT_TIMEOUT
reap
;
reap
;
connection
e
;
connection
e
;
--
error
1205
--
error
ER_LOCK_WAIT_TIMEOUT
reap
;
reap
;
connection
f
;
connection
f
;
--
error
1205
--
error
ER_LOCK_WAIT_TIMEOUT
reap
;
reap
;
connection
g
;
connection
g
;
--
error
1205
--
error
ER_LOCK_WAIT_TIMEOUT
reap
;
reap
;
connection
h
;
connection
h
;
--
error
1205
--
error
ER_LOCK_WAIT_TIMEOUT
reap
;
reap
;
connection
i
;
connection
i
;
--
error
1205
--
error
ER_LOCK_WAIT_TIMEOUT
reap
;
reap
;
connection
j
;
connection
j
;
--
error
1205
--
error
ER_LOCK_WAIT_TIMEOUT
reap
;
reap
;
connection
a
;
connection
a
;
...
@@ -2331,7 +2326,7 @@ CREATE TABLE t2 (
...
@@ -2331,7 +2326,7 @@ CREATE TABLE t2 (
b
VARCHAR
(
128
)
NOT
NULL
,
b
VARCHAR
(
128
)
NOT
NULL
,
c
TEXT
NOT
NULL
,
c
TEXT
NOT
NULL
,
PRIMARY
KEY
(
a
,
b
),
PRIMARY
KEY
(
a
,
b
),
KEY
idx_t2_b_c
(
b
,
c
(
2
00
)),
KEY
idx_t2_b_c
(
b
,
c
(
1
00
)),
CONSTRAINT
t_fk
FOREIGN
KEY
(
a
)
REFERENCES
t1
(
a
)
CONSTRAINT
t_fk
FOREIGN
KEY
(
a
)
REFERENCES
t1
(
a
)
ON
DELETE
CASCADE
ON
DELETE
CASCADE
)
ENGINE
=
INNODB
DEFAULT
CHARSET
=
UTF8
;
)
ENGINE
=
INNODB
DEFAULT
CHARSET
=
UTF8
;
...
...
mysql-test/suite/innodb/t/innodb_misc1-master.opt
deleted
100644 → 0
View file @
d26b9f67
--binlog_cache_size=32768 --innodb_lock_wait_timeout=1
mysql-test/suite/innodb/t/innodb_misc1.test
deleted
100644 → 0
View file @
d26b9f67
This diff is collapsed.
Click to expand it.
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