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
24376742
Commit
24376742
authored
Nov 14, 2022
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.10' into 10.11
parents
d186cb18
695f20f1
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
90 additions
and
3 deletions
+90
-3
mysql-test/main/table_elim.result
mysql-test/main/table_elim.result
+20
-0
mysql-test/main/table_elim.test
mysql-test/main/table_elim.test
+16
-1
sql/sql_lex.cc
sql/sql_lex.cc
+9
-0
storage/spider/ha_spider.cc
storage/spider/ha_spider.cc
+0
-2
storage/spider/mysql-test/spider/r/partition_mrr.result
storage/spider/mysql-test/spider/r/partition_mrr.result
+44
-0
storage/spider/mysql-test/spider/t/partition_mrr.test
storage/spider/mysql-test/spider/t/partition_mrr.test
+1
-0
No files found.
mysql-test/main/table_elim.result
View file @
24376742
...
...
@@ -1003,3 +1003,23 @@ a1 a2
5 277
NULL 278
DROP TABLE t1, t2;
#
# MDEV-30007: SIGSEGV in st_select_lex_unit::is_derived_eliminated,
# runtime error: member access within null pointer of type
# 'struct TABLE' in st_select_lex_unit::is_derived_eliminated()
#
CREATE VIEW v AS SELECT 1 AS a;
SELECT ROUND ((SELECT 1 FROM v)) FROM v GROUP BY ROUND ((SELECT 1 FROM v));
ROUND ((SELECT 1 FROM v))
1
EXPLAIN
SELECT ROUND ((SELECT 1 FROM v)) FROM v GROUP BY ROUND ((SELECT 1 FROM v));
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived4> system NULL NULL NULL NULL 1
4 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used
2 SUBQUERY <derived5> system NULL NULL NULL NULL 1
5 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used
DROP VIEW v;
#
# End of 10.10 tests
#
mysql-test/main/table_elim.test
View file @
24376742
...
...
@@ -784,3 +784,18 @@ SELECT t1.* FROM t1 LEFT JOIN
)
dt2
ON
dt2
.
a2
=
t1
.
a2
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# MDEV-30007: SIGSEGV in st_select_lex_unit::is_derived_eliminated,
--
echo
# runtime error: member access within null pointer of type
--
echo
# 'struct TABLE' in st_select_lex_unit::is_derived_eliminated()
--
echo
#
CREATE
VIEW
v
AS
SELECT
1
AS
a
;
SELECT
ROUND
((
SELECT
1
FROM
v
))
FROM
v
GROUP
BY
ROUND
((
SELECT
1
FROM
v
));
EXPLAIN
SELECT
ROUND
((
SELECT
1
FROM
v
))
FROM
v
GROUP
BY
ROUND
((
SELECT
1
FROM
v
));
DROP
VIEW
v
;
--
echo
#
--
echo
# End of 10.10 tests
--
echo
#
sql/sql_lex.cc
View file @
24376742
...
...
@@ -11921,9 +11921,18 @@ bool SELECT_LEX_UNIT::explainable() const
false
;
}
/*
Determines whether the derived table was eliminated during
the call of eliminate_tables(JOIN *) made at the optimization stage
or completely optimized out (for such degenerate statements like
"SELECT 1", for example)
*/
bool
SELECT_LEX_UNIT
::
is_derived_eliminated
()
const
{
if
(
!
derived
)
return
false
;
if
(
!
derived
->
table
)
return
true
;
return
derived
->
table
->
map
&
outer_select
()
->
join
->
eliminated_tables
;
}
storage/spider/ha_spider.cc
View file @
24376742
...
...
@@ -2055,7 +2055,6 @@ int ha_spider::index_first_internal(
pt_clone_source_handler
));
pt_clone_source_handler
->
pt_clone_last_searcher
=
this
;
}
if
(
sql_is_empty
(
SPIDER_SQL_TYPE_SELECT_SQL
))
{
/*
spider_db_free_one_result_for_start_next(this);
...
...
@@ -2399,7 +2398,6 @@ int ha_spider::index_last_internal(
pt_clone_source_handler
));
pt_clone_source_handler
->
pt_clone_last_searcher
=
this
;
}
if
(
sql_is_empty
(
SPIDER_SQL_TYPE_SELECT_SQL
))
{
/*
spider_db_free_one_result_for_start_next(this);
...
...
storage/spider/mysql-test/spider/r/partition_mrr.result
View file @
24376742
...
...
@@ -104,11 +104,47 @@ pkey
21
26
27
SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey+0 = b.pkey+0 ORDER BY a.pkey;
pkey
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
connection child2_1;
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
argument
select `pkey` from `auto_test_remote`.`tbl_a` order by `pkey`
select a.id,b.`pkey` from auto_test_remote.tmp_spider_bka_xxxx a,`auto_test_remote`.`tbl_b` b where a.c0 <=> b.`pkey`
select `pkey` from `auto_test_remote`.`tbl_a` order by `pkey`
select `pkey` from `auto_test_remote`.`tbl_b` order by `pkey`
select `pkey` from `auto_test_remote`.`tbl_b` order by `pkey`
select `pkey` from `auto_test_remote`.`tbl_b` order by `pkey`
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %'
SELECT pkey FROM tbl_a ORDER BY pkey ;
SELECT pkey FROM tbl_b ORDER BY pkey;
...
...
@@ -139,6 +175,10 @@ SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argum
argument
select `pkey` from `auto_test_remote2`.`tbl_a` order by `pkey`
select a.id,b.`pkey` from auto_test_remote2.tmp_spider_bka_xxxx a,`auto_test_remote2`.`tbl_b` b where a.c0 <=> b.`pkey`
select `pkey` from `auto_test_remote2`.`tbl_a` order by `pkey`
select `pkey` from `auto_test_remote2`.`tbl_b` order by `pkey`
select `pkey` from `auto_test_remote2`.`tbl_b` order by `pkey`
select `pkey` from `auto_test_remote2`.`tbl_b` order by `pkey`
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %'
SELECT pkey FROM tbl_a ORDER BY pkey ;
SELECT pkey FROM tbl_b ORDER BY pkey;
...
...
@@ -169,6 +209,10 @@ SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argum
argument
select `pkey` from `auto_test_remote3`.`tbl_a` order by `pkey`
select a.id,b.`pkey` from auto_test_remote3.tmp_spider_bka_xxxx a,`auto_test_remote3`.`tbl_b` b where a.c0 <=> b.`pkey`
select `pkey` from `auto_test_remote3`.`tbl_a` order by `pkey`
select `pkey` from `auto_test_remote3`.`tbl_b` order by `pkey`
select `pkey` from `auto_test_remote3`.`tbl_b` order by `pkey`
select `pkey` from `auto_test_remote3`.`tbl_b` order by `pkey`
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %'
SELECT pkey FROM tbl_a ORDER BY pkey ;
SELECT pkey FROM tbl_b ORDER BY pkey;
...
...
storage/spider/mysql-test/spider/t/partition_mrr.test
View file @
24376742
...
...
@@ -169,6 +169,7 @@ if ($USE_CHILD_GROUP2)
}
--
connection
master_1
SELECT
a
.
pkey
FROM
tbl_a
a
,
tbl_b
b
WHERE
a
.
pkey
=
b
.
pkey
;
SELECT
a
.
pkey
FROM
tbl_a
a
,
tbl_b
b
WHERE
a
.
pkey
+
0
=
b
.
pkey
+
0
ORDER
BY
a
.
pkey
;
# MDEV-29947
if
(
$USE_CHILD_GROUP2
)
{
if
(
!
$OUTPUT_CHILD_GROUP2
)
...
...
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