Bug #118592 Unexpected result of prepared statement
Submitted: 7 Jul 12:12 Modified: 7 Jul 12:46
Reporter: chi zhang Email Updates:
Status: Analyzing Impact on me:
None 
Category:MySQL Server: Prepared statements Severity:S1 (Critical)
Version:9.3.0 OS:Any
Assigned to: MySQL Verification Team 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;
```