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

CREATE GLOBAL TEMPORARY TABLE ... LIKE creates a normal table #25613

Closed
djshow832 opened this issue Jun 21, 2021 · 2 comments · Fixed by #25644
Closed

CREATE GLOBAL TEMPORARY TABLE ... LIKE creates a normal table #25613

djshow832 opened this issue Jun 21, 2021 · 2 comments · Fixed by #25644
Labels
severity/moderate 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 table tb2(id int);
Query OK, 0 rows affected (0.07 sec)

mysql> create global temporary table tb3 like tb2 on commit delete rows;
Query OK, 0 rows affected (0.07 sec)

mysql> show create table tb3;
+-------+--------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+--------------------------------------------------------------------------------------------------------------+
| tb3 | CREATE TABLE tb3 (
id int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin |
+-------+--------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

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

show create table shows a global temporary table.

3. What did you see instead (Required)

It shows a normal table.

4. What is your TiDB version? (Required)

mysql> select version();
+----------------------------------------+
| version() |
+----------------------------------------+
| 5.7.25-TiDB-v5.2.0-alpha-88-ged52601e6 |
+----------------------------------------+
1 row in set (0.00 sec)

@ti-srebot
Copy link
Contributor

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

6. Fixed versions

@tisonkun
Copy link
Contributor

tisonkun commented Jul 2, 2021

Hi @djshow832 shall we adopt tracking issue style as in #25899 instead of GitHub Project management?

For rationale, see also this section also in the page it describes how to make use of GitHub mechanism implementing tracking issue pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate 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.

4 participants