SHOW READWRITE_SPLITTING RULE
语法
- 未指定
databaseName
时,默认是当前使用的 DATABASE
。 如果也未使用 DATABASE
则会提示 No database selected
。
返回值说明
SHOW READWRITE_SPLITTING RULES FROM readwrite_splitting_db;
mysql> SHOW READWRITE_SPLITTING RULES FROM readwrite_splitting_db;
| name | auto_aware_data_source_name | write_data_source_name | read_data_source_names | load_balancer_type | load_balancer_props |
+------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
| ms_group_0 | | resource_1 | ds_0,ds_1 | random | |
1 row in set (0.01 sec)
mysql> SHOW READWRITE_SPLITTING RULES;
+------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
| name | auto_aware_data_source_name | write_data_source_name | read_data_source_names | load_balancer_type | load_balancer_props |
+------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
| ms_group_0 | | resource_1 | ds_0,ds_1 | random | |
1 row in set (0.01 sec)
SHOW READWRITE_SPLITTING RULE ms_group_0 FROM readwrite_splitting_db;
SHOW READWRITE_SPLITTING RULE ms_group_0;
+------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
| name | auto_aware_data_source_name | write_data_source_name | read_data_source_names | load_balancer_type | load_balancer_props |
+------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
| ms_group_0 | | resource_1 | ds_0,ds_1 | random | |
+------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
保留字