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
b735ca47
Commit
b735ca47
authored
May 05, 2023
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.4' into 10.5
parents
ba0433dc
2594da7a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
1 deletion
+40
-1
mysql-test/main/derived_split_innodb.result
mysql-test/main/derived_split_innodb.result
+16
-0
mysql-test/main/derived_split_innodb.test
mysql-test/main/derived_split_innodb.test
+23
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-1
No files found.
mysql-test/main/derived_split_innodb.result
View file @
b735ca47
...
...
@@ -801,4 +801,20 @@ a b a b a b grp_id count(*)
5 5 5 2 5 3 5 100
drop table t1,t2,t3;
drop table t10, t11;
#
# MDEV-31194: Server crash or assertion failure with join_cache_level=4
# (a followup to the above bug, MDEV-26301)
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (3),(4);
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=Aria;
INSERT INTO t2 VALUES (1),(2);
set @tmp1= @@optimizer_switch, @tmp2= @@join_cache_level;
set
optimizer_switch= 'derived_with_keys=off',
join_cache_level= 4;
SELECT t1.* FROM t1 JOIN (SELECT id, COUNT(*) FROM t2 GROUP BY id) sq ON sq.id= t1.a;
a
set optimizer_switch= @tmp1, join_cache_level= @tmp2;
DROP TABLE t1, t2;
# End of 10.4 tests
mysql-test/main/derived_split_innodb.test
View file @
b735ca47
...
...
@@ -441,4 +441,27 @@ eval $q;
drop
table
t1
,
t2
,
t3
;
drop
table
t10
,
t11
;
--
echo
#
--
echo
# MDEV-31194: Server crash or assertion failure with join_cache_level=4
--
echo
# (a followup to the above bug, MDEV-26301)
--
echo
#
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
3
),(
4
);
CREATE
TABLE
t2
(
id
INT
PRIMARY
KEY
)
ENGINE
=
Aria
;
INSERT
INTO
t2
VALUES
(
1
),(
2
);
set
@
tmp1
=
@@
optimizer_switch
,
@
tmp2
=
@@
join_cache_level
;
set
optimizer_switch
=
'derived_with_keys=off'
,
join_cache_level
=
4
;
SELECT
t1
.*
FROM
t1
JOIN
(
SELECT
id
,
COUNT
(
*
)
FROM
t2
GROUP
BY
id
)
sq
ON
sq
.
id
=
t1
.
a
;
set
optimizer_switch
=
@
tmp1
,
join_cache_level
=
@
tmp2
;
# Cleanup
DROP
TABLE
t1
,
t2
;
--
echo
# End of 10.4 tests
sql/sql_select.cc
View file @
b735ca47
...
...
@@ -12988,7 +12988,7 @@ uint check_join_cache_usage(JOIN_TAB *tab,
join
->
return_tab
=
0
;
if
(
tab
->
no_forced_join_cache
)
return
0
;
goto
no_join_cache
;
/*
Don't use join cache if @@join_cache_level==0 or this table is the first
...
...
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