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
49308383
Commit
49308383
authored
Jun 26, 2023
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.5 into 10.6
parents
14275b47
0b61f4e0
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
60 additions
and
11 deletions
+60
-11
libmariadb
libmariadb
+1
-1
mysql-test/main/group_min_max_notembedded.result
mysql-test/main/group_min_max_notembedded.result
+5
-3
mysql-test/main/group_min_max_notembedded.test
mysql-test/main/group_min_max_notembedded.test
+11
-3
mysql-test/main/join.result
mysql-test/main/join.result
+15
-0
mysql-test/main/join.test
mysql-test/main/join.test
+19
-0
sql/multi_range_read.cc
sql/multi_range_read.cc
+3
-0
sql/sql_priv.h
sql/sql_priv.h
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+1
-1
storage/innobase/include/fil0fil.h
storage/innobase/include/fil0fil.h
+4
-2
No files found.
libmariadb
@
5af90f00
Subproject commit
c2b322d2ca27ef66385d9938b98541c7cf14ac74
Subproject commit
5af90f00ffeda64795e23753c14d601cce5d02ca
mysql-test/main/group_min_max_notembedded.result
View file @
49308383
...
...
@@ -15,10 +15,12 @@ a b
2 2
select
CAST(json_value(json_extract(trace, '$**.chosen_access_method.cost'), '$[0]')
as DOUBLE) < 1.0e100
as DOUBLE) < 1.0e100
as ACCESS_METHOD_COST_IS_FINITE
from information_schema.optimizer_trace;
CAST(json_value(json_extract(trace, '$**.chosen_access_method.cost'), '$[0]')
as DOUBLE) < 1.0e100
ACCESS_METHOD_COST_IS_FINITE
1
set optimizer_use_condition_selectivity = @tmp, optimizer_trace=@tmp2;
drop table t1;
#
# End of 10.5 tests
#
mysql-test/main/group_min_max_notembedded.test
View file @
49308383
--
source
include
/
no_valgrind_without_big
.
inc
#
# Tests for group-min-max optimization that require optimizer trace
# and so need not-embedded.
#
--
source
include
/
default_optimizer_switch
.
inc
--
source
include
/
have_sequence
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_sequence
.
inc
--
source
include
/
not_embedded
.
inc
--
echo
#
...
...
@@ -22,8 +25,13 @@ 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
as
DOUBLE
)
<
1.0e100
as
ACCESS_METHOD_COST_IS_FINITE
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
#
mysql-test/main/join.result
View file @
49308383
...
...
@@ -3424,3 +3424,18 @@ COUNT(*)
2
DROP TABLE t1, t2, t3;
# End of 10.5 tests
#
# MDEV-31449: Assertion s->table->opt_range_condition_rows <= s->found_records
#
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,2),(3,4);
CREATE TABLE t2 (c INT);
INSERT INTO t2 VALUES (5),(6);
SET @tmp=@@OPTIMIZER_USE_CONDITION_SELECTIVITY, OPTIMIZER_USE_CONDITION_SELECTIVITY = 1;
SELECT * FROM
(SELECT t1.* FROM t1 WHERE t1.a IN (SELECT MAX(t2.c) FROM t2 JOIN t1)) AS sq1,
(SELECT t2.* FROM t2 JOIN t1 ON (t1.b IN (SELECT t1.b FROM t2 STRAIGHT_JOIN t1))) AS sq2;
a b c
SET OPTIMIZER_USE_CONDITION_SELECTIVITY=@tmp;
DROP TABLE t1,t2;
# End of 10.6 tests
mysql-test/main/join.test
View file @
49308383
...
...
@@ -1835,3 +1835,22 @@ SELECT COUNT(*) FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON t2.b = t3.c) ON t1.a = t2.
DROP
TABLE
t1
,
t2
,
t3
;
--
echo
# End of 10.5 tests
--
echo
#
--
echo
# MDEV-31449: Assertion s->table->opt_range_condition_rows <= s->found_records
--
echo
#
CREATE
TABLE
t1
(
a
INT
,
b
INT
);
INSERT
INTO
t1
VALUES
(
1
,
2
),(
3
,
4
);
CREATE
TABLE
t2
(
c
INT
);
INSERT
INTO
t2
VALUES
(
5
),(
6
);
SET
@
tmp
=@@
OPTIMIZER_USE_CONDITION_SELECTIVITY
,
OPTIMIZER_USE_CONDITION_SELECTIVITY
=
1
;
SELECT
*
FROM
(
SELECT
t1
.*
FROM
t1
WHERE
t1
.
a
IN
(
SELECT
MAX
(
t2
.
c
)
FROM
t2
JOIN
t1
))
AS
sq1
,
(
SELECT
t2
.*
FROM
t2
JOIN
t1
ON
(
t1
.
b
IN
(
SELECT
t1
.
b
FROM
t2
STRAIGHT_JOIN
t1
)))
AS
sq2
;
SET
OPTIMIZER_USE_CONDITION_SELECTIVITY
=@
tmp
;
DROP
TABLE
t1
,
t2
;
--
echo
# End of 10.6 tests
sql/multi_range_read.cc
View file @
49308383
...
...
@@ -2008,6 +2008,9 @@ bool DsMrr_impl::get_disk_sweep_mrr_cost(uint keynr, ha_rows rows, uint flags,
/* Total cost of all index accesses */
index_read_cost
=
primary_file
->
keyread_time
(
keynr
,
1
,
rows
);
cost
->
add_io
(
index_read_cost
,
1
/* Random seeks */
);
cost
->
cpu_cost
+=
(
rows2double
(
rows
)
/
TIME_FOR_COMPARE
+
MULTI_RANGE_READ_SETUP_COST
);
return
FALSE
;
}
...
...
sql/sql_priv.h
View file @
49308383
...
...
@@ -190,7 +190,7 @@
/* The rest of the file is included in the server only */
#ifndef MYSQL_CLIENT
/* @@optimizer_switch flags. These must be in sync with optimizer_switch_
typelib
*/
/* @@optimizer_switch flags. These must be in sync with optimizer_switch_
names
*/
#define OPTIMIZER_SWITCH_INDEX_MERGE (1ULL << 0)
#define OPTIMIZER_SWITCH_INDEX_MERGE_UNION (1ULL << 1)
#define OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION (1ULL << 2)
...
...
sql/sql_select.cc
View file @
49308383
...
...
@@ -5799,7 +5799,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
get_delayed_table_estimates
(
s
->
table
,
&
s
->
records
,
&
s
->
read_time
,
&
s
->
startup_cost
);
s
->
found_records
=
s
->
records
;
table->opt_range_condition_rows=s->records;
s
->
table
->
opt_range_condition_rows
=
s
->
records
;
}
else
s
->
scan_time
();
...
...
storage/innobase/include/fil0fil.h
View file @
49308383
...
...
@@ -1655,9 +1655,11 @@ template<bool have_reference> inline void fil_space_t::flush()
flush_low
();
else
{
if
(
!
(
acquire_low
()
&
(
STOPPING
|
CLOSING
)))
if
(
!
(
acquire_low
(
STOPPING
|
CLOSING
)
&
(
STOPPING
|
CLOSING
)))
{
flush_low
();
release
();
release
();
}
}
}
...
...
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