Skip to content

bug: Relevant resources are not released after a thread is killed. #1352

@haitaoguan

Description

@haitaoguan

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Describe the problem

###session1
mysql> use db;
Database changed
mysql> show create table ttt\G
*************************** 1. row ***************************
       Table: ttt
Create Table: CREATE TABLE `ttt` (
  `id` bigint(10) NOT NULL,
  `c_date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=TIANMU DEFAULT CHARSET=utf8
1 row in set (0.01 sec)

mysql> select count(*) from ttt;
+----------+
| count(*) |
+----------+
|  3841782 |
+----------+
1 row in set (0.01 sec)

mysql> explain select c_date
    ->   from ttt
    ->  where c_date >= date_sub(now(), interval 30 day)
    ->    AND c_date < now();

###session 2
mysql> show processlist;
......
mysql> kill 20;
Query OK, 0 rows affected (0.00 sec)

mysql> show processlist;
······
| 20 | root | localhost | charge_order | Killed  |  496 | explaining | explain select c_date
  from ttt
 where c_date >= date_sub(now(), interval 30 day)
   AND c_date <  |
......

Expected behavior

No response

How To Reproduce

No response

Environment

build information as follow:
Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7-dev
Branch name: stonedb-5.7-dev
Last commit ID: 3e66e14
Last commit time: Date: Tue Feb 28 16:54:01 2023 +0800
Build time: Date: Thu Mar 2 17:09:04 CST 2023

Are you interested in submitting a PR to solve the problem?

  • Yes, I will!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions