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
7c7de020
Commit
7c7de020
authored
Jun 18, 2023
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
10.5 fixes for --view and --embedded
parent
92502ad7
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
64 deletions
+62
-64
mysql-test/main/derived_cond_pushdown.result
mysql-test/main/derived_cond_pushdown.result
+6
-16
mysql-test/main/derived_cond_pushdown.test
mysql-test/main/derived_cond_pushdown.test
+1
-1
mysql-test/main/group_min_max.result
mysql-test/main/group_min_max.result
+0
-23
mysql-test/main/group_min_max.test
mysql-test/main/group_min_max.test
+0
-24
mysql-test/main/selectivity_innodb_notembedded.result
mysql-test/main/selectivity_innodb_notembedded.result
+26
-0
mysql-test/main/selectivity_innodb_notembedded.test
mysql-test/main/selectivity_innodb_notembedded.test
+29
-0
No files found.
mysql-test/main/derived_cond_pushdown.result
View file @
7c7de020
...
@@ -22732,7 +22732,7 @@ from
...
@@ -22732,7 +22732,7 @@ from
(select a, sum(b) as s from t2 group by a) as dt,
(select a, sum(b) as s from t2 group by a) as dt,
t3
t3
where dt.a=t1.a and t3.a < 3
where dt.a=t1.a and t3.a < 3
)
)
x
from t1 limit 5;
from t1 limit 5;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 1000
1 PRIMARY t1 ALL NULL NULL NULL NULL 1000
...
@@ -22746,14 +22746,9 @@ from
...
@@ -22746,14 +22746,9 @@ from
(select a, sum(b) as s from t2 group by a) as dt,
(select a, sum(b) as s from t2 group by a) as dt,
t3
t3
where dt.a=t1.a and t3.a < 3
where dt.a=t1.a and t3.a < 3
)
)
x
from t1 limit 5;
from t1 limit 5;
a ( select concat(t3.a,'=',dt.s)
a x
from
(select a, sum(b) as s from t2 group by a) as dt,
t3
where dt.a=t1.a and t3.a < 3
)
1 1=804
1 1=804
2 1=1056
2 1=1056
3 1=846
3 1=846
...
@@ -22772,7 +22767,7 @@ from
...
@@ -22772,7 +22767,7 @@ from
(select a, sum(b) as s from t2 group by a) as dt,
(select a, sum(b) as s from t2 group by a) as dt,
t3
t3
where dt.a=t1.a and t3.a < 3
where dt.a=t1.a and t3.a < 3
)
)
x
from t1 limit 5;
from t1 limit 5;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 1000
1 PRIMARY t1 ALL NULL NULL NULL NULL 1000
...
@@ -22786,14 +22781,9 @@ from
...
@@ -22786,14 +22781,9 @@ from
(select a, sum(b) as s from t2 group by a) as dt,
(select a, sum(b) as s from t2 group by a) as dt,
t3
t3
where dt.a=t1.a and t3.a < 3
where dt.a=t1.a and t3.a < 3
)
)
x
from t1 limit 5;
from t1 limit 5;
a ( select concat(t3.a,'=',dt.s)
a x
from
(select a, sum(b) as s from t2 group by a) as dt,
t3
where dt.a=t1.a and t3.a < 3
)
1 1=11858
1 1=11858
2 1=11380
2 1=11380
3 1=11588
3 1=11588
...
...
mysql-test/main/derived_cond_pushdown.test
View file @
7c7de020
...
@@ -4198,7 +4198,7 @@ select
...
@@ -4198,7 +4198,7 @@ select
(
select
a
,
sum
(
b
)
as
s
from
t2
group
by
a
)
as
dt
,
(
select
a
,
sum
(
b
)
as
s
from
t2
group
by
a
)
as
dt
,
t3
t3
where
dt
.
a
=
t1
.
a
and
t3
.
a
<
3
where
dt
.
a
=
t1
.
a
and
t3
.
a
<
3
)
)
x
from
t1
limit
5
;
from
t1
limit
5
;
eval
explain
$q
;
eval
explain
$q
;
...
...
mysql-test/main/group_min_max.result
View file @
7c7de020
...
@@ -4239,29 +4239,6 @@ a b s1
...
@@ -4239,29 +4239,6 @@ a b s1
3 3 t2:1;min_t3_b:3
3 3 t2:1;min_t3_b:3
drop table t1,t2,t3;
drop table t1,t2,t3;
#
#
# MDEV-31380: Assertion `s->table->opt_range_condition_rows <= s->found_records' failed
# (assertion in 10.6+, DBL_MAX costs in 10.5)
#
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a), KEY(b)) ENGINE=InnoDB;
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_100;
SET
@tmp=@@optimizer_use_condition_selectivity,
optimizer_use_condition_selectivity = 1,
@tmp2=@@optimizer_trace,
optimizer_trace=1;
SELECT DISTINCT * FROM t1 WHERE a IN (1, 2);
a b
1 1
2 2
select
CAST(json_value(json_extract(trace, '$**.chosen_access_method.cost'), '$[0]')
as DOUBLE) < 1.0e100 x
from information_schema.optimizer_trace;
x
1
set optimizer_use_condition_selectivity = @tmp, optimizer_trace=@tmp2;
drop table t1;
#
# End of 10.5 tests
# End of 10.5 tests
#
#
#
#
...
...
mysql-test/main/group_min_max.test
View file @
7c7de020
...
@@ -1867,30 +1867,6 @@ from t1;
...
@@ -1867,30 +1867,6 @@ from t1;
drop
table
t1
,
t2
,
t3
;
drop
table
t1
,
t2
,
t3
;
--
echo
#
--
echo
# MDEV-31380: Assertion `s->table->opt_range_condition_rows <= s->found_records' failed
--
echo
# (assertion in 10.6+, DBL_MAX costs in 10.5)
--
echo
#
CREATE
TABLE
t1
(
a
INT
,
b
INT
,
PRIMARY
KEY
(
a
),
KEY
(
b
))
ENGINE
=
InnoDB
;
INSERT
INTO
t1
SELECT
seq
,
seq
FROM
seq_1_to_100
;
SET
@
tmp
=@@
optimizer_use_condition_selectivity
,
optimizer_use_condition_selectivity
=
1
,
@
tmp2
=@@
optimizer_trace
,
optimizer_trace
=
1
;
SELECT
DISTINCT
*
FROM
t1
WHERE
a
IN
(
1
,
2
);
select
CAST
(
json_value
(
json_extract
(
trace
,
'$**.chosen_access_method.cost'
),
'$[0]'
)
as
DOUBLE
)
<
1.0e100
x
from
information_schema
.
optimizer_trace
;
set
optimizer_use_condition_selectivity
=
@
tmp
,
optimizer_trace
=@
tmp2
;
drop
table
t1
;
--
echo
#
--
echo
#
--
echo
# End of 10.5 tests
--
echo
# End of 10.5 tests
--
echo
#
--
echo
#
...
...
mysql-test/main/selectivity_innodb_notembedded.result
View file @
7c7de020
...
@@ -102,3 +102,29 @@ set optimizer_switch=@save_optimizer_switch_for_selectivity_test;
...
@@ -102,3 +102,29 @@ set optimizer_switch=@save_optimizer_switch_for_selectivity_test;
SET SESSION STORAGE_ENGINE=DEFAULT;
SET SESSION STORAGE_ENGINE=DEFAULT;
Warnings:
Warnings:
Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
#
# MDEV-31380: Assertion `s->table->opt_range_condition_rows <= s->found_records' failed
# (assertion in 10.6+, DBL_MAX costs in 10.5)
#
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a), KEY(b)) ENGINE=InnoDB;
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_100;
SET
@tmp=@@optimizer_use_condition_selectivity,
optimizer_use_condition_selectivity = 1,
@tmp2=@@optimizer_trace,
optimizer_trace=1;
SELECT DISTINCT * FROM t1 WHERE a IN (1, 2);
a b
1 1
2 2
select
CAST(json_value(json_extract(trace, '$**.chosen_access_method.cost'), '$[0]')
as DOUBLE) < 1.0e100 x
from information_schema.optimizer_trace;
x
1
set optimizer_use_condition_selectivity = @tmp, optimizer_trace=@tmp2;
drop table t1;
#
# End of 10.5 tests
#
mysql-test/main/selectivity_innodb_notembedded.test
View file @
7c7de020
...
@@ -14,3 +14,32 @@ set optimizer_switch='extended_keys=on';
...
@@ -14,3 +14,32 @@ set optimizer_switch='extended_keys=on';
set
optimizer_switch
=@
save_optimizer_switch_for_selectivity_test
;
set
optimizer_switch
=@
save_optimizer_switch_for_selectivity_test
;
SET
SESSION
STORAGE_ENGINE
=
DEFAULT
;
SET
SESSION
STORAGE_ENGINE
=
DEFAULT
;
--
echo
#
--
echo
# MDEV-31380: Assertion `s->table->opt_range_condition_rows <= s->found_records' failed
--
echo
# (assertion in 10.6+, DBL_MAX costs in 10.5)
--
echo
#
CREATE
TABLE
t1
(
a
INT
,
b
INT
,
PRIMARY
KEY
(
a
),
KEY
(
b
))
ENGINE
=
InnoDB
;
INSERT
INTO
t1
SELECT
seq
,
seq
FROM
seq_1_to_100
;
SET
@
tmp
=@@
optimizer_use_condition_selectivity
,
optimizer_use_condition_selectivity
=
1
,
@
tmp2
=@@
optimizer_trace
,
optimizer_trace
=
1
;
SELECT
DISTINCT
*
FROM
t1
WHERE
a
IN
(
1
,
2
);
select
CAST
(
json_value
(
json_extract
(
trace
,
'$**.chosen_access_method.cost'
),
'$[0]'
)
as
DOUBLE
)
<
1.0e100
x
from
information_schema
.
optimizer_trace
;
set
optimizer_use_condition_selectivity
=
@
tmp
,
optimizer_trace
=@
tmp2
;
drop
table
t1
;
--
echo
#
--
echo
# End of 10.5 tests
--
echo
#
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