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
0946c99e
Commit
0946c99e
authored
Nov 02, 2022
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.3' into 10.4
parents
1a3859ff
3303748f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
89 additions
and
1 deletion
+89
-1
mysql-test/main/subselect.result
mysql-test/main/subselect.result
+11
-0
mysql-test/main/subselect.test
mysql-test/main/subselect.test
+14
-0
mysql-test/main/subselect_no_exists_to_in.result
mysql-test/main/subselect_no_exists_to_in.result
+11
-0
mysql-test/main/subselect_no_mat.result
mysql-test/main/subselect_no_mat.result
+11
-0
mysql-test/main/subselect_no_opts.result
mysql-test/main/subselect_no_opts.result
+11
-0
mysql-test/main/subselect_no_scache.result
mysql-test/main/subselect_no_scache.result
+11
-0
mysql-test/main/subselect_no_semijoin.result
mysql-test/main/subselect_no_semijoin.result
+11
-0
sql/sql_select.cc
sql/sql_select.cc
+9
-1
No files found.
mysql-test/main/subselect.result
View file @
0946c99e
...
...
@@ -7384,6 +7384,17 @@ a
drop table t1,t2,t3;
# End of 10.2 tests
#
# MDEV-29926: ASAN heap-use-after-free in Explain_query::~Explain_query
#
CREATE TABLE t (a VARCHAR(1)) CHARACTER SET utf8mb3;
EXECUTE IMMEDIATE "SELECT COUNT(*) FROM t WHERE a < (SELECT 'x')";
COUNT(*)
0
DROP TABLE t;
#
# End of 10.3 tests
#
#
# Start of 10.4 tests
#
#
...
...
mysql-test/main/subselect.test
View file @
0946c99e
...
...
@@ -6290,6 +6290,20 @@ drop table t1,t2,t3;
--
echo
# End of 10.2 tests
--
echo
#
--
echo
# MDEV-29926: ASAN heap-use-after-free in Explain_query::~Explain_query
--
echo
#
CREATE
TABLE
t
(
a
VARCHAR
(
1
))
CHARACTER
SET
utf8mb3
;
EXECUTE
IMMEDIATE
"SELECT COUNT(*) FROM t WHERE a < (SELECT 'x')"
;
# Cleanup
DROP
TABLE
t
;
--
echo
#
--
echo
# End of 10.3 tests
--
echo
#
--
echo
#
--
echo
# Start of 10.4 tests
...
...
mysql-test/main/subselect_no_exists_to_in.result
View file @
0946c99e
...
...
@@ -7384,6 +7384,17 @@ a
drop table t1,t2,t3;
# End of 10.2 tests
#
# MDEV-29926: ASAN heap-use-after-free in Explain_query::~Explain_query
#
CREATE TABLE t (a VARCHAR(1)) CHARACTER SET utf8mb3;
EXECUTE IMMEDIATE "SELECT COUNT(*) FROM t WHERE a < (SELECT 'x')";
COUNT(*)
0
DROP TABLE t;
#
# End of 10.3 tests
#
#
# Start of 10.4 tests
#
#
...
...
mysql-test/main/subselect_no_mat.result
View file @
0946c99e
...
...
@@ -7377,6 +7377,17 @@ a
drop table t1,t2,t3;
# End of 10.2 tests
#
# MDEV-29926: ASAN heap-use-after-free in Explain_query::~Explain_query
#
CREATE TABLE t (a VARCHAR(1)) CHARACTER SET utf8mb3;
EXECUTE IMMEDIATE "SELECT COUNT(*) FROM t WHERE a < (SELECT 'x')";
COUNT(*)
0
DROP TABLE t;
#
# End of 10.3 tests
#
#
# Start of 10.4 tests
#
#
...
...
mysql-test/main/subselect_no_opts.result
View file @
0946c99e
...
...
@@ -7375,6 +7375,17 @@ a
drop table t1,t2,t3;
# End of 10.2 tests
#
# MDEV-29926: ASAN heap-use-after-free in Explain_query::~Explain_query
#
CREATE TABLE t (a VARCHAR(1)) CHARACTER SET utf8mb3;
EXECUTE IMMEDIATE "SELECT COUNT(*) FROM t WHERE a < (SELECT 'x')";
COUNT(*)
0
DROP TABLE t;
#
# End of 10.3 tests
#
#
# Start of 10.4 tests
#
#
...
...
mysql-test/main/subselect_no_scache.result
View file @
0946c99e
...
...
@@ -7390,6 +7390,17 @@ a
drop table t1,t2,t3;
# End of 10.2 tests
#
# MDEV-29926: ASAN heap-use-after-free in Explain_query::~Explain_query
#
CREATE TABLE t (a VARCHAR(1)) CHARACTER SET utf8mb3;
EXECUTE IMMEDIATE "SELECT COUNT(*) FROM t WHERE a < (SELECT 'x')";
COUNT(*)
0
DROP TABLE t;
#
# End of 10.3 tests
#
#
# Start of 10.4 tests
#
#
...
...
mysql-test/main/subselect_no_semijoin.result
View file @
0946c99e
...
...
@@ -7375,6 +7375,17 @@ a
drop table t1,t2,t3;
# End of 10.2 tests
#
# MDEV-29926: ASAN heap-use-after-free in Explain_query::~Explain_query
#
CREATE TABLE t (a VARCHAR(1)) CHARACTER SET utf8mb3;
EXECUTE IMMEDIATE "SELECT COUNT(*) FROM t WHERE a < (SELECT 'x')";
COUNT(*)
0
DROP TABLE t;
#
# End of 10.3 tests
#
#
# Start of 10.4 tests
#
#
...
...
sql/sql_select.cc
View file @
0946c99e
...
...
@@ -1204,6 +1204,15 @@ JOIN::prepare(TABLE_LIST *tables_init,
// simple check that we got usable conds
dbug_print_item
(
conds
);
/*
It is hack which force creating EXPLAIN object always on runt-time arena
(because very top JOIN::prepare executes always with runtime arena, but
constant subquery like (SELECT 'x') can be called with statement arena
during prepare phase of top SELECT).
*/
if
(
!
(
thd
->
lex
->
context_analysis_only
&
CONTEXT_ANALYSIS_ONLY_PREPARE
))
create_explain_query_if_not_exists
(
thd
->
lex
,
thd
->
mem_root
);
if
(
select_lex
->
handle_derived
(
thd
->
lex
,
DT_PREPARE
))
DBUG_RETURN
(
-
1
);
...
...
@@ -1654,7 +1663,6 @@ bool JOIN::build_explain()
int
JOIN
::
optimize
()
{
int
res
=
0
;
create_explain_query_if_not_exists(thd->lex, thd->mem_root);
join_optimization_state
init_state
=
optimization_state
;
if
(
select_lex
->
pushdown_select
)
{
...
...
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