Column Filtering-opracowanie

Nasza ocena:

3
Wyświetleń: 427
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Column Filtering-opracowanie - strona 1

Fragment notatki:

Column Filtering
When using row-based replication, (binlog_format=ROW [2047]), a slave where the last columns
are missing from a table is supported, as described in the section Section 16.4.1.9, “Replication with
Differing Table Definitions on Master and Slave”.
This filtering works on the slave side, that is, the columns are copied to the slave before they are
filtered out. There are at least two cases where it is not desirable to copy the columns to the slave:
1. If the data is confidential, so the slave server should not have access to it.
2. If the master has many slaves, filtering before sending to the slaves may reduce network traffic.
Master column filtering can be achieved using the BLACKHOLE engine. This is carried out in a
way similar to how master table filtering is achieved - by using the BLACKHOLE engine and the --
replicate-do-table [2012] or --replicate-ignore-table [2013] option.
The setup for the master is:
CREATE TABLE t1 (public_col_1, ..., public_col_N,
secret_col_1, ..., secret_col_M) ENGINE=MyISAM;
The setup for the trusted slave is:
CREATE TABLE t1 (public_col_1, ..., public_col_N) ENGINE=BLACKHOLE;
The setup for the untrusted slave is:
CREATE TABLE t1 (public_col_1, ..., public_col_N) ENGINE=MyISAM;
... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz