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
2a93e632
Commit
2a93e632
authored
Sep 03, 2020
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.1 into 10.2
parents
9aea5061
94a520dd
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
64 additions
and
23 deletions
+64
-23
mysql-test/suite/rpl/r/rpl_filter_tables_dynamic.result
mysql-test/suite/rpl/r/rpl_filter_tables_dynamic.result
+2
-0
mysql-test/suite/rpl/r/rpl_filter_wild_tables_dynamic.result
mysql-test/suite/rpl/r/rpl_filter_wild_tables_dynamic.result
+2
-0
mysql-test/suite/rpl/t/rpl_filter_tables_dynamic.test
mysql-test/suite/rpl/t/rpl_filter_tables_dynamic.test
+2
-0
mysql-test/suite/rpl/t/rpl_filter_wild_tables_dynamic.test
mysql-test/suite/rpl/t/rpl_filter_wild_tables_dynamic.test
+2
-0
mysys/mf_iocache.c
mysys/mf_iocache.c
+5
-3
mysys/my_alloc.c
mysys/my_alloc.c
+3
-1
sql/debug_sync.cc
sql/debug_sync.cc
+3
-1
sql/mysqld.cc
sql/mysqld.cc
+2
-1
sql/net_serv.cc
sql/net_serv.cc
+3
-2
sql/rpl_filter.cc
sql/rpl_filter.cc
+38
-14
sql/sql_string.h
sql/sql_string.h
+2
-1
No files found.
mysql-test/suite/rpl/r/rpl_filter_tables_dynamic.result
View file @
2a93e632
...
...
@@ -7,6 +7,8 @@ SET @@GLOBAL.replicate_ignore_table="test.t4,test.t5,test.t6";
ERROR HY000: This operation cannot be performed as you have a running slave ''; run STOP SLAVE '' first
connection slave;
include/stop_slave.inc
SET @@GLOBAL.replicate_do_table="";
SET @@GLOBAL.replicate_ignore_table="";
SET @@GLOBAL.replicate_do_table="test.t1,test.t2,test.t3";
SET @@GLOBAL.replicate_ignore_table="test.t4,test.t5,test.t6";
include/start_slave.inc
...
...
mysql-test/suite/rpl/r/rpl_filter_wild_tables_dynamic.result
View file @
2a93e632
...
...
@@ -7,6 +7,8 @@ SET @@GLOBAL.replicate_wild_ignore_table="test.b%";
ERROR HY000: This operation cannot be performed as you have a running slave ''; run STOP SLAVE '' first
connection slave;
include/stop_slave.inc
SET @@GLOBAL.replicate_wild_do_table="";
SET @@GLOBAL.replicate_wild_ignore_table="";
SET @@GLOBAL.replicate_wild_do_table="test.a%";
SET @@GLOBAL.replicate_wild_ignore_table="test.b%";
include/start_slave.inc
...
...
mysql-test/suite/rpl/t/rpl_filter_tables_dynamic.test
View file @
2a93e632
...
...
@@ -51,6 +51,8 @@ SET @@GLOBAL.replicate_ignore_table="test.t4,test.t5,test.t6";
connection
slave
;
source
include
/
stop_slave
.
inc
;
SET
@@
GLOBAL
.
replicate_do_table
=
""
;
SET
@@
GLOBAL
.
replicate_ignore_table
=
""
;
SET
@@
GLOBAL
.
replicate_do_table
=
"test.t1,test.t2,test.t3"
;
SET
@@
GLOBAL
.
replicate_ignore_table
=
"test.t4,test.t5,test.t6"
;
source
include
/
start_slave
.
inc
;
...
...
mysql-test/suite/rpl/t/rpl_filter_wild_tables_dynamic.test
View file @
2a93e632
...
...
@@ -13,6 +13,8 @@ SET @@GLOBAL.replicate_wild_ignore_table="test.b%";
connection
slave
;
source
include
/
stop_slave
.
inc
;
SET
@@
GLOBAL
.
replicate_wild_do_table
=
""
;
SET
@@
GLOBAL
.
replicate_wild_ignore_table
=
""
;
SET
@@
GLOBAL
.
replicate_wild_do_table
=
"test.a%"
;
SET
@@
GLOBAL
.
replicate_wild_ignore_table
=
"test.b%"
;
source
include
/
start_slave
.
inc
;
...
...
mysys/mf_iocache.c
View file @
2a93e632
/*
Copyright (c) 2000, 2011, Oracle and/or its affiliates
Copyright (c) 2010, 20
15
, MariaDB
Copyright (c) 2010, 20
20
, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -804,7 +804,8 @@ int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count)
info
->
read_pos
=
info
->
buffer
+
Count
;
info
->
read_end
=
info
->
buffer
+
length
;
info
->
pos_in_file
=
pos_in_file
;
memcpy
(
Buffer
,
info
->
buffer
,
Count
);
if
(
Count
)
memcpy
(
Buffer
,
info
->
buffer
,
Count
);
DBUG_RETURN
(
0
);
}
...
...
@@ -1305,7 +1306,8 @@ static int _my_b_cache_read_r(IO_CACHE *cache, uchar *Buffer, size_t Count)
DBUG_RETURN
(
1
);
}
cnt
=
(
len
>
Count
)
?
Count
:
len
;
memcpy
(
Buffer
,
cache
->
read_pos
,
cnt
);
if
(
cnt
)
memcpy
(
Buffer
,
cache
->
read_pos
,
cnt
);
Count
-=
cnt
;
Buffer
+=
cnt
;
left_length
+=
cnt
;
...
...
mysys/my_alloc.c
View file @
2a93e632
/*
Copyright (c) 2000, 2010, Oracle and/or its affiliates
Copyright (c) 2010, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -449,7 +450,8 @@ char *strmake_root(MEM_ROOT *root, const char *str, size_t len)
char
*
pos
;
if
((
pos
=
alloc_root
(
root
,
len
+
1
)))
{
memcpy
(
pos
,
str
,
len
);
if
(
len
)
memcpy
(
pos
,
str
,
len
);
pos
[
len
]
=
0
;
}
return
pos
;
...
...
sql/debug_sync.cc
View file @
2a93e632
/* Copyright (c) 2009, 2013, Oracle and/or its affiliates.
Copyright (c) 2013, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -319,7 +320,8 @@ static char *debug_sync_bmove_len(char *to, char *to_end,
DBUG_ASSERT
(
to_end
);
DBUG_ASSERT
(
!
length
||
from
);
set_if_smaller
(
length
,
(
size_t
)
(
to_end
-
to
));
memcpy
(
to
,
from
,
length
);
if
(
length
)
memcpy
(
to
,
from
,
length
);
return
(
to
+
length
);
}
...
...
sql/mysqld.cc
View file @
2a93e632
...
...
@@ -4080,7 +4080,8 @@ rpl_make_log_name(const char *opt,
const
char
*
ext
)
{
DBUG_ENTER
(
"rpl_make_log_name"
);
DBUG_PRINT
(
"enter"
,
(
"opt: %s, def: %s, ext: %s"
,
opt
,
def
,
ext
));
DBUG_PRINT
(
"enter"
,
(
"opt: %s, def: %s, ext: %s"
,
opt
?
opt
:
"(null)"
,
def
,
ext
));
char
buff
[
FN_REFLEN
];
const
char
*
base
=
opt
?
opt
:
def
;
unsigned
int
options
=
...
...
sql/net_serv.cc
View file @
2a93e632
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
Copyright (c) 2012, 20
18
, MariaDB Corporation.
Copyright (c) 2012, 20
20
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -604,7 +604,8 @@ net_write_buff(NET *net, const uchar *packet, ulong len)
return
net_real_write
(
net
,
packet
,
len
)
?
1
:
0
;
/* Send out rest of the blocks as full sized blocks */
}
memcpy
((
char
*
)
net
->
write_pos
,
packet
,
len
);
if
(
len
)
memcpy
((
char
*
)
net
->
write_pos
,
packet
,
len
);
net
->
write_pos
+=
len
;
return
0
;
}
...
...
sql/rpl_filter.cc
View file @
2a93e632
...
...
@@ -349,14 +349,20 @@ Rpl_filter::set_do_table(const char* table_spec)
int
status
;
if
(
do_table_inited
)
my_hash_reset
(
&
do_table
);
{
my_hash_free
(
&
do_table
);
do_table_inited
=
0
;
}
status
=
parse_filter_rule
(
table_spec
,
&
Rpl_filter
::
add_do_table
);
if
(
!
do_table
.
record
s
)
if
(
do_table_inited
&&
statu
s
)
{
my_hash_free
(
&
do_table
);
do_table_inited
=
0
;
if
(
!
do_table
.
records
)
{
my_hash_free
(
&
do_table
);
do_table_inited
=
0
;
}
}
return
status
;
...
...
@@ -369,14 +375,20 @@ Rpl_filter::set_ignore_table(const char* table_spec)
int
status
;
if
(
ignore_table_inited
)
my_hash_reset
(
&
ignore_table
);
{
my_hash_free
(
&
ignore_table
);
ignore_table_inited
=
0
;
}
status
=
parse_filter_rule
(
table_spec
,
&
Rpl_filter
::
add_ignore_table
);
if
(
!
ignore_table
.
record
s
)
if
(
ignore_table_inited
&&
statu
s
)
{
my_hash_free
(
&
ignore_table
);
ignore_table_inited
=
0
;
if
(
!
ignore_table
.
records
)
{
my_hash_free
(
&
ignore_table
);
ignore_table_inited
=
0
;
}
}
return
status
;
...
...
@@ -411,14 +423,20 @@ Rpl_filter::set_wild_do_table(const char* table_spec)
int
status
;
if
(
wild_do_table_inited
)
{
free_string_array
(
&
wild_do_table
);
wild_do_table_inited
=
0
;
}
status
=
parse_filter_rule
(
table_spec
,
&
Rpl_filter
::
add_wild_do_table
);
if
(
!
wild_do_table
.
element
s
)
if
(
wild_do_table_inited
&&
statu
s
)
{
delete_dynamic
(
&
wild_do_table
);
wild_do_table_inited
=
0
;
if
(
!
wild_do_table
.
elements
)
{
delete_dynamic
(
&
wild_do_table
);
wild_do_table_inited
=
0
;
}
}
return
status
;
...
...
@@ -431,14 +449,20 @@ Rpl_filter::set_wild_ignore_table(const char* table_spec)
int
status
;
if
(
wild_ignore_table_inited
)
{
free_string_array
(
&
wild_ignore_table
);
wild_ignore_table_inited
=
0
;
}
status
=
parse_filter_rule
(
table_spec
,
&
Rpl_filter
::
add_wild_ignore_table
);
if
(
!
wild_ignore_table
.
element
s
)
if
(
wild_ignore_table_inited
&&
statu
s
)
{
delete_dynamic
(
&
wild_ignore_table
);
wild_ignore_table_inited
=
0
;
if
(
!
wild_ignore_table
.
elements
)
{
delete_dynamic
(
&
wild_ignore_table
);
wild_ignore_table_inited
=
0
;
}
}
return
status
;
...
...
sql/sql_string.h
View file @
2a93e632
...
...
@@ -555,7 +555,8 @@ class String : public Sql_alloc
}
void
q_append
(
const
char
*
data
,
size_t
data_len
)
{
memcpy
(
Ptr
+
str_length
,
data
,
data_len
);
if
(
data_len
)
memcpy
(
Ptr
+
str_length
,
data
,
data_len
);
DBUG_ASSERT
(
str_length
<=
UINT_MAX32
-
data_len
);
str_length
+=
(
uint
)
data_len
;
}
...
...
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