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

ddl: exchange partition with temporary table should not be allowed. #37201

Closed
lcwangchao opened this issue Aug 18, 2022 · 0 comments · Fixed by #37204
Closed

ddl: exchange partition with temporary table should not be allowed. #37201

lcwangchao opened this issue Aug 18, 2022 · 0 comments · Fixed by #37204
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug This issue is a bug.

Comments

@lcwangchao
Copy link
Collaborator

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

set @@tidb_enable_exchange_partition=1;
CREATE TABLE tp (id INT) PARTITION BY RANGE (id) ( 
        PARTITION p0 VALUES LESS THAN (100),
        PARTITION p1 VALUES LESS THAN (1000)
);
create global temporary table tmp1 (id int) on commit delete rows;
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE tmp1;

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

ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE tmp1; should fail.

3. What did you see instead (Required)

mysql> ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE tmp1;
Query OK, 0 rows affected, 1 warning (2.71 sec)

4. What is your TiDB version? (Required)

master

mysql> SELECT tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                           |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v6.2.0-alpha
Edition: Community
Git Commit Hash: 09cb849c27ff8ebe255f6addbc6dfc6b240d68d5
Git Branch: heads/refs/tags/v6.2.0-alpha
UTC Build Time: 2022-08-08 14:26:07
GoVersion: go1.18.5
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: tikv |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
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 This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant