Hello,
I'm testing the fts extensions and experiencing a 'database disk image
is malformed' problem that I can reproduce the following way:
- Create a database
- Open the database to insert/update rows. 'match' queries work at this point
- Close the database
- Open the database. 'match' queries
On 10 Feb 2012 at 07:55, bhaskarReddy uni...@gmail.com wrote:
PRAGMA table_info(yourtablename); will display colNumber, colName, colType,
ex: 0|slotId|INTEGER|0||0
1|ponChannelId|INTEGER|0||0
2|onuType|INTEGER|0||0
3|onuSerialNumber|TEXT|0||0
4|onuId|INTEGER|0||0
On Fri, Feb 10, 2012 at 5:20 AM, Julien LF lefoll.jul...@gmail.com wrote:
Hello,
I'm testing the fts extensions and experiencing a 'database disk image
is malformed' problem that I can reproduce the following way:
- Create a database
- Open the database to insert/update rows. 'match'
Did you try surrounding them strings with single quotes, instead ?
I got the same problem using single quotes.
However the machine I was performing those tests on is a vmware virtual machine.
Performing the same steps on physical hardware (identical os sqlite
version) worked fine, so I guess
Hi,
working with sqlite and mysql, noticed that they're different in regard of
mixed types.
Select '24' 25
Select 24 25
have the same results in MySql and different sqlite.
Actually it's no news (my sqlite queries contained CAST(.. as INT) ), but I
decided to look at the docs and noticed
On 10 Feb 2012, at 11:01am, Julien LF wrote:
Did you try surrounding them strings with single quotes, instead ?
I got the same problem using single quotes.
However the machine I was performing those tests on is a vmware virtual
machine.
Performing the same steps on physical hardware
I have a 'database is locked' issued which can be reproduced as follows.
I have two applications opening the database in WAL mode. The threading
mode is SERIALIZED. Environment is PC/Linux.
Step1: Launch App1 followed by App 2 ( same executables)
Step 2: App1 Prepares a SELECT statement and
I've rethought the interpolation strategy. It's not important to be
able to look up any timestamp, just the timestamps that actually have
values in at least one table. Let's say I have N tables, each with a
timestamp as primary key. For instance:
tab1:
timestamp|value1|value2
1328873000|1|2
On Fri, Feb 10, 2012 at 6:47 AM, Sreekumar TP sreekumar...@gmail.comwrote:
I have a 'database is locked' issued which can be reproduced as follows.
I have two applications opening the database in WAL mode. The threading
mode is SERIALIZED. Environment is PC/Linux.
Step1: Launch App1
On Fri, Feb 10, 2012 at 6:11 AM, Max Vlasov max.vla...@gmail.com wrote:
Hi,
working with sqlite and mysql, noticed that they're different in regard of
mixed types.
Select '24' 25
Select 24 25
have the same results in MySql and different sqlite.
Actually it's no news (my sqlite queries
How is this different from two threads each with a db connection in a
single process?
Moreover the journal mode is WAL. Hence the writer should be able to append
changes to the WAL file as there are no other write transaction.
Sreekumar
On Feb 10, 2012 6:22 PM, Richard Hipp d...@sqlite.org
Steinar Midtskogen stei...@latinitas.org wrote:
Let's say I have N tables, each with a
timestamp as primary key. For instance:
tab1:
timestamp|value1|value2
1328873000|1|2
1328873100|3|4
1328873200|5|6
tab2:
timestamp|value3
1328873050|7
1328873150|8
1328873250|9
tab3:
On 10 Feb 2012, at 11:47am, Sreekumar TP wrote:
I have a 'database is locked' issued which can be reproduced as follows.
I have two applications opening the database in WAL mode. The threading
mode is SERIALIZED. Environment is PC/Linux.
Step1: Launch App1 followed by App 2 ( same
On Fri, Feb 10, 2012 at 4:53 PM, Richard Hipp d...@sqlite.org wrote:
On Fri, Feb 10, 2012 at 6:11 AM, Max Vlasov max.vla...@gmail.com wrote:
Hi,
working with sqlite and mysql, noticed that they're different in regard
of
mixed types.
Select '24' 25
Select 24 25
have the same
Hi Simon,
well, the 'wait' is a simulation of what happens in the real code.
The error is fatal to the application as it never ever recovers from it
even though the writer has finalized and terminated.
Sreekumar
On Feb 10, 2012 6:57 PM, Simon Slavin slav...@bigfraud.org wrote:
On 10 Feb
[Igor Tandetnik]
timestamp|value1|value2|value3|value4|value5|value6
1328873000|1|2| | | |
1328873050| | |7| | |
1328873075| | | |10|13|16
1328873100|3|4| | | |
1328873150| | |8| | |
1328873175| | | |11|14|17
1328873200|5|6| | | |
1328873250| | |9| | |
1328873275| | |
On 10 Feb 2012, at 1:32pm, Sreekumar TP wrote:
well, the 'wait' is a simulation of what happens in the real code.
The error is fatal to the application as it never ever recovers from it
even though the writer has finalized and terminated.
In a multi-process environment I recommend that you
Max Vlasov max.vla...@gmail.com wrote:
On Fri, Feb 10, 2012 at 4:53 PM, Richard Hipp d...@sqlite.org wrote:
In the statement:
SELECT '25' 25;
There are no columns, only literals. And hence no affinity is applied.
So if a string looks like a numeral it should be treated as numeral
In the real code, there is no sleep/wait or pause. It so happens that the
write of the app2 is scheduled in between.
What you are suggesting is that at any point of time only one process can
have a transaction open in a database?
Sreekumar
On Feb 10, 2012 7:12 PM, Simon Slavin
Steinar Midtskogen stei...@latinitas.org wrote:
[Igor Tandetnik]
timestamp|value1|value2|value3|value4|value5|value6
1328873000|1|2| | | |
1328873050| | |7| | |
1328873075| | | |10|13|16
1328873100|3|4| | | |
1328873150| | |8| | |
1328873175| | | |11|14|17
1328873200|5|6| | |
On 10 Feb 2012, at 1:52pm, Sreekumar TP wrote:
In the real code, there is no sleep/wait or pause. It so happens that the
write of the app2 is scheduled in between.
What you are suggesting is that at any point of time only one process can
have a transaction open in a database?
I understand
I'm not sure I'm even following how this scenario can happen. Doesn't App1
have a Shared lock on the DB? Doesn't App2 require an Exclusive lock before it
can update something?
When given the initial scenario, I thought that Step 5 would block waiting for
App1 to finalize.
-Original
Isn't it almost a requirement of a transaction that only one be open at a time
in a database? If there could be more than one transaction, then transaction 1
might start, transaction 2 starts, transaction 1 fails, transaction 1 is rolled
back, and what happens to transaction 2? One could
On Fri, Feb 10, 2012 at 9:01 AM, Marc L. Allen
mlal...@outsitenetworks.comwrote:
I'm not sure I'm even following how this scenario can happen. Doesn't
App1 have a Shared lock on the DB? Doesn't App2 require an Exclusive lock
before it can update something?
The OP is running in WAL mode.
On Fri, Feb 10, 2012 at 9:05 AM, Rob Richardson rdrichard...@rad-con.comwrote:
Isn't it almost a requirement of a transaction that only one be open at a
time in a database? If there could be more than one transaction, then
transaction 1 might start, transaction 2 starts, transaction 1 fails,
On Fri, Feb 10, 2012 at 5:45 PM, Igor Tandetnik itandet...@mvps.org wrote:
Value has TEXT affinity, 5 has none. So 5 is converted to '5', and then
lexicographic comparisons are performed. It so happens that all strings in
the Value column lexicographically precede '5'.
If you wanted Value to
So, you're assuming the OP actually started a transaction? Because, otherwise,
isn't the SELECT in step 2 and the UPDATE in step 5 separate transactions?
If there is a BEGIN in there somewhere, we're talking about:
App1:
BEGIN
SELECT
UPDATE
..
App2BEGIN
i think fixed:: http://synopse.info/forum/viewtopic.php?id=20
--
View this message in context:
http://old.nabble.com/sqlite3_close%28%29-blocked-data-base-file-tp33292831p33300699.html
Sent from the SQLite mailing list archive at Nabble.com.
___
On Fri, Feb 10, 2012 at 9:19 AM, Marc L. Allen
mlal...@outsitenetworks.comwrote:
So, you're assuming the OP actually started a transaction? Because,
otherwise, isn't the SELECT in step 2 and the UPDATE in step 5 separate
transactions?
The OP said Step 3: The statement is not reset or
I see. So, the implied commit doesn't occur until you finalize? As a result,
the subsequent update in step 5 was added to his non-finalized select?
Still.. what is the correct way to handle the explicit scenario? I mean,
having one process do a BEGIN SELECT UPDATE and another do BEGIN UPDATE
Marc L. Allen mlal...@outsitenetworks.com wrote:
I see. So, the implied commit doesn't occur until you finalize?
Or reset.
As a result, the subsequent update in step 5 was added to his
non-finalized select?
The update was attempted within the same transaction.
Still.. what is the correct
On Fri, Feb 10, 2012 at 9:32 AM, Marc L. Allen
mlal...@outsitenetworks.comwrote:
I see. So, the implied commit doesn't occur until you finalize? As a
result, the subsequent update in step 5 was added to his non-finalized
select?
Still.. what is the correct way to handle the explicit
Thanks so much for clarifying that. I was unaware of the BEGIN IMMEDIATE.
Sorry.. new to sqlite, used to MySQL and MSSQL.
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
boun...@sqlite.org] On Behalf Of Igor Tandetnik
Sent: Friday, February 10, 2012
[Igor Tandetnik]
Steinar Midtskogen stei...@latinitas.org wrote:
Thanks, I didn't think in that simple terms. :) I think about listing
all the values, so I got lost.
I lost a word there: I didn't think about listing...
But what if the tables share a timestamp, then I would get, say:
Sreekumar TP sreekumar...@gmail.com wrote:
How is this different from two threads each with a db connection in a
single process?
If each thread uses its own separate connection, it should be no different -
you would observe the same issue.
Moreover the journal mode is WAL. Hence the writer
Steinar Midtskogen stei...@latinitas.org wrote:
[Igor Tandetnik]
Try something like this:
select timestamp, value1, ..., value6 from
(select timestamp from tab1
union
select timestamp from tab2
union
select timestamp from tab3)
left join tab1 using (timespamp)
left join tab2 using
The last transaction should always be the final one. In a a
multiprocess/threaded application how can one make assumptions on the order
of updates?
Sreekumar
On Fri, Feb 10, 2012 at 8:16 PM, Igor Tandetnik itandet...@mvps.org wrote:
Sreekumar TP sreekumar...@gmail.com wrote:
How is this
One last question or series (I hope)...
From my background, I'm used to SQL statements blocking until appropriate
locks are acquired. From what I've seen, it looks like sqlite doesn't block,
but returns BUSY, is that correct?
If two processes start a BEGIN IMMEDIATE, will one return a BUSY or
I took traces of the lock/unlock pattern -
After App1 SELECT
--
fcntl -1212610880 7 SETLK WRLCK 124 1 0 0
WAL806F9D8: acquire EXCLUSIVE-READ-LOCK[1] cnt=1 ok
fcntl -1212610880 7 SETLK UNLCK 124 1 0 0
WAL806F9D8: release EXCLUSIVE-READ-LOCK[1] cnt=1
fcntl -1212610880 7 SETLK RDLCK
[Igor Tandetnik]
If you need a particular order, it's best to add an explicit ORDER BY.
Otherwise, you are at the mercy of an implementation. Your current version of
SQLite chooses an execution plan that happens, by accident, to produce rows
in the desired order. Tomorrow you upgrade to a
I have been trying to get the system.data.sqlite version 1.0.79 working with
Visual Studio 2008 Pro (with SP). Each time I try to use Add Connection to
create the database connection string, the system.sqlite.data, I VS2008 is
popping up an error dialog:
Package Load Failure
Package
We are looking at using SqlLite from an access application, but we have run
into troubles executing a query that has a UNION.
Does SqlLite support Unions? Any help you can provide would be appreciated.
___
sqlite-users mailing list
On 07.02.2012 12:28, Ralf Junker wrote:
The new feature to insert multiple rows of VALUES in a single INSERT
http://www.sqlite.org/src/info/eb3b6a0ceb
gives wrong results if SQLite is compiled with SQLITE_OMIT_COMPOUND_SELECT.
Has the team seen this or has it been overlooked? Shall I
What is the query , and what error do you encounter ? SQLite does support
UNION and UNION ALL
Regards
nobre
David Hubbard-4 wrote:
We are looking at using SqlLite from an access application, but we have
run
into troubles executing a query that has a UNION.
Does SqlLite support Unions? Any
On 10 Feb 2012, at 3:01pm, Marc L. Allen wrote:
From my background, I'm used to SQL statements blocking until appropriate
locks are acquired. From what I've seen, it looks like sqlite doesn't block,
but returns BUSY, is that correct?
You can set a timeout. SQLite tries and retries until
On 10 Feb 2012, at 3:24pm, Steinar Midtskogen wrote:
I feared that. As it is, it takes 6 seconds to do a SELECT * FROM
Combined LIMIT 1 (Combined is a view representing the merged table).
If I add an ORDER BY, it takes 35 seconds.
Any way to speed up the ordering?
Are you putting the
There is no recovery from this situation-
If you try to rollback, you get the following error -cannot rollback
savepoint, SQL statments in progress or if you dont use SAVEPOINT -
cannot rollback, no transaction is active
If you start the transaction with BEGIN IMMEDIATE in App1, the writer in
On 10 Feb 2012, at 4:45pm, Sreekumar TP wrote:
There is no recovery from this situation-
If you try to rollback, you get the following error -cannot rollback
savepoint, SQL statments in progress or if you dont use SAVEPOINT -
cannot rollback, no transaction is active
If you start the
On 2/10/2012 9:57 AM, Sreekumar TP wrote:
The last transaction should always be the final one. In a a
multiprocess/threaded application how can one make assumptions on the order
of updates?
There are two updates in my example:
update t set count = count + 1;
update t set count = count + 10;
On 2/10/2012 11:45 AM, Sreekumar TP wrote:
There is no recovery from this situation-
If you try to rollback, you get the following error -cannot rollback
savepoint, SQL statments in progress or if you dont use SAVEPOINT -
cannot rollback, no transaction is active
If you start the transaction
Though the example of $ is very intuitive, I am not suggesting that we
drop one of the transaction and block the database forever (as it is
happening now). Instead, it could be serialized such that two $100
transactions are committed to the db.
On Fri, Feb 10, 2012 at 10:33 PM, Igor Tandetnik
On 2/10/2012 9:57 AM, Sreekumar TP wrote:
The last transaction should always be the final one. In a a
multiprocess/threaded application how can one make assumptions on the
order
of updates?
SQL does not have any concept of 'last transaction' or 'final transaction' or
'order of
Can this situation be handled in sqlite - by upgrading the lock to a
writer lock ? Since both applications use the same WAL file for read and
writes, it shouldnt be a problem , because all changes will be in linear
sequence ?
Sreekumar
On Fri, Feb 10, 2012 at 10:49 PM, Sreekumar TP
2012/2/10 Sreekumar TP sreekumar...@gmail.com:
Though the example of $ is very intuitive, I am not suggesting that we
drop one of the transaction and block the database forever (as it is
happening now). Instead, it could be serialized such that two $100
transactions are committed to the db.
On 10 Feb 2012, at 5:29pm, Sreekumar TP wrote:
Can this situation be handled in sqlite - by upgrading the lock to a
writer lock ? Since both applications use the same WAL file for read and
writes, it shouldnt be a problem , because all changes will be in linear
sequence ?
SQLite handles
On Fri, Feb 10, 2012 at 11:45 AM, Sreekumar TP sreekumar...@gmail.comwrote:
There is no recovery from this situation-
The recovery from your situation is to reset or finalize the initial query
that is holding the transaction option.
If you try to rollback, you get the following error
On 10 Feb 2012, at 5:32pm, Kit wrote:
2012/2/10 Sreekumar TP sreekumar...@gmail.com:
Though the example of $ is very intuitive, I am not suggesting that we
drop one of the transaction and block the database forever (as it is
happening now). Instead, it could be serialized such that two $100
[Simon Slavin]
On 10 Feb 2012, at 3:24pm, Steinar Midtskogen wrote:
I feared that. As it is, it takes 6 seconds to do a SELECT * FROM
Combined LIMIT 1 (Combined is a view representing the merged table).
If I add an ORDER BY, it takes 35 seconds.
Any way to speed up the ordering?
Are
2012/2/10 Simon Slavin slav...@bigfraud.org:
On 10 Feb 2012, at 5:32pm, Kit wrote:
A situation in which I read from the database first and then changes
the data tells me that they are wrong questions. It is such a problem
to insert SELECT into UPDATE or INSERT?
Why do you need to do a SELECT
On 10 Feb 2012, at 5:55pm, Kit wrote:
2012/2/10 Simon Slavin slav...@bigfraud.org:
On 10 Feb 2012, at 5:32pm, Kit wrote:
A situation in which I read from the database first and then changes
the data tells me that they are wrong questions. It is such a problem
to insert SELECT into UPDATE or
We are running this from an access front end and the
simplest example of a query that generates this error is:
SELECT MDR.MDR_No
FROM MDR
UNION
SELECT MDR_Archive.MDR_No
FROM MDR_Archive;
The error is:
ODBC--call failed.
near (: syntax error (1) (#1)
and MDR_No is a string field.
On Fri,
On Fri, Feb 10, 2012 at 1:17 PM, David Hubbard dgxhubb...@gmail.com wrote:
We are running this from an access front end and the
simplest example of a query that generates this error is:
SELECT MDR.MDR_No
FROM MDR
UNION
SELECT MDR_Archive.MDR_No
FROM MDR_Archive;
The above is perfectly
Hi,
Not sure if anyone has suggested this already but rather than messing with the
shell and bat files, cant you write a little program which reads the database,
outputs a CSV file and puts it wherever it needs putting
Andy
Would this be able to run on windows mobile or windows ce?
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Andrew Barnes
Sent: Friday, February 10, 2012 1:46 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Compiling
On 2/10/2012 12:29 PM, Sreekumar TP wrote:
Can this situation be handled in sqlite - by upgrading the lock to a
writer lock ? Since both applications use the same WAL file for read and
writes, it shouldnt be a problem , because all changes will be in linear
sequence ?
Consider again:
[1]
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
boun...@sqlite.org] On Behalf Of Igor Tandetnik
Sent: Friday, February 10, 2012 2:36 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Database locked in multi process scenario
On 2/10/2012 12:29
I still wasn't able to get this to work. It doesn't do anything.
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Black, Michael (IS)
Sent: Thursday, February 09, 2012 3:04 PM
To: General Discussion of SQLite Database
Subject:
On 2/10/2012 2:57 PM, Marc L. Allen wrote:
MSSQL in its default serialization mode does not guarantee repeatable
reads within a transaction. But, it provides locking hints to help
enforce it when required. I'm guessing that sqlite does guarantee
repeatable reads?
SQLite implements only one
Trevor Burns wrote:
Package Load Failure
Package 'System.Data.SQlite Designer Package' has failed to load properly
(
GUID = {DCBE6C8D-0E57-4099-A183-98FF74C64D9C}). Please contact package
vendor for assistance. Application restart is recommended, due to
possible
environment corruption.
Trevor Burns wrote:
Package Load Failure
Package 'System.Data.SQlite Designer Package' has failed to load properly
(
GUID = {DCBE6C8D-0E57-4099-A183-98FF74C64D9C}). Please contact package
vendor for assistance. Application restart is recommended, due to
possible
environment corruption.
Modification of big index-tree is disk-expensive operation.
You can try to insert pre-sorted data. Did yoy search only
by equals conditions? Did you think about packing a set
of values in single string or blob like to
Insert into t1 values ('1 2 3 4 5 6 7 8 9');
You can search by string content
See pragma table_info
2012/2/9 rod crimson.blu...@gmail.com:
My apologies if this question should be directed to some other list.
I'm looking for a better way to printout the:
Column Headers,
followed by the table contents -
in comma separated value (csv) format
from a SELECT statement:
I suspected the odbc layer, but is there any type of logging for SqlLite to
verify the sql it gets?
On Fri, Feb 10, 2012 at 11:37 AM, Richard Hipp d...@sqlite.org wrote:
On Fri, Feb 10, 2012 at 1:17 PM, David Hubbard dgxhubb...@gmail.com
wrote:
We are running this from an access front end
On Fri, Feb 10, 2012 at 5:28 PM, David Hubbard dgxhubb...@gmail.com wrote:
I suspected the odbc layer, but is there any type of logging for SqlLite to
verify the sql it gets?
No. We've always assumed that the application developer knows what he is
sending into SQLite, or else can write his
I will check and get back to you. I have not really studied it.
On Fri, Feb 10, 2012 at 3:52 PM, Richard Hipp d...@sqlite.org wrote:
On Fri, Feb 10, 2012 at 5:28 PM, David Hubbard dgxhubb...@gmail.com
wrote:
I suspected the odbc layer, but is there any type of logging for SqlLite
to
Joe
After getting the update on the changes I downloaded the installer from the
website (the publish dates match today). When I used the installer, the
same error message occurred. So I downloaded the VS2008 SDK 1.1, installed,
and the add connection screen is working.
Thanks for your help.
2012/2/9 rod crimson.blu...@gmail.com:
My apologies if this question should be directed to some other list.
I'm looking for a better way to printout the:
Column Headers,
followed by the table contents -
in comma separated value (csv) format
from a SELECT statement:
On Fri, Feb 10, 2012 at
Hi All, how do you generate a random number between two numbers in
your query using the random() function? Thank's.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On 2/10/2012 10:52 PM, Rick Guizawa wrote:
Hi All, how do you generate a random number between two numbers in
your query using the random() function? Thank's.
select random() % (:high - :low) + :low;
--
Igor Tandetnik
___
sqlite-users mailing list
I need to develop a light-weight, custom property editor using SQLite,
Perl, thttpd and HTML/CSS for building and editing recipes. I'm thinking
of something like the classic folder/tree/property sheet interface and
it will (obviously) run in a web browser
I suppose I could use XML as well,
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10/02/12 22:06, Bill McCormick wrote:
... building and editing recipes ...
For real world messy data I'm a huge fan of documented oriented databases
(aka NoSQL). There is no schema so you don't have to make every item
conform to the same rules,
81 matches
Mail list logo