mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-15530: Variable replicate_rewrite_db cannot be found in "show global variables"
- Add `replicate_rewrite_db` status variable, that may accept comma
separated key-value pairs.
- Note that option `OPT_REPLICATE_REWRITE_DB` already existed in `mysqld.h`
from this commit 23d8586dbf
Reviewer:Brandon Nesterenko <brandon.nesterenko@mariadb.com>
This commit is contained in:
committed by
Brandon Nesterenko
parent
ccf0e27f28
commit
1a057a923b
@@ -1374,21 +1374,49 @@ bool Protocol::store(I_List<i_string>* str_list)
|
||||
{
|
||||
char buf[256];
|
||||
String tmp(buf, sizeof(buf), &my_charset_bin);
|
||||
uint32 len;
|
||||
size_t len= 0;
|
||||
I_List_iterator<i_string> it(*str_list);
|
||||
i_string* s;
|
||||
const char *delimiter= ",";
|
||||
|
||||
tmp.length(0);
|
||||
while ((s=it++))
|
||||
{
|
||||
tmp.append(delimiter, len);
|
||||
tmp.append(s->ptr, strlen(s->ptr));
|
||||
tmp.append(',');
|
||||
len= 1;
|
||||
}
|
||||
if ((len= tmp.length()))
|
||||
len--; // Remove last ','
|
||||
return store((char*) tmp.ptr(), len, tmp.charset());
|
||||
|
||||
return store((char*) tmp.ptr(), tmp.length(), tmp.charset());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Send a set of strings as a string of key-value pairs with ',' in between.
|
||||
*/
|
||||
|
||||
bool Protocol::store(I_List<i_string_pair>* str_list)
|
||||
{
|
||||
char buf[256];
|
||||
const char *delimiter= ",";
|
||||
String tmp(buf, sizeof(buf), &my_charset_bin);
|
||||
size_t delim_len= 0;
|
||||
I_List_iterator<i_string_pair> it(*str_list);
|
||||
i_string_pair* s;
|
||||
|
||||
tmp.length(0);
|
||||
while ((s=it++))
|
||||
{
|
||||
tmp.append(delimiter, delim_len);
|
||||
tmp.append(s->key, strlen(s->key));
|
||||
tmp.append(STRING_WITH_LEN("->"));
|
||||
tmp.append(s->val, strlen(s->val));
|
||||
delim_len= 1;
|
||||
}
|
||||
return store((char*) tmp.ptr(), tmp.length(), tmp.charset());
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
Functions to handle the simple (default) protocol where everything is
|
||||
This protocol is the one that is used by default between the MySQL server
|
||||
|
Reference in New Issue
Block a user