You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Stanimir Stamenkov via derby-dev <de...@db.apache.org> on 2023/01/04 20:29:26 UTC

Re: [jira] [Commented] (DERBY-7145) MERGE UPDATE failing: Restore of a serializable or SQLData object of class , attempted to read more data than was originally stored

Hi Rick.  Happy new year!

I've wondered if you had a chance to look further into this one?

– Stanimir


Tue, 11 Oct 2022 22:53:00 +0000 (UTC):

>      [ https://issues.apache.org/jira/browse/DERBY-7145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17616095#comment-17616095 ]
> 
> Richard N. Hillegas commented on DERBY-7145:
> --------------------------------------------
> 
> One thing that looks suspicious to me is the following:
> 
> For the failing case (with the DEFAULT clause), the type of the stored 
> CS value in the spillover conglomerate is SQLInteger. For the successful 
> case (without the DEFAULT clause), the type of that stored value is a 
> SQLLongint. This could explain the deserialization error: we are trying 
> to read back a SQLLongint from a shorter SQLInteger value.
> 
> It may take a little while to chase this down, since the SQLInteger is 
> being instantiated inside generated code.
> 
> 
>> MERGE UPDATE failing: Restore of a serializable or SQLData object of 
>> class , attempted to read more data than was originally stored
>> -----------------------------------------------------------------------------------------------------------------------------------
>>
>>                  Key: DERBY-7145
>>                  URL: https://issues.apache.org/jira/browse/DERBY-7145
>>              Project: Derby
>>           Issue Type: Bug
>>           Components: SQL
>>     Affects Versions: 10.14.2.0, 10.15.2.0, 10.16.1.1, 10.17.0.0
>>          Environment: Windows 10, JDK 8, Derby 10.14.2.0;
>> Windows 10, JDK 11, Derby 10.15.2.0;
>> Windows 10, JDK 17, Derby 10.16.1.1.
>>             Reporter: Stanimir Stamenkov
>>             Priority: Major
>>          Attachments: bug-demo3.zip, derby.log, derby2.log, sysinfo.txt

-- 

Re: [jira] [Commented] (DERBY-7145) MERGE UPDATE failing: Restore of a serializable or SQLData object of class , attempted to read more data than was originally stored

Posted by Stanimir Stamenkov via derby-dev <de...@db.apache.org>.
Thu, 5 Jan 2023 08:26:03 -0800, /Rick Hillegas/:

> Happy New Year, Stanimir. I have not looked into this further. I gave up 
> after sinking a fair amount of time into a seemingly plausible solution. 
> The MERGE implementation is unfortunately limited and brittle. It is 
> hard to fix one problem without breaking something else. At this time, I 
> don't have any clever ideas about how to move this issue forward.

Thank you for spending the time to investigate it, nevertheless.  I 
understand it could be an issue that may be nearly impossible to 
resolve.  Wish you and all Derby devs best of luck in the new year!


> On 1/4/23 12:29 PM, Stanimir Stamenkov via derby-dev wrote:
>>
>> Hi Rick.  Happy new year!
>>
>> I've wondered if you had a chance to look further into this one?
>>
>>
>> Tue, 11 Oct 2022 22:53:00 +0000 (UTC):
>>
>>>      [ https://issues.apache.org/jira/browse/DERBY-7145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17616095#comment-17616095 
]

-- 

Re: [jira] [Commented] (DERBY-7145) MERGE UPDATE failing: Restore of a serializable or SQLData object of class , attempted to read more data than was originally stored

Posted by Rick Hillegas <ri...@gmail.com>.
Happy New Year, Stanimir. I have not looked into this further. I gave up 
after sinking a fair amount of time into a seemingly plausible solution. 
The MERGE implementation is unfortunately limited and brittle. It is 
hard to fix one problem without breaking something else. At this time, I 
don't have any clever ideas about how to move this issue forward.

On 1/4/23 12:29 PM, Stanimir Stamenkov via derby-dev wrote:
> Hi Rick.  Happy new year!
>
> I've wondered if you had a chance to look further into this one?
>
> – Stanimir
>
>
> Tue, 11 Oct 2022 22:53:00 +0000 (UTC):
>
>>      [ 
>> https://issues.apache.org/jira/browse/DERBY-7145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17616095#comment-17616095 
>> ]
>>
>> Richard N. Hillegas commented on DERBY-7145:
>> --------------------------------------------
>>
>> One thing that looks suspicious to me is the following:
>>
>> For the failing case (with the DEFAULT clause), the type of the 
>> stored CS value in the spillover conglomerate is SQLInteger. For the 
>> successful case (without the DEFAULT clause), the type of that stored 
>> value is a SQLLongint. This could explain the deserialization error: 
>> we are trying to read back a SQLLongint from a shorter SQLInteger value.
>>
>> It may take a little while to chase this down, since the SQLInteger 
>> is being instantiated inside generated code.
>>
>>
>>> MERGE UPDATE failing: Restore of a serializable or SQLData object of 
>>> class , attempted to read more data than was originally stored
>>> ----------------------------------------------------------------------------------------------------------------------------------- 
>>>
>>>
>>>                  Key: DERBY-7145
>>>                  URL: https://issues.apache.org/jira/browse/DERBY-7145
>>>              Project: Derby
>>>           Issue Type: Bug
>>>           Components: SQL
>>>     Affects Versions: 10.14.2.0, 10.15.2.0, 10.16.1.1, 10.17.0.0
>>>          Environment: Windows 10, JDK 8, Derby 10.14.2.0;
>>> Windows 10, JDK 11, Derby 10.15.2.0;
>>> Windows 10, JDK 17, Derby 10.16.1.1.
>>>             Reporter: Stanimir Stamenkov
>>>             Priority: Major
>>>          Attachments: bug-demo3.zip, derby.log, derby2.log, sysinfo.txt
>