Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread Dan Kennedy
On Thu, 2007-01-11 at 15:00 -0800, ohadp wrote: > here's the detailed description of the apparent bug: > > i'm using the _16 versions for getting text from an fts1 table. > if i insert data and select, i get good data, meaning my call to > sqlite3_column_text16(..) returns a pointer to a UNICODE

Re: [sqlite] How to handle dual-field Primary Key - only one is Autoincrement

2007-01-11 Thread Dan Kennedy
On Thu, 2007-01-11 at 21:47 -0500, Dan Cooperstock wrote: > I have a slightly unusual situation in my database design. Several of my > tables have primary keys composed of two integer fields, such as customerid > and year. The customerid should be an Autoincrement field, in the sense that > when a

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread ohadp
I'm not using the various 'bind' calls but simply executing SQL inserts/updates/querys with _sqlite3_prepare, _sqlite3_step. notice that the insert comes through as unicode, the update is recognized as unicode but stored as ascii. i looked into the code one level deeper and it looks like the

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread ohadp
This is happening only with FTS1. With a normal table everything comes back normally. ohadp wrote: > > here's the detailed description of the apparent bug: > > i'm using the _16 versions for getting text from an fts1 table. > if i insert data and select, i get good data, meaning my call to

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread Scott Hess
Are you absolutely, positively certain that you're calling sqlite3_bind_text16() when setting up the update? I ask because I recently spent a long afternoon tracking down that basic mistake :-). -scott On 1/11/07, ohadp <[EMAIL PROTECTED]> wrote: here's the detailed description of the

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread ohadp
here's the detailed description of the apparent bug: i'm using the _16 versions for getting text from an fts1 table. if i insert data and select, i get good data, meaning my call to sqlite3_column_text16(..) returns a pointer to a UNICODE string. if i update and then select, my call to

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread John Stanton
In that case your problem will be in your code, specifically in the function which gives you a pointer to the data. Show us your code. ohadp wrote: i'm linking with it and calling the api directly. i think that sqlite3.exe doesn't have fts1 support in it. John Stanton wrote: How are you

Re: [sqlite] multiuser DB on network share

2007-01-11 Thread John Stanton
Thankyou for the excellent reference. Roger Binns wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John Stanton wrote: An elegant explanation. Write a book about it! Chris Hertel already did. This is the bit about oplocks: http://ubiqx.org/cifs/SMB.html#SMB.10.1 The index has

Re: [sqlite] multiuser DB on network share

2007-01-11 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John Stanton wrote: > An elegant explanation. Write a book about it! Chris Hertel already did. This is the bit about oplocks: http://ubiqx.org/cifs/SMB.html#SMB.10.1 The index has pointers to a few other places where oplocks are discussed.

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread ohadp
i'm linking with it and calling the api directly. i think that sqlite3.exe doesn't have fts1 support in it. John Stanton wrote: > > How are you calling Sqlite? Have you tried sqlite3.exe? > > ohadp wrote: >> Scott Hess <[EMAIL PROTECTED]> writes: >> >> >> >>> CREATE VIRTUAL TABLE t USING

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread Scott Hess
On 1/11/07, ohadp <[EMAIL PROTECTED]> wrote: Scott Hess <[EMAIL PROTECTED]> writes: > CREATE VIRTUAL TABLE t USING fts1(content); > INSERT INTO t (rowid, content) VALUES (1, 'this is a test'); > UPDATE t SET content = 'that was a test' WHERE rowid = 1; > > -- The following is returning

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread John Stanton
How are you calling Sqlite? Have you tried sqlite3.exe? ohadp wrote: Scott Hess <[EMAIL PROTECTED]> writes: CREATE VIRTUAL TABLE t USING fts1(content); INSERT INTO t (rowid, content) VALUES (1, 'this is a test'); UPDATE t SET content = 'that was a test' WHERE rowid = 1; -- The

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread John Stanton
You would be doing radix conversions all the time because you would be mapping the full set of types available in your C (or whatever) program in the limited set of types in Sqlite. Add to that the "manifest typing" where the actual type can differ from the declared type. A compiler has to

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread ohadp
Scott Hess <[EMAIL PROTECTED]> writes: > > CREATE VIRTUAL TABLE t USING fts1(content); > INSERT INTO t (rowid, content) VALUES (1, 'this is a test'); > UPDATE t SET content = 'that was a test' WHERE rowid = 1; > > -- The following is returning 'gibberish here' for me: > SELECT content

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread John Stanton
How about when you have a twos complement integer in your program and Sqlite decides to return a character string? Ken wrote: From the standpoint of data insertions you wouldn't reall need to deal with datatype correctness since sqlite is typeless. John Stanton <[EMAIL PROTECTED]> wrote:

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread Ken
>From the standpoint of data insertions you wouldn't reall need to deal with >datatype correctness since sqlite is typeless. John Stanton <[EMAIL PROTECTED]> wrote: Why would it be a benefit? You would have to be doing type conversions all the time. Ken wrote: > I think the fact that

[sqlite] How to get the information if threadsafe ...

2007-01-11 Thread Marten Feldtmann
Is it possible to get the information, if a SQLite library one uses is threadsafe compiled or not ? Marten - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread John Stanton
Why would it be a benefit? You would have to be doing type conversions all the time. Ken wrote: I think the fact that sqlite is typeless actually is a benefit. I see what you mean now about connecting to obtain the meta info. Maybe that could be embedded in the code as well for the

RE: [sqlite] Sqlite Preprocessor

2007-01-11 Thread Fred Williams
Or my contempt of code generators in general :-) Fred > -Original Message- > From: Ken [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 11, 2007 12:46 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Sqlite Preprocessor > > > I think the fact that sqlite is typeless actually

[sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread Ohad Eder-Pressman
inserts work once i update my fts1 table and then select data from it, i get gibberish. anybody seen something like this ?

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread Ken
I think the fact that sqlite is typeless actually is a benefit. I see what you mean now about connecting to obtain the meta info. Maybe that could be embedded in the code as well for the pre-processor. Thanks for your input. Joe Wilson <[EMAIL PROTECTED]> wrote: ...and I was trying to

[sqlite] Pager modification question

2007-01-11 Thread Ken
Would it be possible to implement a Page level locking system using sqlite? I seem to recall a commercial product Ingress that utilized a page level locking scheme that would escalte to a table level lock when over a certain % of a tables pages were locked. This obviously would be very

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread Ken
Yes, but probably simpler and more in the tradition of sqlite. Make it simple and easy to use. John Stanton <[EMAIL PROTECTED]> wrote: Are you proposing an implementation of the existing Embedded SQL standard? Ken wrote: > Yes, a pre processor, but not a wrapper. A wrapper as I've seen from

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread John Stanton
It was one of the poorly thought through concepts which slipped into the ash can of history without mourners. To be reliable such a tool needs to be integrated into the development system so that a change in schema forces a remake of all affected applications. With discipline and the

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread Ken
Joe, yes thats what I'm thinking.. The thing is the amount of code that can be reduced via the preprocessor is enormous. Plus the fact that one could also preprocess into the resulting C code all sorts of wonderful error handling in a very succinct language construct. I hapen to perfer

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread Joe Wilson
> Yes, a pre processor, but not a wrapper. A wrapper as I've seen from the > sqlite.org site is > simply a layer on top of the sqlite3 api. I've written my own wrapper. I'm > really looking to > see if instead of inserting an additional layer, the actual code could be > compiled inline into >

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread John Stanton
Are you proposing an implementation of the existing Embedded SQL standard? Ken wrote: Yes, a pre processor, but not a wrapper. A wrapper as I've seen from the sqlite.org site is simply a layer on top of the sqlite3 api. I've written my own wrapper. I'm really looking to see if instead of

Re: [sqlite] multiuser DB on network share

2007-01-11 Thread John Stanton
The daemon would behave just like a well trained Sqlite application on the host. Local ODBC clients could access it through localhost and remote ones through a well known port. It would have some security on the remote connections. Existing Sqlite applications would operate transparently by

Re: [sqlite] ANN: SQLite ODBC driver 0.71

2007-01-11 Thread Joe Wilson
--- Christian Werner <[EMAIL PROTECTED]> wrote: > Joe Wilson wrote: > > > > Hi Christian, > > > > Does your ODBC driver allow for SQLite loadable modules out of the box? > > If so, how do you specify the names of the module DLLs? > > No, the extension loading is not supported yet, although

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread Ken
Yes, a pre processor, but not a wrapper. A wrapper as I've seen from the sqlite.org site is simply a layer on top of the sqlite3 api. I've written my own wrapper. I'm really looking to see if instead of inserting an additional layer, the actual code could be compiled inline into the sourcing

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread John Stanton
My understanding is that he is advocating a compiler which would take his definition of an Sqlite operation and generate correct Sqlite3 API calls. An existing wrapper could well satisfy his requirement. Joe Wilson wrote: I not sure what you mean by preprocessor, but if you mean a "stored

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread Joe Wilson
I not sure what you mean by preprocessor, but if you mean a "stored procedure language", sqlite does not support an official one within the database itself. There are, however, dozens of bindings to computer languages in addition to the Tcl wrapper that ships with sqlite:

[sqlite] Sqlite Preprocessor

2007-01-11 Thread Ken
Does a preprocessor exist for sqlite and if so where ? If not that might be a really nice project to be able to support syntax as follows: SQLITE_EXEC at :loginhndllogin "dbname.db"; SQLITE_EXEC at :loginhndl declar cursor c1; SQLITE_EXEC at :loginhndl prepare cursor c1 using

Re: [sqlite] multiuser DB on network share

2007-01-11 Thread John Stanton
An Sqlite redirector which runs as a daemon on the machine hosting the DB and has an API which provides the Sqlite API calls for remote clients would solve these networking problems and maintain application code compatibility. The sqlite3_open call would detect that the DB was remote and the

Re: [sqlite] multiuser DB on network share

2007-01-11 Thread John Stanton
An elegant explanation. Write a book about it! Roger Binns wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jay Sprenkle wrote: This sounds exactly like what causes the trashed shared MS Access databases I've seen and network locking issues I see warnings about here. No it isn't.

Re: [sqlite] ANN: SQLite ODBC driver 0.71

2007-01-11 Thread Joe Wilson
Hi Christian, Does your ODBC driver allow for SQLite loadable modules out of the box? If so, how do you specify the names of the module DLLs? thanks. --- Christian Werner <[EMAIL PROTECTED]> wrote: > Howdy! > > Release 0.71 of the SQLite ODBC driver is ready for download from > >

[sqlite] ANN: SQLite ODBC driver 0.71

2007-01-11 Thread Christian Werner
Howdy! Release 0.71 of the SQLite ODBC driver is ready for download from http://www.ch-werner.de/sqliteodbc (Main page) http://www.ch-werner.de/sqliteodbc/sqliteodbc.exe (Win32 Installer) http://www.ch-werner.de/sqliteodbc/sqliteodbc-0.71.tar.gz (Sources) The most important changes are: -