Re: [sqlite] locked database returning SQLITE_IOERR, not SQLITE_BUSY
For the record, this problem went away when I upgraded to the latest greatest (3.7.15.2). From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Dan Kennedy [danielk1...@gmail.com] Sent: Tuesday, February 26, 2013 10:32 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] locked database returning SQLITE_IOERR, not SQLITE_BUSY On 02/27/2013 12:49 AM, Greg Janée wrote: I've instrumented the SQLite source and have found that the error is occurring at the fcntl call near the end of function unixLock (in SQLite version 3.7.0.1, this is line 23592 of sqlite3.c). The relevant code snippet is below. fnctl is returning -1, and errno=2 (ENOENT). From my reading of the fcntl man page, it wouldn't seem to be possible for fcntl to even return ENOENT. SQLite is being used from a multi-threaded application in my case, and I don't know if it's a possibility that some other thread is overwriting errno. But then, if that's even a possibility, wouldn't that seem to preclude using SQLite in a multithreaded application at all? I think errno is thread specific on any unix that isn't ancient. On Solaris you have to get the compiler flags right - -D_REENTRANT or something. Maybe -mt too. I thought you might have been reading errno fter the sqlite3_step() call returned. It is weird that it is setting errno to ENOENT... ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Memory DB - Query does not return all records after Update
Oh, nice catch. Well, after I made the change I am still seeing the same issue. I added some print statements that will maybe help. It sounds like you might think it is because I am not closing my statement is the reason I am getting this issue? I was thinking if it were only that then no matter how long I wait, my next query would return only 9. But this happens only if it is an immediate query, if I wait .5s then I get all 10 results. It feels as if SQLite is acquiring the write lock, doing some work, then releasing the lock. But it seems like SQLite still is doing some writing/protecting of sort in the back ground, and this work is taking longer than my next statement to come around and execute. This is my Query [Thread ID] Bind Results - calls to get data from sqlite3_column_count, sqlite3_column_int64, etc Next - Row, - [SQLITE return code from sqlite3_step()] -- [980] P Query Begin [980] Acquire Mutex [980] Prepare [980] Execute [980] Bind Results Next - Row, 100 [980 ] Bind Results Next - Row, 100 [980] Bind Results Next - Row, 100 [980] Bind Results Next - Row, 100 [980] Bind Results Next - Row, 100 [980] Bind Results Next - Row, 100 [980] Bind Results Next - Row, 100 [980] Bind Results Next - Row, 100 [980] Bind Results Next - Row, 100 [980] Bind Results [980] Release [980] Release Mutex Result set has 10 entries Then the Update [10096] Acquire Mutex [10096] Begin Transaction [10096] Prepare [10096] Bind Blob [10096] Execute [10096] Release [10096] End Transaction [10096] Release Mutex Immediate Query after the Update [980] Acquire Mutex [980] Prepare [980] Execute [980] Bind Results Next - Row, 100 [980] Bind Results Next - Row, 100 [980] Bind Results Next - Row, 100 [980] Bind Results Next - Row, 100 [980] Bind Results Next - Row, 100 [980] Bind Results Next - Row, 100 [980] Bind Results Next - Row, 100 [980 ] Bind Results Next - Row, 100 [980] Bind Results [980] Release [980] Release Mutex Result set has 9 entries -- View this message in context: http://sqlite.1065341.n5.nabble.com/Memory-DB-Query-does-not-return-all-records-after-Update-tp67267p67333.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Sqlite on windows ce 5.0 Emulator
Hi, Thanks for your reply. It is raising below error: DeviceApplication1.exe NullReferenceException at DeviceApplication1.Form1.Button1_Click()\par at System.Windows.Forms.Control.OnClick()\par at System.Windows.Forms.Button.OnClick()\par at System.Windows.Forms.ButtonBase.WnProc()\par at System.Windows.Forms.Control._InternalWnProc()\par at Microsoft.AGL.Forms.EVL.EnterMainLoop()\par at System.Windows.Forms.Application.Run()\par at DeviceApplication1.Form1.Main()\par The latest version you have suggested might need .net CF 3.5 but I must use 2.0 CF. How would I be able to use this binary files in my vs project? -- View this message in context: http://sqlite.1065341.n5.nabble.com/Sqlite-on-windows-ce-5-0-Emulator-tp67313p67340.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] sqlite in windows 8?
could anybody guide me how to connect sqlite database connection in windws 8 app using java script,HTML.please i am trying a lot but in vain -- View this message in context: http://sqlite.1065341.n5.nabble.com/sqlite-in-windows-8-tp67341.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Memory DB - Query does not return all records after Update
On 2/27/2013 1:10 PM, mike.akers wrote: Well, after I made the change I am still seeing the same issue. I added some print statements that will maybe help. What does your select statement look like? What does your update statement look like? Any chance you can show a complete sample that reproduces the problem? -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite Pronunciation
On Wed, Feb 27, 2013 at 06:28:03PM -0500, f...@cetussoft.com scratched on the wall: I guess, to some extent, it may depend on whether one pronounces (or mispronounces) SQL as see-kwel or as ess-kyoo-ell. As I understand it, the ess-cue-ell pronunciation is part of the ISO standard for SQL. Is there a consensus here? (Yes, I know that pronunciation matters little on a mailing list.) If you want to be real formal, it does (which means, for a mailing list, I guess it doesn't). When I was working on Using SQLite I got into a discussion with my editor about the usage an SQL statement vs a SQL statement. (or an SQLite database... it goes on an on). We ended up going with an SQL... because it is more correct for the ess-cue-ell pronunciation. -j -- Jay A. Kreibich J A Y @ K R E I B I.C H Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable. -- Angela Johnson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite Pronunciation
On 28 Feb 2013, at 7:02pm, Jay A. Kreibich j...@kreibi.ch wrote: On Wed, Feb 27, 2013 at 06:28:03PM -0500, f...@cetussoft.com scratched on the wall: I guess, to some extent, it may depend on whether one pronounces (or mispronounces) SQL as see-kwel or as ess-kyoo-ell. As I understand it, the ess-cue-ell pronunciation is part of the ISO standard for SQL. Database professionals have been pronouncing it as 'sequel' ('see kwel') for years. They might be seen as 'the old guard' and ISO as the young standardisers fighting against them. I don't know. First paragraph of first answer: http://www.orafaq.com/wiki/SQL_FAQ#What_is_SQL_and_where_does_it_come_from.3F Pronunciation is a problem with IT professionals because they get much of their information from written sources. In fact I have used half a dozen computing technologies where I've never heard their names pronounced. Perhaps technical English is getting more like German, which is a written language which people try to talk, rather than English, which is a spoken language which people try to write down. I was once asked whether Ministers of Parliament were shouting here here or hear hear and I didn't have a clue. I had to look it up in Hansard. And even now I know the answer I don't know how the cry originated. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite in windows 8?
satishpatil14 wrote: could anybody guide me how to connect sqlite database connection in windws 8 app using java script,HTML.please i am trying a lot but in vain Here you go: http://timheuer.com/blog/archive/2012/08/07/updated-how-to-using-sqlite-from -windows-store-apps.aspx -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Sqlite on windows ce 5.0 Emulator
Anand Shah wrote: DeviceApplication1.exe NullReferenceException at DeviceApplication1.Form1.Button1_Click()\par at System.Windows.Forms.Control.OnClick()\par at System.Windows.Forms.Button.OnClick()\par at System.Windows.Forms.ButtonBase.WnProc()\par at System.Windows.Forms.Control._InternalWnProc()\par at Microsoft.AGL.Forms.EVL.EnterMainLoop()\par at System.Windows.Forms.Application.Run()\par at DeviceApplication1.Form1.Main()\par I see no references to SQLite or System.Data.SQLite in the above stack trace. The latest version you have suggested might need .net CF 3.5 but I must use 2.0 CF. It is also possible to target the .NET Compact Framework 2.0 with the current sources by using the project file for Visual Studio 2005. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Maybe bug with vtab xDestroy
In xRename, if I set zErrMsg and return SQLITE_ERROR, the error message gets through. In xDestroy, using the same code, the error message seems to get eaten. Bug? My code: static int my_Destroy(sqlite3_vtab *tab) { struct my_vtab* pvtab = (struct my_vtab*) tab; if (pvtab-zErrMsg) sqlite3_free(pvtab-zErrMsg); pvtab-zErrMsg = sqlite3_mprintf(whatever); return SQLITE_ERROR; } This is with 3.7.15.2 -- E ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite Pronunciation
On Thu, 28 Feb 2013 19:21:16 +, Simon Slavin slav...@bigfraud.org wrote: I was once asked whether Ministers of Parliament were shouting here here or hear hear and I didn't have a clue. I had to look it up in Hansard. And even now I know the answer I don't know how the cry originated. It's Hear! Hear! as in Hear him! Hear him! When IBM brought out SCSI, they initially pronounced it sexy and wanted it that way, but somebody thought of scuzzy and that's what caught fire with people. -- Ned ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] update the same record in multiple segments at once
All, I don't know if this is possible. A segment in table Files contains a record Content with a fields like this XXX Needs to become XXX 123 456 78 90 Based on a Translation table were I have |123 |456 |78 |90 If I do UPDATE [Files] SET [Content] = replace(Content, (SELECT [Source] FROM [Translations]), (SELECT [Translation] FROM [Translations])); only the first match is replaced and I get: XXX 123 Is there a way to translate , and as well? thanks Gert ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] update the same record in multiple segments at once
On Thu, Feb 28, 2013 at 10:50 PM, Gert Van Assche ger...@datamundi.be wrote: All, I don't know if this is possible. A segment in table Files contains a record Content with a fields like this XXX Needs to become XXX 123 456 78 90 Based on a Translation table were I have |123 |456 |78 |90 If I do UPDATE [Files] SET [Content] = replace(Content, (SELECT [Source] FROM [Translations]), (SELECT [Translation] FROM [Translations])); only the first match is replaced and I get: XXX 123 Is there a way to translate , and as well? It is so much easier and faster to do this in programming language. SQL is not suitable for things like that. Pavel ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users