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
6491c591
Commit
6491c591
authored
Dec 06, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.0' into 10.1
parents
328d7779
daca7e70
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
159 additions
and
64 deletions
+159
-64
mysql-test/r/stat_tables.result
mysql-test/r/stat_tables.result
+19
-0
mysql-test/r/stat_tables_innodb.result
mysql-test/r/stat_tables_innodb.result
+19
-0
mysql-test/suite/roles/flush_roles-17898.result
mysql-test/suite/roles/flush_roles-17898.result
+13
-0
mysql-test/suite/roles/flush_roles-17898.test
mysql-test/suite/roles/flush_roles-17898.test
+11
-0
mysql-test/t/stat_tables.test
mysql-test/t/stat_tables.test
+17
-0
sql/opt_range.cc
sql/opt_range.cc
+3
-1
sql/sql_acl.cc
sql/sql_acl.cc
+65
-60
sql/sql_array.h
sql/sql_array.h
+12
-3
No files found.
mysql-test/r/stat_tables.result
View file @
6491c591
...
...
@@ -591,6 +591,25 @@ id select_type table type possible_keys key key_len ref rows Extra
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables;
#
# MDEV-17734: AddressSanitizer: use-after-poison in create_key_parts_for_pseudo_indexes
#
set @@use_stat_tables= PREFERABLY;
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
set @@optimizer_use_condition_selectivity=4;
set @save_use_stat_tables= @@use_stat_tables;
create table t1 (a int, b int);
insert into t1(a,b) values (1,2),(1,3),(1,4),(1,5),(2,6),(2,7),(3,8),(3,9),(3,9),(4,10);
analyze table t1 persistent for columns (a) indexes ();
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select * from t1 where a=1 and b=3;
a b
1 3
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables;
drop table t1;
#
# MDEV-16711:CREATE OR REPLACE TABLE introducing BLOB column
#
SET use_stat_tables= PREFERABLY;
...
...
mysql-test/r/stat_tables_innodb.result
View file @
6491c591
...
...
@@ -618,6 +618,25 @@ id select_type table type possible_keys key key_len ref rows Extra
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables;
#
# MDEV-17734: AddressSanitizer: use-after-poison in create_key_parts_for_pseudo_indexes
#
set @@use_stat_tables= PREFERABLY;
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
set @@optimizer_use_condition_selectivity=4;
set @save_use_stat_tables= @@use_stat_tables;
create table t1 (a int, b int);
insert into t1(a,b) values (1,2),(1,3),(1,4),(1,5),(2,6),(2,7),(3,8),(3,9),(3,9),(4,10);
analyze table t1 persistent for columns (a) indexes ();
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select * from t1 where a=1 and b=3;
a b
1 3
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables;
drop table t1;
#
# MDEV-16711:CREATE OR REPLACE TABLE introducing BLOB column
#
SET use_stat_tables= PREFERABLY;
...
...
mysql-test/suite/roles/flush_roles-17898.result
0 → 100644
View file @
6491c591
use mysql;
insert db (db,user,select_priv) values ('foo','dwr_foo','Y'), ('bar','dwr_bar','Y');
insert roles_mapping (user,role) values ('dwr_qux_dev','dwr_foo'),('dwr_qux_dev','dwr_bar');
insert user (user,show_db_priv,is_role) values ('dwr_foo','N','Y'), ('dwr_bar','N','Y'), ('dwr_qux_dev','Y','Y');
Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
Warning 1364 Field 'authentication_string' doesn't have a default value
flush privileges;
drop role dwr_foo;
drop role dwr_bar;
drop role dwr_qux_dev;
mysql-test/suite/roles/flush_roles-17898.test
0 → 100644
View file @
6491c591
#
# MDEV-17898 FLUSH PRIVILEGES crashes server with segfault
#
use
mysql
;
insert
db
(
db
,
user
,
select_priv
)
values
(
'foo'
,
'dwr_foo'
,
'Y'
),
(
'bar'
,
'dwr_bar'
,
'Y'
);
insert
roles_mapping
(
user
,
role
)
values
(
'dwr_qux_dev'
,
'dwr_foo'
),(
'dwr_qux_dev'
,
'dwr_bar'
);
insert
user
(
user
,
show_db_priv
,
is_role
)
values
(
'dwr_foo'
,
'N'
,
'Y'
),
(
'dwr_bar'
,
'N'
,
'Y'
),
(
'dwr_qux_dev'
,
'Y'
,
'Y'
);
flush
privileges
;
drop
role
dwr_foo
;
drop
role
dwr_bar
;
drop
role
dwr_qux_dev
;
mysql-test/t/stat_tables.test
View file @
6491c591
...
...
@@ -369,6 +369,23 @@ SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user;
set
@@
optimizer_use_condition_selectivity
=@
save_optimizer_use_condition_selectivity
;
set
use_stat_tables
=@
save_use_stat_tables
;
--
echo
#
--
echo
# MDEV-17734: AddressSanitizer: use-after-poison in create_key_parts_for_pseudo_indexes
--
echo
#
set
@@
use_stat_tables
=
PREFERABLY
;
set
@
save_optimizer_use_condition_selectivity
=
@@
optimizer_use_condition_selectivity
;
set
@@
optimizer_use_condition_selectivity
=
4
;
set
@
save_use_stat_tables
=
@@
use_stat_tables
;
create
table
t1
(
a
int
,
b
int
);
insert
into
t1
(
a
,
b
)
values
(
1
,
2
),(
1
,
3
),(
1
,
4
),(
1
,
5
),(
2
,
6
),(
2
,
7
),(
3
,
8
),(
3
,
9
),(
3
,
9
),(
4
,
10
);
analyze
table
t1
persistent
for
columns
(
a
)
indexes
();
select
*
from
t1
where
a
=
1
and
b
=
3
;
set
@@
optimizer_use_condition_selectivity
=
@
save_optimizer_use_condition_selectivity
;
set
use_stat_tables
=@
save_use_stat_tables
;
drop
table
t1
;
--
echo
#
--
echo
# MDEV-16711:CREATE OR REPLACE TABLE introducing BLOB column
--
echo
#
...
...
sql/opt_range.cc
View file @
6491c591
...
...
@@ -2762,7 +2762,9 @@ bool create_key_parts_for_pseudo_indexes(RANGE_OPT_PARAM *param,
if
(
bitmap_is_set
(
used_fields
,
(
*
field_ptr
)
->
field_index
))
{
Field
*
field
=
*
field_ptr
;
if
(
field
->
type
()
==
MYSQL_TYPE_GEOMETRY
)
Column_statistics
*
col_stats
=
field
->
read_stats
;
if
(
field
->
type
()
==
MYSQL_TYPE_GEOMETRY
||
!
col_stats
||
col_stats
->
no_stat_values_provided
())
continue
;
uint16
store_length
;
...
...
sql/sql_acl.cc
View file @
6491c591
This diff is collapsed.
Click to expand it.
sql/sql_array.h
View file @
6491c591
...
...
@@ -114,8 +114,7 @@ template <class Elem> class Dynamic_array
void
init
(
uint
prealloc
=
16
,
uint
increment
=
16
)
{
my_init_dynamic_array
(
&
array
,
sizeof
(
Elem
),
prealloc
,
increment
,
MYF
(
0
));
init_dynamic_array2
(
&
array
,
sizeof
(
Elem
),
0
,
prealloc
,
increment
,
MYF
(
0
));
}
/**
...
...
@@ -208,6 +207,11 @@ template <class Elem> class Dynamic_array
set_dynamic
(
&
array
,
&
el
,
idx
);
}
void
freeze
()
{
freeze_size
(
&
array
);
}
bool
resize
(
size_t
new_size
,
Elem
default_val
)
{
size_t
old_size
=
elements
();
...
...
@@ -230,6 +234,11 @@ template <class Elem> class Dynamic_array
delete_dynamic
(
&
array
);
}
void
free_memory
()
{
delete_dynamic
(
&
array
);
}
typedef
int
(
*
CMP_FUNC
)(
const
Elem
*
el1
,
const
Elem
*
el2
);
void
sort
(
CMP_FUNC
cmp_func
)
...
...
@@ -237,7 +246,7 @@ template <class Elem> class Dynamic_array
my_qsort
(
array
.
buffer
,
array
.
elements
,
sizeof
(
Elem
),
(
qsort_cmp
)
cmp_func
);
}
typedef
int
(
*
CMP_FUNC2
)(
const
Elem
*
el1
,
const
Elem
*
el2
,
void
*
);
typedef
int
(
*
CMP_FUNC2
)(
void
*
,
const
Elem
*
el1
,
const
Elem
*
el2
);
void
sort
(
CMP_FUNC2
cmp_func
,
void
*
data
)
{
my_qsort2
(
array
.
buffer
,
array
.
elements
,
sizeof
(
Elem
),
(
qsort2_cmp
)
cmp_func
,
data
);
...
...
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