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
21069c52
Commit
21069c52
authored
Dec 07, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.2 into 10.3
parents
b6f20398
53440e2d
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
207 additions
and
101 deletions
+207
-101
mysql-test/main/connect.test
mysql-test/main/connect.test
+2
-5
mysql-test/main/stat_tables.result
mysql-test/main/stat_tables.result
+19
-0
mysql-test/main/stat_tables.test
mysql-test/main/stat_tables.test
+17
-0
mysql-test/main/stat_tables_innodb.result
mysql-test/main/stat_tables_innodb.result
+19
-0
mysql-test/suite/encryption/disabled.def
mysql-test/suite/encryption/disabled.def
+1
-0
mysql-test/suite/innodb_fts/r/create.result
mysql-test/suite/innodb_fts/r/create.result
+16
-0
mysql-test/suite/innodb_fts/t/create.test
mysql-test/suite/innodb_fts/t/create.test
+16
-0
mysql-test/suite/perfschema/r/socket_connect.result
mysql-test/suite/perfschema/r/socket_connect.result
+0
-13
mysql-test/suite/perfschema/t/socket_connect.test
mysql-test/suite/perfschema/t/socket_connect.test
+6
-3
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
sql/opt_range.cc
sql/opt_range.cc
+3
-1
sql/sql_acl.cc
sql/sql_acl.cc
+66
-61
sql/sql_array.h
sql/sql_array.h
+7
-3
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+6
-4
storage/innobase/row/row0ftsort.cc
storage/innobase/row/row0ftsort.cc
+5
-11
No files found.
mysql-test/main/connect.test
View file @
21069c52
...
...
@@ -253,11 +253,8 @@ let $wait_condition =
--
echo
--
echo
# -- Waiting for connections to close...
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
information_schema
.
processlist
WHERE
db
=
'test'
;
--
source
include
/
wait_condition
.
inc
let
$count_sessions
=
1
;
--
source
include
/
wait_until_count_sessions
.
inc
--
echo
DROP
USER
mysqltest_u1
@
localhost
;
...
...
mysql-test/main/stat_tables.result
View file @
21069c52
...
...
@@ -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/main/stat_tables.test
View file @
21069c52
...
...
@@ -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
#
...
...
mysql-test/main/stat_tables_innodb.result
View file @
21069c52
...
...
@@ -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/encryption/disabled.def
View file @
21069c52
...
...
@@ -12,3 +12,4 @@
innodb_scrub : MDEV-8139 scrubbing does not work reliably
innodb_scrub_background : MDEV-8139 scrubbing does not work reliably
innodb-redo-badkey : MDEV-13893/MDEV-12699 fix recovery of corrupted pages
mysql-test/suite/innodb_fts/r/create.result
View file @
21069c52
...
...
@@ -162,3 +162,19 @@ SELECT len,COUNT(*) FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS where name='word'
len COUNT(*)
84 6
DROP TABLE t;
#
# MDEV-17923 Assertion memcmp(field, field_ref_zero, 7) failed in
# trx_undo_page_report_modify upon optimizing table
# under innodb_optimize_fulltext_only
#
CREATE TABLE t1 (f1 TEXT, f2 TEXT, FULLTEXT KEY (f2)) ENGINE=InnoDB;
INSERT INTO t1 (f1) VALUES ('foo'),('bar');
DELETE FROM t1 LIMIT 1;
ALTER TABLE t1 ADD FULLTEXT KEY (f1);
SET @optimize_fulltext.save= @@innodb_optimize_fulltext_only;
SET GLOBAL innodb_optimize_fulltext_only= 1;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
DROP TABLE t1;
SET GLOBAL innodb_optimize_fulltext_only= @optimize_fulltext.save;
mysql-test/suite/innodb_fts/t/create.test
View file @
21069c52
...
...
@@ -90,3 +90,19 @@ ENGINE=InnoDB;
# The column length should be 84 bytes (84 characters * 1 byte/character).
SELECT
len
,
COUNT
(
*
)
FROM
INFORMATION_SCHEMA
.
INNODB_SYS_COLUMNS
where
name
=
'word'
GROUP
BY
len
;
DROP
TABLE
t
;
--
echo
#
--
echo
# MDEV-17923 Assertion memcmp(field, field_ref_zero, 7) failed in
--
echo
# trx_undo_page_report_modify upon optimizing table
--
echo
# under innodb_optimize_fulltext_only
--
echo
#
CREATE
TABLE
t1
(
f1
TEXT
,
f2
TEXT
,
FULLTEXT
KEY
(
f2
))
ENGINE
=
InnoDB
;
INSERT
INTO
t1
(
f1
)
VALUES
(
'foo'
),(
'bar'
);
DELETE
FROM
t1
LIMIT
1
;
ALTER
TABLE
t1
ADD
FULLTEXT
KEY
(
f1
);
SET
@
optimize_fulltext
.
save
=
@@
innodb_optimize_fulltext_only
;
SET
GLOBAL
innodb_optimize_fulltext_only
=
1
;
OPTIMIZE
TABLE
t1
;
DROP
TABLE
t1
;
SET
GLOBAL
innodb_optimize_fulltext_only
=
@
optimize_fulltext
.
save
;
mysql-test/suite/perfschema/r/socket_connect.result
View file @
21069c52
...
...
@@ -167,19 +167,6 @@ connection default;
# 6.1 Verify that there are no TCP/IP connections in the socket instance table
SELECT COUNT(*) = 0 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
AND (IP LIKE '%127.0.0.1' OR IP LIKE '%::1');
Expect 1
1
# 6.2 Verify that there are no TCP/IP connections in the summary instance table
SELECT COUNT(*) = 0 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin;
Expect 1
1
mysql-test/suite/perfschema/t/socket_connect.test
View file @
21069c52
...
...
@@ -273,18 +273,21 @@ WHERE EVENT_NAME LIKE '%client_connection%'
--
echo
--
echo
# 6.1 Verify that there are no TCP/IP connections in the socket instance table
--
echo
eval
SELECT
COUNT
(
*
)
=
0
AS
'Expect 1'
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
0
AS
'Expect 1'
FROM
performance_schema
.
socket_instances
WHERE
EVENT_NAME
LIKE
'%client_connection%'
AND
OBJECT_INSTANCE_BEGIN
<>
@
default_object_instance_begin
AND
$ip_localhost
;
--
source
include
/
wait_condition
.
inc
--
echo
--
echo
# 6.2 Verify that there are no TCP/IP connections in the summary instance table
--
echo
eval
SELECT
COUNT
(
*
)
=
0
AS
'Expect 1'
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
0
AS
'Expect 1'
FROM
performance_schema
.
socket_summary_by_instance
WHERE
EVENT_NAME
LIKE
'%client_connection%'
AND
OBJECT_INSTANCE_BEGIN
<>
@
default_object_instance_begin
;
--
source
include
/
wait_condition
.
inc
exit
;
mysql-test/suite/roles/flush_roles-17898.result
0 → 100644
View file @
21069c52
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 ignore 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 @
21069c52
#
# 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
ignore
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
;
sql/opt_range.cc
View file @
21069c52
...
...
@@ -2758,7 +2758,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 @
21069c52
This diff is collapsed.
Click to expand it.
sql/sql_array.h
View file @
21069c52
...
...
@@ -123,8 +123,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
));
}
/**
...
...
@@ -218,6 +217,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
();
...
...
@@ -252,7 +256,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
);
...
...
storage/innobase/handler/ha_innodb.cc
View file @
21069c52
...
...
@@ -11072,9 +11072,6 @@ create_table_info_t::create_table_def()
case
DB_SUCCESS
:
ut_ad
(
table
);
m_table
=
table
;
if
(
m_flags2
&
DICT_TF2_FTS
)
{
fts_optimize_add_table
(
table
);
}
DBUG_RETURN
(
0
);
default:
break
;
...
...
@@ -11093,7 +11090,8 @@ create_table_info_t::create_table_def()
:
ER_TABLESPACE_EXISTS
,
MYF
(
0
),
display_name
);
}
DBUG_RETURN
(
convert_error_code_to_mysql
(
err
,
m_flags
,
m_thd
));}
DBUG_RETURN
(
convert_error_code_to_mysql
(
err
,
m_flags
,
m_thd
));
}
/*****************************************************************//**
Creates an index in an InnoDB database. */
...
...
@@ -12481,6 +12479,10 @@ create_table_info_t::create_table_update_dict()
trx_free
(
m_trx
);
DBUG_RETURN
(
-
1
);
}
mutex_enter
(
&
dict_sys
->
mutex
);
fts_optimize_add_table
(
innobase_table
);
mutex_exit
(
&
dict_sys
->
mutex
);
}
if
(
const
Field
*
ai
=
m_form
->
found_next_number_field
)
{
...
...
storage/innobase/row/row0ftsort.cc
View file @
21069c52
...
...
@@ -1579,9 +1579,6 @@ row_fts_merge_insert(
dict_table_t
*
aux_table
;
dict_index_t
*
aux_index
;
trx_t
*
trx
;
byte
trx_id_buf
[
6
];
roll_ptr_t
roll_ptr
=
0
;
dfield_t
*
field
;
ut_ad
(
index
);
ut_ad
(
table
);
...
...
@@ -1692,16 +1689,13 @@ row_fts_merge_insert(
dict_index_get_n_fields
(
aux_index
));
/* Set TRX_ID and ROLL_PTR */
trx_write_trx_id
(
trx_id_buf
,
trx
->
id
);
field
=
dtuple_get_nth_field
(
ins_ctx
.
tuple
,
2
);
dfield_set_data
(
field
,
&
trx_id_buf
,
6
);
dfield_set_data
(
dtuple_get_nth_field
(
ins_ctx
.
tuple
,
2
),
&
reset_trx_id
,
DATA_TRX_ID_LEN
);
dfield_set_data
(
dtuple_get_nth_field
(
ins_ctx
.
tuple
,
3
),
&
reset_trx_id
[
DATA_TRX_ID_LEN
],
DATA_ROLL_PTR_LEN
);
field
=
dtuple_get_nth_field
(
ins_ctx
.
tuple
,
3
);
dfield_set_data
(
field
,
&
roll_ptr
,
7
);
ut_d
(
ins_ctx
.
aux_index_id
=
id
);
#ifdef UNIV_DEBUG
ins_ctx
.
aux_index_id
=
id
;
#endif
const
ulint
space
=
table
->
space_id
;
for
(
i
=
0
;
i
<
fts_sort_pll_degree
;
i
++
)
{
...
...
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