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
575bec00
Commit
575bec00
authored
Dec 15, 2009
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
1e521053
c94fdc7e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
0 deletions
+56
-0
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+25
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+26
-0
sql/sql_select.cc
sql/sql_select.cc
+5
-0
No files found.
mysql-test/r/subselect.result
View file @
575bec00
...
...
@@ -4410,6 +4410,31 @@ WHERE a = 230;
MAX(b) (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
NULL 0
DROP TABLE t1, st1, st2;
#
# Bug #48709: Assertion failed in sql_select.cc:11782:
# int join_read_key(JOIN_TAB*)
#
CREATE TABLE t1 (pk int PRIMARY KEY, int_key int);
INSERT INTO t1 VALUES (10,1), (14,1);
CREATE TABLE t2 (pk int PRIMARY KEY, int_key int);
INSERT INTO t2 VALUES (3,3), (5,NULL), (7,3);
# should have eq_ref for t1
EXPLAIN
SELECT * FROM t2 outr
WHERE outr.int_key NOT IN (SELECT t1.pk FROM t1, t2)
ORDER BY outr.pk;
id select_type table type possible_keys key key_len ref rows Extra
x x outr ALL x x x x x x
x x t1 eq_ref x x x x x x
x x t2 index x x x x x x
# should not crash on debug binaries
SELECT * FROM t2 outr
WHERE outr.int_key NOT IN (SELECT t1.pk FROM t1, t2)
ORDER BY outr.pk;
pk int_key
3 3
7 3
DROP TABLE t1,t2;
End of 5.0 tests.
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (2,22),(1,11),(2,22);
...
...
mysql-test/t/subselect.test
View file @
575bec00
...
...
@@ -3368,6 +3368,32 @@ WHERE a = 230;
DROP
TABLE
t1
,
st1
,
st2
;
--
echo
#
--
echo
# Bug #48709: Assertion failed in sql_select.cc:11782:
--
echo
# int join_read_key(JOIN_TAB*)
--
echo
#
CREATE
TABLE
t1
(
pk
int
PRIMARY
KEY
,
int_key
int
);
INSERT
INTO
t1
VALUES
(
10
,
1
),
(
14
,
1
);
CREATE
TABLE
t2
(
pk
int
PRIMARY
KEY
,
int_key
int
);
INSERT
INTO
t2
VALUES
(
3
,
3
),
(
5
,
NULL
),
(
7
,
3
);
--
echo
# should have eq_ref for t1
--
replace_column
1
x
2
x
5
x
6
x
7
x
8
x
9
x
10
x
EXPLAIN
SELECT
*
FROM
t2
outr
WHERE
outr
.
int_key
NOT
IN
(
SELECT
t1
.
pk
FROM
t1
,
t2
)
ORDER
BY
outr
.
pk
;
--
echo
# should not crash on debug binaries
SELECT
*
FROM
t2
outr
WHERE
outr
.
int_key
NOT
IN
(
SELECT
t1
.
pk
FROM
t1
,
t2
)
ORDER
BY
outr
.
pk
;
DROP
TABLE
t1
,
t2
;
--
echo
End
of
5.0
tests
.
#
...
...
sql/sql_select.cc
View file @
575bec00
...
...
@@ -1622,6 +1622,11 @@ JOIN::reinit()
if
(
join_tab_save
)
memcpy
(
join_tab
,
join_tab_save
,
sizeof
(
JOIN_TAB
)
*
tables
);
/* need to reset ref access state (see join_read_key) */
if
(
join_tab
)
for
(
uint
i
=
0
;
i
<
tables
;
i
++
)
join_tab
[
i
].
ref
.
key_err
=
TRUE
;
if
(
tmp_join
)
restore_tmp
();
...
...
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