[sqlite] SIGBUS errors with WAL mode and multiple simultaneous updating clients

2011-09-07 Thread Brodie Thiesfield
Hi, I seeing some SIGBUS faults during startup in the debug version of my app, but only when running under valgrind, and only for some clients. The faults appear to be occurring around the same location in the sqlite WAL code. If I disable WAL then there are no faults. If I don't run it under

Re: [sqlite] .lib file?

2009-07-25 Thread Brodie Thiesfield
-Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]on Behalf Of Doug Sent: Saturday, July 25, 2009 11:24 AM To: 'General Discussion of SQLite Database' Subject: Re: [sqlite] .lib file? Hi Paul -- When I build SQLite (from the

[sqlite] journal_mode = off crash in 3.6.10

2009-02-04 Thread Brodie Thiesfield
Hi, I know that there has been a number of crashes involving journal_mode = off. This problem continues for me in sqlite 3.6.10 almalgamation though. A trigger seems to be the cause. The following test program crashes on the last line (sqlite3_step) with a NULL pointer dereference of id-pMethods

[sqlite] Extra functions for portability

2008-03-03 Thread Brodie Thiesfield
Hi, My database layer needs to support PostgreSQL, MS SQL Server and SQLite and as much as possible I try to use the same SQL statements without modification. I found that for some of my uses, I needed extra functions or aliases to builtin sqlite functions and so I wrote them. Since others may

Re: [sqlite] sqlite3_open_v2 and SQLITE_OPEN_READONLY

2007-09-24 Thread Brodie Thiesfield
On Thu, 20 Sep 2007 10:14:10 -0700 drh wrote: Sqlite3_open_v2() and SQLITE_OPEN_READONLY and a whole bunch of other stuff is all new to 3.5.0. Version 3.5.0 is stable. It has lots of cool stuff. Older versions are not supported (except for paying customers) - by which we mean that if any

Re: [sqlite] Top 10 distinct record count

2007-03-02 Thread Brodie Thiesfield
Perhaps this is what you are after? select file, count(file) from logtable where type = 'specific' group by file order by 2 desc limit 10; Hikka W wrote: Dear list Quite new to sqlite/sql - and just signed the list. Have a logtable where I need a TOP 10 output of the most representet field

[sqlite] sqlite_sequence lacks a PK definition

2007-02-14 Thread Brodie Thiesfield
Hi, At the moment the sqlite_sequence table: * doesn't exist when a database is first created * is created when an AUTOINCREMENT table is created * doesn't use a primary key on the name column * doesn't get populated with the sequence row for a table until a row is added to the table. Would

[sqlite] reusing prepared queries or dynamic generation of SQL?

2007-02-10 Thread Brodie Thiesfield
Hi, I'm looking for some SQL advice. I have a query which is used as the base of a filter. At the moment I am using: SELECT * FROM table WHERE (1=? OR foo=?); The actual query is more complex and uses multiple of the constructions in this WHERE clause. If I wanted to select on the foo column

[sqlite] Hexadecimal literals or MAX_INTEGER definition?

2007-01-29 Thread Brodie Thiesfield
Does sqlite support numeric literals in hexadecimal? e.g.INSERT INTO table(mask) VALUES (0x); Additionally, is there a constant like MAX_INTEGER defined which I can use as the maximum value that an INTEGER field supports (assuming that types actually exist)? Regards, Brodie

[sqlite] Correct use of sqlite3 API (release locks)

2007-01-17 Thread Brodie Thiesfield
Hi, I have multiple processes using a single database for both read and write. I want to ensure that my interpretation of the v3 API spec is correct. In particular, I want to ensure that all processes lock the database for the minimum time possible and release the lock as soon as they have

Re: [sqlite] Possible Memory Leak

2006-12-21 Thread Brodie Thiesfield
The API documentation doesn't mention anything about this. It would be good to have it added there. http://www.sqlite.org/capi3ref.html#sqlite3_errmsg However drh stated a while ago that sqlite3_errmsg strings do NOT need to be freed. Error strings returned from sqlite3_exec do.

Re: [sqlite] Need a wince test

2006-12-20 Thread Brodie Thiesfield
Robert, does the patch I provided work as is on Windows CE or not? Robert Simpson wrote: There's some flaws in your arguments, Brodie ... 1. There's no need to do this whole _UNICODE test, only the _WINCE test is needed. All versions of Windows that support unicode also support the ANSI

Re: [sqlite] Need a wince test

2006-12-20 Thread Brodie Thiesfield
[EMAIL PROTECTED] wrote: Brodie Thiesfield [EMAIL PROTECTED] wrote: [...] SQLite should never expect strings in any encoding other than UTF-8 or UTF-16. (Note that ASCII is a proper subset of UTF-8 so SQLite will also accept ASCII.) I do not know what CP_ACP is, but if it is not a subset

Re: [sqlite] Need a wince test

2006-12-20 Thread Brodie Thiesfield
Robert Simpson wrote: From: Brodie Thiesfield [mailto:[EMAIL PROTECTED] Robert, you are missing the point. Because of the way this is being defined, there is a need to check for _UNICODE. If you don't then a build with _UNICODE defined will fail. If it was implemented like the rest

Re: [sqlite] Need a wince test

2006-12-20 Thread Brodie Thiesfield
Robert Simpson wrote: CP_UTF8 doesn't work on most CE platforms and hence your proposed patch doesn't work. Then neither did drh's. Which then only leaves the option of implementing it in os_win.c which I have been wanting to do all along. Robert wrote: Brodie wrote: Robert wrote:

Re: [sqlite] Need a wince test

2006-12-20 Thread Brodie Thiesfield
The utf8ToUnicode function uses MultiByteToWideChar(CP_UTF8) which it seems from recent comments isn't supported on all versions of Windows CE. This may need to be changed to use the internal UTF-8 to UTF-16 conversion routines. To be safe, the unicodeToMbcs needs to determine which codepage to

Re: [sqlite] Need a wince test

2006-12-19 Thread Brodie Thiesfield
There are a few problems with your patch. +# ifdef _WIN32_WCE +static HANDLE loadLibraryUtf8(const char *z){ + WCHAR zWide[MAX_PATH]; + MultiByteToWideChar(CP_ACP,0,z,-1,zWide,MAX_PATH); + return LoadLibrary(zWide); +} +# define SQLITE_OPEN_LIBRARY(A) loadLibraryUtf8(A)

Re: [sqlite] building sqlite on windows in Unicode

2006-12-17 Thread Brodie Thiesfield
to avoid adding them to the existing OS abstraction layer. Regards, Brodie -Original Message- From: Brodie Thiesfield [mailto:[EMAIL PROTECTED] Sent: Sunday, December 17, 2006 10:10 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] building sqlite on windows in Unicode [EMAIL

[sqlite] Using a view is slower than using the query that comprises the view?

2006-12-16 Thread Brodie Thiesfield
Hi, In my database I find that the explain program for the view (114 statements) is much longer than direct query that comprises the view (89) and almost twice as long as doing the 2 separate queries that make up the union in the view (39 + 30 = 69). To explain more clearly what I mean, if I

Re: [sqlite] building sqlite on windows in Unicode

2006-12-16 Thread Brodie Thiesfield
Christian Smith wrote: Check the requirements in: http://www.sqlite.org/copyright.html for patches and other submissions to SQLite. This could be what is holding up inclusion of the patch. Christian Brodie Thiesfield uttered: Hi, Building sqlite on windows in Unicode mode broke

[sqlite] building sqlite on windows in Unicode

2006-12-12 Thread Brodie Thiesfield
Hi, Building sqlite on windows in Unicode mode broke with the addition of the loadable extensions. I found a bug matching this problem and attached a patch to it to fix it a while ago, however I haven't seen any other comments or movement in the bug. I'm not sure what else needs to be done to