Bug #55962 Savepoint identifier is occasionally considered as floating point numbers
Submitted: 13 Aug 2010 5:40 Modified: 19 Apr 2012 20:58
Reporter: Mikiya Okuno Email Updates:
Status: Closed Impact on me:
Category:Connector / J Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: CPU Architecture:Any

[13 Aug 2010 5:40] Mikiya Okuno
When java.sql.Connection#.setSavepoint() is called without argument, Connector/J generates savepoint identifier using java.rmi.server.UID. In some cases, such an identifier is recognized as a floating point number if:

- It begins with digits.
- 'e' follows
- Digits follow.
- Any characters follow.

Even though Connector/J encloses savepoint IDs with back ticks and such IDs are harmless, it's not good idea to use those ID generators which may be recognized as floating number digits.

How to repeat:
Call java.sql.Connection#.setSavepoint() again and again.

Suggested fix:
Add some prefix like '_'.
[30 Sep 2010 9:34] Jon Stephens
See also BUG#55961.
[19 Apr 2012 20:58] John Russell
Added to changelog for 5.1.20: 

The savepoint identifier generated by the
java.sql.Connection#.setSavepoint() function could be misinterpreted
as a floating-point number, for example values such as 123e10 or
123e10foo. Such values could cause replication errors on slave
servers because the values are not quoted in the binary log. The fix
ensures that the savepoint identifiers do not begin with digits.