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
e9b8b76f
Commit
e9b8b76f
authored
Mar 04, 2021
by
Vicențiu Ciorbaru
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.2' into 10.3
parents
08d8bce5
5da6ffe2
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
140 additions
and
10 deletions
+140
-10
mysql-test/main/win.result
mysql-test/main/win.result
+26
-0
mysql-test/main/win.test
mysql-test/main/win.test
+20
-0
mysql-test/suite/encryption/r/tempfiles_encrypted.result
mysql-test/suite/encryption/r/tempfiles_encrypted.result
+26
-0
mysql-test/suite/innodb/r/innodb.result
mysql-test/suite/innodb/r/innodb.result
+17
-0
mysql-test/suite/innodb/t/innodb.test
mysql-test/suite/innodb/t/innodb.test
+18
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-0
storage/innobase/btr/btr0btr.cc
storage/innobase/btr/btr0btr.cc
+12
-0
storage/innobase/fil/fil0fil.cc
storage/innobase/fil/fil0fil.cc
+20
-10
No files found.
mysql-test/main/win.result
View file @
e9b8b76f
...
...
@@ -3866,6 +3866,32 @@ NULL
DROP VIEW v1;
DROP TABLE t1,t2;
#
# MDEV-25032 Window functions without column references get removed from ORDER BY
#
create table t1 (id int, score double);
insert into t1 values
(1, 5),
(1, 6),
(1, 6),
(1, 6),
(1, 7),
(1, 8.1),
(1, 9),
(1, 10);
select id, row_number() over () rn
from t1
order by rn desc;
id rn
1 8
1 7
1 6
1 5
1 4
1 3
1 2
1 1
drop table t1;
#
# End of 10.2 tests
#
#
...
...
mysql-test/main/win.test
View file @
e9b8b76f
...
...
@@ -2522,6 +2522,26 @@ SELECT NTH_VALUE(i1, i1) OVER (PARTITION BY i1) FROM v1;
DROP
VIEW
v1
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# MDEV-25032 Window functions without column references get removed from ORDER BY
--
echo
#
create
table
t1
(
id
int
,
score
double
);
insert
into
t1
values
(
1
,
5
),
(
1
,
6
),
(
1
,
6
),
(
1
,
6
),
(
1
,
7
),
(
1
,
8.1
),
(
1
,
9
),
(
1
,
10
);
select
id
,
row_number
()
over
()
rn
from
t1
order
by
rn
desc
;
drop
table
t1
;
--
echo
#
--
echo
# End of 10.2 tests
--
echo
#
...
...
mysql-test/suite/encryption/r/tempfiles_encrypted.result
View file @
e9b8b76f
...
...
@@ -3872,6 +3872,32 @@ NULL
DROP VIEW v1;
DROP TABLE t1,t2;
#
# MDEV-25032 Window functions without column references get removed from ORDER BY
#
create table t1 (id int, score double);
insert into t1 values
(1, 5),
(1, 6),
(1, 6),
(1, 6),
(1, 7),
(1, 8.1),
(1, 9),
(1, 10);
select id, row_number() over () rn
from t1
order by rn desc;
id rn
1 8
1 7
1 6
1 5
1 4
1 3
1 2
1 1
drop table t1;
#
# End of 10.2 tests
#
#
...
...
mysql-test/suite/innodb/r/innodb.result
View file @
e9b8b76f
...
...
@@ -3318,3 +3318,20 @@ c1 c2
9 3
DROP TABLE t1;
DROP TABLE t2;
#
# MDEV-24748 Extern field check missing
#
in btr_index_rec_validate()
#
CREATE TABLE t1 (pk INT, c1 char(255),
c2 char(255), c3 char(255), c4 char(255),
c5 char(255), c6 char(255), c7 char(255),
c8 char(255), primary key (pk)
)
CHARACTER SET utf32 ENGINE=InnoDB;
INSERT INTO t1 VALUES
(1,
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'),
(2,
'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p');
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
ALTER TABLE t1 FORCE;
DROP TABLE t1;
mysql-test/suite/innodb/t/innodb.test
View file @
e9b8b76f
...
...
@@ -2593,3 +2593,21 @@ SELECT * FROM t2;
DROP
TABLE
t1
;
DROP
TABLE
t2
;
--
echo
#
--
echo
# MDEV-24748 Extern field check missing
--
echo
# in btr_index_rec_validate()
--
echo
#
CREATE
TABLE
t1
(
pk
INT
,
c1
char
(
255
),
c2
char
(
255
),
c3
char
(
255
),
c4
char
(
255
),
c5
char
(
255
),
c6
char
(
255
),
c7
char
(
255
),
c8
char
(
255
),
primary
key
(
pk
)
)
CHARACTER
SET
utf32
ENGINE
=
InnoDB
;
INSERT
INTO
t1
VALUES
(
1
,
'a'
,
'b'
,
'c'
,
'd'
,
'e'
,
'f'
,
'g'
,
'h'
),
(
2
,
'i'
,
'j'
,
'k'
,
'l'
,
'm'
,
'n'
,
'o'
,
'p'
);
CHECK
TABLE
t1
;
ALTER
TABLE
t1
FORCE
;
# Cleanup
DROP
TABLE
t1
;
sql/sql_select.cc
View file @
e9b8b76f
...
...
@@ -13416,6 +13416,7 @@ remove_const(JOIN *join,ORDER *first_order, COND *cond,
{
table_map
order_tables
=
order
->
item
[
0
]
->
used_tables
();
if
(
order
->
item
[
0
]
->
with_sum_func
||
order
->
item
[
0
]
->
with_window_func
||
/*
If the outer table of an outer join is const (either by itself or
after applying WHERE condition), grouping on a field from such a
...
...
storage/innobase/btr/btr0btr.cc
View file @
e9b8b76f
...
...
@@ -4547,6 +4547,18 @@ btr_index_rec_validate(
rec_get_nth_field_offs
(
offsets
,
i
,
&
len
);
if
(
rec_offs_nth_extern
(
offsets
,
i
))
{
const
byte
*
data
=
rec_get_nth_field
(
rec
,
offsets
,
i
,
&
len
);
len
-=
BTR_EXTERN_FIELD_REF_SIZE
;
ulint
extern_len
=
mach_read_from_4
(
data
+
len
+
BTR_EXTERN_LEN
+
4
);
if
(
fixed_size
==
extern_len
)
{
continue
;
}
}
/* Note that if fixed_size != 0, it equals the
length of a fixed-size column in the clustered index.
We should adjust it here.
...
...
storage/innobase/fil/fil0fil.cc
View file @
e9b8b76f
...
...
@@ -1000,15 +1000,14 @@ fil_space_extend_must_retry(
}
/*******************************************************************//**
Reserves the fil_system.mutex and tries to make sure we can open at least one
/** Reserves the fil_system.mutex and tries to make sure we can open at least one
file while holding it. This should be called before calling
fil_node_prepare_for_io(), because that function may need to open a file. */
fil_node_prepare_for_io(), because that function may need to open a file.
@param[in] space_id tablespace id
@return whether the tablespace is usable for io */
static
void
fil_mutex_enter_and_prepare_for_io
(
/*===============================*/
ulint
space_id
)
/*!< in: space id */
bool
fil_mutex_enter_and_prepare_for_io
(
ulint
space_id
)
{
for
(
ulint
count
=
0
;;)
{
mutex_enter
(
&
fil_system
.
mutex
);
...
...
@@ -1021,7 +1020,7 @@ fil_mutex_enter_and_prepare_for_io(
fil_space_t
*
space
=
fil_space_get_by_id
(
space_id
);
if
(
space
==
NULL
)
{
break
;
return
false
;
}
fil_node_t
*
node
=
UT_LIST_GET_LAST
(
space
->
chain
);
...
...
@@ -1036,6 +1035,10 @@ fil_mutex_enter_and_prepare_for_io(
the insert buffer. The insert buffer is in
tablespace 0, and we cannot end up waiting in
this function. */
}
else
if
(
space
->
is_stopping
()
&&
!
space
->
is_being_truncated
)
{
/* If the tablespace is being deleted then InnoDB
shouldn't prepare the tablespace for i/o */
return
false
;
}
else
if
(
!
node
||
node
->
is_open
())
{
/* If the file is already open, no need to do
anything; if the space does not exist, we handle the
...
...
@@ -1107,6 +1110,8 @@ fil_mutex_enter_and_prepare_for_io(
break
;
}
return
true
;
}
/** Try to extend a tablespace if it is smaller than the specified size.
...
...
@@ -1123,7 +1128,10 @@ fil_space_extend(
bool
success
;
do
{
fil_mutex_enter_and_prepare_for_io
(
space
->
id
);
if
(
!
fil_mutex_enter_and_prepare_for_io
(
space
->
id
))
{
success
=
false
;
break
;
}
}
while
(
fil_space_extend_must_retry
(
space
,
UT_LIST_GET_LAST
(
space
->
chain
),
size
,
&
success
));
...
...
@@ -1478,7 +1486,9 @@ fil_space_t* fil_system_t::read_page0(ulint id)
/* It is possible that the tablespace is dropped while we are
not holding the mutex. */
fil_mutex_enter_and_prepare_for_io
(
id
);
if
(
!
fil_mutex_enter_and_prepare_for_io
(
id
))
{
return
NULL
;
}
fil_space_t
*
space
=
fil_space_get_by_id
(
id
);
...
...
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