You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a MySQL table with a bigint(20) primary key.
Using a query like SELECT * FROM table WHERE id = #{id} works fine.
However, using a prepared statement fails in some cases when the id is too big (bigger than what fits into a Fixnum, it seems).
statement = client.prepare("SELECT * FROM table WHERE id = ?")
statement.execute(18325422643391879579)
RangeError: bignum too big to convert into `long long'
With smaller ids, this same statement works.
Is this a known limitation or a bug?
Converting the id to a string using id.to_s before passing it to execute seems to be a working work around, which makes me think this might be a bug (if it is, I'm happy to take a look at fixing it, just want confirmation).
Thanks!
The text was updated successfully, but these errors were encountered:
I have a MySQL table with a
bigint(20)
primary key.Using a query like
SELECT * FROM table WHERE id = #{id}
works fine.However, using a prepared statement fails in some cases when the
id
is too big (bigger than what fits into aFixnum
, it seems).With smaller ids, this same statement works.
Is this a known limitation or a bug?
Converting the
id
to a string usingid.to_s
before passing it toexecute
seems to be a working work around, which makes me think this might be a bug (if it is, I'm happy to take a look at fixing it, just want confirmation).Thanks!
The text was updated successfully, but these errors were encountered: