-
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
Check table syntax support. #4673
Comments
In mysql-test analyze.test use the statement. |
This syntax is really a MyISAM-ism. In InnoDB I believe it just reads the pages from the table to make sure the page checksums are verified. I assume in TiDB it could be just mapped to |
A correction to my previous comment, there is a strong use-case for The MySQL server will allow tables that a view references to be removed without dependency checking, so |
Confirming this issue still exists in master: DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT);
CHECK TABLE t1;
CREATE OR REPLACE VIEW v1 AS SELECT 1;
CHECK TABLE v1;
..
mysql> CHECK TABLE t1;
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 5 near "CHECK TABLE t1"
mysql>
mysql> CREATE OR REPLACE VIEW v1 AS SELECT 1;
Query OK, 0 rows affected (0.10 sec)
mysql> CHECK TABLE v1;
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 5 near "CHECK TABLE v1"
mysql> SELECT tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v4.0.0-beta.2-859-gccfc9b2ad
Edition: Community
Git Commit Hash: ccfc9b2ad0dcf8e447210de5f559d7fc208db968
Git Branch: master
UTC Build Time: 2020-07-29 09:37:45
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec) |
See https://dev.mysql.com/doc/refman/5.7/en/check-table.html
The text was updated successfully, but these errors were encountered: