From dee2edf65a0a997dab0a9f31c5c6896c5779b9e5 Mon Sep 17 00:00:00 2001 From: wgs13579 Date: Tue, 13 Apr 2021 23:09:49 +0800 Subject: [PATCH] support temporary_table route variable --- src/obproxy/proxy/mysqllib/ob_session_field_mgr.h | 3 ++- src/sql/session/ob_system_variable_alias.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/obproxy/proxy/mysqllib/ob_session_field_mgr.h b/src/obproxy/proxy/mysqllib/ob_session_field_mgr.h index 15a19cb..16fd223 100644 --- a/src/obproxy/proxy/mysqllib/ob_session_field_mgr.h +++ b/src/obproxy/proxy/mysqllib/ob_session_field_mgr.h @@ -504,7 +504,8 @@ public: static bool is_hot_modified_variable(const common::ObString &var_name); static bool is_last_insert_id_variable(const common::ObString &var_name) { return var_name == sql::OB_SV_LAST_INSERT_ID; } static bool is_user_privilege_variable(const common::ObString &var_name) { return var_name == sql::OB_SV_PROXY_USER_PRIVILEGE; } - static bool is_set_trx_executed_variable(const common::ObString &var_name) { return var_name == sql::OB_SV_PROXY_SET_TRX_EXECUTED; } + static bool is_set_trx_executed_variable(const common::ObString &var_name) { return var_name == sql::OB_SV_PROXY_SET_TRX_EXECUTED + || var_name == sql::OB_SV_PROXY_SESSION_TEMPORARY_TABLE_USED; } static bool is_partition_hit_variable(const common::ObString &var_name) { return var_name == sql::OB_SV_PROXY_PARTITION_HIT; } static bool is_global_version_variable(const common::ObString &var_name) { return var_name == sql::OB_SV_PROXY_GLOBAL_VARIABLES_VERSION; } static bool is_capability_flag_variable(const common::ObString &var_name) { return var_name == sql::OB_SV_CAPABILITY_FLAG; } diff --git a/src/sql/session/ob_system_variable_alias.h b/src/sql/session/ob_system_variable_alias.h index f7c3151..a26f785 100644 --- a/src/sql/session/ob_system_variable_alias.h +++ b/src/sql/session/ob_system_variable_alias.h @@ -74,6 +74,7 @@ namespace sql static const char* const OB_SV_ENABLE_PLAN_CACHE = "ob_enable_plan_cache"; static const char* const OB_SV_ENABLE_INDEX_DIRECT_SELECT = "ob_enable_index_direct_select"; static const char* const OB_SV_PROXY_SET_TRX_EXECUTED = "ob_proxy_set_trx_executed"; + static const char* const OB_SV_PROXY_SESSION_TEMPORARY_TABLE_USED = "_ob_proxy_session_temporary_table_used"; static const char* const OB_SV_ENABLE_AGGREGATION_PUSHDOWN = "ob_enable_aggregation_pushdown"; static const char* const OB_SV_LAST_SCHEMA_VERSION = "ob_last_schema_version"; static const char* const OB_SV_GLOBAL_DEBUG_SYNC = "ob_global_debug_sync"; -- GitLab