Re: [sqlite] Sqlite error code 14 when using 3.31.0+

2020-03-11 Thread Daniel Polski
Den 2020-03-10 kl. 12:31, skrev Daniel Polski: Den 2020-03-10 kl. 02:33, skrev Rowan Worth: On Mon, 9 Mar 2020 at 23:22, Daniel Polski wrote: Updated to 3.31.1 but my application started spitting out an error when opening the database, so I tested some earlier sqlite versions to figure

Re: [sqlite] Sqlite error code 14 when using 3.31.0+

2020-03-10 Thread Daniel Polski
Den 2020-03-10 kl. 02:33, skrev Rowan Worth: On Mon, 9 Mar 2020 at 23:22, Daniel Polski wrote: Updated to 3.31.1 but my application started spitting out an error when opening the database, so I tested some earlier sqlite versions to figure out when the problem starts. I don't get the me

[sqlite] Sqlite error code 14 when using 3.31.0+

2020-03-09 Thread Daniel Polski
Updated to 3.31.1 but my application started spitting out an error when opening the database, so I tested some earlier sqlite versions to figure out when the problem starts. I don't get the message in versions <= 3.30.1. (from the applications log) SQLite Version: 3.31.0 INFO: Database opened:

Re: [sqlite] Obtaining rowid of an updated row in UPSERT

2020-01-19 Thread Daniel Janus
On 16.01.2020 14:02, Daniel Janus wrote: Dear SQLiters, If an INSERT ... ON CONFLICT DO UPDATE statement detects that a row already exists and needs to be updated, it doesn't seem to set lastRowid to the rowid of that row. Observe (sqlite 3.30.1):   > create table users (id integer

[sqlite] Obtaining rowid of an updated row in UPSERT

2020-01-16 Thread Daniel Janus
ohn Doe. I imagine the reasoning behind this is that if there was no inserted row, then last_*insert*_rowid should remain as it was... but is there any way to obtain this information, other than making a subsequent SELECT? Thanks, – Daniel ___ sqlite-use

[sqlite] The LIKE operator and Swift

2019-09-26 Thread Daniel Odom
I am just now getting around to learning Swift and XCode. I am having a problem with 'LIKE'. When I do this: let queryString = "select name, phone, street, city, state from phone where name like '%?%'" And then this: if sqlite3_bind_text(stmt, 1, name, -1, SQLITE_TRANSIENT) != SQLITE_OK {do

Re: [sqlite] Inverted changesets and UNIQUE constraints

2019-08-26 Thread Daniel Kraft
o use the pre-update hooks that the sessions module itself uses to start and extract a changeset right around each change? Or would that not work (e.g. due to interactions with the hooks for sessions itself) / be prohibitively expensive? Thanks! Yours, Daniel -- https://www.domob.eu/ OpenPGP: 1142

[sqlite] Inverted changesets and UNIQUE constraints

2019-08-26 Thread Daniel Kraft
state restored. Is this just "by chance", or can I safely ignore these errors in this context and rely on the ability to apply inverted changesets even if they (intermittently) violate UNIQUE constraints? Thanks a lot for any insights! Yours, Daniel =

[sqlite] Database backup with writers present?

2019-02-27 Thread Daniel Polski
Hello, When reading the docs I don't get a clear understanding on what strategy I could/should use to backup a heavily used database (with frequent reads & writes). I have one application (A) with multiple threads reading & writing to the database. Application (A) handles write locking intern

Re: [sqlite] Session extension, "INSERT OR REPLACE" and "WITHOUT ROWID"

2019-01-07 Thread Daniel Kraft
Hi Dan! On 07.01.19 16:58, Dan Kennedy wrote: > I think it was a bug. Thanks for reporting it. Now fixed here: > >   https://www.sqlite.org/src/info/6281ef974c0ac7a7 Cool, thanks for confirming it was indeed a bug (and not my stupidity), and the quick fix! Yours, Daniel

Re: [sqlite] Session extension, "INSERT OR REPLACE" and "WITHOUT ROWID"

2019-01-06 Thread Daniel Kraft
Since it seems that the mailing list swallowed my attached example code, I've put it on Github as well: https://gist.github.com/domob1812/7842edade949b5169edaf9de79f1b6d1 On 06.01.19 14:08, Daniel Kraft wrote: > Hi! > > It seems to me that the session extension is broken in a

[sqlite] Session extension, "INSERT OR REPLACE" and "WITHOUT ROWID"

2019-01-06 Thread Daniel Kraft
quot; statement. Am I doing something wrong here, or is this a bug? Is there something I can do to make this work as expected? Thanks! Yours, Daniel -- https://www.domob.eu/ OpenPGP: 1142 850E 6DFF 65BA 63D6 88A8 B249 2AC4 A733 0737 Namecoin: id/domob -> https://nameid.org/?name=domob --

Re: [sqlite] Mac: Users receive "database disk image is malformed" errors after restoring database from Time Machine backup

2018-12-17 Thread Daniel Alm
> Richard Hipp wrote: > Do you know if the corruption is occurring when TimeMachine makes its > backup, or is occurring when the backed up database is restored? Can > you capture some unrestored TimeMachine backups to see if they are > corrupt? > > Can you send us one of your corrupted databa

[sqlite] Mac: Users receive "database disk image is malformed" errors after restoring database from Time Machine backup

2018-12-12 Thread Daniel Alm
I might be doing something wrong or have changed anything else, but I don’t know what; if you have any ideas, let me know. Any suggestions on what could be the culprit or what else I could try besides downgrading all the way to SQLite 3.21 would be appreciated. Thanks, Daniel Alm P.S.: Our databa

Re: [sqlite] Bug Report: corrupted double-linked list

2018-10-10 Thread Daniel Espinosa
, but any way, I will check if the issue is in related on multi-threading destruction in GDA. El mié., 10 de octubre de 2018 5:46, Richard Hipp escribió: > On 10/9/18, Daniel Espinosa wrote: > > I'm current maintainer of GDA[1], I've updated embbeded version of SQLite > >

[sqlite] Bug Report: corrupted double-linked list

2018-10-10 Thread Daniel Espinosa
I'm current maintainer of GDA[1], I've updated embbeded version of SQLite to 3.25.2, but I found an issue with a segfault due to a "corrupted double-linked list". In order to reproduce it: a) Checkout libgda from its respository[1] b) compile using its meson: $ meson _build $ cd _build $ ninja $

Re: [sqlite] [EXTERNAL] Persistent snapshots and rollbacks

2018-10-07 Thread Daniel Kraft
ication *platform* rather than a particular application). The sessions extension seems to provide this, so I'll try that one first to see if it fits my requirements. Yours, Daniel -- https://www.domob.eu/ OpenPGP: 1142 850E 6DFF 65BA 63D6 88A8 B249 2AC4 A733 0737 Namecoin: id/domob -> https://n

Re: [sqlite] Persistent snapshots and rollbacks

2018-10-05 Thread Daniel Kraft
upported by litetree. > That said, I would personally favor using "standard" SQLite3 if possible. And this is my second small issue with litetree. It seems to be actively developed at the moment, but of course using the official SQLite3 gives me a dependency that is most likely

Re: [sqlite] Persistent snapshots and rollbacks

2018-10-05 Thread Daniel Kraft
ere I can on the platform-side create snapshots / start a changeset and let the actual application do SQL commands, without the need for "instrumenting" the SQL commands themselves. Yours, Daniel -- https://www.domob.eu/ OpenPGP: 1142 850E 6DFF 65BA 63D6 88A8 B249 2AC4 A733 0737 Nameco

Re: [sqlite] Persistent snapshots and rollbacks

2018-10-05 Thread Daniel Kraft
g. newly created or dropped tables), though, right? I don't think that is very important in my usecase (even though it would be nice to have), so it should be fine. Yours, Daniel -- https://www.domob.eu/ OpenPGP: 1142 850E 6DFF 65BA 63D6 88A8 B249 2AC4 A733 0737 Namecoin: id/domob -> ht

Re: [sqlite] Persistent snapshots and rollbacks

2018-10-05 Thread Daniel Kraft
formation needed to redo the changes is available) and may be acceptable performance-wise. Yours, Daniel -- https://www.domob.eu/ OpenPGP: 1142 850E 6DFF 65BA 63D6 88A8 B249 2AC4 A733 0737 Namecoin: id/domob -> https://nameid.org/?name=domob -- 3.6.0: Bar-Pri-Ran-Rog-Sam-Val-Wiz To go: Arc-C

Re: [sqlite] Persistent snapshots and rollbacks

2018-10-05 Thread Daniel Kraft
On 2018-10-05 19:47, Daniel Kraft wrote: > I'm still thinking about the savepoints that Chris pointed out, though. > They seem to be very close to what I need. And even if I don't commit > the transaction, I imagine that at least the database connection that is > buildi

Re: [sqlite] Persistent snapshots and rollbacks

2018-10-05 Thread Daniel Kraft
Hi! On 2018-10-05 19:39, Simon Slavin wrote: > On 5 Oct 2018, at 6:17pm, Daniel Kraft wrote: >> If there is indeed no way to achieve my requirements with SQLite > > There isn't. I understand what you want and SQLite can't do it. Ok, thanks for confirming -- that&

Re: [sqlite] Persistent snapshots and rollbacks

2018-10-05 Thread Daniel Kraft
Hi! On 2018-10-05 19:00, Gerry Snyder wrote: > On Fri, Oct 5, 2018 at 8:40 AM Daniel Kraft wrote: >> I need the ability to make multiple changes / commits to my SQLite >> database but keep snapshots of previous states and potentially roll back >> to those states later on. &g

Re: [sqlite] Persistent snapshots and rollbacks

2018-10-05 Thread Daniel Kraft
Hi! On 2018-10-05 19:05, Simon Slavin wrote: > On 5 Oct 2018, at 4:39pm, Daniel Kraft wrote: > >> I need the ability to make multiple changes / commits to my SQLite >> database but keep snapshots of previous states and potentially roll back >> to those states later on.

Re: [sqlite] Persistent snapshots and rollbacks

2018-10-05 Thread Daniel Kraft
ble to the one writer that has performed that "roll-back" operation > until the entire undo is released (ROLLACK). Exactly -- I can manually keep undo logs to perform the rollbacks, but I'm hoping that SQLite can do that for me. Yours, Daniel -- https://www.domob.eu/ OpenPGP: 1142

Re: [sqlite] Persistent snapshots and rollbacks

2018-10-05 Thread Daniel Kraft
; Daniel's use case wants each transaction to become visible to readers, so > savepoint do not apply here. > Daniel wants regular transactions to become savepoints basically. Yes, savepoints sound very close to what I need -- except that I need the current state to be visible. (And all ch

[sqlite] Persistent snapshots and rollbacks

2018-10-05 Thread Daniel Kraft
to remove parts from the beginning of the WAL? Is my understanding here correct? And is there some way in which I could achieve my requirements using WAL mode (or somehow else)? Thank you very much! Yours, Daniel -- https://www.domob.eu/ OpenPGP: 1142 850E 6DFF 65BA 63D6 88A8 B249 2AC4 A733 07

[sqlite] FTS - IF NOT EXISTS missing from sqlite_master

2018-08-21 Thread Daniel Santiago
Hi, It seems that when creating a virtual table the 'IF NOT EXISTS' part is missing from the sql column in sqlite_master for the recently created table entry. For example: sqlite> CREATE VIRTUAL TABLE IF NOT EXISTS `Mail` USING FTS4(`subject`, `body`); sqlite> SELECT `sql` FROM `sqlite_master` WH

Re: [sqlite] Article: UUID or GUID as Primary Keys? Be Careful!

2017-06-10 Thread Daniel Anderson
I drink to that! 2017-06-10 14:26 GMT-04:00 Jens Alfke : > > > On Jun 10, 2017, at 6:58 AM, Daniel Anderson wrote: > > > > the article was integers (4 bytes) vs guid as a primary key, which as > > string takes 36 bytes. so he was right in saying that string guid/uuid

Re: [sqlite] Article: UUID or GUID as Primary Keys? Be Careful!

2017-06-10 Thread Daniel Anderson
er global data and always fast with the right > query. > > Cheers, > Ryan > > [1] - It's hard to say exactly, most DBs use extra bits/bytes for field > specifications, lengths etc, even for the INT fields, so making an exact > blanket assertion here about ratio of

Re: [sqlite] WAL checkpoint starved?

2017-06-07 Thread Daniel Polski
Den 2017-06-07 kl. 17:09, skrev Simon Slavin: On 7 Jun 2017, at 1:49pm, Daniel Polski wrote: Ok, have I understood this correctly: If doing a manual checkpoint with SQLITE_CHECKPOINT_TRUNCATE, that call will block for maximum the time set by the busy_timeout while trying to proceed. If

Re: [sqlite] WAL checkpoint starved?

2017-06-07 Thread Daniel Polski
Den 2017-06-07 kl. 15:02, skrev Richard Hipp: On 6/7/17, Daniel Polski wrote: Does the [TRUNCATE] checkpoint call lock out new requests which might prohibit checkpoint progress while waiting for the timeout? It prohibits new writers. New readers are allowed to proceed. What will happen

Re: [sqlite] WAL checkpoint starved?

2017-06-07 Thread Daniel Polski
Den 2017-06-05 kl. 17:48, skrev Simon Slavin: On 5 Jun 2017, at 1:45pm, Daniel Polski wrote: How do I make the checkpointing work like the above documentation describes? Set a timeout. Perhaps a very long one (one minute, which is what I use in some places). You can do this two ways

Re: [sqlite] feature req: PLEASE why the heck COMMENT fields are not supporte in years!!

2017-06-06 Thread Daniel Kamil Kozar
Patches are still welcome, I guess. I haven't seen anybody claiming that this would be done in any way. On 6 June 2017 at 15:17, PICCORO McKAY Lenz wrote: > how its the status of this work? > > a limited implementation will be good! > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.

Re: [sqlite] WAL checkpoint starved?

2017-06-05 Thread Daniel Polski
Den 2017-06-05 kl. 12:34, skrev Richard Hipp: On 6/5/17, Daniel Polski wrote: Den 2017-06-02 kl. 16:07, skrev Richard Hipp: and I thought that SQLITE_CHECKPOINT_TRUNCATE would force the checkpoint to completion. Do you have a busy callback handler registered (https://sqlite.org/c3ref

Re: [sqlite] WAL checkpoint starved?

2017-06-04 Thread Daniel Polski
Den 2017-06-02 kl. 16:07, skrev Clemens Ladisch: Daniel Polski wrote: Any ideas why I can end up with that large WAL file Sounds like checkpoint starvation. Does the checkpoint call actually succeed? Unfortunately I don't know (adding a log message for that now). Any suggestions abou

Re: [sqlite] WAL checkpoint starved?

2017-06-04 Thread Daniel Polski
Den 2017-06-02 kl. 16:07, skrev Richard Hipp: On 6/2/17, Daniel Polski wrote: I've found something weird in a log from a client. Normally our WAL files are < 100kB, but in this log I noticed the file was >40MB. This was totally unexpected since we run this call every minut

[sqlite] WAL checkpoint starved?

2017-06-02 Thread Daniel Polski
I've found something weird in a log from a client. Normally our WAL files are < 100kB, but in this log I noticed the file was >40MB. This was totally unexpected since we run this call every minute: int val = sqlite3_wal_checkpoint_v2(myDB->getDbPointer(), NULL, SQLITE_CHECKPOINT_TRUNCATE, &wal

Re: [sqlite] Create database

2017-04-14 Thread Daniel Anderson
ite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > > On Behalf Of Daniel Anderson > > Sent: Friday, 14 April, 2017 21:11 > > To: SQLite mailing list > > Subject: Re: [sqlite] Create database > > > > you would probably be better off using C++ to handle everything,

Re: [sqlite] Create database

2017-04-14 Thread Daniel Anderson
qlite-users > >> > >> > >> > >> _______ > >> sqlite-users mailing list > >> sqlite-users@mailinglists.sqlite.org > >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > > > &g

Re: [sqlite] "struct Mem" conflicts with namespaces/classes having the same name

2017-04-10 Thread Daniel Anderson
namespace 2017-04-10 10:43 GMT-04:00 Olivier Mascia : > > Le 10 avr. 2017 à 16:21, Daniel Anderson a écrit : > > > > as Sqlite is already within extern "C" > > > > I'm wondering how your namespace trick can work ? > > > Both are si

Re: [sqlite] "struct Mem" conflicts with namespaces/classes having the same name

2017-04-10 Thread Daniel Anderson
sqlite3_exec; > } > > Bob > -- > Bob Friesenhahn > bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ > GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ > ___ > sqlite-users mailing l

Re: [sqlite] "struct Mem" conflicts with namespaces/classes having the same name

2017-04-10 Thread Daniel Anderson
name or b) you change the namespace name you'll be stuck with a hack! Cordialement! Daniel 2017-04-10 5:11 GMT-04:00 dip : > I am mixing C and C++ code. My code is in C++, SQLite is in C. > Just create memory.h: > > namespace Mem { > // some functions > } > > And

Re: [sqlite] "struct Mem" conflicts with namespaces/classes having the same name

2017-04-09 Thread Daniel Anderson
you make a small reproduceable sample ? also are you mixing C++ & C, or is your code all in c ? Daniel 2017-04-09 15:49 GMT-04:00 dip : > sqlite3.c is C file. C does not support namespaces. > Even though another project files are .cpp, sqlite3.c is still compiled as > C language

Re: [sqlite] Second beta for SQLite 3.18.0.

2017-03-28 Thread Daniel Polski
Den 2017-03-24 kl. 08:09, skrev Daniel Polski: The "PRAGMA optimize" looks interesting. - Can using "PRAGMA optimize" in one thread create a situation where "BEGIN IMMEDIATE TRANSACTION" in another thread fails? (The threads are using different connect

Re: [sqlite] Second beta for SQLite 3.18.0.

2017-03-24 Thread Daniel Polski
The "PRAGMA optimize" looks interesting. - Can using "PRAGMA optimize" in one thread create a situation where "BEGIN IMMEDIATE TRANSACTION" in another thread fails? (The threads are using different connections) - Is there any risk of "optimization fighting" if several threads are using the s

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-23 Thread Daniel Anderson
RIGGER t23 BEFORE INSERT ON tb >...> FOR EACH ROW BEGIN >...> INSERT INTO gradsad VALUES (ajsdhasd); >...> END; > sqlite> > > Simon. > _______ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-23 Thread Daniel Anderson
sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > -- Daniel *L'action accède à la perfection quand, bien que vivant, vous êtes déjà mort* *Bunan* ___ sqlite-users ma

Re: [sqlite] RIGHT JOIN! still not supported?

2017-03-21 Thread Daniel Kamil Kozar
Seeing how SQLite was created in 2000, it seems like nobody really needed this feature for the last 17 years enough in order to actually implement it. Last I heard, patches are welcome on this mailing list. Don't keep us waiting. Kind regards, Daniel On 20 March 2017 at 21:09, PICCORO

Re: [sqlite] tclsqlite3 db function exports not visible on other connections. Why not?

2017-03-19 Thread Daniel Kamil Kozar
You can use sqlite3_auto_extension for this. On 19 March 2017 at 11:35, R Smith wrote: > > On 2017/03/19 11:05 AM, petern wrote: >> >> Taking DRH's remarks about learning tclsqlite for the efficient coding to >> heart, I discovered a big problem. >> >> Here is the simplest example from the docs a

Re: [sqlite] Application is crashing while performing sqlite3_prepare_v2 with sqlite version 3.15.2 (intermittently)

2017-03-15 Thread Daniel Anderson
browser/sqlitebrowser/issues/12> 0x419be27c > in sqlite3_prepare_v2 (db=, > zSql=zSql@entry=0x198248 "SELECT FROM WHERE > "..., nBytes=, ppStmt=ppStmt@entry=0xbec440d8, > pzTail=pzTail@entry=0x0) at /usr/src/debug/sqlite3/3_3.15. > 2.0-r0/sqlite-autoconf-315

Re: [sqlite] Crash on Android

2017-02-27 Thread Daniel Anderson
ite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > -- Daniel *L'action accède à la perfection quand, bien que vivant, vous êtes déjà mort* *Bunan* ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Problem compiling 3.17.0 in MSVS 12

2017-02-14 Thread Daniel Anderson
e chance that your copy of VC (or its compiler) got > corrupted somehow. > > Simon. > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >

Re: [sqlite] IS NULL and IS NOT NULL constraints not passed into virtual table's xBestIndex

2017-02-03 Thread Daniel Kamil Kozar
aration, add _IS_NULL INTEGER for all fields that > need to support this. > > SELECT ... FROM your_table WHERE ..._IS_NULL = 1 ... > > This should make SQLite pass the constraint to xBestIndex and the value (0 or > 1, depending if you need IS NULL or NOT NULL) to xFilter.

[sqlite] IS NULL and IS NOT NULL constraints not passed into virtual table's xBestIndex

2017-02-02 Thread Daniel Kamil Kozar
.sqlite.org/msg62850.html - however, it does not offer an explanation why the implementation behaves this way. Kind regards, Daniel ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Date (from REAL) with Negative Year

2016-12-13 Thread Daniel Dumitriu
ably try SELECT datetime(2 + 42713.1916667+julianday('1900-01-01')); Regards, Daniel [1] https://en.wikipedia.org/wiki/Leap_year_bug [2] https://support.microsoft.com/en-us/kb/214326 ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Is it possible to connect to an in-memory sqlite

2016-11-14 Thread Daniel Meyer
I am very interested in the answer to this question. Currently it seems like the only way to get multiple connection to the in-memory db is with 'cache=shared' and I understand that subsequent connections opened to that memory database are Read/Write regardless of whether the new connections are o

Re: [sqlite] Pivot & concat SELECT?

2016-10-17 Thread Daniel Polski
Den 2016-10-17 kl. 16:40, skrev R Smith: Luckily all data needed is in the table, and Igor's method will work just dandy in your case. Why not store the flags in full rather than per line though? You can easily manipulate the values by using standard bit-masking and boolean bit-wise functio

Re: [sqlite] Pivot & concat SELECT?

2016-10-17 Thread Daniel Polski
select unit, sum(1 << bit_position) from table1 where val group by unit; To make it more complex.. Is it possible to select into "different bytes" depending on bit_position? (For example that bit_position 0-7 represent byte 1, bit_position 8-15 represent another) To get a second "byte" I

Re: [sqlite] Pivot & concat SELECT?

2016-10-17 Thread Daniel Polski
Den 2016-10-17 kl. 16:03, skrev Igor Tandetnik: select unit, sum(1 << bit_position) from table1 where val group by unit; Wow!! Thanks alot! /Daniel ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqli

[sqlite] Pivot & concat SELECT?

2016-10-17 Thread Daniel Polski
Let's say I have a table like this: CREATE TABLE table1( idINT, unitINT, bit_positionINT, valBOOL ); INSERT INTO table1 VALUES(1,1, 0, 1); INSERT INTO table1 VALUES(2,1, 1, 1); INSERT INTO table1 VALUES(3,1, 4, 1); INSERT INTO

Re: [sqlite] Trigger WHEN condition, comparing with null

2016-10-13 Thread Daniel Polski
Replace != with IS NOT. Regards, Clemens Thanks! Exactly what I looked for. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Parallel access to read only in memory database

2016-10-13 Thread Daniel Meyer
the list at > sqlite-users-ow...@mailinglists.sqlite.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of sqlite-users digest..." > > > Today's Topics: > >1. Parallel access to read only in memory datab

Re: [sqlite] Trigger WHEN condition, comparing with null

2016-10-13 Thread Daniel Polski
Thank you, I see. Any suggestion how to get the trigger to fire if (and only if) the values are different, including if one of the "sides" of old/new are null? Den 2016-10-13 kl. 11:56, skrev Kees Nuyt: On Thu, 13 Oct 2016 11:45:14 +0200, Daniel Polski wrote: That's because

[sqlite] Trigger WHEN condition, comparing with null

2016-10-13 Thread Daniel Polski
Hello, I guess there is something I'm missing when trying to synchronize some data with a trigger. How do I get the trigger to fire when the comparison in either new.x or old.x is null? The below tested with 3.8.6 sqlite command line shell: CREATE TABLE table1( idINTEGER PRIMARY K

[sqlite] Parallel access to read only in memory database

2016-10-07 Thread Daniel Meyer
We are interested in using sqlite as a read only, in memory, parallel access database. We have database files that are on the order of 100GB that we are loading into memory. We have found great performance when reading from a single thread. We need to scale up to have many parallel reader thread

Re: [sqlite] Inspect WAL file?

2016-10-05 Thread Daniel Polski
Den 2016-10-05 kl. 14:51, skrev Michael Schlenker: Hi, have a look at the 'showwal.c' file in the sources. https://www.sqlite.org/src/artifact/ec79959834f7b21f It allows you to look at the WAL.., but not sure if it fits your problem. Thanks! ___

Re: [sqlite] Inspect WAL file?

2016-10-05 Thread Daniel Polski
That should be safe too. I hope someone else can help debug your problem. Many bugs like the one you mentioned are a result of a) having other parts of your program misuse SQLite file handles b) having other parts of your program overwrite memory SQLite is using c) using file storage mounted

Re: [sqlite] Inspect WAL file?

2016-10-05 Thread Daniel Polski
Do your applications use any PRAGMAs ? PRAGMA foreign_keys=ON; PRAGMA journal_mode=WAL; Are they running on the same computer both accessing storage held on that same computer ? It's different threads within the same application. Threads have "own" sqlite connections. __

Re: [sqlite] Inspect WAL file?

2016-10-05 Thread Daniel Polski
There is no helper software, except maybe SQLite itself. Ok, thanks for the information. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Inspect WAL file?

2016-10-05 Thread Daniel Polski
Do you have any suggestion about how to inspect the contents of a wal file? The reason for the examination is that I suspect my application might have a bug which makes one thread very occationally not see data in the WAL file another thread has added. _

[sqlite] Bug: SQLite's include guards are reserved identifiers

2016-07-09 Thread Daniel Seither
pinions on that? Daniel [1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Time & between, midnight wrap around

2016-05-14 Thread Daniel Polski
Hello, BETWEEN doesn't give the result I would need when used with time before & after midnight: SELECT time('23:00') BETWEEN time('22:00') AND time ('23:30'); time 1 sqlite> SELECT time('23:00') BETWEEN time('22:00') AND time ('01:00'); time 0 Any suggestion how to tweak the query to

[sqlite] Error help

2016-04-04 Thread Daniel Telvock
learn Microsoft Access. Dan Telvock Environment Reporter Investigative Post <http://www.investigativepost.org/> Twitter: @dantelvock 716-831-2626 ext. 3 On Mon, Apr 4, 2016 at 2:27 PM, Simon Slavin wrote: > > On 4 Apr 2016, at 7:22pm, Daniel Telvock > wrote: > > > Even when tra

[sqlite] Error help

2016-04-04 Thread Daniel Telvock
Using the non plugin option is a little above my head. I haven't been trained to use the command line. Even when trained to use SQLite I was told it could handle large CSV files, and this one was only 1000 rows Dan Telvock Environment Reporter Investigative Post

[sqlite] Error help

2016-04-04 Thread Daniel Telvock
, 2016 at 12:52 PM, Stephen Chrzanowski wrote: > Large CSV? How large? Because the constraint error is probably coming > from the browser for an upload constraint on size versus SQLite throwing an > error. > > > On Mon, Apr 4, 2016 at 12:26 PM, Daniel Telvock < > dte

[sqlite] Error help

2016-04-04 Thread Daniel Telvock
(NS_ERROR_STORAGE_CONSTRAINT) [mozIStorageStatement.execute] Dan Telvock Environment Reporter Investigative Post <http://www.investigativepost.org/> Twitter: @dantelvock 716-831-2626 ext. 3 On Mon, Apr 4, 2016 at 12:21 PM, Simon Slavin wrote: > > On 4 Apr 2016, at 5:04pm, Daniel Telv

[sqlite] Error help

2016-04-04 Thread Daniel Telvock
There is a field that contains longer sentences for descriptions. It keeps giving me an error that the NS Error Storage Constraint. I've tried labeling the column as VarCHar and Text to not avail. When you have a columns that has lengthy text, is there a way to label it so SQLite won't spit it o

[sqlite] Error msg help

2016-03-16 Thread Daniel Telvock
Anyone know what this is trying to tell me? I cannot import the CSV because of this error. Everything is labeled as VARCHAR and api_well_number is marked as the unique identifier. SQLiteManager: INSERT INTO "main"."WELLS" VALUES ("Adams, E.H. et al",'Schuyler','Hector','3.11E+13','Collins 1','U

[sqlite] SQLite Pronunciation

2016-03-16 Thread Daniel Telvock
I was at the Investigative Reporters and Editors Conference last week and the presenter for SQLite courses 1 and 3 said that it is actually pronounced SQ Lite. Even he thought that was odd considering SQL is a term or acronym. Dan Telvock Environment Reporter Investigative Post

[sqlite] Find SQLITE_BUSY reason?

2016-02-18 Thread Daniel Polski
I realized I never wrote back to the list about the solution (so others who might get into the same kind problem can see what the actual problem was for us). The problem wasn't caused by the update to a newer version of sqlite. By coincidence the firmware which included the new sqlite version g

[sqlite] Find SQLITE_BUSY reason?

2016-01-21 Thread Daniel Polski
Den 2016-01-21 kl. 11:30, skrev Simon Slavin: > On 21 Jan 2016, at 9:44am, Daniel Polski wrote: > >> The Webserver/PHP can process up to 16 requests simultanuously and will >> share one database connection among all instances. >> The process for each request is: >>

[sqlite] Find SQLITE_BUSY reason?

2016-01-21 Thread Daniel Polski
>> Any suggestions how to debug and find the reason why we get SQLITE_BUSY? > Have you enabled error and warning logging? > https://www.sqlite.org/errlog.html Thanks, I have now. > Can you enhance your existing log to report the > sqlite3_extended_errcode() value in addition to the basic erro

[sqlite] Find SQLITE_BUSY reason?

2016-01-21 Thread Daniel Polski
Hello, I have a problem getting SQLITE_BUSY, and the lock won?t get released. The problem *seems* to have started around the time we upgraded sqlite from 3.8.10 to 3.9.0, but it's not confirmed. I can?t find anything in our firmware logic which should be relevant to the changed locking behavio

[sqlite] Trigger, fetch matching rows and process/insert each row into multiple tables?

2015-09-24 Thread Daniel Polski
1; ) Best Regards, Daniel Den 2015-09-24 kl. 13:31, skrev Marco: > Excerpts from Daniel Polski's message of 2015-09-24 07:38:24 -0300: >> Hello! >> >> --Table t1 contains some "base" data >> CREATE TABLE t1 ( >> idINTEGER PRIMARY K

[sqlite] Trigger, fetch matching rows and process/insert each row into multiple tables?

2015-09-24 Thread Daniel Polski
Den 2015-09-24 kl. 13:03, skrev Simon Slavin: > On 24 Sep 2015, at 11:38am, Daniel Polski wrote: > >> -- Here is where my real question starts. Can I fetch a list of rows in a >> trigger >> -- and update different tables from that data? > Create a VIEW which does this

[sqlite] Trigger, fetch matching rows and process/insert each row into multiple tables?

2015-09-24 Thread Daniel Polski
row in t2 -- For example: UPDATE t1 SET value = 1 WHERE id = 1; --Should make the trigger run: INSERT INTO t3 VALUES(1, 'dummy'); INSERT INTO t4 VALUES(1, last_insert_rowid()); INSERT INTO t3 VALUES(2, 'dummy'); INSERT INTO t4 VALUES(2, last_insert_rowid()); How would you accomplish this? Thank you! /Daniel

[sqlite] Threading-mode for an encrypted database

2015-08-24 Thread Daniel Coles
that my understanding of the issues is correct, or whether SQLite is doing clever stuff behind the scenes with multiple connections within a single application instance. Thank you in advance for any help that you're able to offer, Daniel

[sqlite] On delete cascade & create trigger order?

2015-07-15 Thread Daniel Polski
content in table_3 after we've deleted a row in table_1. -- BUT.. Is it certain this always will be run AFTER the delete_trigger ? CREATE TRIGGER delete_trigger_2 AFTER DELETE ON table_1 BEGIN DELETE FROM table_3 WHERE table_1_id = old.id; END; --New test with the delete_trigger_2 also active DELETE FROM table_1; --Should work ...Or if there is a more elegant solution I haven't thought about? /Daniel

[sqlite] VBA Sqllite blob data

2015-05-15 Thread Daniel Sjödin
Hi Preston, That's good news. It would be really interesting to hear how you solved it. Din you hit any particular obstacles? BR Daniel Thank you for all of your suggestions and tips. I have been able to use the code samples and extract the data that I needed from my database in a test sce

[sqlite] VBA Sqllite blob data

2015-05-12 Thread Daniel Sjödin
using the SQLite3ColumnBlob function. Then you need to convert it into text. Have a look at the end of the thread. Suppose you will use StrConv function. Daniel 2015-05-12 13:41 GMT+02:00 Preston King : > I have been able to use SQLite2009 Pro Management Studio to export the > specific

[sqlite] VBA Sqllite blob data

2015-05-11 Thread Daniel Sjödin
Hi, Have a look at the last post in this thread. Never tested this but if true then maybe it's an idea to try to implement it in vba part of sqliteforexcel. http://stackoverflow.com/questions/2516702/getting-around-the-max-string-size-in-a-vba-function Regards, Daniel Den 11 maj 2015

[sqlite] Awesome SQLite List - Collection of SQLite Goodies Started - Contributions Welcome

2015-05-04 Thread Daniel Sjödin
Hi, There is also a VBA wrapper that I've tested. Maybe the usage is a bit narrow but it shows how broad sqlite is. https://sqliteforexcel.codeplex.com/ Regards, Daniel Hello, Thanks for the additions to the awesome-sqlite [1] list. I added the ODBC and JDBC drivers to a new middl

[sqlite] FW: Core dump with shared cache enabled

2015-01-23 Thread Roberts, Daniel
Hello, While doing some profiling in python, I ran into a crash in sqlite3. The workflow was pretty simple – one thread doing writes, another doing reads (of course, these are python threads, so it’s only “sort-of” concurrent). This workflow worked fine with the shared cache disabled, but when

[sqlite] insert or ignore with foreign keys

2014-11-25 Thread Daniel Polski
I guess the example below shows the intended behaviour for Sqlite? PRAGMA FOREIGN_KEYS=1; CREATE TABLE t1 ( idINTEGER PRIMARY KEY ); CREATE TABLE t2( idINTEGER PRIMARY KEY, t1_id INT NOT NULL, CONSTRAINT fk FOREIGN KEY(t1_id) REFERENCES t1(id) ); INSERT INTO t1 VALUES(2

[sqlite] Multiple threads reading different data

2014-11-11 Thread Daniel Polski
e update is not yet "processed enough" for the other threads to fetch the new data (so they still selects the old data), even though the trigger is set to fire "after update". Is this maybe the case? If so, any suggestions how to solve it? Regards, Daniel ___

Re: [sqlite] Query / schema optimization procedure?

2013-11-07 Thread Daniel Polski
been used. About t11, t12: You're correct that they're doing something related, but is separated on purpose to let the user link data different ways Thanks alot! /Daniel Simon Slavin skrev 2013-11-07 14:08: On 7 Nov 2013, at 10:52am, Daniel Polski wrote: I would be happy to

[sqlite] Query / schema optimization procedure?

2013-11-07 Thread Daniel Polski
_id FROM query_view; Should result in v2_id's in order: 1, 4, 6, 8, 11, 3 I'm using SQLite 3.8.1 I would be very happy if you help me with the optimization, but even happier if you explain how you think to reach the goal. It's also possible to tweak the database/view layo

Re: [sqlite] Dropping Trigger from Table

2013-11-01 Thread Daniel Polski
I don't understand what condition you might be talking about. As far as I know the functionality only allows you to simply drop a trigger, in your case: DROP TRIGGER trigger_name; or: DROP TRIGGER IF EXISTS trigger_name; Best regards, Daniel techi eth skrev 2013-11-01 12:53: H

  1   2   3   4   5   >