Re: [sqlite] Implicit indices on TEMP tables

2009-04-13 Thread Alex Ousherovitch
Igor, yes, deletes do occur on , but before every insert on I delete all records from mods_log_ and nevertheless get duplicates. I would expect the implicit index on modrowid to be refreshed too, when mods_log_ gets emptied. Thank you, Alex - Date: Tue, 14

Re: [sqlite] Problem with ordering

2009-04-13 Thread Lukáš Petrovický
2009/4/14 John Machin : >> As you can see, it takes ages and it shouldn't. > > I can't see ... why are you measuring CPU time instead of elapsed time? > what is the unit of measure? nanoseconds or centuries? Oh, my apologies. The actual measuring happens in the code that

Re: [sqlite] Implicit indices on TEMP tables

2009-04-13 Thread Igor Tandetnik
"Alex Ousherovitch" wrote in message news:5ee1928d06817b4788b64caf1a8517b00332a...@sfo-ex-01.ad.opentv.local > I am creating a set of the following TEMP tables > >CREATE TEMP TABLE IF NOT EXISTS mods_log_ (modrowid > INTEGER NOT NULL PRIMARY KEY) > > for every

Re: [sqlite] PRAGMA read_uncommitted = 1

2009-04-13 Thread Igor Tandetnik
"Joanne Pham" wrote in message news:432996.36668...@web90306.mail.mud.yahoo.com > I have set my database connection to "PRAGMA read_uncommitted = 1". > Is this allow the dirty read? http://sqlite.org/sharedcache.html Igor Tandetnik

Re: [sqlite] fail to drop table in transaction

2009-04-13 Thread John Machin
On 14/04/2009 12:21 PM, Wenton Thomas TOP-POSTED: > I have to drop the table,because I will use the same table name with > different table struct. Ever see those signs facing out from the end of a freeway exit: WRONG WAY! GO BACK! ? > > From: Kees Nuyt [snip]

Re: [sqlite] fail to drop table in transaction

2009-04-13 Thread Wenton Thomas
Well,It works in command tool. Maybe there exists some error in my code. I have to drop the table,because I will use the same table name with different table struct. Thanks for your help. From: Kees Nuyt To: sqlite-users@sqlite.org Sent:

[sqlite] PRAGMA read_uncommitted = 1

2009-04-13 Thread Joanne Pham
Hi All, I have set my database connection to "PRAGMA read_uncommitted = 1".Is this allow the dirty read? Thanks, JP ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Problem with ordering

2009-04-13 Thread John Machin
On 14/04/2009 6:29 AM, Lukáš Petrovický wrote: > Hello! > > I've been trying probably for ages to make the following work. I have > a table with following schema (most of the columns are irrelevant for > now): > > sqlite> .schema Event > CREATE TABLE Event (id integer, assignedCPUs varchar,

[sqlite] Implicit indices on TEMP tables

2009-04-13 Thread Alex Ousherovitch
Hello list, I am creating a set of the following TEMP tables CREATE TEMP TABLE IF NOT EXISTS mods_log_ (modrowid INTEGER NOT NULL PRIMARY KEY) for every connection on my database, using the same name. These TEMP tables AND their indices are supposed to be only visible within that same

[sqlite] Problem with ordering

2009-04-13 Thread Lukáš Petrovický
Hello! I've been trying probably for ages to make the following work. I have a table with following schema (most of the columns are irrelevant for now): sqlite> .schema Event CREATE TABLE Event (id integer, assignedCPUs varchar, bringsSchedule integer not null, clock integer, deadline integer,

Re: [sqlite] Storage of blobs: to encode or not to encode?

2009-04-13 Thread Igor Tandetnik
Julian Bui wrote: > One thing I don't understand is, you wrote: > > sqlite> CREATE TABLE foo (a INTEGER PRIMARY KEY, b NOTABLOB); >> > > I take it that "NOTABLOB" is any data type I want, since "NOTABLOB" > is not a > keyword/datatype. Doesn't that mean I will restrict

Re: [sqlite] Storage of blobs: to encode or not to encode?

2009-04-13 Thread P Kishor
On Mon, Apr 13, 2009 at 2:00 PM, Julian Bui wrote: > Thanks for your response Puneet. > > I was originally just converting my non-blobs (ints, text, reals) to byte > arrays since I need to do that in my program anyway. > > But now since you've mentioned it, I will look into

Re: [sqlite] PRAGMA doesn't support parameter binds?

2009-04-13 Thread Mark Spiegel
As an alternative, you can use the WinDgb tool from MSFT. It is not the nicest debugger in the world, but understands all the MSFT PDB formats. It is free for download from the MSDN site. While it is a bit slow with large source files like the SQLite amalgamation, it does handle them fine.

Re: [sqlite] Storage of blobs: to encode or not to encode?

2009-04-13 Thread Julian Bui
Thanks for your response Puneet. I was originally just converting my non-blobs (ints, text, reals) to byte arrays since I need to do that in my program anyway. But now since you've mentioned it, I will look into storing multiple types in the same column.. One thing I don't understand is, you

Re: [sqlite] Whoops! Huge misunderstanding of multi-threaded database

2009-04-13 Thread Igor Tandetnik
Vinnie wrote: > So I'm getting SQLITE_BUSY now. I have one thread inserting rows > while another thread tries to read a row from the same table. I had a > bad implementation where I was keeping the transaction open far > longer than necessary so I think I went over some 5

Re: [sqlite] "PRAGMA" Check constraints

2009-04-13 Thread jan
Thank you for the fast and clear answers! Cheers Jan D. Richard Hipp schrieb: > On Apr 13, 2009, at 2:19 PM, jan wrote: > >> Hi, >> >> is there a way to query the check constraints added to a column >> definition? >> > > No. > > Actually, SQLite does not support CHECK constraints assigned

Re: [sqlite] Storage of blobs: to encode or not to encode?

2009-04-13 Thread P Kishor
On Mon, Apr 13, 2009 at 1:43 PM, Julian Bui wrote: > Oops didn't read your other comment: > > >> Why?  SQLite is perfectly capable of storing multiple datatypes in a >> single column.  It sounds to me like you are making your problem much >> harder than it needs to be. > > >

[sqlite] Whoops! Huge misunderstanding of multi-threaded database

2009-04-13 Thread Vinnie
So I'm getting SQLITE_BUSY now. I have one thread inserting rows while another thread tries to read a row from the same table. I had a bad implementation where I was keeping the transaction open far longer than necessary so I think I went over some 5 second rule? Does SQLite wait up some

Re: [sqlite] Storage of blobs: to encode or not to encode?

2009-04-13 Thread Julian Bui
By encoding I mean using some function to transform my binary data in such a way that removes the terminators and single quote characters. However, from what you said, it sounds like I do not need to worry about encoding. I am using ...VALUES(?) in a prepared statement and I will be using

Re: [sqlite] "PRAGMA" Check constraints

2009-04-13 Thread D. Richard Hipp
On Apr 13, 2009, at 2:19 PM, jan wrote: > Hi, > > is there a way to query the check constraints added to a column > definition? > No. Actually, SQLite does not support CHECK constraints assigned to individual columns. Sure, you can include the CHECK constraint on an individual column

Re: [sqlite] "PRAGMA" Check constraints

2009-04-13 Thread Igor Tandetnik
jan wrote: > is there a way to query the check constraints added to a column > definition? Not really. The best you can do is select sql from sqlite_master where type='table' and name='your_table_name'; then parse raw SQL. Note that there may be table level check constraints

Re: [sqlite] Storage of blobs: to encode or not to encode?

2009-04-13 Thread D. Richard Hipp
On Apr 13, 2009, at 2:14 PM, Julian Bui wrote: > Hi all, > > I have a question about encoding blob bytes before inserting a > record into > SQLite. > > CONTEXT: > I have a base java (I'm using JDBC) class that has a many children. > Each > child may store a different data type (such as

[sqlite] "PRAGMA" Check constraints

2009-04-13 Thread jan
Hi, is there a way to query the check constraints added to a column definition? Thanks and bye Jan ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Storage of blobs: to encode or not to encode?

2009-04-13 Thread Julian Bui
Hi all, I have a question about encoding blob bytes before inserting a record into SQLite. CONTEXT: I have a base java (I'm using JDBC) class that has a many children. Each child may store a different data type (such as String, int, long, etc.) in its VALUE field. Since this value field could

Re: [sqlite] PRAGMA doesn't support parameter binds?

2009-04-13 Thread mw
How to debug the SQLite amalgation with Visual Studio 2008. To get the debugger going you need to strip out the comments and empty lines from the sqlite.c source file. This can be done easily with two regular expressions for search and replace: First replace (Ctrl+H) (/\*(\n|.)@\*/)|(//.*$)

Re: [sqlite] step() fails with SQLITE_BUSY after BEGIN EXCLUSIVETRANSACTION - SOLVED

2009-04-13 Thread mw
Hi, Marcus I'm absolutely sure that the problem is in my code and not a SQLite problem. SQLite works well in MT, if one respects the documented limits. I just have no handle currently to find the problem. As we all know, Multi-threading is tricky ;-) I will strip down my MT code until I get it

Re: [sqlite] step() fails with SQLITE_BUSY after BEGIN EXCLUSIVETRANSACTION

2009-04-13 Thread Marcus Grimm
Mario, I'm sorry but I'm running out of ideas... I can only repeat that sqlite works well with this kind of approach. I'm using it in a database server without a problem so far and there I use the exclusive mode to block the threads. However, when I started using sqlite for this I also run into

Re: [sqlite] SQLite version 3.6.13

2009-04-13 Thread Zaher Dirkey
Where can i found a WinCE/ARM precompiled for this version?, there is no official one. -- Zaher Dirkey ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] fail to drop table in transaction

2009-04-13 Thread Kees Nuyt
On Mon, 13 Apr 2009 02:35:46 -0700 (PDT), Wenton Thomas wrote: > I didn't test it from command tool yet. Well, that is the first thing to try. > I have a table (call it table A) to record other > table's information. When I delete a table, I also > delete all its

Re: [sqlite] PRAGMA doesn't support parameter binds?

2009-04-13 Thread Dan
On Apr 13, 2009, at 5:52 PM, Vinnie wrote: > > Sorry for only posting when I have a problem...but... > > I'm doing > > PRAGMA user_version=?; > > And getting result code SQLITE_ERROR (1) from sqlite3_prepare_v2(). > Of course I can't step into the sqlite3.c code because the Visual > Studio

[sqlite] PRAGMA doesn't support parameter binds?

2009-04-13 Thread Vinnie
Sorry for only posting when I have a problem...but... I'm doing PRAGMA user_version=?; And getting result code SQLITE_ERROR (1) from sqlite3_prepare_v2(). Of course I can't step into the sqlite3.c code because the Visual Studio 2008 debugger gets hopelessly confused when confronted with a

[sqlite] SQLite version 3.6.13

2009-04-13 Thread D. Richard Hipp
SQLite version 3.6.13 is now available on the SQLite website: http://www.sqlite.org/ Version 3.6.13 is a bug-fix release only. There are no new features or enhancements. Upgrading is optional. D. Richard Hipp d...@hwaci.com ___

Re: [sqlite] fail to drop table in transaction

2009-04-13 Thread Wenton Thomas
I didn't test it from command tool yet. I have a table (call it table A) to record other table's information. When I delete a table, I also delete all its information recorded in table A. I wonder whether it is legal to drop a table and delete another table's records in one transaction.

Re: [sqlite] fail to drop table in transaction

2009-04-13 Thread Kees Nuyt
On Sun, 12 Apr 2009 20:46:40 -0700 (PDT), Wenton Thomas wrote: >I created two tables A and B. >There exists a record which contains B's information. > >Now I need to drop table B and delete all its information in table A. >The two actions were wrapped in a