Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
None
-
None
-
Not for Release Notes
Description
Hi,
In the following test case, a backslash is used in the query. In the normal query, the \' will be transformed to a single quote, which is different from the single quote that was used to include the string; however, in the prepared query, the \' is transformed to a single quote that is the same as the one used to include the string. The two equivalent queries have different results.
CREATE TABLE t0(c0 DOUBLE);
REPLACE INTO t0 VALUES (0.5);
SELECT t0.c0 FROM t0 WHERE '1\'#' AND FALSE; – empty result
PREPARE prepare_query FROM "SELECT t0.c0 FROM t0 WHERE '1\'#' AND FALSE";
EXECUTE prepare_query; – 0.5