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 |
---|---|
rule_name | Shadow rule name |
source_name | Data source name |
shadow_name | Shadow data source name |
shadow_table | Shadow table |
SHOW SHADOW RULE shadow_rule FROM shadow_db;
mysql> SHOW SHADOW RULE shadow_rule FROM shadow_db;
+-------------+-------------+-------------+----------------------+
| rule_name | source_name | shadow_name | shadow_table |
+-------------+-------------+-------------+----------------------+
| shadow_rule | ds_0 | ds_1 | t_order_item,t_order |
+-------------+-------------+-------------+----------------------+
1 row in set (0.00 sec)
SHOW SHADOW RULE shadow_rule;
mysql> SHOW SHADOW RULE shadow_rule;
+-------------+-------------+-------------+----------------------+
| rule_name | source_name | shadow_name | shadow_table |
+-------------+-------------+-------------+----------------------+
| shadow_rule | ds_0 | ds_1 | t_order_item,t_order |
+-------------+-------------+-------------+----------------------+
1 row in set (0.01 sec)
SHOW SHADOW RULES FROM shadow_db;
mysql> SHOW SHADOW RULES FROM shadow_db;
+-------------+-------------+-------------+----------------------+
| rule_name | source_name | shadow_name | shadow_table |
+-------------+-------------+-------------+----------------------+
| shadow_rule | ds_0 | ds_1 | t_order_item,t_order |
+-------------+-------------+-------------+----------------------+
1 row in set (0.00 sec)
SHOW SHADOW RULES;
mysql> SHOW SHADOW RULES;
+-------------+-------------+-------------+----------------------+
| rule_name | source_name | shadow_name | shadow_table |
+-------------+-------------+-------------+----------------------+
| shadow_rule | ds_0 | ds_1 | t_order_item,t_order |
+-------------+-------------+-------------+----------------------+
1 row in set (0.00 sec)
SHOW
, SHADOW
, RULE
, RULES
, FROM