New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Curious intermittent bug SQLite3 and beedb #11
Comments
What's definiton about the struct;for the int type try int64 |
This appears to be using the same pointer address for multiple reads. I wonder if this has anything to do with my issue. |
I changed all the code over to int64 and the issue persists. here is a (very) rough outline of how my app works: https://gist.github.com/3530821 I'm still struck by how the pointer addresses reported by beedb are the same. I'm going to work on some way of getting the records out of the 'db goroutine' to the main goroutine by val instead of the pointers. |
i have no idea about this issue |
Hello, I had some similar issue. I had a table (with some data) and I added another column with int type (without default 0 value). All existent row got "" (empty) value for this column. After adding I had the same problem - different results for the same queries. I noticed that for int column beedb adds 0 in there is no value. I removed my new column and added it again with default 0 value. All existent rows got 0 for that new column. And it was fixed - same results for same queries. I use Sqlite3 extension for Firefox for managing sqlite db. I hope it will work for you too. |
yesterday when i review the pkg doc http://golang.org/pkg/database/sql/driver/#Driver i find the driver definition
The returned connection is only used by one goroutine at a time. the problem maybe calls by the goroutine |
This is becoming more prevalent. I'm having some trouble with orm.FindAll. The test data in the database is:
1|1|458|1|45000|Debtor has other outstanding obligations|1344643200|1351036800|5|13000000|4380000|1260000|890000|
I print the object after the select and get quite a different result:
&{0 0 0 0 0 Debtor has other outstanding obligations 0 0 5 0 0 0 0 0}
beedb's debug output from that resembles: &{0xf840137300 judgements 0 0 [] attorneyfeesbalance, account, duedayofmonth, interestbalance, bank, statutedate, id, monthlypayment, judgementdate, notation, bankexpensesbalance, principalbalance, apr, lastinterestdate Id ` ? 1}
The fields that get zeroed out are random every time. About 25% of the time, the entire record is returned intact. I had this problem before and I thought it had gone away with your latest fix. If I use Mattn's drivers directly, I don't have intermittent results like this. I can help in any way possible, the drivers are otherwise excellent.
SQLite 3.7.13
Linux Gothmaug 3.4.4-gentoo #1 SMP PREEMPT Tue Jul 17 17:53:20 EDT 2012 x86_64 AMD Phenom(tm) 9950 Quad-Core Processor AuthenticAMD GNU/Linux
The text was updated successfully, but these errors were encountered: