Subject RE: [firebird-support] Firebird Crashes creating strored procedures dynamicly ?
Author Ryan Baldwin
Hi

Thanks for your response Alan.

>>
>> The application uses jaybird and currently we use a transaction isolation
>> level isc_tpb_consistency. Each seperate transaction uses stored
>> procedures
>> either created in its context or by a previous transaction that
>> has already
>> commited. If the same stored procedure happens to be required by two
>> concurrent transactions then it is created twice. The intention
>> is that this
>> will be cleaned up later.
>
>how do you expect to create the same procedure twice? how will the second
>one ever avoid raising an exception when it attempts to be committed?

We give it a different name.

>so you are aware that creating an SP dynamically and expecting to use it
>without properly disconnecting and reconnecting is a recipe for corruption?
>We are speaking about making changes to metadata here which is not visible
>to other transactions...

Only the transaction that creates a stored procedure uses it or potentially
other transactions that start after that transaction commits.
I assumed commiting the transaction is enough to make the changes visible ?
I can test disconnecting/reconnecting to see if this solves the problem - do
you suggest a connection should be closed to make its metadata updates
visible to other connections/transaction ? - this I am not so clear about.

When this application starts with an empty data it creates it own 'static'
metadata and then commits this on start up. This has never been a problem.

Thanks
Ryan