diff --git a/storage/tianchi/tse_cbo.cc b/storage/tianchi/tse_cbo.cc index 7b24310636dc3696c1a8106679d17c48fd07c33e..205ffaa6cc0c36f2636331e08f49098a00d266ff 100644 --- a/storage/tianchi/tse_cbo.cc +++ b/storage/tianchi/tse_cbo.cc @@ -22,7 +22,6 @@ void r_key2variant(tse_key *rKey, KEY_PART_INFO *cur_index_part, cache_variant_t *ret_val, cache_variant_t * value, uint32_t key_offset) { - ret_val->is_null = 0; if (rKey->cmp_type == CMP_TYPE_NULL) { *ret_val = *value; rKey->cmp_type = CMP_TYPE_CLOSE_INTERNAL; @@ -30,7 +29,6 @@ void r_key2variant(tse_key *rKey, KEY_PART_INFO *cur_index_part, cache_variant_t } enum_field_types field_type = cur_index_part->field->real_type(); - ret_val->type = field_type; uint32_t offset = 0; if (cur_index_part->field->is_nullable()) { /* The first byte in the field tells if this is an SQL NULL value */ @@ -59,7 +57,6 @@ void r_key2variant(tse_key *rKey, KEY_PART_INFO *cur_index_part, cache_variant_t ret_val->v_bigint = *(int64_t *)const_cast(key); break; default: - ret_val->is_null = 1; break; } } diff --git a/storage/tianchi/tse_ddl_rewriter_plugin.cc b/storage/tianchi/tse_ddl_rewriter_plugin.cc index 4519838f34c284eab0b2e4389e7a9582b49c4e60..82978d91406978bf0d90b7c062cdd25a71fcfdfc 100644 --- a/storage/tianchi/tse_ddl_rewriter_plugin.cc +++ b/storage/tianchi/tse_ddl_rewriter_plugin.cc @@ -1219,7 +1219,7 @@ static int tse_ddl_rewrite(MYSQL_THD thd, mysql_event_class_t event_class, // for non-metadata-normalization's gate test DBUG_EXECUTE_IF("non_metadata_normalization", { check_metadata_switch_result = 1; }); // broadcast SET_OPTION query with subselect item - if (check_metadata_switch_result != 1 && !(need_forward && g_rewrite_sqls.find(sql_cmd) != g_rewrite_sqls.end())) { + if (check_metadata_switch_result != 1 && !(need_forward && sql_cmd == SQLCOM_SET_OPTION)) { return check_metadata_switch_result; } diff --git a/storage/tianchi/tse_mysql_proxy.cc b/storage/tianchi/tse_mysql_proxy.cc index b9977a6b131691fb67971fdc6a2ec16af602da8d..178f6743089f42c0aa55821612b88aa35b839549 100644 --- a/storage/tianchi/tse_mysql_proxy.cc +++ b/storage/tianchi/tse_mysql_proxy.cc @@ -369,7 +369,7 @@ __attribute__((visibility("default"))) int tse_ddl_execute_update(uint32_t thd_i } bool is_meta_normalization = IS_METADATA_NORMALIZATION(); - if (is_meta_normalization && g_rewrite_sqls.find(broadcast_req->sql_command) == g_rewrite_sqls.end()) { + if (is_meta_normalization && broadcast_req->sql_command != SQLCOM_SET_OPTION) { return 0; } else if (is_meta_normalization && broadcast_req->sql_command == SQLCOM_SET_OPTION && (broadcast_req->options & TSE_SET_VARIABLE_WITH_SUBSELECT) == 0){ diff --git a/storage/tianchi/tse_srv.h b/storage/tianchi/tse_srv.h index 56c59fb8e8b38e22427a2df539024f93287ee595..1922adb1f909fc6056e8dfde6476a260a84ab026 100644 --- a/storage/tianchi/tse_srv.h +++ b/storage/tianchi/tse_srv.h @@ -112,16 +112,6 @@ typedef struct cache_st_variant { unsigned long long v_ubigint; double v_real; }; - - union { - struct { - short type; - unsigned char is_null; - unsigned char is_hex; - }; - - unsigned int ctrl; - }; } cache_variant_t; typedef enum { diff --git a/storage/tianchi/tse_util.h b/storage/tianchi/tse_util.h index a2c6adf6b62208ffd44e8b48e5eb7bdb42bffdc2..3cad7f24e1ba35b9b7e59abdc7b58c0dfde72745 100644 --- a/storage/tianchi/tse_util.h +++ b/storage/tianchi/tse_util.h @@ -22,7 +22,6 @@ #include #include #include -#include #include "sql/table.h" #include "datatype_cnvrtr.h" #include "sql/item_timefunc.h" @@ -32,7 +31,6 @@ using namespace std; static unordered_set mysql_system_db{"information_schema", "mysql", "performance_schema", "sys"}; -static set g_rewrite_sqls {SQLCOM_SET_OPTION, SQLCOM_LOCK_TABLES, SQLCOM_UNLOCK_TABLES}; #define CM_IS_EMPTY_STR(str) (((str) == NULL) || ((str)[0] == 0))