Bug #59456 | com.mysql.jdbc.PreparedStatement.setObject(int,Object) doesn't handle Character | ||
---|---|---|---|
Submitted: | 12 Jan 2011 18:29 | Modified: | 20 Jan 2011 7:00 |
Reporter: | Yura Nakonechnyy | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | Connector / J | Severity: | S4 (Feature request) |
Version: | OS: | Any | |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | jdbc, PreparedStatement, setObject |
[12 Jan 2011 18:29]
Yura Nakonechnyy
[12 Jan 2011 18:32]
Yura Nakonechnyy
Added jdbc tag
[12 Jan 2011 23:46]
Mark Matthews
Technically not a bug, there is no JDBC specification-defined mapping for java.lang.Character (or char[]). The driver is doing the right thing as far as the JDBC spec is concerned, i.e. if there's no mapping defined, it's a java.lang.Object. We'll have to consider whether we want to do something custom here or not.
[13 Jan 2011 19:21]
Yura Nakonechnyy
In this case still cannot understand why according to JDBC specialization char should be serialized as object in PreparedStatement.setObject(int,Object) and other primitive types (int, double, float) are treated like their counterparts in SQL. As for me, this looks like char was ommitted by mistake in JDBC specialization and this mistake can be easily fixed in Connector/J. Anyway, thank You for the quick feedback on this!
[13 Jan 2011 19:24]
Yura Nakonechnyy
In previous comment, instead of "specialization" should be "specification", sorry.
[20 Jan 2011 7:00]
Valeriy Kravchuk
Based on Mar's comment I'd say we have a valid feature request here.
[12 Aug 2016 9:23]
Mo Do
What is the status of this bug? Is it possible it's five years unfixed?
[12 Aug 2016 13:01]
Alexander Soklakov
It's a feature request, we implement it as time allows.