Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inserting into a temporary table panics after the database is dropped #29255

Closed
djshow832 opened this issue Oct 29, 2021 · 1 comment · Fixed by #29263
Closed

Inserting into a temporary table panics after the database is dropped #29255

djshow832 opened this issue Oct 29, 2021 · 1 comment · Fixed by #29263
Assignees
Labels
severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@djshow832
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> create database tmpd;
Query OK, 0 rows affected (0.11 sec)

mysql> create temporary table tmpd.t(id int);
Query OK, 0 rows affected (0.01 sec)

mysql> drop database tmpd;
Query OK, 0 rows affected (0.20 sec)

mysql> insert into tmpd.t values(1);
ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference

2. What did you expect to see? (Required)

mysql> create database tmpd;
Query OK, 1 row affected (0.03 sec)

mysql> create temporary table tmpd.t(id int);
Query OK, 0 rows affected (0.01 sec)

mysql> drop database tmpd;
Query OK, 0 rows affected (0.07 sec)

mysql> insert into tmpd.t values(1);
Query OK, 1 row affected (0.01 sec)

If inserting cannot succeed, at least it should not panic.

3. What did you see instead (Required)

mysql> insert into tmpd.t values(1);
ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference

### 4. What is your TiDB version? (Required)

<!-- Paste the output of SELECT tidb_version() -->

Release Version: None
Edition: Community
Git Commit Hash: None
Git Branch: None
UTC Build Time: None
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false

@github-actions
Copy link

github-actions bot commented Nov 1, 2021

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants