5.5.28 with mysqlnd does not return data when concat'ing a prepared field
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC |
Invalid
|
Undecided
|
Unassigned |
Bug Description
We are using Percona XtraDB Cluster 5.5.28 as a standalone instance. Using mysqlnd installed on PHP-FPM 5.3.21, we are seeing that using a concat that has a string prepared statement parameter is not returning any data when concat'ing with an integer.
In the example code provided, we try to join table_a with table_b when a.field2 is of the form CONCAT("test:", b.autoinc). This works if "test:" is explicitly provided, but not when we use a prepared variable as it's placeholder. No rows are returned in the case of a placeholder.
This issue only seems to happen when we use mysqlnd with Percona XtraDB 5.5. When we do mysqlnd to MySQL 5.5, it works. When we do non-mysqlnd to Percona XtraDB 5.5, it works. If we use the normal mysql functions, it works. If we use mysqli without using a prepared query, it works. It's just when using mysqli prepared queries on Percona XtraDB 5.5.28 with mysqlnd that the issue happens.
The only way we've gotten this to work on 5.5.28 with mysqlnd is by casting b.autoinc to a char, or converting b.autoinc to utf8. We're guessing it has something to do with the prepared variable being a string but the field it's concat'ed to being an int. It also works with the field type as a varchar, but it isn't possible to change the table structure since it's an auto inc.