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

parser: something wrong with scanner with the stats_extended table #24742

Closed
AilinKid opened this issue May 19, 2021 · 2 comments
Closed

parser: something wrong with scanner with the stats_extended table #24742

AilinKid opened this issue May 19, 2021 · 2 comments
Labels
duplicate Issues or pull requests already exists. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@AilinKid
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> use mysql
Database changed

mysql> show create table stats_extended;
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 32 near "stats_extended" 

mysql> show create table mysql.stats_extended;
+----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table          | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
+----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| stats_extended | CREATE TABLE `stats_extended` (
  `name` varchar(32) NOT NULL,
  `type` tinyint(4) NOT NULL,
  `table_id` bigint(64) NOT NULL,
  `column_ids` varchar(32) NOT NULL,
  `stats` blob DEFAULT NULL,
  `version` bigint(64) unsigned NOT NULL,
  `status` tinyint(4) NOT NULL,
  PRIMARY KEY (`name`,`table_id`) /*T![clustered_index] NONCLUSTERED */,
  KEY `idx_1` (`table_id`,`status`,`version`),
  KEY `idx_2` (`status`,`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin |
+----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

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

show the result

3. What did you see instead (Required)

parser error

4. What is your TiDB version? (Required)

master

@AilinKid AilinKid added the type/bug The issue is confirmed as a bug. label May 19, 2021
@djshow832
Copy link
Contributor

Duplicate with #23396

@ti-srebot
Copy link
Contributor

ti-srebot commented May 21, 2021

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

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug Querying stats_extended reports syntax error #23396

@djshow832 djshow832 added the duplicate Issues or pull requests already exists. label May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues or pull requests already exists. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

4 participants