The SHOW SHADOW RULE syntax is used to query shadow rules for specified database.
ShowShadowRule::=
'SHOW' 'SHADOW' ('RULES' | 'RULE' shadowRuleName) ('FROM' databaseName)?
shadowRuleName ::=
identifier
databaseName ::=
identifier
databaseName is not specified, the default is the currently used DATABASE. If DATABASE is not used, No database selected will be prompted.| Column | Description |
|---|---|
| shadow_table | Shadow table |
| rule_name | Shadow rule name |
| source_name | Data source name |
| shadow_name | Shadow data source name |
| algorithm_type | Shadow algorithm type |
| algorithm_props | Shadow algorithm props |
SHOW SHADOW RULE shadow_rule FROM shadow_db;
mysql> SHOW SHADOW RULE shadow_rule FROM shadow_db;
+--------------+-------------+-------------+-------------+----------------+-------------------------------------------------+
| shadow_table | rule_name | source_name | shadow_name | algorithm_type | algorithm_props |
+--------------+-------------+-------------+-------------+----------------+-------------------------------------------------+
| t_order | shadow_rule | ds_0 | ds_1 | VALUE_MATCH | column=user_id,operation=insert,value=1 |
+--------------+-------------+-------------+-------------+----------------+-------------------------------------------------+
1 row in set (0.00 sec)
SHOW SHADOW RULE shadow_rule;
mysql> SHOW SHADOW RULE shadow_rule;
+--------------+-------------+-------------+-------------+----------------+-------------------------------------------------+
| shadow_table | rule_name | source_name | shadow_name | algorithm_type | algorithm_props |
+--------------+-------------+-------------+-------------+----------------+-------------------------------------------------+
| t_order | shadow_rule | ds_0 | ds_1 | VALUE_MATCH | column=user_id,operation=insert,value=1 |
+--------------+-------------+-------------+-------------+----------------+-------------------------------------------------+
1 row in set (0.01 sec)
SHOW SHADOW RULES FROM shadow_db;
mysql> SHOW SHADOW RULES FROM shadow_db;
+--------------+-------------+-------------+-------------+----------------+-------------------------------------------------+
| shadow_table | rule_name | source_name | shadow_name | algorithm_type | algorithm_props |
+--------------+-------------+-------------+-------------+----------------+-------------------------------------------------+
| t_order | shadow_rule | ds_0 | ds_1 | VALUE_MATCH | column=user_id,operation=insert,value=1 |
+--------------+-------------+-------------+-------------+----------------+-------------------------------------------------+
1 row in set (0.00 sec)
SHOW SHADOW RULES;
mysql> SHOW SHADOW RULES;
+--------------+-------------+-------------+-------------+----------------+-------------------------------------------------+
| shadow_table | rule_name | source_name | shadow_name | algorithm_type | algorithm_props |
+--------------+-------------+-------------+-------------+----------------+-------------------------------------------------+
| t_order | shadow_rule | ds_0 | ds_1 | VALUE_MATCH | column=user_id,operation=insert,value=1 |
+--------------+-------------+-------------+-------------+----------------+-------------------------------------------------+
1 row in set (0.00 sec)
SHOW, SHADOW, RULE, RULES, FROM
