Assume I have a table
Create table T1 (id INTEGER PRIMARY KEY not null, puid UNIQUE
INTEGER not null, format INTEGER not null);
Now some values given below
Id puidformat
1 8000123
2 9000169
3 8001178
4 8002165
5 9001180
6
Convert your sql to sql Statements.
run sqliteanalz and see which all columns are to be indexed.
regards
ragha
**
This email and its attachments contain confidential information from HUAWEI,
which is intende
On Thu, 2007-08-30 at 19:13 -0700, Joe Wilson wrote:
> > > > latest CVS:
> > > >
> > > > #if SQLITE_THREADSAFE
> > > > # include
> > > > # define SQLITE_UNIX_THREADS 1
> > > > #endif
> > > >
> > >
> > > I don't know where you are seeing this. The latest is
> > >
> > >
> > > http://www.sql
Hi,
I am using SQLite 3_3_17with the default configuration of SQLite.
Using Windows XP C++ API.
50,000 inserts into Table (with primary key and no other index as single
transaction commit) is taking 4.609000 sec.
50,000 selects from Table ( having 1,00,000 rec with primary key and no
other index)
On Fri, 2007-08-31 at 00:09 +0200, Yves Goergen wrote:
> On 30.08.2007 22:55 CE(S)T, Ken wrote:
> > BEGIN TRANSACTION;
> > CREATE TEMPORARY TABLE attached_db.temp_table (...);
> > INSERT INTO attached_db.temp_table SELECT * FROM attached_db.table1;
> >
> > /* Add a comit */
> > COMMIT;
>
> Erro
using UODATE command its working.
thanks for the help
regards
Nishit
On 8/30/07, Jim Dodgen <[EMAIL PROTECTED]> wrote:
>
> Also I recommend you get a very basic SQL database book.
>
>
> Quoting John Stanton <[EMAIL PROTECTED]>:
>
> > nishit sharma wrote:
> > > i have given some text in a databas
> > > latest CVS:
> > >
> > > #if SQLITE_THREADSAFE
> > > # include
> > > # define SQLITE_UNIX_THREADS 1
> > > #endif
> > >
> >
> > I don't know where you are seeing this. The latest is
> >
> >
> > http://www.sqlite.org/cvstrac/filediff?f=sqlite/src/sqliteInt.h&v1=1.592&v2=1.593
>
> Look
Hi,
Do we have tool(similar to Sqlite3) by which Prepare statement can be tested as
easily as normal sql ?
As most of the time we have use Prepare statement hence we need a RAD tool
to verify it.This will be useful to the Sqlite grp.Share your opinion.
Or if any have an idea how to do it,let me
>
> What you described about the locking is correct. The threading isn't
> strictly relevant; locking is done on a per-connection basis, not
> per-thread.
>
Yes, I think this was what was missed in our application's original
implementation; it was not fully appreciated that locking was
per-connec
Did you closed the cursor opened at 'select *...' ?
Thats probably the reason you have getting a 'table is locked' error.
-Original Message-
From: RaghavendraK 70574 [mailto:[EMAIL PROTECTED]
Sent: quinta-feira, 30 de agosto de 2007 19:24
To: sqlite-users@sqlite.org
Subject: Re: [sqlite]
Pls see if u hv an open sqlite3 terminal.sometimes this can also cause a prob
with begin tx and just kept it open.
regrads
ragha
**
This email and its attachments contain confidential information from HUAWE
On 30.08.2007 23:00 CE(S)T, [EMAIL PROTECTED] wrote:
> Probably another thread or process is reading from the database
> and does not want you to drop the table out from under it.
Surely not. This database is there for testing and development purposes
only and my application is the only one that o
On 30.08.2007 22:55 CE(S)T, Ken wrote:
> BEGIN TRANSACTION;
> CREATE TEMPORARY TABLE attached_db.temp_table (...);
> INSERT INTO attached_db.temp_table SELECT * FROM attached_db.table1;
>
> /* Add a comit */
> COMMIT;
Error: cannot commit transaction - SQL statements in progress
> DROP TABLE a
Yves Goergen <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to modify the structure of a table, particularly remove a column.
> Since SQLite won't help me with that, I'll need to go the hard way by
> copying all data to a temp table, then re-creating the table with the
> new structure and copying all
BEGIN TRANSACTION;
CREATE TEMPORARY TABLE attached_db.temp_table (...);
INSERT INTO attached_db.temp_table SELECT * FROM attached_db.table1;
/* Add a comit */
COMMIT;
DROP TABLE attached_db.table1; -- Error: Table is locked
Yves Goergen <[EMAIL PROTECTED]> wrote: Hi,
I want to modify the st
Hi,
I want to modify the structure of a table, particularly remove a column.
Since SQLite won't help me with that, I'll need to go the hard way by
copying all data to a temp table, then re-creating the table with the
new structure and copying all remaining data back.
This works fine with a table
Set up CFLAGS and rebuilt sqlite library.
gcc -DSQLITE_THREADSAFE=1 -I. -I../src -DSQLITE_DEBUG=1 -DTHREADSAFE=1
-DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -c
../src/vdbeblob.c -o vdbeblob.o >/dev/null 2>&1
Ran again and got:
sqlitetest_thrd35: ../src/btree.c:2494: sqlite3B
--- [EMAIL PROTECTED] wrote:
> This problem will likely come up again. To try and work
> around it, I have added a new (experimental) API to the
> latest version in CVS. Call
>
> sqlite3_threadsafe()
>
> To get back a boolean to indicate whether or not your
> build is threadsafe.
Could you
--- [EMAIL PROTECTED] wrote:
> Ken <[EMAIL PROTECTED]> wrote:
> > Recompiled with:
> > gcc -DSQLITE_THREADSAFE -I. -I../src
> ^^^
>
> Should be -DSQLITE_THREADSAFE=1
>
> The =1 is important in this case.
-DSQLITE_THREADSAFE is equivalent to -DSQLITE_THREADSAFE=1
$ cat t
[EMAIL PROTECTED] wrote:
> Ken <[EMAIL PROTECTED]> wrote:
> > Recompiled with:
> > gcc -DSQLITE_THREADSAFE -I. -I../src
> ^^^
>
> Should be -DSQLITE_THREADSAFE=1
>
> The =1 is important in this case.
>
This problem will likely come up again. To try and work
around it,
Ken <[EMAIL PROTECTED]> wrote:
> Recompiled with:
> gcc -DSQLITE_THREADSAFE -I. -I../src
^^^
Should be -DSQLITE_THREADSAFE=1
The =1 is important in this case.
--
D. Richard Hipp <[EMAIL PROTECTED]>
---
And the sqliteInt.h file is id as:
** @(#) $Id: sqliteInt.h,v 1.605 2007/08/29 12:31:28 danielk1977 Exp $
Let me know if you need anything else..
Thanks,
Ken
[EMAIL PROTECTED] wrote: Joe Wilson wrote:
>
> latest CVS:
>
> #if SQLITE_THREADSAFE
> # include
> # define SQLITE_UNIX_THREADS 1
>
Recompiled with:
gcc -DSQLITE_THREADSAFE -I. -I../src -DSQLITE_DEBUG=1 -DTHREADSAFE=1
-DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1
-DHAVE_READLINE=1
Ran code (hardware is a dual core x86_64 amd cpu).
sqlitetest_thrd35: ../src/btree.c:1816: sqlite3BtreeBeginTrans: Assertio
** $Id: btree.c,v 1.420 2007/08/30 01:19:59 drh Exp $
Compilation:
../configure --enable-threadsafe --disable-tcl --enable-tempstore
make
gcc -g -O2 -I. -I../src -DNDEBUG -DTHREADSAFE=1
-DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -c
../src/alter.c -o alter.o >/dev/null 2
On Thu, 30 Aug 2007 13:06:38 +0100, "Simon Davies" <[EMAIL PROTECTED]> wrote:
> On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
>> Simon,
>>Yeah you can term the problem like that. Can't I use the
>> function which is assigning a unique id for INTEGER PRIMARY KEY column
--- [EMAIL PROTECTED] wrote:
> Amazingly enough, the test program works OK most of
> the time even with mutexes all disabled. But every
> now and then I get the segfault.
>
> It's a weak thread-test that works OK must of the
> time with mutexes disabled. :-) Or perhaps it is
> a very robust d
--- [EMAIL PROTECTED] wrote:
> Joe Wilson <[EMAIL PROTECTED]> wrote:
> >
> > latest CVS:
> >
> > #if SQLITE_THREADSAFE
> > # include
> > # define SQLITE_UNIX_THREADS 1
> > #endif
> >
>
> I don't know where you are seeing this. The latest is
>
>
> http://www.sqlite.org/cvstrac/filediff?f=
Joe Wilson <[EMAIL PROTECTED]> wrote:
>
> latest CVS:
>
> #if SQLITE_THREADSAFE
> # include
> # define SQLITE_UNIX_THREADS 1
> #endif
>
I don't know where you are seeing this. The latest is
http://www.sqlite.org/cvstrac/filediff?f=sqlite/src/sqliteInt.h&v1=1.592&v2=1.593
--
D. Richard H
--- Joe Wilson <[EMAIL PROTECTED]> wrote:
> I thought there was a checkin a few months ago that made sqlite3
> threadsafe by default.
>
> os_unix.c
> revision 1.128
> date: 2007/04/01 18:46:19; author: drh; state: Exp; lines: +4 -1
> Make unix builds threadsafe by default.
>
> I guess
--- Dan Kennedy <[EMAIL PROTECTED]> wrote:
> On Thu, 2007-08-30 at 10:13 -0700, Joe Wilson wrote:
> > Compiled without -DSQLITE_DEBUG=1 which presumably changes the timing.
> >
> > cvs up -A
> > make distclean
> > # thrd35.c = http://marc.info/?l=sqlite-users&m=118848741522192&w=2
> > cp thrd35.c
Joe Wilson <[EMAIL PROTECTED]> wrote:
> Compiled without -DSQLITE_DEBUG=1 which presumably changes the timing.
>
> cvs up -A
> make distclean
> # thrd35.c = http://marc.info/?l=sqlite-users&m=118848741522192&w=2
> cp thrd35.c src/shell.c
> ../configure --disable-shared && make LIBPTHREAD=-lpthread
ext/fts3.c in the current code fixes the fts2-vs-vacuum problem by
adding "docid INTEGER PRIMARY KEY" to the %_content table. This
becomes an alias for rowid, and thus causes vacuum to not renumber
rowids. It is safe to add that column because the other columns in
%_content are constructed such t
Joe Wilson <[EMAIL PROTECTED]> wrote:
> Is it feasible to change testfixture in such a way to run the same tests
> in N seperate threads at the same time? This could potentially expose
> a lot of thread-related bugs.
No, this is not really feasible.
>
> Among other things, you'd have to change s
On Thu, 2007-08-30 at 10:13 -0700, Joe Wilson wrote:
> Compiled without -DSQLITE_DEBUG=1 which presumably changes the timing.
>
> cvs up -A
> make distclean
> # thrd35.c = http://marc.info/?l=sqlite-users&m=118848741522192&w=2
> cp thrd35.c src/shell.c
> ./configure --disable-shared && make LIBPTH
Upon further thought, such a scheme would not exercise concurrent access
to the same database files, so it would not exercise the shared cache code.
--- Joe Wilson <[EMAIL PROTECTED]> wrote:
> Is it feasible to change testfixture in such a way to run the same tests
> in N seperate threads at the s
Is it feasible to change testfixture in such a way to run the same tests
in N seperate threads at the same time? This could potentially expose
a lot of thread-related bugs.
Among other things, you'd have to change some low level sqlite open()
calls to use a different directory for databases for e
Compiled without -DSQLITE_DEBUG=1 which presumably changes the timing.
cvs up -A
make distclean
# thrd35.c = http://marc.info/?l=sqlite-users&m=118848741522192&w=2
cp thrd35.c src/shell.c
./configure --disable-shared && make LIBPTHREAD=-lpthread sqlite3
./sqlite3
valgrind -v ./sqlite3 2>&1 | tee v
Joe Wilson <[EMAIL PROTECTED]> wrote:
> I also see random crashes with sources from CVS as of
> Thu Aug 30 12:20:43 EDT 2007 using Ken's program below.
>
> http://marc.info/?l=sqlite-users&m=118848741522192&w=2
>
> It's timing dependent.
> On a single core Pentium4 machine it crashes once in 1
Another unique valgrind stack trace.
http://marc.info/?l=sqlite-users&m=118848741522192&w=2
==14918== Thread 2:
==14918== Invalid read of size 4
==14918==at 0x80534F9: sqlite3OsWrite (os.c:38)
==14918==by 0x8056C06: syncJournal (pager.c:2765)
==14918==by 0x80581A8: sqlite3PagerCommitP
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 30, 2007 6:11 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] _sqlite3StrCmp not found
>
> Bharath Booshan L <[EMAIL PROTECTED]> wrote:
> > Hello All,
> >
> > I am using sqlite 3.1.3
Also:
==14673== Invalid read of size 4
==14673==at 0x80534F9: sqlite3OsWrite (os.c:38)
==14673==by 0x8050A17: sqlite3BtreeBeginTrans (btree.c:1850)
==14673==by 0x807E068: sqlite3VdbeExec (vdbe.c:2519)
==14673==by 0x805C209: sqlite3_step (vdbeapi.c:328)
==14673==by 0x8060951: sq
I also see random crashes with sources from CVS as of
Thu Aug 30 12:20:43 EDT 2007 using Ken's program below.
http://marc.info/?l=sqlite-users&m=118848741522192&w=2
It's timing dependent.
On a single core Pentium4 machine it crashes once in 10 runs.
Sometimes it produces this valgrind error:
Thanks.
I can't yet get this to crash here on Linux.
Did you compile with the new threadsafe symbol, SQLITE_THREADSAFE?
(the old one was just plain old THREADSAFE).
Dan.
On Thu, 2007-08-30 at 08:17 -0700, Ken wrote:
> Dan Source code is attached. I didn't write this, someone else from
> the f
This is not available as publicly distributed, but there is some code in
http://www.viacognis.com/declib which you are free to use.
RohitPatel wrote:
Hi John
If sourcecode for that type (DECIMAL) is available for public, please let us
know the link and we can explore it for SQLite.
Thanks
Also I recommend you get a very basic SQL database book.
Quoting John Stanton <[EMAIL PROTECTED]>:
> nishit sharma wrote:
> > i have given some text in a database file as
> > America|england| and many more.
> > now i want to replace some text with new text how
> > this is possible. Also my dat
Ken <[EMAIL PROTECTED]> wrote:
> program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1080043872 (LWP 15448)]
> moveToChild (pCur=0x569058, newPgno=) at btree.c:3304
> (gdb)
>
>
> if( rc ) return rc;
> pNewPage->idxParent = pCur->idx;
> pOldPage = pCur->pPage;
> pOld
I just need the answer for my original question.
Regards,
Phanisekhar
Maybe you "need" an answer, but others do not "need" to give it to you.
If you want others to do your thinking and reading for you, don't
demand, ask politely.
nishit sharma wrote:
i have given some text in a database file as
America|england| and many more.
now i want to replace some text with new text how
this is possible. Also my database has around 15 rows now
which will be incremented.
so, plz anyone tell me how to replace a text in a row and
how
http://www.sqlite.org/lockingv3.html
where A3 means the processes 3rd connection.
A1 - Shared (select)
B2 - Pending (insert)
A3 - Shared (select)
Looks like a deadlock at A3. B2 has a pending Lock and can not make further
progress until A1 completes. But A3 is now waiting on B2.
Eith
Why do you have a unique primary key as an integer to hold your other
unique integer? Why not just use the unique integer as a primary key?
If you want to have a limit on the maximum unique ID you can store your
next to allocate and next to replace keys in another table.
B V, Phanisekhar wro
On 8/29/07, Ben Mann <[EMAIL PROTECTED]> wrote:
> The problem is that connection A is calling a function which is attempting
> to open a new SHARED connection. Since it can't (B's PENDING prevents this,
> because of A's earlier SHARED connection), A blocks.
>
> If instead, A does not open a new c
Dan Source code is attached. I didn't write this, someone else from the forum
did their name is not on it, nor coppyrighted.. I thought it was a clean way to
test threading.
Interestingly if you remove out the shared cache everything runs to completion.
Dan Kennedy <[EMAIL PROTECTED]> wrote:
Bharath Booshan L <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> I am using sqlite 3.1.3 version which is provided in Mac OS 10.4 OS for my
> application. We are upgrading our application to support Leapord. Leapord
> includes sqlite 3.4.0 version and while loading dynamic library
> "libsqlite3.dyli
Hi Phani,
On Thu, 30 Aug 2007 16:51:27 +0530, you wrote:
>Simon,
> Yeah you can term the problem like that. Can't I use the
>function which is assigning a unique id for INTEGER PRIMARY KEY column
>inside sql? If yes, how to use it?
>
>Regards,
>Phani
SQLite will do the job for you, it's a
Hi,
Yes, The server and clients are in Network.
Best Regards,
Sreedhar.
-Original Message-
From: John Stanton [mailto:[EMAIL PROTECTED]
Sent: Friday, August 24, 2007 6:17 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Client/Server approach
You do not need a server to manage 5 cl
On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
> Simon,
>Yeah you can term the problem like that. Can't I use the
> function which is assigning a unique id for INTEGER PRIMARY KEY column
> inside sql? If yes, how to use it?
>
> Regards,
> Phani
>
Phani,
With the whole of the s
Update can be used to replace a text with some new text.
To delete a particular row use 'where' command along with
'delete'.
-Original Message-
From: nishit sharma [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 30, 2007 4:04 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] command
i h
Simon,
Yeah you can term the problem like that. Can't I use the
function which is assigning a unique id for INTEGER PRIMARY KEY column
inside sql? If yes, how to use it?
Regards,
Phani
-Original Message-
From: Simon Davies [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 30, 20
On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
> Simon,
>
> > Without knowing your design, it looks like you wish to be able to
> > determine type from the id. This is creating a problem. Can you not
> > store the type separately from the id?
>
> Why is this creating a problem?
> No it'
Simon,
> Without knowing your design, it looks like you wish to be able to
> determine type from the id. This is creating a problem. Can you not
> store the type separately from the id?
Why is this creating a problem?
No it's not possible to store the type separately.
I just need the answer for
On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
> Hi Simon,
>The problem is I have rowid which is the PRIMARY Key, and
> another column puid which should be unique. Now when I do vacuum rowid
> changes, but puid doesn't change and I don't want puid to change. Now it
> is possible
i have given some text in a database file as
America|england| and many more.
now i want to replace some text with new text how
this is possible. Also my database has around 15 rows now
which will be incremented.
so, plz anyone tell me how to replace a text in a row and
how to delete a particular
Hi Simon,
The problem is I have rowid which is the PRIMARY Key, and
another column puid which should be unique. Now when I do vacuum rowid
changes, but puid doesn't change and I don't want puid to change. Now it
is possible to make puid itself as PRIMARY KEY, but the problem is I
assign the
Hi Phani,
What is the point of generating a unique integer separate from the
(unique) integer primary key?
If you use the primary key as your unique identifier, sqlite will take
care of locating unused (deleted) ids when the maximum value is
reached (according to the documentation; I have not tri
Sreedhar,
I think u didn't read my mail properly. I want to generate unique id for
puid not for id (which is the PRIMARY KEY). Anyone knows how to generate
a undique ID for a column which is not PRIMARY KEY? Also, whenever I
reach the limit (max value), I should be able to use the values of
delete
Klemens Friedl wrote:
2007/8/29, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
I think you will be much much better off to put every
thread it is own private address space. In other words,
turn each thread into a separate process. Threads are
an invention of the devil. Stay as far away from these
Phani,
Read the "auto increment" in Sqlite FAQ s it is the first one in the list,
it will solve your problem.
Best Regards,
A.Sreedhar.
-Original Message-
From: B V, Phanisekhar [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 30, 2007 2:11 PM
To: sqlite-users@sqlite.org
Subject: [sql
Assume I have a table:
Create table YYY (id Interger PRIMARY KEY, puid Unique integer)
Id is the primary key.
Puid is an unsque interger, whose values needs to be assigned by the
user.
Currently my approach is get the maximum value of puid stored in the
table; add 1 to it and uses this value
2007/8/29, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> I think you will be much much better off to put every
> thread it is own private address space. In other words,
> turn each thread into a separate process. Threads are
> an invention of the devil. Stay as far away from these
> fiendish abominat
Hi John
If sourcecode for that type (DECIMAL) is available for public, please let us
know the link and we can explore it for SQLite.
Thanks
John Stanton wrote:
>
> That is an interesting way to store money. We developed a fixed point
> arithmetic library of arbitrary precision using the alg
Hello All,
I am using sqlite 3.1.3 version which is provided in Mac OS 10.4 OS for my
application. We are upgrading our application to support Leapord. Leapord
includes sqlite 3.4.0 version and while loading dynamic library
"libsqlite3.dylib" it returns me following error
Symbol not found : _sql
71 matches
Mail list logo