mariano/node-db-mysql — Issue #55: SELECT CONCAT('a string', int) returns Node.js Buffer instead of String
Author: exshovelrydr
Created: 2012-02-16 02:13:42+00:00
State: open

Hi,

As the title states, a query with a string combined with an integer, using CONCAT returns a Node.js Buffer instead of a string. Shouldn't the CONCAT function always return a string? Example below:

```sql
SELECT CONCAT('my-', id) AS id FROM mytable WHERE id = 1;
```

The result of this query is has the rows.id object as a Buffer. It can be converted using rows.id.toString('utf-8') to get the desired output of: my-1, but this defeats the purpose of using the MySQL engine to perform the string concatenation.