diff options
-rw-r--r-- | mysql-test/main/thread_pool_info.result | 2 | ||||
-rw-r--r-- | sql/thread_pool_info.cc | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/mysql-test/main/thread_pool_info.result b/mysql-test/main/thread_pool_info.result index 5eeb0ca1d6a..27717aa298a 100644 --- a/mysql-test/main/thread_pool_info.result +++ b/mysql-test/main/thread_pool_info.result @@ -31,7 +31,7 @@ Field Type Null Key Default Extra GROUP_ID int(6) NO 0 POSITION int(6) NO 0 PRIORITY int(1) NO 0 -CONNECTION_ID bigint(19) unsigned NO 0 +CONNECTION_ID bigint(19) unsigned YES NULL QUEUEING_TIME_MICROSECONDS bigint(19) NO 0 DESC INFORMATION_SCHEMA.THREAD_POOL_STATS; Field Type Null Key Default Extra diff --git a/sql/thread_pool_info.cc b/sql/thread_pool_info.cc index cf9ffe94f94..f003581a5b0 100644 --- a/sql/thread_pool_info.cc +++ b/sql/thread_pool_info.cc @@ -92,7 +92,7 @@ static ST_FIELD_INFO queues_field_info[] = Column("GROUP_ID", SLong(6), NOT_NULL), Column("POSITION", SLong(6), NOT_NULL), Column("PRIORITY", SLong(1), NOT_NULL), - Column("CONNECTION_ID", ULonglong(19), NOT_NULL), + Column("CONNECTION_ID", ULonglong(19), NULLABLE), Column("QUEUEING_TIME_MICROSECONDS", SLonglong(19), NOT_NULL), CEnd() }; @@ -130,7 +130,8 @@ static int queues_fill_table(THD* thd, TABLE_LIST* tables, COND*) /* PRIORITY */ table->field[2]->store(prio, true); /* CONNECTION_ID */ - table->field[3]->store(c->thd->thread_id, true); + if (c->thd) + table->field[3]->store(c->thd->thread_id, true); /* QUEUEING_TIME */ table->field[4]->store(now - c->enqueue_time, true); |