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
d2fab686
Commit
d2fab686
authored
Nov 02, 2020
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge bb-10.2-release into 10.2
parents
ff0b6122
6d3792a9
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
417 additions
and
386 deletions
+417
-386
libmariadb
libmariadb
+1
-1
mysql-test/r/order_by.result
mysql-test/r/order_by.result
+20
-0
mysql-test/t/order_by.test
mysql-test/t/order_by.test
+21
-0
mysql-test/unstable-tests
mysql-test/unstable-tests
+352
-384
sql/field.h
sql/field.h
+3
-0
sql/filesort.cc
sql/filesort.cc
+13
-1
sql/sql_class.h
sql/sql_class.h
+2
-0
sql/sql_type.h
sql/sql_type.h
+2
-0
storage/innobase/dict/dict0stats.cc
storage/innobase/dict/dict0stats.cc
+3
-0
No files found.
libmariadb
@
62427520
Subproject commit
8e5be108991ffc29887660fd6540ed0fd3428d1b
Subproject commit
62427520a5ba20e42fe51f5045062a7a9cadb466
mysql-test/r/order_by.result
View file @
d2fab686
...
...
@@ -3432,4 +3432,24 @@ NULLIF(GROUP_CONCAT(v1), null)
C
B
DROP TABLE t1;
#
# MDEV-24033: SIGSEGV in __memcmp_avx2_movbe from queue_insert | SIGSEGV in __memcmp_avx2_movbe from native_compare
#
SET @save_max_length_for_sort_data=@@max_length_for_sort_data;
SET @save_max_sort_length= @@max_sort_length;
SET @save_sql_select_limit= @@sql_select_limit;
CREATE TABLE t1 (a DECIMAL(64,0), b INT);
INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4);
SET max_length_for_sort_data= 30;
SET sql_select_limit = 3;
SET max_sort_length=8;
SELECT * FROM t1 ORDER BY a+1;
a b
1 1
2 2
3 3
SET max_length_for_sort_data=@save_max_length_for_sort_data;
SET max_sort_length= @save_max_sort_length;
SET sql_select_limit= @save_sql_select_limit;
DROP TABLE t1;
# End of 10.2 tests
mysql-test/t/order_by.test
View file @
d2fab686
...
...
@@ -2272,4 +2272,25 @@ ORDER BY id+1 DESC;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-24033: SIGSEGV in __memcmp_avx2_movbe from queue_insert | SIGSEGV in __memcmp_avx2_movbe from native_compare
--
echo
#
SET
@
save_max_length_for_sort_data
=@@
max_length_for_sort_data
;
SET
@
save_max_sort_length
=
@@
max_sort_length
;
SET
@
save_sql_select_limit
=
@@
sql_select_limit
;
CREATE
TABLE
t1
(
a
DECIMAL
(
64
,
0
),
b
INT
);
INSERT
INTO
t1
VALUES
(
1
,
1
),
(
2
,
2
),
(
3
,
3
),
(
4
,
4
);
SET
max_length_for_sort_data
=
30
;
SET
sql_select_limit
=
3
;
SET
max_sort_length
=
8
;
SELECT
*
FROM
t1
ORDER
BY
a
+
1
;
SET
max_length_for_sort_data
=@
save_max_length_for_sort_data
;
SET
max_sort_length
=
@
save_max_sort_length
;
SET
sql_select_limit
=
@
save_sql_select_limit
;
DROP
TABLE
t1
;
--
echo
# End of 10.2 tests
mysql-test/unstable-tests
View file @
d2fab686
This diff is collapsed.
Click to expand it.
sql/field.h
View file @
d2fab686
...
...
@@ -1339,6 +1339,8 @@ class Field: public Value_source
virtual
uint
max_packed_col_length
(
uint
max_length
)
{
return
max_length
;}
virtual
bool
is_packable
()
const
{
return
false
;
}
uint
offset
(
uchar
*
record
)
const
{
return
(
uint
)
(
ptr
-
record
);
...
...
@@ -1827,6 +1829,7 @@ class Field_longstr :public Field_str
bool
can_optimize_range
(
const
Item_bool_func
*
cond
,
const
Item
*
item
,
bool
is_eq_func
)
const
;
bool
is_packable
()
const
{
return
true
;
}
};
/* base class for float and double and decimal (old one) */
...
...
sql/filesort.cc
View file @
d2fab686
...
...
@@ -1971,7 +1971,14 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length,
if
(
sortorder
->
field
)
{
CHARSET_INFO
*
cs
=
sortorder
->
field
->
sort_charset
();
sortorder
->
type
=
sortorder
->
field
->
is_packable
()
?
SORT_FIELD_ATTR
::
VARIABLE_SIZE
:
SORT_FIELD_ATTR
::
FIXED_SIZE
;
sortorder
->
length
=
sortorder
->
field
->
sort_length
();
if
(
sortorder
->
is_variable_sized
())
set_if_smaller
(
sortorder
->
length
,
thd
->
variables
.
max_sort_length
);
if
(
use_strnxfrm
((
cs
=
sortorder
->
field
->
sort_charset
())))
{
*
multi_byte_charset
=
true
;
...
...
@@ -1982,6 +1989,10 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length,
}
else
{
sortorder
->
type
=
sortorder
->
item
->
type_handler
()
->
is_packable
()
?
SORT_FIELD_ATTR
::
VARIABLE_SIZE
:
SORT_FIELD_ATTR
::
FIXED_SIZE
;
sortorder
->
item
->
sortlength
(
thd
,
sortorder
->
item
,
sortorder
);
if
(
use_strnxfrm
(
sortorder
->
item
->
collation
.
collation
))
{
...
...
@@ -1990,7 +2001,8 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length,
if
(
sortorder
->
item
->
maybe_null
)
length
++
;
// Place for NULL marker
}
set_if_smaller
(
sortorder
->
length
,
thd
->
variables
.
max_sort_length
);
if
(
sortorder
->
is_variable_sized
())
set_if_smaller
(
sortorder
->
length
,
thd
->
variables
.
max_sort_length
);
length
+=
sortorder
->
length
;
}
sortorder
->
field
=
(
Field
*
)
0
;
// end marker
...
...
sql/sql_class.h
View file @
d2fab686
...
...
@@ -5449,6 +5449,8 @@ struct SORT_FIELD_ATTR
{
uint
length
;
/* Length of sort field */
uint
suffix_length
;
/* Length suffix (0-4) */
enum
Type
{
FIXED_SIZE
,
VARIABLE_SIZE
}
type
;
bool
is_variable_sized
()
{
return
type
==
VARIABLE_SIZE
;
}
};
...
...
sql/sql_type.h
View file @
d2fab686
...
...
@@ -92,6 +92,7 @@ class Type_handler
virtual
void
sortlength
(
THD
*
thd
,
const
Type_std_attributes
*
item
,
SORT_FIELD_ATTR
*
attr
)
const
=
0
;
virtual
bool
is_packable
()
const
{
return
false
;
}
};
...
...
@@ -169,6 +170,7 @@ class Type_handler_string_result: public Type_handler
void
sortlength
(
THD
*
thd
,
const
Type_std_attributes
*
item
,
SORT_FIELD_ATTR
*
attr
)
const
;
bool
is_packable
()
const
{
return
true
;
}
};
...
...
storage/innobase/dict/dict0stats.cc
View file @
d2fab686
...
...
@@ -2249,6 +2249,9 @@ dict_stats_update_persistent(
}
ut_ad
(
!
dict_index_is_ibuf
(
index
));
mutex_enter
(
&
dict_sys
->
mutex
);
dict_stats_empty_index
(
index
,
false
);
mutex_exit
(
&
dict_sys
->
mutex
);
index_stats_t
stats
=
dict_stats_analyze_index
(
index
);
...
...
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