mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 15:24:16 +01:00
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/home/mysql_src/mysql-5.1
This commit is contained in:
commit
081cc15587
2 changed files with 31 additions and 19 deletions
|
@ -449,9 +449,11 @@ Rpl_filter::free_string_array(DYNAMIC_ARRAY *a)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
Rpl_filter::table_rule_ent_hash_to_str(String* s, HASH* h)
|
Rpl_filter::table_rule_ent_hash_to_str(String* s, HASH* h, bool inited)
|
||||||
{
|
{
|
||||||
s->length(0);
|
s->length(0);
|
||||||
|
if (inited)
|
||||||
|
{
|
||||||
for (uint i= 0; i < h->records; i++)
|
for (uint i= 0; i < h->records; i++)
|
||||||
{
|
{
|
||||||
TABLE_RULE_ENT* e= (TABLE_RULE_ENT*) hash_element(h, i);
|
TABLE_RULE_ENT* e= (TABLE_RULE_ENT*) hash_element(h, i);
|
||||||
|
@ -460,12 +462,16 @@ Rpl_filter::table_rule_ent_hash_to_str(String* s, HASH* h)
|
||||||
s->append(e->db,e->key_len);
|
s->append(e->db,e->key_len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Rpl_filter::table_rule_ent_dynamic_array_to_str(String* s, DYNAMIC_ARRAY* a)
|
Rpl_filter::table_rule_ent_dynamic_array_to_str(String* s, DYNAMIC_ARRAY* a,
|
||||||
|
bool inited)
|
||||||
{
|
{
|
||||||
s->length(0);
|
s->length(0);
|
||||||
|
if (inited)
|
||||||
|
{
|
||||||
for (uint i= 0; i < a->elements; i++)
|
for (uint i= 0; i < a->elements; i++)
|
||||||
{
|
{
|
||||||
TABLE_RULE_ENT* e;
|
TABLE_RULE_ENT* e;
|
||||||
|
@ -475,33 +481,34 @@ Rpl_filter::table_rule_ent_dynamic_array_to_str(String* s, DYNAMIC_ARRAY* a)
|
||||||
s->append(e->db,e->key_len);
|
s->append(e->db,e->key_len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Rpl_filter::get_do_table(String* str)
|
Rpl_filter::get_do_table(String* str)
|
||||||
{
|
{
|
||||||
table_rule_ent_hash_to_str(str, &do_table);
|
table_rule_ent_hash_to_str(str, &do_table, do_table_inited);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Rpl_filter::get_ignore_table(String* str)
|
Rpl_filter::get_ignore_table(String* str)
|
||||||
{
|
{
|
||||||
table_rule_ent_hash_to_str(str, &ignore_table);
|
table_rule_ent_hash_to_str(str, &ignore_table, ignore_table_inited);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Rpl_filter::get_wild_do_table(String* str)
|
Rpl_filter::get_wild_do_table(String* str)
|
||||||
{
|
{
|
||||||
table_rule_ent_dynamic_array_to_str(str, &wild_do_table);
|
table_rule_ent_dynamic_array_to_str(str, &wild_do_table, wild_do_table_inited);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Rpl_filter::get_wild_ignore_table(String* str)
|
Rpl_filter::get_wild_ignore_table(String* str)
|
||||||
{
|
{
|
||||||
table_rule_ent_dynamic_array_to_str(str, &wild_ignore_table);
|
table_rule_ent_dynamic_array_to_str(str, &wild_ignore_table, wild_ignore_table_inited);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -87,10 +87,15 @@ private:
|
||||||
|
|
||||||
void free_string_array(DYNAMIC_ARRAY *a);
|
void free_string_array(DYNAMIC_ARRAY *a);
|
||||||
|
|
||||||
void table_rule_ent_hash_to_str(String* s, HASH* h);
|
void table_rule_ent_hash_to_str(String* s, HASH* h, bool inited);
|
||||||
void table_rule_ent_dynamic_array_to_str(String* s, DYNAMIC_ARRAY* a);
|
void table_rule_ent_dynamic_array_to_str(String* s, DYNAMIC_ARRAY* a,
|
||||||
|
bool inited);
|
||||||
TABLE_RULE_ENT* find_wild(DYNAMIC_ARRAY *a, const char* key, int len);
|
TABLE_RULE_ENT* find_wild(DYNAMIC_ARRAY *a, const char* key, int len);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Those 4 structures below are uninitialized memory unless the
|
||||||
|
corresponding *_inited variables are "true".
|
||||||
|
*/
|
||||||
HASH do_table;
|
HASH do_table;
|
||||||
HASH ignore_table;
|
HASH ignore_table;
|
||||||
DYNAMIC_ARRAY wild_do_table;
|
DYNAMIC_ARRAY wild_do_table;
|
||||||
|
|
Loading…
Add table
Reference in a new issue