nemequ / sqlheavy

Automatically exported from code.google.com/p/sqlheavy
Other
5 stars 4 forks source link

Versioned database constructor hangs when using Update-to scripts #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a VersionedDatabase using a folder that contains one or more 
Update-to scrips in the schema folder.

What is the expected output? What do you see instead?
The object should be created and run each of the scripts in the folder.
The program hangs after adding a script to the sql transaction.

What version of the product are you using? On what operating system?
SQLHeavy 0.1 on Oneiric using Vala 0.14

Please provide any additional information below.
It looks like the transaction is blocking the code that updates the 
user_version. I pulled the VersionedDatabase class from source and ran the code 
through GDB. The execution hangs trying to update the user_version of the 
database. I was able to fix the issue by moving the user_version update to 
after the transaction commit and simply incrementing the version variable each 
loop. Attached is a patch of my changes. 

Original issue reported on code.google.com by BlueXan...@gmail.com on 11 Jan 2012 at 6:16

Attachments:

GoogleCodeExporter commented 9 years ago
Just confirming the issue in current git version and that the patch provided by 
BlueXan works. I was about to report the bug myself and put together a simple 
test case, I might as well post it here. 

Original comment by skagedal on 23 Jul 2013 at 11:24

Attachments: