Skip to content

Bug: block comment ending with "**/" causes SQL parse error #19486

@TCeason

Description

@TCeason

Summary

When SQL contains a block comment with an extra * before the closing slash (i.e. ending with **/), the query fails in the kernel/parser.

On our cloud platform, comments are currently not filtered and are sent directly to Databend, so this issue is user-visible.

Reproduction

Case 1 (works):

  /***succ*/
  SELECT 1;

Case 2 (fails):

  /***fail, succ**/
  SELECT 1;

Expected behavior

Both statements should execute successfully and return 1.

Metadata

Metadata

Assignees

Labels

C-bugCategory: something isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions