summaryrefslogtreecommitdiff
path: root/storage/spider/spd_include.h
diff options
context:
space:
mode:
authorKentoku SHIBA <kentokushiba@gmail.com>2020-03-03 03:06:33 +0900
committerKentoku SHIBA <kentokushiba@gmail.com>2020-06-05 17:29:59 +0900
commit23c8adda74935211ca8f8a50676cf4f94e9215fb (patch)
tree4ea6ef941491a81544f84eda0ff5aefdec022a3f /storage/spider/spd_include.h
parent272625d92aa5e4d48f3ba1be482813bb8aef5ed0 (diff)
downloadmariadb-git-23c8adda74935211ca8f8a50676cf4f94e9215fb.tar.gz
MDEV-6268 SPIDER table with no COMMENT clause causes queries to wait forever
Add looping check Conflicts: sql/table.h
Diffstat (limited to 'storage/spider/spd_include.h')
-rw-r--r--storage/spider/spd_include.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/storage/spider/spd_include.h b/storage/spider/spd_include.h
index bca4e4014ef..c1819da1567 100644
--- a/storage/spider/spd_include.h
+++ b/storage/spider/spd_include.h
@@ -261,7 +261,7 @@ const char SPIDER_empty_string = "";
#define SPIDER_TMP_SHARE_LONG_COUNT 19
#define SPIDER_TMP_SHARE_LONGLONG_COUNT 3
-#define SPIDER_MEM_CALC_LIST_NUM 268
+#define SPIDER_MEM_CALC_LIST_NUM 273
#define SPIDER_CONN_META_BUF_LEN 64
#define SPIDER_BACKUP_DASTATUS \
@@ -413,6 +413,8 @@ typedef struct st_spider_alter_table
uint tmp_link_statuses_length;
} SPIDER_ALTER_TABLE;
+typedef struct st_spider_conn_loop_check SPIDER_CONN_LOOP_CHECK;
+
/* database connection */
typedef struct st_spider_conn
{
@@ -603,6 +605,22 @@ typedef struct st_spider_conn
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
#endif
SPIDER_IP_PORT_CONN *ip_port_conn;
+
+ pthread_mutex_t loop_check_mutex;
+ HASH loop_checked;
+ uint loop_checked_id;
+ const char *loop_checked_func_name;
+ const char *loop_checked_file_name;
+ ulong loop_checked_line_no;
+ HASH loop_check_queue;
+ uint loop_check_queue_id;
+ const char *loop_check_queue_func_name;
+ const char *loop_check_queue_file_name;
+ ulong loop_check_queue_line_no;
+ SPIDER_CONN_LOOP_CHECK *loop_check_ignored_first;
+ SPIDER_CONN_LOOP_CHECK *loop_check_ignored_last;
+ SPIDER_CONN_LOOP_CHECK *loop_check_meraged_first;
+ SPIDER_CONN_LOOP_CHECK *loop_check_meraged_last;
} SPIDER_CONN;
typedef struct st_spider_lgtm_tblhnd_share
@@ -702,6 +720,7 @@ typedef struct st_spider_wide_handler
#endif
TABLE *top_table;
Field **top_table_field;
+ TABLE_SHARE *top_share;
enum thr_lock_type lock_type;
uchar lock_table_type;
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)