obproxy实例有什么表?

root@proxysys实例登录obproxy:


mysql> show tables;
+--------------------------+-------------------+
| Variable_name            | Value             |
+--------------------------+-------------------+
| tx_isolation             | READ-COMMITTED    |
| system_time_zone         | +08:00            |
| time_zone                | +08:00            |
| character_set_server     | utf8mb4           |
| character_set_client     | utf8mb4           |
| interactive_timeout      | 28800             |
| query_cache_size         | 1048576           |
| character_set_results    | utf8mb4           |
| max_allowed_packet       | 4194304           |
| sql_mode                 | STRICT_ALL_TABLES |
| net_buffer_length        | 16384             |
| wait_timeout             | 28800             |
| lower_case_table_names   | 2                 |
| query_cache_type         | OFF               |
| init_connect             |                   |
| transaction_isolation    | READ              |
| character_set_connection | utf8mb4           |
| net_write_timeout        | 60                |
+--------------------------+-------------------+
18 rows in set (0.00 sec)
mysql> show databases;
+--------------------------+-------------------+
| Variable_name            | Value             |
+--------------------------+-------------------+
| tx_isolation             | READ-COMMITTED    |
| system_time_zone         | +08:00            |
| time_zone                | +08:00            |
| character_set_server     | utf8mb4           |
| character_set_client     | utf8mb4           |
| interactive_timeout      | 28800             |
| query_cache_size         | 1048576           |
| character_set_results    | utf8mb4           |
| max_allowed_packet       | 4194304           |
| sql_mode                 | STRICT_ALL_TABLES |
| net_buffer_length        | 16384             |
| wait_timeout             | 28800             |
| lower_case_table_names   | 2                 |
| query_cache_type         | OFF               |
| init_connect             |                   |
| transaction_isolation    | READ              |
| character_set_connection | utf8mb4           |
| net_write_timeout        | 60                |
+--------------------------+-------------------+
18 rows in set (0.00 sec)

发现没有数据库,也没有表。
从论坛上看到有proxy_config、white_list表。

mysql> select * from proxy_config limit 10;
+------+------+-------+-------------+--------------+----------------------------------+-------+------+-------+-------------+---------------+--------------+
| vid  | vip  | vport | tenant_name | cluster_name | name                             | value | info | range | need_reboot | visible_level | config_level |
+------+------+-------+-------------+--------------+----------------------------------+-------+------+-------+-------------+---------------+--------------+
| -1   |      | 0     |             |              | client_session_id_version        | 1     |      |       |             |               | LEVEL_GLOBAL |
| -1   |      | 0     |             |              | connection_diagnosis_option      | 3     |      |       |             |               | LEVEL_GLOBAL |
| -1   |      | 0     |             |              | read_stale_remove_interval       | 6h    |      |       |             |               | LEVEL_GLOBAL |
| -1   |      | 0     |             |              | ob_max_read_stale_time           | -1    |      |       |             |               | LEVEL_GLOBAL |
| -1   |      | 0     |             |              | read_stale_retry_interval        | 5s    |      |       |             |               | LEVEL_GLOBAL |
| -1   |      | 0     |             |              | enable_session_info_verification | False |      |       |             |               | LEVEL_GLOBAL |
| -1   |      | 0     |             |              | init_sql                         |       |      |       |             |               | LEVEL_GLOBAL |
| -1   |      | 0     |             |              | binlog_service_ip                |       |      |       |             |               | LEVEL_GLOBAL |
| -1   |      | 0     |             |              | weak_read_user_list              |       |      |       |             |               | LEVEL_GLOBAL |
| -1   |      | 0     |             |              | enable_transaction_split         | False |      |       |             |               | LEVEL_GLOBAL |
+------+------+-------+-------------+--------------+----------------------------------+-------+------+-------+-------------+---------------+--------------+
10 rows in set (0.00 sec)

mysql>  select * from white_list;
Query OK, 0 rows affected (0.00 sec)

请问除了proxy_config、white_list表之外,还有什么表?这些虚拟表是怎么生成(存储的管理的)的?

这个不是租户实例。只是用于 obproxy 的一些参数管理状态查询。并没有兼容实现所有的 mysql 语法。

那都有什么表?什么作用?

查看系统租户的 oceanbase 库,如下:
select table_name from __all_table where table_name like ‘%proxy%’;

mysql> select table_name from __all_table where table_name like '%proxy%';
+------------------------------------+
| table_name                         |
+------------------------------------+
| __all_virtual_proxy_partition      |
| __all_virtual_proxy_partition_info |
| __all_virtual_proxy_routine        |
| __all_virtual_proxy_schema         |
| __all_virtual_proxy_server_stat    |
| __all_virtual_proxy_sub_partition  |
| __all_virtual_proxy_sys_variable   |
+------------------------------------+
7 rows in set (0.00 sec)

我是想知道obproxy上有什么表的,比如proxy_config 和white_list,还有其他什么表 只能在obproxy上查的?

其实没有表的概念的 只有参数信息 为了方便 查看参数信息 才有这个表的