描述

    使用show proxysession variables [all] id [like 'xx']语句:

    • 不带all参数时,展示指定cs的本地session变量(changed sys和user的)
    • all参数时,展示指定cs的全部session变量(sys和user的)
    • id既可以是cs id,也可以是connection id, 展示结果相同;
    • cs id为proxy内部标记每个client的id号, connection id为整个ob数据库标记每个client的id号.
    • 支持like模糊匹配(支持’%’和’_‘的匹配)

    示例

    1. OceanBase (root@oceanbase)> show proxysession variables 3;
    2. +-----------------------------------+------------------+-----------------+--------------------+--------------------------------------------+
    3. | variable_name | value | info | modified_type | sys_variable_flag |
    4. +-----------------------------------+------------------+-----------------+--------------------+--------------------------------------------+
    5. | ob_proxy_global_variables_version | 1461742173142100 | changed sys var | cold modified vars | && invisible && session_scope && readonly |
    6. | ob_proxy_user_privilege | 65534 | changed sys var | cold modified vars | && invisible && session_scope && readonly |
    7. +-----------------------------------+------------------+-----------------+--------------------+--------------------------------------------+
    8. 2 rows in set (0.01 sec)
    9. OceanBase (root@oceanbase)> show proxysession variables 2147549231;
    10. +-----------------------------------+------------------+-----------------+--------------------+--------------------------------------------+
    11. | variable_name | value | info | modified_type | sys_variable_flag |
    12. +-----------------------------------+------------------+-----------------+--------------------+--------------------------------------------+
    13. | ob_proxy_global_variables_version | 1461742173142100 | changed sys var | cold modified vars | && invisible && session_scope && readonly |
    14. | ob_proxy_user_privilege | 65534 | changed sys var | cold modified vars | && invisible && session_scope && readonly |
    15. +-----------------------------------+------------------+-----------------+--------------------+--------------------------------------------+
    16. 2 rows in set (0.00 sec)
    17. OceanBase (root@oceanbase)> show proxysession variables all 3;
    18. +-----------------------------------+------------------------------------------------------------------------------------------------------+---------+------------------------------+-----------------------------------------------+
    19. | variable_name | value | info | modified_type | sys_variable_flag |
    20. +-----------------------------------+------------------------------------------------------------------------------------------------------+---------+------------------------------+-----------------------------------------------+
    21. | ob_proxy_global_variables_version | 1461742173142100 | sys var | cold modified vars | && invisible && session_scope && readonly |
    22. | ob_proxy_user_privilege | 65534 | sys var | cold modified vars | && invisible && session_scope && readonly |
    23. | autocommit | 1 | sys var | hot modified vars | && global_scope && session_scope |
    24. | auto_increment_increment | 1 | sys var | cold modified vars | && global_scope && session_scope |
    25. | auto_increment_offset | 1 | sys var | cold modified vars | && global_scope && session_scope |
    26. | binlog_row_image | 2 | sys var | cold modified vars | && global_scope && session_scope |
    27. | character_set_client | 45 | sys var | cold modified vars | && global_scope && session_scope && nullable |
    28. | character_set_connection | 45 | sys var | cold modified vars | && global_scope && session_scope && nullable |
    29. | character_set_database | 45 | sys var | cold modified vars | && global_scope && session_scope && nullable |
    30. | character_set_filesystem | 63 | sys var | cold modified vars | && global_scope && session_scope && nullable |
    31. | character_set_results | 45 | sys var | cold modified vars | && global_scope && session_scope && nullable |
    32. | character_set_server | 45 | sys var | cold modified vars | && global_scope && session_scope && nullable |
    33. | character_set_system | 45 | sys var | cold modified vars | && global_scope && session_scope && readonly |
    34. | collation_connection | 45 | sys var | cold modified vars | && global_scope && session_scope && nullable |
    35. | collation_database | 45 | sys var | cold modified vars | && global_scope && session_scope && nullable |
    36. | collation_server | 45 | sys var | cold modified vars | && global_scope && session_scope && nullable |
    37. | connect_timeout | 10 | sys var | cold modified vars | && global_scope |
    38. | datadir | /usr/local/mysql/data/ | sys var | cold modified vars | && global_scope && readonly |
    39. | debug_sync | | sys var | cold modified vars | && invisible && session_scope |
    40. | div_precision_increment | 4 | sys var | cold modified vars | && global_scope && session_scope |
    41. | explicit_defaults_for_timestamp | 1 | sys var | cold modified vars | && global_scope && session_scope |
    42. | group_concat_max_len | 1024 | sys var | cold modified vars | && global_scope && session_scope |
    43. | identity | 0 | sys var | cold modified vars | && session_scope |
    44. | init_connect | | sys var | cold modified vars | && global_scope |
    45. | interactive_timeout | 28800 | sys var | cold modified vars | && global_scope && session_scope |
    46. | last_insert_id | 0 | sys var | last insert id modified vars | && session_scope |
    47. | license | | sys var | cold modified vars | && global_scope && readonly |
    48. | lower_case_table_names | 2 | sys var | cold modified vars | && global_scope && readonly |
    49. | max_allowed_packet | 4194304 | sys var | cold modified vars | && global_scope && session_scope && readonly |
    50. | max_user_connections | 0 | sys var | cold modified vars | && global_scope && session_scope && readonly |
    51. | net_read_timeout | 30 | sys var | cold modified vars | && global_scope && session_scope |
    52. | net_write_timeout | 60 | sys var | cold modified vars | && global_scope && session_scope |
    53. | ob_bnl_join_cache_size | 10485760 | sys var | cold modified vars | && global_scope && session_scope |
    54. | ob_default_replica_num | 1 | sys var | cold modified vars | && global_scope && session_scope |
    55. | ob_enable_aggregation_pushdown | 1 | sys var | cold modified vars | && global_scope && session_scope |
    56. | ob_enable_blk_nestedloop_join | 0 | sys var | cold modified vars | && global_scope && session_scope |
    57. | ob_enable_hash_group_by | 0 | sys var | cold modified vars | && global_scope && session_scope |
    58. | ob_enable_index_direct_select | 0 | sys var | cold modified vars | && global_scope && session_scope |
    59. | ob_enable_plan_cache | 1 | sys var | cold modified vars | && global_scope && session_scope |
    60. | ob_enable_trace_log | 0 | sys var | cold modified vars | && global_scope && session_scope |
    61. | ob_enable_transformation | 1 | sys var | cold modified vars | && global_scope && session_scope |
    62. | ob_global_debug_sync | | sys var | cold modified vars | && invisible && session_scope |
    63. | ob_interm_result_mem_limit | 2147483648 | sys var | cold modified vars | && global_scope && session_scope |
    64. | ob_last_schema_version | 0 | sys var | hot modified vars | && session_scope |
    65. | ob_log_level | disabled | sys var | hot modified vars | && global_scope && session_scope |
    66. | ob_max_parallel_degree | 32 | sys var | cold modified vars | && global_scope && session_scope |
    67. | ob_org_cluster_id | 0 | sys var | cold modified vars | && session_scope |
    68. | ob_proxy_partition_hit | 1 | sys var | cold modified vars | && invisible && session_scope && readonly |
    69. | ob_proxy_set_trx_executed | 0 | sys var | cold modified vars | && invisible && session_scope && readonly |
    70. | ob_query_timeout | 10000000 | sys var | hot modified vars | && global_scope && session_scope |
    71. | ob_read_consistency | 3 | sys var | cold modified vars | && global_scope && session_scope |
    72. | ob_trx_timeout | 100000000 | sys var | cold modified vars | && global_scope && session_scope |
    73. | read_only | 0 | sys var | cold modified vars | && global_scope |
    74. | sql_auto_is_null | 0 | sys var | cold modified vars | && global_scope && session_scope |
    75. | sql_mode | 4194304 | sys var | cold modified vars | && global_scope && session_scope |
    76. | sql_select_limit | 9223372036854775807 | sys var | cold modified vars | && global_scope && session_scope |
    77. | sql_warnings | 0 | sys var | cold modified vars | && global_scope && session_scope |
    78. | timestamp | 0 | sys var | cold modified vars | && session_scope |
    79. | time_zone | +8:00 | sys var | cold modified vars | && global_scope && session_scope |
    80. | tx_isolation | READ-COMMITTED | sys var | cold modified vars | && global_scope && session_scope |
    81. | tx_read_only | 0 | sys var | cold modified vars | && global_scope && session_scope |
    82. | version | 1.0.6 | sys var | cold modified vars | && global_scope && readonly |
    83. | version_comment | OceanBase 1.0.6 (r57980-local-f70f8267c28da07e638b124c6909e18883fb98c0) (Built Apr 27 2016 14:32:24) | sys var | cold modified vars | && global_scope && readonly |
    84. | wait_timeout | 28800 | sys var | cold modified vars | && global_scope && session_scope |
    85. +-----------------------------------+------------------------------------------------------------------------------------------------------+---------+------------------------------+-----------------------------------------------+
    86. 64 rows in set (0.00 sec)
    87. OceanBase (root@oceanbase)> show proxysession variables all 2147549231 like "%id%";
    88. +-------------------+-------+---------+------------------------------+-------------------+
    89. | variable_name | value | info | modified_type | sys_variable_flag |
    90. +-------------------+-------+---------+------------------------------+-------------------+
    91. | identity | 0 | sys var | cold modified vars | && session_scope |
    92. | last_insert_id | 0 | sys var | last insert id modified vars | && session_scope |
    93. | ob_org_cluster_id | 0 | sys var | cold modified vars | && session_scope |
    94. +-------------------+-------+---------+------------------------------+-------------------+
    95. 3 rows in set (0.00 sec)