SHOW SHADOW shadowRule | RULES [FROM schemaName]
SHOW SHADOW TABLE RULES [FROM schemaName]
SHOW SHADOW ALGORITHMS [FROM schemaName]
shadowRule:
RULE ruleName
Column | Description |
---|---|
rule_name | Rule name |
source_name | Source database |
shadow_name | Shadow database |
shadow_table | Shadow table |
Column | Description |
---|---|
shadow_table | Shadow table |
shadow_algorithm_name | Shadow algorithm name |
Column | Description |
---|---|
shadow_algorithm_name | Shadow algorithm name |
type | Shadow algorithm type |
props | Shadow algorithm properties |
is_default | Default |
Column | Description |
---|---|
status | Enable |
SHOW SHADOW RULES
mysql> show shadow rules;
+--------------------+-------------+-------------+--------------+
| rule_name | source_name | shadow_name | shadow_table |
+--------------------+-------------+-------------+--------------+
| shadow_rule_1 | ds_1 | ds_shadow_1 | t_order |
| shadow_rule_2 | ds_2 | ds_shadow_2 | t_order_item |
+--------------------+-------------+-------------+--------------+
2 rows in set (0.02 sec)
SHOW SHADOW RULE ruleName
mysql> show shadow rule shadow_rule_1;
+------------------+-------------+-------------+--------------+
| rule_name | source_name | shadow_name | shadow_table |
+------------------+-------------+-------------+--------------+
| shadow_rule_1 | ds_1 | ds_shadow_1 | t_order |
+------------------+-------------+-------------+--------------+
1 rows in set (0.01 sec)
SHOW SHADOW TABLE RULES
mysql> show shadow table rules;
+--------------+--------------------------------------------------------------------------------+
| shadow_table | shadow_algorithm_name |
+--------------+--------------------------------------------------------------------------------+
| t_order_1 | user_id_match_algorithm,simple_hint_algorithm_1 |
+--------------+--------------------------------------------------------------------------------+
1 rows in set (0.01 sec)
SHOW SHADOW ALGORITHMS
mysql> show shadow algorithms;
+-------------------------+--------------------+-------------------------------------------+----------------+
| shadow_algorithm_name | type | props | is_default |
+-------------------------+--------------------+-------------------------------------------+----------------+
| user_id_match_algorithm | REGEX_MATCH | operation=insert,column=user_id,regex=[1] | false |
| simple_hint_algorithm_1 | SIMPLE_HINT | shadow=true,foo=bar | false |
+-------------------------+--------------------+-------------------------------------------+----------------+
2 rows in set (0.01 sec)