alibaba / alibaba/druid

建表语句COMMENT中包含分号报异常

Open
#4,366 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
28.2k
Forks
8.6k
PR merge metrics
No merged PRs in 30d

Description

```sql
`resource_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '类型:SPACE(空间);ASSET(设备)',
```
`resource_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '类型:SPACE(空间)

com.alibaba.druid.sql.parser.ParserException: unclosed str. pos 1772, line 17, column 145, token COMMENT

Contributor guide

Open the contributing guide

Research direction

Start with the Druid SQL parser path that raises com.alibaba.druid.sql.parser.ParserException for the supplied CREATE TABLE fragment. Reproduce the case with the COMMENT containing a semicolon, then verify that the complete statement parses successfully without an “unclosed str” error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.