Bug #118592 Unexpected result of prepared statement
Submitted: 7 Jul 12:12 Modified: 10 Jul 6:53
Reporter: chi zhang Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Prepared statements Severity:S1 (Critical)
Version:9.3.0 OS:Any
Assigned to: CPU Architecture:Any

[7 Jul 12:12] chi zhang
Description:
The following test case creates an empty table and select values from this table, however, the result of the prepared statement is parts of the query.

```
CREATE TABLE t0(c0 BIGINT) ;
SET @a = 8;
PREPARE prepare_query FROM 'SELECT '' FROM t0 GROUP BY '' LIMIT ?';
EXECUTE prepare_query USING @a;
```

This is the result:
```
FROM t0 GROUP BY 
 FROM t0 GROUP BY
```

How to repeat:
This is the test case
```
CREATE TABLE t0(c0 BIGINT) ;
SET @a = 8;
PREPARE prepare_query FROM 'SELECT '' FROM t0 GROUP BY '' LIMIT ?';
EXECUTE prepare_query USING @a;
```
[10 Jul 6:53] MySQL Verification Team
Hello Chi Zhang,

Thank you for the bug report.
Imho this is duplicate of Bug #118595, please see Bug #118595.

Regards,
Ashwini Patil