undefined argument in where clause causes terminate #63

IfpnI opened this Issue Mar 29, 2012 · 0 comments


None yet
1 participant

IfpnI commented Mar 29, 2012

terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::replace

The following code triggers the bug:

new mysql.Database(mysqlOpts).connect (err, server) ->
  this.query('UPDATE table SET counter=counter+1 WHERE foo_id=? AND other_id=?',
                            [undefined, 1]
                            ).execute (err, result) ->
    console.log err, result

It seems related to the undefined argument, if it is a valid integer it is OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment