readysettech / readyset

Readyset is a MySQL and Postgres wire-compatible caching layer that sits in front of existing databases to speed up queries and horizontally scale read throughput. Under the hood, ReadySet caches the results of cached select statements and incrementally updates these results over time as the underlying data changes.
https://readyset.io
Other
4.54k stars 125 forks source link

Table with delimiter inside a comment fail to parse #1373

Open altmannmarcelo opened 2 months ago

altmannmarcelo commented 2 months ago

Description

DDL that have delimiter inside comment fail to parse:

CREATE TABLE t (status tinyint COMMENT '1=active; 0=inactive');

fails with:

2024-09-20T15:18:37.116392Z  WARN taking database snapshot: replicators::mysql_connector::snapshot: Error extending CREATE TABLE "test"."t", table will not be used error=Query failed to parse: 0=inactive'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci

Change in user-visible behavior

Requires documentation change

altmannmarcelo commented 2 months ago

Issue seems in ends_in_semicolon_or_eof as we are not considering to discard the semicolon if we it is inside a single or double quote.