[MDEV-11267] connect jdbc null value problem remains Created: 2016-11-10 Updated: 2016-12-17 Resolved: 2016-11-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect |
| Affects Version/s: | 10.1.19 |
| Fix Version/s: | 10.0.29, 10.1.21, 10.2.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Robert Dyas | Assignee: | Olivier Bertrand |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
centos 7 |
||
| Description |
|
I just upgraded to 10.1.19 and recompiled the Java code for the JdbcInterface and ApacheInterface. The null behavior is different than 10.1.18 but still not correct. In 10.1.19 when you INSERT a row with NULL values specified for numeric or date/time column datatypes (all of their various forms) and then SELECT the result back, you will see that 0 was INSERTed. Note however that now in 10.1.19 if you issue an UPDATE statement with null values the behavior is now correct (when you select back you get NULLs for numbers and dates). |
| Comments |
| Comment by Olivier Bertrand [ 2016-11-14 ] | ||
|
The difference is that UPDATE commands are just sent to the driver while INSERT are prepared statements. And the set parameter function did not test for null values. Waiting for the fix, a turnaround is to replace:
by:
| ||
| Comment by Robert Dyas [ 2016-11-15 ] | ||
|
Great. Thank you! | ||
| Comment by Robert Dyas [ 2016-12-17 ] | ||
|
I just installed 10.1.20 and the problem with inserting null values remains. INSERT INTO atable (mynumericcol) VALUES (null); the SELECT returns zero not null. |