1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

- Fix MDEV-10950. Null values not retrieved for numeric types.

Now the null is tested using the result set getObject method.
  modified:   storage/connect/JdbcInterface.java
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jdbconn.h
This commit is contained in:
Olivier Bertrand
2016-10-14 18:29:33 +02:00
parent 9b20d606fb
commit b7aee7dbe7
3 changed files with 29 additions and 15 deletions

View File

@@ -692,11 +692,11 @@ public class JdbcInterface {
return 0;
} // end of TimestampField
public String ObjectField(int n, String name) {
public Object ObjectField(int n, String name) {
if (rs == null) {
System.out.println("No result set");
} else try {
return (n > 0) ? rs.getObject(n).toString() : rs.getObject(name).toString();
return (n > 0) ? rs.getObject(n) : rs.getObject(name);
} catch (SQLException se) {
SetErrmsg(se);
} //end try/catch