Re: SQLDataException when updating rows (Vert.x)

2016-03-29 Thread Simon
Hello all,

Just one more note, I made an issue for this problem:

https://issues.apache.org/jira/browse/DERBY-6880

Cheers,

Simon


On Tue, Mar 29, 2016 at 9:44 PM, Simon  wrote:

> Ok - here's my attempt at making a fairly minimal reproducible example.
>
> https://github.com/ssadedin/DerbyDebug
>
> Cheers,
>
> Simon
>
> On Tue, Mar 29, 2016 at 11:24 AM, Bryan Pendleton <
> bpendleton.de...@gmail.com> wrote:
>
>> One thing I'll note is that I /don't/ get this error when I execute the
>>> update via other means.
>>>
>>
>> Perhaps, those other tools (Squirrel, etc.) are not using the special
>> form of Statement.executeUpdate() which requests that the auto-generated
>> keys should be made available, while the Vert.x framework is.
>>
>>
>> https://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html#executeUpdate(java.lang.String,%20int)
>>
>> bryan
>>
>>
>>
>


Re: SQLDataException when updating rows (Vert.x)

2016-03-29 Thread Simon
Ok - here's my attempt at making a fairly minimal reproducible example.

https://github.com/ssadedin/DerbyDebug

Cheers,

Simon

On Tue, Mar 29, 2016 at 11:24 AM, Bryan Pendleton <
bpendleton.de...@gmail.com> wrote:

> One thing I'll note is that I /don't/ get this error when I execute the
>> update via other means.
>>
>
> Perhaps, those other tools (Squirrel, etc.) are not using the special
> form of Statement.executeUpdate() which requests that the auto-generated
> keys should be made available, while the Vert.x framework is.
>
>
> https://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html#executeUpdate(java.lang.String,%20int)
>
> bryan
>
>
>


Re: SQLDataException when updating rows (Vert.x)

2016-03-28 Thread Bryan Pendleton

One thing I'll note is that I /don't/ get this error when I execute the update 
via other means.


Perhaps, those other tools (Squirrel, etc.) are not using the special
form of Statement.executeUpdate() which requests that the auto-generated
keys should be made available, while the Vert.x framework is.

https://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html#executeUpdate(java.lang.String,%20int)

bryan




Re: SQLDataException when updating rows (Vert.x)

2016-03-27 Thread Bryan Pendleton

I am not completely sure if this problem is to do with Vert.x and its JDBC 
wrappers or Derby 10.12.1.1.


Me either.


Derby throws an error while trying to interrogate the result set for updated 
rows:




Caused by: ERROR 22018: Invalid character string format for type long.



at org.apache.derby.iapi.types.SQLChar.getLong(SQLChar.java:447)
at 
org.apache.derby.impl.sql.execute.UpdateResultSet.collectAffectedRows(UpdateResultSet.java:534)
at 
org.apache.derby.impl.sql.execute.UpdateResultSet.open(UpdateResultSet.java:272)


Well, that code in collectAffectedRows is new with Derby 10.12 (DERBY-6742),
so you certainly might have found a new bug in Derby.

Is it possible for you to run your program against Derby 10.11?
If so, does the problem disappear (that would be a strong clue)?


What's happening seems to be an inconsistent expectation about what is in the 
result set.



It addresses the wrong column


Your analysis is very interesting, and I think you have explained the
behavior quite plausibly.

Is there any chance that you can construct a standalone test case
that demonstrates this behavior?

Ideally, a Minimal Complete Verifiable Example 
(http://stackoverflow.com/help/mcve)
would be wonderful, but anything you can do to help simplify the reproduction
of the problem will go a long ways to those developers trying to
track down and fix it.

Possibly, running your test case with statement logging and query plans
enabled (http://wiki.apache.org/db-derby/PerformanceDiagnosisTips) will
give you some clues about how to construct a simpler reproduction case.

At the very least, please log a bug against Derby in the issue tracker
(http://db.apache.org/derby/DerbyBugGuidelines.html) with as much
information as you can provide.

thanks,

bryan