5.5.28 with mysqlnd does not return data when concat'ing a prepared field

Bug #1153722 reported by Zach Gardner on 2013-03-11
6
This bug affects 1 person
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.

Zach Gardner (zgardner) wrote :

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.

affects: percona-server → percona-xtradb-cluster

@Jack, Do you face this issue with a Percona Server instance as well? Just to check if it is the server core issue or issue with wsrep/galera.

Zach Gardner (zgardner) wrote :

@Raghavendra, it appears to be working in Percona Server 5.5.15. We're using Percona XtraDB Cluster as a standalone for now, so it's not connecting to any other nodes through wsrep/galera.

@Jack, can you check if it is crashing with latest Percona Server (5.5.30) for you?

Zach Gardner (zgardner) wrote :

@Raghavendra, it is not crashing using 5.5.30.

Marking it invalid for now. If there is any change, please change the status.

Changed in percona-xtradb-cluster:
status: New → Invalid

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1308

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers