I think the reason is ".close()"

During the first pass in method *prepareLocal(String sql)* of 
*org.h2.engine.Session*,  in process of execution
*command = parser.prepareCommand(sql);*

we doing 
*parameters.get(0).setValue(ValueNull.INSTANCE);* 

but during the second pass in method *prepareLocal(String sql)* of 
*org.h2.engine.Session 
*we execute block


*                if (command != null && command.canReuse()) {*
*                    command.reuse();*
*                    return command;*
*                }*

return *command*, but *parameters.get(0)* value still null :-(


 I made more simpler test: 

1) https://gist.github.com/Manjago/8122598 -  fail with output 
https://gist.github.com/Manjago/8122610
2) https://gist.github.com/Manjago/8122632 - success


суббота, 28 декабря 2013 г., 13:46:50 UTC+4 пользователь Thomas Mueller 
написал:
>
>
> The strange thing is, if I remove cs.close(), then it works.
>
> I didn't analyze yet what the root cause is.
>
> Regards,
> Thomas
>
>
>
> On Sat, Dec 28, 2013 at 7:32 AM, Kirill Temnenkov 
> <[email protected]<javascript:>
> > wrote:
>
>> I submitted issue 
>> http://code.google.com/p/h2database/issues/detail?id=538
>>
>> пятница, 27 декабря 2013 г., 10:44:55 UTC+4 пользователь Kirill Temnenkov 
>> написал:
>>
>>> will there be any corrections? or better send me a patch?
>>>
>>>
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "H2 Database" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to