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
3f77ef52
Commit
3f77ef52
authored
Dec 19, 2013
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#157 test case for the indexsubselect::exec crash
parent
26b2d23e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
169 additions
and
0 deletions
+169
-0
mysql-test/suite/tokudb.bugs/r/subselect_index_next_same_bug_157.result
...te/tokudb.bugs/r/subselect_index_next_same_bug_157.result
+78
-0
mysql-test/suite/tokudb.bugs/t/subselect_index_next_same_bug_157.test
...uite/tokudb.bugs/t/subselect_index_next_same_bug_157.test
+91
-0
No files found.
mysql-test/suite/tokudb.bugs/r/subselect_index_next_same_bug_157.result
0 → 100644
View file @
3f77ef52
drop table if exists C, CC, D;
CREATE TABLE `C` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`col_varchar_key` varchar(1) DEFAULT NULL,
`col_varchar_nokey` varchar(1) DEFAULT NULL,
PRIMARY KEY (`pk`),
KEY `col_varchar_key` (`col_varchar_key`)
) ENGINE=InnoDB;
INSERT INTO `C` VALUES (1,'v','v'),(2,'v','v'),(3,'c','c'),(4,NULL,NULL),(5,'x','x');
CREATE TABLE `CC` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`col_varchar_key` varchar(1) DEFAULT NULL,
`col_varchar_nokey` varchar(1) DEFAULT NULL,
PRIMARY KEY (`pk`),
KEY `col_varchar_key` (`col_varchar_key`)
) ENGINE=InnoDB;
INSERT INTO `CC` VALUES (10,'x','x');
CREATE TABLE `D` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`col_varchar_key` varchar(1) DEFAULT NULL,
PRIMARY KEY (`pk`),
KEY `col_varchar_key` (`col_varchar_key`)
) ENGINE=InnoDB;
INSERT INTO `D` VALUES (10,'u');
SELECT
alias1.col_varchar_key, alias2.col_varchar_key
FROM
(CC AS alias1
INNER JOIN D AS alias2
ON (alias2.pk = alias1.pk))
WHERE
alias2.col_varchar_key NOT IN
(SELECT col_varchar_key
FROM C
WHERE col_varchar_nokey = alias1.col_varchar_key);
col_varchar_key col_varchar_key
x u
SELECT
alias1.col_varchar_key, alias2.col_varchar_key
FROM
(CC AS alias1
INNER JOIN D AS alias2
ON (alias2.pk = alias1.pk))
WHERE
alias2.col_varchar_key NOT IN
(SELECT col_varchar_key
FROM C FORCE INDEX(col_varchar_key)
WHERE col_varchar_nokey = alias1.col_varchar_key);
col_varchar_key col_varchar_key
x u
alter table C engine=TokuDB;
SELECT
alias1.col_varchar_key, alias2.col_varchar_key
FROM
(CC AS alias1
INNER JOIN D AS alias2
ON (alias2.pk = alias1.pk))
WHERE
alias2.col_varchar_key NOT IN
(SELECT col_varchar_key
FROM C
WHERE col_varchar_nokey = alias1.col_varchar_key);
col_varchar_key col_varchar_key
x u
SELECT
alias1.col_varchar_key, alias2.col_varchar_key
FROM
(CC AS alias1
INNER JOIN D AS alias2
ON (alias2.pk = alias1.pk))
WHERE
alias2.col_varchar_key NOT IN
(SELECT col_varchar_key
FROM C FORCE INDEX(col_varchar_key)
WHERE col_varchar_nokey = alias1.col_varchar_key);
col_varchar_key col_varchar_key
x u
drop table if exists C, CC, D;
mysql-test/suite/tokudb.bugs/t/subselect_index_next_same_bug_157.test
0 → 100644
View file @
3f77ef52
# test case for Tokutek/ft-engine/issue/157
# a bug in tokudb::index_next_same did not set table->status, so the
# indexsubselect::exec function would assert.
source
include
/
have_tokudb
.
inc
;
source
include
/
have_innodb
.
inc
;
disable_warnings
;
drop
table
if
exists
C
,
CC
,
D
;
enable_warnings
;
CREATE
TABLE
`C`
(
`pk`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`col_varchar_key`
varchar
(
1
)
DEFAULT
NULL
,
`col_varchar_nokey`
varchar
(
1
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`pk`
),
KEY
`col_varchar_key`
(
`col_varchar_key`
)
)
ENGINE
=
InnoDB
;
INSERT
INTO
`C`
VALUES
(
1
,
'v'
,
'v'
),(
2
,
'v'
,
'v'
),(
3
,
'c'
,
'c'
),(
4
,
NULL
,
NULL
),(
5
,
'x'
,
'x'
);
CREATE
TABLE
`CC`
(
`pk`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`col_varchar_key`
varchar
(
1
)
DEFAULT
NULL
,
`col_varchar_nokey`
varchar
(
1
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`pk`
),
KEY
`col_varchar_key`
(
`col_varchar_key`
)
)
ENGINE
=
InnoDB
;
INSERT
INTO
`CC`
VALUES
(
10
,
'x'
,
'x'
);
CREATE
TABLE
`D`
(
`pk`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`col_varchar_key`
varchar
(
1
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`pk`
),
KEY
`col_varchar_key`
(
`col_varchar_key`
)
)
ENGINE
=
InnoDB
;
INSERT
INTO
`D`
VALUES
(
10
,
'u'
);
SELECT
alias1
.
col_varchar_key
,
alias2
.
col_varchar_key
FROM
(
CC
AS
alias1
INNER
JOIN
D
AS
alias2
ON
(
alias2
.
pk
=
alias1
.
pk
))
WHERE
alias2
.
col_varchar_key
NOT
IN
(
SELECT
col_varchar_key
FROM
C
WHERE
col_varchar_nokey
=
alias1
.
col_varchar_key
);
SELECT
alias1
.
col_varchar_key
,
alias2
.
col_varchar_key
FROM
(
CC
AS
alias1
INNER
JOIN
D
AS
alias2
ON
(
alias2
.
pk
=
alias1
.
pk
))
WHERE
alias2
.
col_varchar_key
NOT
IN
(
SELECT
col_varchar_key
FROM
C
FORCE
INDEX
(
col_varchar_key
)
WHERE
col_varchar_nokey
=
alias1
.
col_varchar_key
);
alter
table
C
engine
=
TokuDB
;
SELECT
alias1
.
col_varchar_key
,
alias2
.
col_varchar_key
FROM
(
CC
AS
alias1
INNER
JOIN
D
AS
alias2
ON
(
alias2
.
pk
=
alias1
.
pk
))
WHERE
alias2
.
col_varchar_key
NOT
IN
(
SELECT
col_varchar_key
FROM
C
WHERE
col_varchar_nokey
=
alias1
.
col_varchar_key
);
SELECT
alias1
.
col_varchar_key
,
alias2
.
col_varchar_key
FROM
(
CC
AS
alias1
INNER
JOIN
D
AS
alias2
ON
(
alias2
.
pk
=
alias1
.
pk
))
WHERE
alias2
.
col_varchar_key
NOT
IN
(
SELECT
col_varchar_key
FROM
C
FORCE
INDEX
(
col_varchar_key
)
WHERE
col_varchar_nokey
=
alias1
.
col_varchar_key
);
drop
table
if
exists
C
,
CC
,
D
;
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