← Back to team overview

maria-developers team mailing list archive

WL40: Notes/questions


With WL36 and WL40 we have:
mysqlbinlog options:

replication options:

1. In mysqlbinlog we do not have --do_db and --ignore_db options.
   Does it mean that instead it is supposed to use:



   Compared with other options, --database option looks like
   a "foreign body" :

   - contrary to other options, it allows to specify only one
     database (with multiple --database's only the last one is

   - having with --database an analog of do_db, we have no
     similar analog of ignore_db.

2. In replication two functions are used for filtering databases:

   - db_ok(const char* db) which matches db only with do-db and
     ignore-db rules;

   - db_ok_with_wild_table(const char* db) which matches db only
     with wild-do-table=db.% and wild-ignore-table=db.% rules.
     This function is applied only to CREATE DB, DROP DB, and
     ALTER DATABASE statements.

   In mysqlbinlog, should we follow the same scheme, namely:

   - db_ok() for matching db with --database option only;
   - db_ok_with_wild_table() for statements listed above?

3. According to replication filtering rules, --replicate-rewrite_db
   is always done _before_ other --replicate-* rules are tested;
   see explanation for --replicate-rewrite-db in RefMan (
   Replication Slave Options and Variables), or the following piece
   of code in og_event.cc:

       int Table_map_log_event::do_apply_event(Relay_log_info const* rli)
         RPL_TABLE_LIST* table_list;
         strmov(table_list->db, rpl_filter->get_rewrite_db(m_dbnam, &dummy_len));
         if (...!rpl_filter->db_ok(table_list->db) ...)

   And what about --database + rewrite-db for mysqlbinlog? If we mean to
   output only database xxx with renaming it to yyy, should we use

   (1)  mysqlbinlog --database=xxx --rewrite-db=xxx->yyy
   (2)  mysqlbinlog --database=yyy --rewrite-db=xxx->yyy

   In current WL36 design it is supposed that (1) should be used
   (surely, this can easily be redesigned). But this becomes confused
   with using of --wild-do-table + replication filtering rules,
   for which we should use:

   (3)  --wild-do-table=yyy.% --rewrite-db=xxx->yyy

Follow ups