The content of the tdh: (gdb) print *thd $7 = { = { = {_vptr.ilink = 0x9e5990, prev = 0xeef4c0, next = 0x14aa14e0}, = {_vptr.Query_arena = 0x9e59c0, free_list = 0x0, mem_root = 0x4cfcf7a0, is_backup_arena = false, is_reprepared = false, state = Query_arena::INITIALIZED_FOR_SP}, id = 0, mark_used_columns = MARK_COLUMNS_READ, name = {str = 0x0, length = 1}, lex = 0x14b92138, query = 0x14b6a698 "SELECT * FROM t1", query_length = 16, cursor = 0x0, db = 0x13ed4690 "test", db_length = 4}, = {m_reprepare_observer = 0x0, open_tables = 0x14b74aa0, temporary_tables = 0x0, handler_tables = 0x0, derived_tables = 0x0, lock = 0x0, extra_lock = 0x0, locked_tables_mode = LTM_NONE, version = 3, current_tablenr = 1, state_flags = 0, mdl_context = {locks = { first = 0x14b934e8}, has_global_shared_lock = false, thd = 0x14b27e00}, handler_mdl_context = {locks = {first = 0x0}, has_global_shared_lock = false, thd = 0x14b27e00}}, rli_fake = 0x0, static DEFAULT_WHERE = 0x9e4143 "field list", mysql = 0xe421c0, client_stmt_id = 346821964, client_param_count = 11488841, client_params = 0x0, extra_data = 0x2aaac001cb90 "SELECT * FROM t1", extra_length = 16, cur_data = 0x0, first_data = 0x0, data_tail = 0x14b27f48, current_stmt = 0x0, query_cache_tls = {first_query_block = 0x0}, net = {vio = 0x0, buff = 0x0, buff_end = 0x0, write_pos = 0x0, read_pos = 0x0, fd = 0, remain_in_buf = 0, length = 0, buf_length = 0, where_b = 0, max_packet = 0, max_packet_size = 0, pkt_nr = 0, compress_pkt_nr = 0, write_timeout = 0, read_timeout = 0, retry_count = 0, fcntl = 0, return_status = 0x0, reading_or_writing = 0 '\0', save_char = 0 '\0', unused1 = 0 '\0', unused2 = 0 '\0', compress = 0 '\0', unused3 = 0 '\0', unused = 0x0, last_errno = 0, error = 0 '\0', unused4 = 0 '\0', unused5 = 0 '\0', last_error = '\0' , sqlstate = "\000\000\000\000\000", extension = 0x0}, protocol = 0x14b28218, protocol_text = { = {_vptr.Protocol = 0x9cb4b0, thd = 0x14b27e00, packet = 0x14b28318, convert = 0x14b28338, field_pos = 2, field_types = 0x0, field_count = 2, next_field = 0x14b89e20, next_mysql_field = 0x14b89d98, alloc = 0x14afac00}, }, protocol_binary = { = { _vptr.Protocol = 0x9d5ed0, thd = 0x14b27e00, packet = 0x14b28318, convert = 0x14b28338, field_pos = 0, field_types = 0x0, field_count = 0, next_field = 0x0, next_mysql_field = 0x4811, alloc = 0x302394f110}, bit_fields = 596963600}, user_vars = { key_offset = 0, key_length = 0, blength = 1, records = 0, flags = 0, array = { buffer = 0x14ad1df0 "��\224#0", elements = 0, max_element = 16, alloc_increment = 32, size_of_element = 16}, get_key = 0x5dc2a0 , free = 0x5dc950 , charset = 0xe27400}, packet = {Ptr = 0x0, str_length = 0, Alloced_length = 0, alloced = false, str_charset = 0xe07d80}, convert_buffer = {Ptr = 0x0, str_length = 0, Alloced_length = 0, alloced = false, str_charset = 0xe07d80}, rand = {seed1 = 187514822, seed2 = 914014322, max_value = 1073741823, max_value_dbl = 1073741823}, variables = { dynamic_variables_version = 3, dynamic_variables_ptr = 0x14ae1110 "\001\001\001#0", dynamic_variables_head = 2, dynamic_variables_size = 3, myisam_max_extra_sort_file_size = 0, myisam_max_sort_file_size = 9223372036853727232, max_heap_table_size = 1048576, tmp_table_size = 16777216, long_query_time = 10000000, select_limit = 18446744073709551615, max_join_size = 18446744073709551615, ---Type to continue, or q to quit--- auto_increment_increment = 1, auto_increment_offset = 1, bulk_insert_buff_size = 8388608, join_buff_size = 131072, join_cache_level = 1, max_allowed_packet = 1048576, max_error_count = 64, max_length_for_sort_data = 1024, max_sort_length = 1024, max_tmp_tables = 32, max_insert_delayed_threads = 20, min_examined_row_limit = 0, myisam_repair_threads = 1, myisam_sort_buff_size = 8388608, myisam_stats_method = 0, net_buffer_length = 16384, net_interactive_timeout = 28800, net_read_timeout = 30, net_retry_count = 10, net_wait_timeout = 28800, net_write_timeout = 60, optimizer_prune_level = 1, optimizer_search_depth = 62, optimizer_use_mrr = 1, optimizer_switch = 0, preload_buff_size = 32768, profiling_history_size = 15, query_cache_type = 1, read_buff_size = 131072, read_rnd_buff_size = 262144, div_precincrement = 4, sortbuff_size = 262144, thread_handling = 1, tx_isolation = 1, completion_type = 0, sql_mode = 0, max_sp_recursion_depth = 0, updatable_views_with_limit = 1, default_week_format = 0, max_seeks_for_key = 18446744073709551615, range_alloc_block_size = 4096, query_alloc_block_size = 8192, query_prealloc_size = 8192, trans_alloc_block_size = 8192, trans_prealloc_size = 4096, log_warnings = 1, group_concat_max_len = 1024, ndb_autoincrement_prefetch_sz = 0, ndb_index_stat_cache_entries = 32, ndb_index_stat_update_freq = 20, binlog_format = 0, pseudo_thread_id = 18, low_priority_updates = 0 '\0', new_mode = 0 '\0', old_mode = 0 '\0', query_cache_wlock_invalidate = 0 '\0', engine_condition_pushdown = 1 '\001', keep_files_on_create = 0 '\0', ndb_force_send = 0 '\0', ndb_use_copying_alter_table = 0 '\0', ndb_use_exact_count = 0 '\0', ndb_use_transactions = 0 '\0', ndb_index_stat_enable = 0 '\0', old_alter_table = 0 '\0', old_passwords = 0 '\0', table_plugin = 0x14a997b0, character_set_filesystem = 0xe07d80, character_set_client = 0xe090a0, character_set_results = 0xe090a0, collation_server = 0xe090a0, collation_database = 0xe090a0, collation_connection = 0xe090a0, lc_time_names = 0xef8660, time_zone = 0xeffa70, date_format = 0x13ed4610, datetime_format = 0x13ed4650, time_format = 0x14ac8280, sysdate_is_now = 0 '\0', wt_timeout_short = 10000, wt_deadlock_search_depth_short = 4, wt_timeout_long = 50000000, wt_deadlock_search_depth_long = 15}, status_var = { bytes_received = 0, bytes_sent = 0, com_other = 0, com_stat = {1, 0, 0, 0, 3, 2, 0 , 3, 0 , 2, 0 }, created_tmp_disk_tables = 0, created_tmp_tables = 0, ha_commit_count = 3, ha_delete_count = 0, ha_read_first_count = 1, ha_read_last_count = 0, ha_read_key_count = 10, ha_read_next_count = 0, ha_read_prev_count = 0, ha_read_rnd_count = 0, ha_read_rnd_next_count = 2, ha_multi_range_read_init_count = 0, ha_rollback_count = 1, ha_update_count = 1, ha_write_count = 9, ha_prepare_count = 0, ha_discover_count = 0, ha_savepoint_count = 0, ha_savepoint_rollback_count = 0, key_blocks_changed = 0, key_blocks_used = 0, key_cache_r_requests = 0, key_cache_read = 0, key_cache_w_requests = 0, key_cache_write = 0, net_big_packet_count = 0, opened_tables = 1, opened_shares = 0, select_full_join_count = 0, select_full_range_join_count = 0, select_range_count = 0, select_range_check_count = 0, select_scan_count = 1, long_query_count = 0, filesort_merge_passes = 0, filesort_range_count = 0, ---Type to continue, or q to quit--- filesort_rows = 0, filesort_scan_count = 0, com_stmt_prepare = 0, com_stmt_reprepare = 0, com_stmt_execute = 0, com_stmt_send_long_data = 0, com_stmt_fetch = 0, com_stmt_reset = 0, com_stmt_close = 0, questions = 8, last_query_cost = 1.1990000000000001}, initial_status_var = 0x0, lock_info = {thread = 47907565757248, thread_id = 18, n_cursors = 0}, main_lock_id = {info = 0x14b28bc8}, lock_id = 0x14b28be0, LOCK_delete = { global = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 2, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\0' , "\002", '\0' , __align = 0}, mutex = { __data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 3, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\0' , "\003", '\0' , __align = 0}, file = 0x9e3e7c "sql_class.cc", name = 0x9e416c "LOCK_delete", line = 1042, count = 0, create_flags = 0, active_flags = 0, id = 1448, thread = 0, locked_mutex = 0x14ac81c0, used_mutex = 0x14ac8218, prev = 0x0, next = 0x0}, stmt_map = {st_hash = {key_offset = 0, key_length = 0, blength = 1, records = 0, flags = 0, array = { buffer = 0x14a622e0 "0�\224#0", elements = 0, max_element = 16, alloc_increment = 32, size_of_element = 16}, get_key = 0x5dc740 , free = 0x5dc750 , charset = 0xe07d80}, names_hash = { key_offset = 0, key_length = 0, blength = 1, records = 0, flags = 0, array = { buffer = 0x14a996a0 "P�\224#0", elements = 0, max_element = 16, alloc_increment = 32, size_of_element = 16}, get_key = 0x5dc770 , free = 0, charset = 0xe27400}, transient_cursor_list = { = {first = 0x14b28d48, last = { _vptr.ilink = 0x9cb630, prev = 0x14b28d40, next = 0x0}}, }, last_found_statement = 0x0}, thread_stack = 0x7fff513b8e30 "�$�", catalog = 0x9e4167 "std", main_security_ctx = {host = 0x9be0bf "localhost", user = 0x14ad1f40 "root", priv_user = 0x14ad1f40 "root", ip = 0x0, priv_host = "localhost", '\0' , host_or_ip = 0x9be0bf "localhost", master_access = 536870911, db_access = 0}, security_ctx = 0x14b28d78, proc_info = 0x9dc155 "closing tables", where = 0x9e4143 "field list", tmp_double_value = 0, client_capabilities = 500237, max_client_packet_length = 0, handler_tables_hash = {key_offset = 0, key_length = 0, blength = 0, records = 0, flags = 0, array = {buffer = 0x0, elements = 0, max_element = 0, alloc_increment = 0, size_of_element = 0}, get_key = 0, free = 0, charset = 0x0}, ull = 0x0, dbug_sentry = 4276998655, mysys_var = 0x13e83b50, command = COM_QUERY, server_id = 1, file_id = 0, peer_port = 0, start_time = 1235665157, user_time = 0, connect_utime = 0, thr_create_utime = 0, start_utime = 1235665157717623, utime_after_lock = 1235665157717623, update_lock_default = TL_WRITE, di = 0x0, in_sub_stmt = 0, ha_data = {{ha_ptr = 0x0, ha_info = {{m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}}}, {ha_ptr = 0x0, ha_info = {{m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}}}, {ha_ptr = 0x0, ha_info = {{m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}}}, {ha_ptr = 0x0, ha_info = {{m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}}}, {ha_ptr = 0x2aaabdee10b8, ha_info = {{m_next = 0x0, m_ht = 0x0, ---Type to continue, or q to quit--- m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x1405a170, m_flags = 1 '\001'}}}, { ha_ptr = 0x0, ha_info = {{m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}}}, {ha_ptr = 0x0, ha_info = {{m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}}}, {ha_ptr = 0x0, ha_info = {{m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}}}, {ha_ptr = 0x0, ha_info = {{m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}}}, {ha_ptr = 0x0, ha_info = {{m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}}}, {ha_ptr = 0x0, ha_info = {{m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}}}, {ha_ptr = 0x0, ha_info = {{m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}}}, {ha_ptr = 0x0, ha_info = {{m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}}}, {ha_ptr = 0x0, ha_info = {{m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}}}, {ha_ptr = 0x0, ha_info = {{m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}, {m_next = 0x0, m_ht = 0x0, m_flags = 0 '\0'}}}}, thd_marker = { emb_on_expr_nest = 0x0}, binlog_table_maps = 0, binlog_flags = 0, transaction = { savepoints = 0x0, all = {no_2pc = false, ha_list = 0x14b28fe8, modified_non_trans_table = true}, stmt = {no_2pc = false, ha_list = 0x0, modified_non_trans_table = false}, on = true, xid_state = {xid = {formatID = 1, gtrid_length = 24, bqual_length = 0, data = "MySQLXid\001\000\000\000\000\000\000\000\r\004", '\0' }, xa_state = XA_NOTR, in_thd = true, rm_error = 0}, wt = {my_resources = {buffer = 0x0, elements = 0, max_element = 0, alloc_increment = 5, size_of_element = 8}, waiting_for = 0x0, pins = 0x0, timeout_short = 0x14b285e0, deadlock_search_depth_short = 0x14b285e8, timeout_long = 0x14b285f0, deadlock_search_depth_long = 0x14b285f8, weight = 0, killed = 0 '\0', name = 0x13e83c90 "T@1"}, m_pending_rows_event = 0x0, changed_tables = 0x0, mem_root = { free = 0x14b2d690, used = 0x0, pre_alloc = 0x14b2d690, min_malloc = 32, block_size = 8152, block_num = 4, first_block_usage = 0, error_handler = 0x6ef670 }}, dup_field = 0x0, signals = { __val = {0 }}, change_list = { = {first = 0x14b29460, last = { _vptr.ilink = 0x9cb630, prev = 0x14b29458, next = 0x0}}, }, stmt_arena = 0x14b93760, table_map_for_update = 0, arg_of_last_insert_id_function = false, first_successful_insert_id_in_prev_stmt = 0, first_successful_insert_id_in_prev_stmt_for_binlog = 0, first_successful_insert_id_in_cur_stmt = 0, stmt_depends_on_first_successful_insert_id_in_prev_stmt = false, auto_inc_intervals_in_cur_stmt_for_binlog = {head = 0x0, tail = 0x0, current = 0x0, elements = 0}, auto_inc_intervals_forced = {head = 0x0, tail = 0x0, current = 0x0, elements = 0}, limit_found_rows = 1, options = 2148290048, row_count_func = 1, cuted_fields = 0, sent_row_count = 0, examined_row_count = 0, used_tables = 0, user_connect = 0x0, db_charset = 0xe090a0, warning_info = 0x4cfcf730, stmt_da = 0x14b2a778, ---Type to continue, or q to quit--- profiling = {profile_id_counter = 1, thd = 0x14b27e00, keeping = false, enabled = false, current = 0x0, last = 0x0, history = {first = 0x0, last = 0x0, elements = 0}}, query_id = 3057, col_access = 0, statement_id_counter = 0, rand_saved_seed1 = 0, rand_saved_seed2 = 0, real_id = 47907565757248, thread_id = 18, tmp_table = 0, global_read_lock = 0, server_status = 1, open_options = 0, system_thread = NON_SYSTEM_THREAD, select_number = 1, session_tx_isolation = ISO_READ_COMMITTED, count_cuted_fields = CHECK_FIELD_IGNORE, user_var_events = {buffer = 0x0, elements = 0, max_element = 0, alloc_increment = 0, size_of_element = 0}, user_var_events_alloc = 0x4cfcf7a0, killed = THD::NOT_KILLED, scramble = '\0' , slave_thread = false, one_shot_set = false, current_stmt_binlog_row_based = false, some_tables_deleted = false, last_cuted_field = false, no_errors = false, password = false, is_fatal_error = false, transaction_rollback_request = false, is_fatal_sub_stmt_error = true, query_start_used = false, rand_used = false, time_zone_used = false, substitute_null_with_insert_id = false, in_lock_tables = false, is_slave_error = false, bootstrap = false, cleanup_done = false, thread_specific_used = false, charset_is_system_charset = false, charset_is_collation_connection = true, charset_is_character_set_filesystem = true, enable_slow_log = true, abort_on_warning = false, got_warning = true, no_warnings_for_error = false, derived_tables_processing = false, tablespace_op = 0 '\0', spcont = 0x14b2add0, sp_proc_cache = 0x14add960, sp_func_cache = 0x0, current_linfo = 0x0, slave_net = 0x0, sys_var_tmp = {my_bool_value = 0 '\0', long_value = 0, ulong_value = 0, ulonglong_value = 0}, binlog_evt_union = {do_union = false, unioned_events = false, unioned_events_trans = false, first_query_id = 347248696}, m_parser_state = 0x0, DDL_exception = 0 '\0', backup_wait_timeout = 50, locked_tables_list = { m_locked_tables_root = {free = 0x0, used = 0x0, pre_alloc = 0x0, min_malloc = 32, block_size = 8152, block_num = 4, first_block_usage = 0, error_handler = 0x6ef670 }, m_locked_tables = 0x0, m_locked_tables_last = 0x14b296c8}, debug_sync_control = 0x14aaaae0, locked_tables_root = 0x0, scheduler = {}, m_internal_handler = 0x0, main_lex = { = {query_tables = 0x0, query_tables_last = 0x14b29700, query_tables_own_last = 0x0, sroutines = {key_offset = 0, key_length = 0, blength = 2, records = 1, flags = 0, array = {buffer = 0x14adda10 "����0", elements = 1, max_element = 16, alloc_increment = 32, size_of_element = 16}, get_key = 0x5bfe60 , free = 0, charset = 0xe27400}, sroutines_list = { elements = 1, first = 0x14b2ad10 "0��\024", next = 0x14b2ad20}, sroutines_list_own_last = 0x14b2ad20, sroutines_list_own_elements = 1, binlog_stmt_flags = 0}, _vptr.LEX = 0x9de1b0, unit = { = { _vptr.st_select_lex_node = 0x9e9210, next = 0x0, prev = 0x0, master = 0x0, slave = 0x14b29c00, link_next = 0x0, link_prev = 0x0, options = 0, sql_cache = st_select_lex_node::SQL_CACHE_UNSPECIFIED, uncacheable = 0 '\0', linkage = GLOBAL_OPTIONS_TYPE, no_table_names_allowed = false, no_error = false}, result_table_list = {next_local = 0x0, next_global = 0x0, prev_global = 0x0, db = 0x0, alias = 0x0, table_name = 0x14ac12f8 "", schema_table_name = 0x14ac1380 "", ---Type to continue, or q to quit--- option = 0x0, on_expr = 0x0, sj_on_expr = 0x0, sj_inner_tables = 4294967295, sj_in_exprs = 0, sj_subq_pred = 0x0, sj_mat_info = 0x0, prep_on_expr = 0x0, cond_equal = 0x0, natural_join = 0x0, is_natural_join = false, join_using_fields = 0x0, join_columns = 0x0, is_join_columns_complete = false, next_name_resolution_table = 0x0, index_hints = 0x0, table = 0x0, table_id = 0, derived_result = 0x0, correspondent_table = 0x0, derived = 0x0, schema_table = 0x0, schema_select_lex = 0x0, schema_table_reformed = false, schema_table_param = 0x0, select_lex = 0x0, view = 0x0, field_translation = 0x0, field_translation_end = 0x0, merge_underlying_list = 0x0, view_tables = 0x0, belong_to_view = 0x0, referencing_view = 0x0, parent_l = 0x0, security_ctx = 0x0, view_sctx = 0x0, allowed_show = false, next_leaf = 0x0, where = 0x0, check_option = 0x0, select_stmt = {str = 0x0, length = 0}, md5 = { str = 0x0, length = 0}, source = {str = 0x0, length = 0}, view_db = {str = 0x0, length = 0}, view_name = {str = 0x0, length = 0}, timestamp = {str = 0x0, length = 0}, definer = {user = {str = 0x0, length = 0}, host = {str = 0x0, length = 0}, password = {str = 0x0, length = 0}}, file_version = 0, updatable_view = 0, algorithm = 0, view_suid = 0, with_check = 0, effective_with_check = 0 '\0', effective_algorithm = 0 '\0', grant = { grant_table = 0x0, version = 0, privilege = 0, want_privilege = 0, orig_want_privilege = 0}, engine_data = 0, callback_func = 0, lock_type = TL_UNLOCK, outer_join = 0, shared = 0, db_length = 0, table_name_length = 0, updatable = false, straight = false, updating = false, force_index = false, ignore_leaves = false, dep_tables = 0, on_expr_dep_tables = 0, nested_join = 0x0, embedding = 0x0, join_list = 0x0, cacheable_table = false, table_in_first_from_clause = false, skip_temporary = false, contain_auto_increment = false, multitable_view = false, compact_view_format = false, where_processed = false, check_option_processed = false, required_type = FRMTYPE_ERROR, db_type = 0x0, timestamp_buffer = '\0' , prelocking_placeholder = false, open_type = TABLE_LIST::NORMAL_OPEN, lock_timeout = 0, lock_transactional = false, internal_tmp_table = false, is_alias = false, is_fqtn = false, view_creation_ctx = 0x0, view_client_cs_name = {str = 0x0, length = 0}, view_connection_cl_name = {str = 0x0, length = 0}, view_body_utf8 = {str = 0x0, length = 0}, trg_event_map = 0 '\0', i_s_requested_object = 0, has_db_lookup_value = false, has_table_lookup_value = false, table_open_method = 0, schema_table_state = NOT_PROCESSED, mdl_lock_data = 0x0, child_def_version = 0, m_table_ref_type = TABLE_REF_NULL, m_table_ref_version = 0}, union_result = 0x0, table = 0x0, result = 0x0, found_rows_for_union = 0, saved_error = false, prepared = false, optimized = false, executed = false, cleaned = false, item_list = { = { = {}, first = 0xef81c0, last = 0x14b29b80, elements = 0}, }, types = { = { = {}, first = 0xef81c0, last = 0x14b29b98, elements = 0}, }, global_parameters = 0x14b29c00, return_to = 0x0, select_limit_cnt = 18446744073709551615, offset_limit_cnt = 0, item = 0x0, thd = 0x14b27e00, fake_select_lex = 0x0, union_distinct = 0x0, describe = false, last_procedure = 0x0}, select_lex = { = { ---Type to continue, or q to quit--- _vptr.st_select_lex_node = 0x9e9170, next = 0x0, prev = 0x14b297b8, master = 0x14b29798, slave = 0x0, link_next = 0x0, link_prev = 0x14b29ec0, options = 0, sql_cache = st_select_lex_node::SQL_CACHE_UNSPECIFIED, uncacheable = 0 '\0', linkage = UNSPECIFIED_TYPE, no_table_names_allowed = false, no_error = false}, context = { = {}, outer_context = 0x0, table_list = 0x0, first_name_resolution_table = 0x0, last_name_resolution_table = 0x0, select_lex = 0x14b29c00, error_processor = 0x767930 , error_processor_data = 0x0, resolve_in_select_list = false, security_ctx = 0x0}, db = 0x0, where = 0x0, having = 0x0, prep_where = 0x0, prep_having = 0x0, cond_value = Item::COND_UNDEF, having_value = Item::COND_UNDEF, parent_lex = 0x14b296f8, olap = UNSPECIFIED_OLAP_TYPE, table_list = {elements = 0, first = 0x0, next = 0x14b29ce0}, group_list = {elements = 0, first = 0x0, next = 0x14b29cf8}, item_list = { = { = {}, first = 0xef81c0, last = 0x14b29d08, elements = 0}, }, interval_list = { = { = {}, first = 0xef81c0, last = 0x14b29d20, elements = 0}, }, is_item_list_lookup = false, ftfunc_list = 0x14b29d48, ftfunc_list_alloc = { = { = {}, first = 0xef81c0, last = 0x14b29d48, elements = 0}, }, join = 0x0, top_join_list = { = { = {}, first = 0xef81c0, last = 0x14b29d68, elements = 0}, }, join_list = 0x14b29d68, embedding = 0x0, sj_nests = { = { = {}, first = 0xef81c0, last = 0x14b29d90, elements = 0}, }, leaf_tables = 0x0, type = 0x0, order_list = {elements = 0, first = 0x0, next = 0x14b29dc0}, gorder_list = 0x0, select_limit = 0x14b2b3c8, offset_limit = 0x0, ref_pointer_array = 0x0, select_n_having_items = 0, cond_count = 0, between_count = 0, max_equal_elems = 0, select_n_where_fields = 0, parsing_place = NO_MATTER, with_sum_func = false, conds_processed_with_permanent_arena = false, table_join_options = 0, in_sum_expr = 0, select_number = 1, nest_level = 0, inner_sum_func_list = 0x0, with_wild = 0, braces = false, having_fix_field = false, inner_refs_list = { = { = {}, first = 0xef81c0, last = 0x14b29e38, elements = 0}, }, n_sum_items = 0, n_child_sum_items = 0, explicit_limit = false, subquery_in_having = false, first_execution = true, first_natural_join_processing = true, first_cond_optimization = true, no_wrap_view_item = false, exclude_from_table_unique_test = false, non_agg_fields = { = { = {}, first = 0xef81c0, last = 0x14b29e60, elements = 0}, }, cur_pos_in_select_list = -1, udf_list = { = { = {}, first = 0xef81c0, last = 0x14b29e80, elements = 0}, }, prev_join_using = 0x0, full_group_by_flag = 0 '\0', current_index_hint_type = INDEX_HINT_IGNORE, current_index_hint_clause = 0 '\0', index_hints = 0x0}, current_select = 0x14b29c00, ---Type to continue, or q to quit--- all_selects_list = 0x14b29c00, length = 0x0, dec = 0x0, change = 0x0, name = {str = 0x0, length = 0}, help_arg = 0x0, backup_dir = {str = 0x0, length = 0}, backup_compression = false, to_log = 0x0, backup_id = 0, x509_subject = 0x0, x509_issuer = 0x0, ssl_cipher = 0x0, wild = 0x0, exchange = 0x0, result = 0x0, default_value = 0x0, on_update_value = 0x0, comment = {str = 0x0, length = 0}, ident = { str = 0x0, length = 0}, grant_user = 0x0, xid = 0x0, thd = 0x14b27e00, plugins = { buffer = 0x14b29fb0 "", elements = 0, max_element = 16, alloc_increment = 16, size_of_element = 8}, plugins_static_buffer = {0x0 }, charset = 0x0, text_string_is_7bit = false, leaf_tables_insert = 0x0, create_view_select = {str = 0x0, length = 0}, raw_trg_on_table_name_begin = 0x0, raw_trg_on_table_name_end = 0x0, part_info = 0x0, definer = 0x0, col_list = { = { = {}, first = 0xef81c0, last = 0x14b2a078, elements = 0}, }, ref_list = { = { = {}, first = 0xef81c0, last = 0x14b2a090, elements = 0}, }, interval_list = { = { = {}, first = 0xef81c0, last = 0x14b2a0a8, elements = 0}, }, users_list = { = { = {}, first = 0xef81c0, last = 0x14b2a0c0, elements = 0}, }, columns = { = { = {}, first = 0xef81c0, last = 0x14b2a0d8, elements = 0}, }, insert_list = 0x0, field_list = { = { = {}, first = 0xef81c0, last = 0x14b2a0f8, elements = 0}, }, value_list = { = { = {}, first = 0xef81c0, last = 0x14b2a110, elements = 0}, }, update_list = { = { = {}, first = 0xef81c0, last = 0x14b2a128, elements = 0}, }, many_values = { = { = {}, first = 0xef81c0, last = 0x14b2a140, elements = 0}, }, var_list = { = { = {}, first = 0x14b2ae90, last = 0x14b2ae90, elements = 1}, }, set_var_list = { = { = {}, first = 0xef81c0, last = 0x14b2a170, elements = 0}, }, param_list = { = { = {}, first = 0xef81c0, last = 0x14b2a188, elements = 0}, }, view_list = { = { = {}, first = 0xef81c0, last = 0x14b2a1a0, elements = 0}, }, context_stack = { = { = {}, first = 0x14b2ac90, last = 0x14b2ac90, elements = 1}, }, db_list = { = { = {}, first = 0xef81c0, last = 0x14b2a1d0, elements = 0}, }, proc_list = {elements = 0, first = 0x0, next = 0x0}, auxiliary_table_list = {elements = 0, first = 0x0, next = 0x14b2a208}, save_list = {elements = 0, first = 0x0, next = 0x2891}, ---Type to continue, or q to quit--- last_field = 0x302394ea00, in_sum_func = 0x0, udf = {name = {str = 0x0, length = 0}, returns = STRING_RESULT, type = 0, dl = 0x0, dlhandle = 0x0, func = 0, func_init = 0, func_deinit = 0, func_clear = 0, func_add = 0x2831, usage_count = 206755393760}, check_opt = {flags = 596963552, sql_flags = 48, key_cache = 0x0}, create_info = { table_charset = 0x0, default_table_charset = 0x0, connect_string = {str = 0x0, length = 0}, password = 0x0, tablespace = 0x0, comment = {str = 0x0, length = 0}, data_file_name = 0x0, index_file_name = 0x0, alias = 0x0, max_rows = 0, min_rows = 0, auto_increment_value = 0, table_options = 0, avg_row_length = 0, used_fields = 0, key_block_size = 0, merge_list = {elements = 0, first = 0x0, next = 0x0}, db_type = 0x0, row_type = ROW_TYPE_DEFAULT, null_bits = 0, options = 0, merge_insert_method = 0, extra_size = 0, transactional = HA_CHOICE_UNDEF, table_existed = false, frm_only = false, varchar = false, default_storage_media = HA_SM_DEFAULT, page_checksum = HA_CHOICE_UNDEF}, key_create_info = {algorithm = HA_KEY_ALG_UNDEF, block_size = 0, parser_name = {str = 0x0, length = 0}, comment = {str = 0x0, length = 0}}, mi = {host = 0x0, user = 0x0, password = 0x0, log_file_name = 0x0, port = 0, connect_retry = 0, heartbeat_period = 0, pos = 0, server_id = 0, ssl = st_lex_master_info::LEX_MI_UNCHANGED, ssl_verify_server_cert = st_lex_master_info::LEX_MI_UNCHANGED, heartbeat_opt = st_lex_master_info::LEX_MI_UNCHANGED, repl_ignore_server_ids_opt = st_lex_master_info::LEX_MI_UNCHANGED, ssl_key = 0x0, ssl_cert = 0x0, ssl_ca = 0x0, ssl_capath = 0x0, ssl_cipher = 0x0, relay_log_name = 0x0, relay_log_pos = 0, repl_ignore_server_ids = {buffer = 0x0, elements = 0, max_element = 0, alloc_increment = 0, size_of_element = 0}}, server_options = {port = -1, server_name_length = 0, server_name = 0x0, host = 0x0, db = 0x0, username = 0x0, password = 0x0, scheme = 0x0, socket = 0x0, owner = 0x0}, mqh = {questions = 0, updates = 0, conn_per_hour = 0, user_conn = 0, specified_limits = 0}, type = 0, allow_sum_func = 0, sql_command = SQLCOM_CALL, expr_allows_subselect = true, lock_option = TL_READ, ssl_type = SSL_TYPE_NONE, duplicates = DUP_ERROR, tx_isolation = ISO_READ_UNCOMMITTED, ha_read_mode = RFIRST, { ha_rkey_mode = HA_READ_KEY_EXACT, xa_opt = XA_NONE, lock_transactional = false}, option_type = OPT_SESSION, create_view_mode = VIEW_CREATE_NEW, drop_mode = DROP_DEFAULT, profile_query_id = 0, profile_options = 0, uint_geom_type = 0, storage_type = HA_SM_DEFAULT, column_format = COLUMN_FORMAT_TYPE_DEFAULT, grant = 0, grant_tot_col = 0, which_columns = 0, fk_match_option = Foreign_key::FK_MATCH_UNDEF, fk_update_opt = Foreign_key::FK_OPTION_UNDEF, fk_delete_opt = Foreign_key::FK_OPTION_UNDEF, slave_thd_opt = 0, start_transaction_opt = 0, nest_level = 0, table_count = 0, describe = 0 '\0', derived_tables = 0 '\0', create_view_algorithm = 0 '\0', create_view_check = 0 '\0', drop_if_exists = false, drop_temporary = false, local_file = false, one_shot_set = false, autocommit = false, verbose = false, no_write_to_binlog = false, tx_chain = false, tx_release = false, view_prepare_mode = false, safe_to_cache_query = true, subqueries = false, ignore = false, parsing_options = {allows_variable = true, allows_select_into = true, allows_select_procedure = true, allows_derived = true}, alter_info = { drop_list = { = { = {}, first = 0xef81c0, ---Type to continue, or q to quit--- last = 0x14b2a548, elements = 0}, }, alter_list = { = { = {}, first = 0xef81c0, last = 0x14b2a560, elements = 0}, }, key_list = { = { = {}, first = 0xef81c0, last = 0x14b2a578, elements = 0}, }, create_list = { = { = {}, first = 0xef81c0, last = 0x14b2a590, elements = 0}, }, flags = 0, keys_onoff = LEAVE_AS_IS, tablespace_op = NO_TABLESPACE_OP, partition_names = { = { = {}, first = 0xef81c0, last = 0x14b2a5b8, elements = 0}, }, no_parts = 0, build_method = HA_BUILD_DEFAULT, datetime_field = 0x0, error_if_not_empty = false}, prepared_stmt_name = {str = 0x0, length = 0}, prepared_stmt_code = {str = 0x0, length = 0}, prepared_stmt_code_is_varref = false, prepared_stmt_params = { = { = {}, first = 0xef81c0, last = 0x14b2a610, elements = 0}, }, sphead = 0x0, spname = 0x14b2acb8, sp_lex_in_use = false, all_privileges = false, spcont = 0x0, sp_chistics = {comment = { str = 0x0, length = 0}, suid = SP_IS_DEFAULT_SUID, detistic = false, daccess = SP_DEFAULT_ACCESS}, event_parse_data = 0x0, only_view = false, empty_field_list_on_rset = false, create_view_suid = 0 '\0', trg_chistics = { action_time = TRG_ACTION_BEFORE, event = TRG_EVENT_INSERT}, trg_table_fields = { elements = 0, first = 0x0, next = 0x0}, stmt_definition_begin = 0x0, stmt_definition_end = 0x0, fname_start = 0x0, fname_end = 0x0, use_only_table_context = false, alter_tablespace_info = 0x0, escape_used = false, is_lex_started = true}, main_mem_root = {free = 0x14b2a9b0, used = 0x0, pre_alloc = 0x14b2a9b0, min_malloc = 32, block_size = 8152, block_num = 4, first_block_usage = 0, error_handler = 0x6ef670 }, main_warning_info = {m_warn_root = {free = 0x0, used = 0x0, pre_alloc = 0x0, min_malloc = 32, block_size = 2008, block_num = 4, first_block_usage = 0, error_handler = 0x6ef670 }, m_warn_list = { = { = {}, first = 0xef81c0, last = 0x14b2a740, elements = 0}, }, m_warn_count = {0, 0, 0}, m_statement_warn_count = 0, m_current_row_for_warning = 2, m_warn_id = 2371}, main_da = { is_sent = false, can_overwrite_status = false, m_message = "\000ows matched: 0 Changed: 0 Warnings: 0\000g transaction\000\f\233\024\000\000\000\000(\f\233\024", '\0' , "J\004\200\000\000\000\000�\n\233\024", '\0' , "�\201�\000\000\000\000\000\b��\024", '\0' , "�\201�\000\000\000\000\000 ��\024", '\0' , "��������\000\000\000\000\000\000\000\000\001", '\0' , "\001", '\0' , "�\227\232\024\000\000\000\000P\234\232\024", '\0' ..., m_sql_errno = 1205, m_server_status = 1, m_affected_rows = 1, m_last_insert_id = 0, m_statement_warn_count = 0, m_status = Diagnostics_area::DA_EMPTY}} (gdb) and the content of the thd->spcont: (gdb) print *thd->spcont $8 = { = {}, callers_arena = 0x4cfcf820, sp = 0x14b8fb28, m_root_parsing_ctx = 0x14b8fef0, m_var_table = 0x0, m_var_items = 0x14b2ae58, m_return_value_fld = 0x0, m_return_value_set = false, in_sub_stmt = false, m_handler = 0x14b2ae58, m_hcount = 0, m_hstack = 0x14b2ae58, m_hsp = 0, m_in_handler = 0x14b2ae58, m_ihsp = 0, m_hfound = -1, m_cstack = 0x14b2ae58, m_ccount = 0, m_case_expr_holders = 0x14b2ae58, m_prev_runtime_ctx = 0x14b2ad48}