-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
tidb-4.0 should not support invisible index
syntax
#20486
Labels
sig/sql-infra
SIG: SQL Infra
Comments
/label sig/execution |
Hi @marsishandsome , this is actually expected because, for most syntaxes, we support it in the parser firstly to 'improve the compatibility'. You can see this issue: #11486 for more details. |
bb7133
added
sig/sql-infra
SIG: SQL Infra
and removed
sig/execution
SIG execution
labels
Oct 16, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
tidb-4.0 should not support
invisible index
syntax1. Minimal reproduce step (Required)
drop table t_invisible_index;
create table t_invisible_index(a int, index idx_a(a));
alter table t_invisible_index alter index idx_a invisible;
2. What did you expect to see? (Required)
MySQL [test]> drop table if exists t_invisible_index
-> ;
Query OK, 0 rows affected (0.22 sec)
MySQL [test]> drop table if exists t_invisible_index;
Query OK, 0 rows affected (0.00 sec)
MySQL [test]> create table t_invisible_index(a int, index idx_a(a));
Query OK, 0 rows affected (0.07 sec)
MySQL [test]> alter table t_invisible_index alter index idx_a invisible;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 41 near "index idx_a invisible"
3. What did you see instead (Required)
MySQL [test]> drop table t_invisible_index;
Query OK, 0 rows affected (0.19 sec)
MySQL [test]> create table t_invisible_index(a int, index idx_a(a));
Query OK, 0 rows affected (0.08 sec)
MySQL [test]> alter table t_invisible_index alter index idx_a invisible;
Query OK, 0 rows affected (0.00 sec)
MySQL [test]> show create table t_invisible_index;
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
| t_invisible_index | CREATE TABLE
t_invisible_index
(a
int(11) DEFAULT NULL,KEY
idx_a
(a
)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin |
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
4. What is your TiDB version? (Required)
Release Version: v4.0.5
Edition: Community
Git Commit Hash: 9c1c212
Git Branch: heads/refs/tags/v4.0.5
UTC Build Time: 2020-08-28 10:07:42
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
The text was updated successfully, but these errors were encountered: