Merge 10.1 into 10.2
This commit is contained in:
commit
2a93e632b1
@ -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
|
ERROR HY000: This operation cannot be performed as you have a running slave ''; run STOP SLAVE '' first
|
||||||
connection slave;
|
connection slave;
|
||||||
include/stop_slave.inc
|
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_do_table="test.t1,test.t2,test.t3";
|
||||||
SET @@GLOBAL.replicate_ignore_table="test.t4,test.t5,test.t6";
|
SET @@GLOBAL.replicate_ignore_table="test.t4,test.t5,test.t6";
|
||||||
include/start_slave.inc
|
include/start_slave.inc
|
||||||
|
@ -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
|
ERROR HY000: This operation cannot be performed as you have a running slave ''; run STOP SLAVE '' first
|
||||||
connection slave;
|
connection slave;
|
||||||
include/stop_slave.inc
|
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_do_table="test.a%";
|
||||||
SET @@GLOBAL.replicate_wild_ignore_table="test.b%";
|
SET @@GLOBAL.replicate_wild_ignore_table="test.b%";
|
||||||
include/start_slave.inc
|
include/start_slave.inc
|
||||||
|
@ -51,6 +51,8 @@ SET @@GLOBAL.replicate_ignore_table="test.t4,test.t5,test.t6";
|
|||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/stop_slave.inc;
|
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_do_table="test.t1,test.t2,test.t3";
|
||||||
SET @@GLOBAL.replicate_ignore_table="test.t4,test.t5,test.t6";
|
SET @@GLOBAL.replicate_ignore_table="test.t4,test.t5,test.t6";
|
||||||
source include/start_slave.inc;
|
source include/start_slave.inc;
|
||||||
|
@ -13,6 +13,8 @@ SET @@GLOBAL.replicate_wild_ignore_table="test.b%";
|
|||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/stop_slave.inc;
|
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_do_table="test.a%";
|
||||||
SET @@GLOBAL.replicate_wild_ignore_table="test.b%";
|
SET @@GLOBAL.replicate_wild_ignore_table="test.b%";
|
||||||
source include/start_slave.inc;
|
source include/start_slave.inc;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2000, 2011, Oracle and/or its affiliates
|
Copyright (c) 2000, 2011, Oracle and/or its affiliates
|
||||||
Copyright (c) 2010, 2015, MariaDB
|
Copyright (c) 2010, 2020, MariaDB
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -804,6 +804,7 @@ int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count)
|
|||||||
info->read_pos=info->buffer+Count;
|
info->read_pos=info->buffer+Count;
|
||||||
info->read_end=info->buffer+length;
|
info->read_end=info->buffer+length;
|
||||||
info->pos_in_file=pos_in_file;
|
info->pos_in_file=pos_in_file;
|
||||||
|
if (Count)
|
||||||
memcpy(Buffer, info->buffer, Count);
|
memcpy(Buffer, info->buffer, Count);
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
@ -1305,6 +1306,7 @@ static int _my_b_cache_read_r(IO_CACHE *cache, uchar *Buffer, size_t Count)
|
|||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
cnt= (len > Count) ? Count : len;
|
cnt= (len > Count) ? Count : len;
|
||||||
|
if (cnt)
|
||||||
memcpy(Buffer, cache->read_pos, cnt);
|
memcpy(Buffer, cache->read_pos, cnt);
|
||||||
Count -= cnt;
|
Count -= cnt;
|
||||||
Buffer+= cnt;
|
Buffer+= cnt;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2000, 2010, Oracle and/or its affiliates
|
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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -449,6 +450,7 @@ char *strmake_root(MEM_ROOT *root, const char *str, size_t len)
|
|||||||
char *pos;
|
char *pos;
|
||||||
if ((pos=alloc_root(root,len+1)))
|
if ((pos=alloc_root(root,len+1)))
|
||||||
{
|
{
|
||||||
|
if (len)
|
||||||
memcpy(pos,str,len);
|
memcpy(pos,str,len);
|
||||||
pos[len]=0;
|
pos[len]=0;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/* Copyright (c) 2009, 2013, Oracle and/or its affiliates.
|
/* 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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -319,6 +320,7 @@ static char *debug_sync_bmove_len(char *to, char *to_end,
|
|||||||
DBUG_ASSERT(to_end);
|
DBUG_ASSERT(to_end);
|
||||||
DBUG_ASSERT(!length || from);
|
DBUG_ASSERT(!length || from);
|
||||||
set_if_smaller(length, (size_t) (to_end - to));
|
set_if_smaller(length, (size_t) (to_end - to));
|
||||||
|
if (length)
|
||||||
memcpy(to, from, length);
|
memcpy(to, from, length);
|
||||||
return (to + length);
|
return (to + length);
|
||||||
}
|
}
|
||||||
|
@ -4080,7 +4080,8 @@ rpl_make_log_name(const char *opt,
|
|||||||
const char *ext)
|
const char *ext)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("rpl_make_log_name");
|
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];
|
char buff[FN_REFLEN];
|
||||||
const char *base= opt ? opt : def;
|
const char *base= opt ? opt : def;
|
||||||
unsigned int options=
|
unsigned int options=
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
|
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2012, 2018, MariaDB Corporation.
|
Copyright (c) 2012, 2020, MariaDB Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -604,6 +604,7 @@ net_write_buff(NET *net, const uchar *packet, ulong len)
|
|||||||
return net_real_write(net, packet, len) ? 1 : 0;
|
return net_real_write(net, packet, len) ? 1 : 0;
|
||||||
/* Send out rest of the blocks as full sized blocks */
|
/* Send out rest of the blocks as full sized blocks */
|
||||||
}
|
}
|
||||||
|
if (len)
|
||||||
memcpy((char*) net->write_pos,packet,len);
|
memcpy((char*) net->write_pos,packet,len);
|
||||||
net->write_pos+= len;
|
net->write_pos+= len;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -349,15 +349,21 @@ Rpl_filter::set_do_table(const char* table_spec)
|
|||||||
int status;
|
int status;
|
||||||
|
|
||||||
if (do_table_inited)
|
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);
|
status= parse_filter_rule(table_spec, &Rpl_filter::add_do_table);
|
||||||
|
|
||||||
|
if (do_table_inited && status)
|
||||||
|
{
|
||||||
if (!do_table.records)
|
if (!do_table.records)
|
||||||
{
|
{
|
||||||
my_hash_free(&do_table);
|
my_hash_free(&do_table);
|
||||||
do_table_inited= 0;
|
do_table_inited= 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -369,15 +375,21 @@ Rpl_filter::set_ignore_table(const char* table_spec)
|
|||||||
int status;
|
int status;
|
||||||
|
|
||||||
if (ignore_table_inited)
|
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);
|
status= parse_filter_rule(table_spec, &Rpl_filter::add_ignore_table);
|
||||||
|
|
||||||
|
if (ignore_table_inited && status)
|
||||||
|
{
|
||||||
if (!ignore_table.records)
|
if (!ignore_table.records)
|
||||||
{
|
{
|
||||||
my_hash_free(&ignore_table);
|
my_hash_free(&ignore_table);
|
||||||
ignore_table_inited= 0;
|
ignore_table_inited= 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -411,15 +423,21 @@ Rpl_filter::set_wild_do_table(const char* table_spec)
|
|||||||
int status;
|
int status;
|
||||||
|
|
||||||
if (wild_do_table_inited)
|
if (wild_do_table_inited)
|
||||||
|
{
|
||||||
free_string_array(&wild_do_table);
|
free_string_array(&wild_do_table);
|
||||||
|
wild_do_table_inited= 0;
|
||||||
|
}
|
||||||
|
|
||||||
status= parse_filter_rule(table_spec, &Rpl_filter::add_wild_do_table);
|
status= parse_filter_rule(table_spec, &Rpl_filter::add_wild_do_table);
|
||||||
|
|
||||||
|
if (wild_do_table_inited && status)
|
||||||
|
{
|
||||||
if (!wild_do_table.elements)
|
if (!wild_do_table.elements)
|
||||||
{
|
{
|
||||||
delete_dynamic(&wild_do_table);
|
delete_dynamic(&wild_do_table);
|
||||||
wild_do_table_inited= 0;
|
wild_do_table_inited= 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -431,15 +449,21 @@ Rpl_filter::set_wild_ignore_table(const char* table_spec)
|
|||||||
int status;
|
int status;
|
||||||
|
|
||||||
if (wild_ignore_table_inited)
|
if (wild_ignore_table_inited)
|
||||||
|
{
|
||||||
free_string_array(&wild_ignore_table);
|
free_string_array(&wild_ignore_table);
|
||||||
|
wild_ignore_table_inited= 0;
|
||||||
|
}
|
||||||
|
|
||||||
status= parse_filter_rule(table_spec, &Rpl_filter::add_wild_ignore_table);
|
status= parse_filter_rule(table_spec, &Rpl_filter::add_wild_ignore_table);
|
||||||
|
|
||||||
|
if (wild_ignore_table_inited && status)
|
||||||
|
{
|
||||||
if (!wild_ignore_table.elements)
|
if (!wild_ignore_table.elements)
|
||||||
{
|
{
|
||||||
delete_dynamic(&wild_ignore_table);
|
delete_dynamic(&wild_ignore_table);
|
||||||
wild_ignore_table_inited= 0;
|
wild_ignore_table_inited= 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -555,6 +555,7 @@ public:
|
|||||||
}
|
}
|
||||||
void q_append(const char *data, size_t data_len)
|
void q_append(const char *data, size_t data_len)
|
||||||
{
|
{
|
||||||
|
if (data_len)
|
||||||
memcpy(Ptr + str_length, data, data_len);
|
memcpy(Ptr + str_length, data, data_len);
|
||||||
DBUG_ASSERT(str_length <= UINT_MAX32 - data_len);
|
DBUG_ASSERT(str_length <= UINT_MAX32 - data_len);
|
||||||
str_length += (uint)data_len;
|
str_length += (uint)data_len;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user