pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
36.96k stars 5.82k forks source link

show warnings and show errors do not support limit clause #24251

Open liaohongxing opened 3 years ago

liaohongxing commented 3 years ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> show warnings;
+---------+------+----------------------------------------------+
| Level   | Code | Message                                      |
+---------+------+----------------------------------------------+
| Warning | 1105 | unknown node type: tiflash(192.168.0.4:3930) |
| Warning | 1105 | unknown node type: tiflash(192.168.0.5:3930) |
| Warning | 1105 | unknown node type: tiflash(192.168.0.3:3930) |
+---------+------+----------------------------------------------+
3 rows in set (0.03 sec)
mysql> show warnings limit 1;
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 19 near "limit 1"
mysql> show warnings limit 1,1;
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 19 near "limit 1,1"

mysql> show errors;
Empty set (0.03 sec)
mysql> show errors limit 1;
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 17 near "limit 1"
mysql> show errors limit 1,1;
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 17 near "limit 1,1"
mysql>

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

Support SHOW WARNINGS [LIMIT [offset,] row_count] Support SHOW ERRORS [LIMIT [offset,] row_count]

3. What did you see instead (Required)

mysql> show errors limit 1,1;
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 17 near "limit 1,1"

mysql> show errors limit 1,1;
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 17 near "limit 1,1"

4. What is your TiDB version? (Required)

mysql> select tidb_version(); +-----------------------+ | Release Version: v5.0.0 Edition: Community Git Commit Hash: bdac0885cd11bdf571aad9353bfc24e13554b91c Git Branch: heads/refs/tags/v5.0.0 UTC Build Time: 2021-04-06 16:36:29 GoVersion: go1.13 Race Enabled: false TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306 Check Table Before Drop: false | +----------------------------+ 1 row in set (0.03 sec)

mysql>

EcoleKeine commented 2 years ago

same problem, any news?

与https://asktug.com/t/topic/69835 同样的问题,heidisql客户端会直接崩溃

xqinghu commented 2 years ago

+1