建表语句COMMENT中包含分号报异常
Open
- 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
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