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
3d5dff6c
Commit
3d5dff6c
authored
Mar 14, 2018
by
Vicențiu Ciorbaru
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '5.5' into 10.0
parents
48c11d40
926edd48
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
3 deletions
+33
-3
debian/control
debian/control
+2
-2
mysql-test/r/subselect_mat.result
mysql-test/r/subselect_mat.result
+15
-0
mysql-test/t/subselect_mat.test
mysql-test/t/subselect_mat.test
+13
-0
sql/opt_subselect.cc
sql/opt_subselect.cc
+3
-1
No files found.
debian/control
View file @
3d5dff6c
...
...
@@ -24,8 +24,8 @@ Build-Depends: bison,
${
LIBREADLINE_DEV
}
Standards
-
Version
:
3.8.3
Homepage
:
http
://
mariadb
.
org
/
Vcs
-
Browser
:
http
://
bazaar
.
launchpad
.
net
/~
maria
-
captains
/
maria
/
10.0
/
files
Vcs
-
Bzr
:
bzr
://
lp
:
maria
Vcs
-
Browser
:
http
s
://
github
.
com
/
MariaDB
/
server
/
Vcs
-
Git
:
https
://
github
.
com
/
MariaDB
/
server
.
git
Package
:
libmariadbclient18
Section
:
libs
...
...
mysql-test/r/subselect_mat.result
View file @
3d5dff6c
...
...
@@ -2714,3 +2714,18 @@ a b sq
4 4 1
4 2 1
drop table t1, t2;
#
# MDEV-15235: Assertion `length > 0' failed in create_ref_for_key
#
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (f CHAR(1));
INSERT INTO t2 VALUES ('a'),('b');
explain
SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where
2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 );
f
DROP TABLE t1, t2;
mysql-test/t/subselect_mat.test
View file @
3d5dff6c
...
...
@@ -254,3 +254,16 @@ SELECT a, b, (a, b) NOT IN (SELECT a, b FROM t2) as sq
FROM
t1
;
drop
table
t1
,
t2
;
--
echo
#
--
echo
# MDEV-15235: Assertion `length > 0' failed in create_ref_for_key
--
echo
#
CREATE
TABLE
t1
(
i
INT
);
INSERT
INTO
t1
VALUES
(
1
),(
2
);
CREATE
TABLE
t2
(
f
CHAR
(
1
));
INSERT
INTO
t2
VALUES
(
'a'
),(
'b'
);
explain
SELECT
*
FROM
t2
WHERE
f
IN
(
SELECT
LEFT
(
'foo'
,
0
)
FROM
t1
ORDER
BY
1
);
SELECT
*
FROM
t2
WHERE
f
IN
(
SELECT
LEFT
(
'foo'
,
0
)
FROM
t1
ORDER
BY
1
);
DROP
TABLE
t1
,
t2
;
sql/opt_subselect.cc
View file @
3d5dff6c
...
...
@@ -873,8 +873,10 @@ bool subquery_types_allow_materialization(Item_in_subselect *in_subs)
Make sure that create_tmp_table will not fail due to too long keys.
See MDEV-7122. This check is performed inside create_tmp_table also and
we must do it so that we know the table has keys created.
Make sure that the length of the key for the temp_table is atleast
greater than 0.
*/
if
(
total_key_length
>
tmp_table_max_key_length
()
||
if
(
!
total_key_length
||
total_key_length
>
tmp_table_max_key_length
()
||
elements
>
tmp_table_max_key_parts
())
DBUG_RETURN
(
FALSE
);
...
...
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