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
8570a6a0
Commit
8570a6a0
authored
Mar 20, 2021
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.4 into 10.5
parents
1bacab8a
d8dc8537
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
3 deletions
+72
-3
mysql-test/main/func_group.result
mysql-test/main/func_group.result
+35
-1
mysql-test/main/func_group.test
mysql-test/main/func_group.test
+31
-1
mysql-test/suite/engines/funcs/r/rpl_sp,myisam,mix.rdiff
mysql-test/suite/engines/funcs/r/rpl_sp,myisam,mix.rdiff
+2
-0
mysys/my_seek.c
mysys/my_seek.c
+1
-1
sql/opt_sum.cc
sql/opt_sum.cc
+3
-0
No files found.
mysql-test/main/func_group.result
View file @
8570a6a0
...
@@ -2460,7 +2460,38 @@ count(*)+sleep(0)
...
@@ -2460,7 +2460,38 @@ count(*)+sleep(0)
2
2
drop table t1;
drop table t1;
#
#
# Start of 10.3 tests
# MDEV-25112: MIN/MAX optimization for query containing BETWEEN in WHERE
#
create table t1 (a int) engine=myisam;
insert into t1 values (267), (273), (287), (303), (308);
select max(a) from t1 where a < 303 and (a between 267 AND 287);
max(a)
287
explain select max(a) from t1 where a < 303 and (a between 267 AND 287);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
select min(a) from t1 where a > 267 and (a between 273 AND 303);
min(a)
273
explain select min(a) from t1 where a > 267 and (a between 273 AND 303);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
create index idx on t1(a);
select max(a) from t1 where a < 303 and (a between 267 AND 287);
max(a)
287
explain select max(a) from t1 where a < 303 and (a between 267 AND 287);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
select min(a) from t1 where a > 267 and (a between 273 AND 303);
min(a)
273
explain select min(a) from t1 where a > 267 and (a between 273 AND 303);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
drop table t1;
#
# End of 10.2 tests
#
#
#
#
# MDEV-9408 CREATE TABLE SELECT MAX(int_column) creates different columns for table vs view
# MDEV-9408 CREATE TABLE SELECT MAX(int_column) creates different columns for table vs view
...
@@ -2492,3 +2523,6 @@ t2 CREATE TABLE `t2` (
...
@@ -2492,3 +2523,6 @@ t2 CREATE TABLE `t2` (
DROP TABLE t2;
DROP TABLE t2;
DROP VIEW v1;
DROP VIEW v1;
DROP TABLE t1;
DROP TABLE t1;
#
# End of 10.3 tests
#
mysql-test/main/func_group.test
View file @
8570a6a0
...
@@ -1705,7 +1705,33 @@ select count(*)+sleep(0) from t1;
...
@@ -1705,7 +1705,33 @@ select count(*)+sleep(0) from t1;
drop
table
t1
;
drop
table
t1
;
--
echo
#
--
echo
#
--
echo
# Start of 10.3 tests
--
echo
# MDEV-25112: MIN/MAX optimization for query containing BETWEEN in WHERE
--
echo
#
create
table
t1
(
a
int
)
engine
=
myisam
;
insert
into
t1
values
(
267
),
(
273
),
(
287
),
(
303
),
(
308
);
let
$q1
=
select
max
(
a
)
from
t1
where
a
<
303
and
(
a
between
267
AND
287
);
let
$q2
=
select
min
(
a
)
from
t1
where
a
>
267
and
(
a
between
273
AND
303
);
eval
$q1
;
eval
explain
$q1
;
eval
$q2
;
eval
explain
$q2
;
create
index
idx
on
t1
(
a
);
eval
$q1
;
eval
explain
$q1
;
eval
$q2
;
eval
explain
$q2
;
drop
table
t1
;
--
echo
#
--
echo
# End of 10.2 tests
--
echo
#
--
echo
#
--
echo
#
--
echo
#
...
@@ -1730,3 +1756,7 @@ DROP TABLE t2;
...
@@ -1730,3 +1756,7 @@ DROP TABLE t2;
DROP
VIEW
v1
;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 10.3 tests
--
echo
#
mysql-test/suite/engines/funcs/r/rpl_sp,myisam,mix.rdiff
View file @
8570a6a0
--- /home/alice/git/10.3/mysql-test/suite/engines/funcs/r/rpl_sp,myisam,mix.result~ 2021-03-19 17:27:12.935559866 +0100
+++ /home/alice/git/10.3/mysql-test/suite/engines/funcs/r/rpl_sp,myisam,mix.reject 2021-03-19 17:27:14.071534938 +0100
@@ -126,12 +126,15 @@
@@ -126,12 +126,15 @@
show warnings;
show warnings;
Level Code Message
Level Code Message
...
...
mysys/my_seek.c
View file @
8570a6a0
...
@@ -86,7 +86,7 @@ my_off_t my_tell(File fd, myf MyFlags)
...
@@ -86,7 +86,7 @@ my_off_t my_tell(File fd, myf MyFlags)
DBUG_ENTER
(
"my_tell"
);
DBUG_ENTER
(
"my_tell"
);
DBUG_PRINT
(
"my"
,(
"fd: %d MyFlags: %lu"
,
fd
,
MyFlags
));
DBUG_PRINT
(
"my"
,(
"fd: %d MyFlags: %lu"
,
fd
,
MyFlags
));
DBUG_ASSERT
(
fd
>=
0
);
DBUG_ASSERT
(
fd
>=
0
);
#if defined (HAVE_TELL) && !defined (_WIN32)
#if defined (HAVE_TELL) && !defined (_WIN32)
&& !defined(_AIX)
pos
=
tell
(
fd
);
pos
=
tell
(
fd
);
#else
#else
pos
=
my_seek
(
fd
,
0L
,
MY_SEEK_CUR
,
0
);
pos
=
my_seek
(
fd
,
0L
,
MY_SEEK_CUR
,
0
);
...
...
sql/opt_sum.cc
View file @
8570a6a0
...
@@ -842,7 +842,10 @@ static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo,
...
@@ -842,7 +842,10 @@ static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo,
if
(
is_field_part
)
if
(
is_field_part
)
{
{
if
(
between
||
eq_type
)
if
(
between
||
eq_type
)
{
*
range_fl
&=
~
(
NO_MAX_RANGE
|
NO_MIN_RANGE
);
*
range_fl
&=
~
(
NO_MAX_RANGE
|
NO_MIN_RANGE
);
*
range_fl
&=
~
(
max_fl
?
NEAR_MAX
:
NEAR_MIN
);
}
else
else
{
{
*
range_fl
&=
~
(
max_fl
?
NO_MAX_RANGE
:
NO_MIN_RANGE
);
*
range_fl
&=
~
(
max_fl
?
NO_MAX_RANGE
:
NO_MIN_RANGE
);
...
...
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