Re: [sqlite] SQLite 3.20.0 postponed

2017-07-21 Thread Gwendal Roué
till valid Maybe this is considered awful practices - I'm certainly not a C expert. And this would also force functions that use the new pointer APIs to expose those keys in some header (such as FTS5()). You may have chosen the current technique precisely because you don't want such AP

Re: [sqlite] SQLite 3.20.0 postponed

2017-07-21 Thread Gwendal Roué
> Le 21 juil. 2017 à 17:55, Gwendal Roué a écrit : > > First, this strcmp() give a lot of work to languages that wrap SQLite and > lack support for "static strings". Building a global \0-terminated buffer > that never gets deallocated is not always that easy :-) Fo

Re: [sqlite] SQLite 3.20.0 postponed

2017-07-21 Thread Gwendal Roué
> Le 21 juil. 2017 à 18:50, Richard Hipp a écrit : > > On 7/21/17, Gwendal Roué wrote: >> >> First, this strcmp() give a lot of work to languages that wrap SQLite and >> lack support for "static strings". > > But sqlite3_result_pointer() and sqlite3_

Re: [sqlite] SQLite 3.20.0 postponed

2017-07-22 Thread Gwendal Roué
> Le 22 juil. 2017 à 08:14, Gwendal Roué a écrit : > > Still, I feel that static strings are a weird way to define keys. For > example, value subtypes in SQLite have the same requirement of needing > "unique subtype identifiers", and those subtypes are, today, ints

Re: [sqlite] New draft document on the new pointer-passing interfaces

2017-07-24 Thread Gwendal Roué
> Le 24 juil. 2017 à 13:54, Richard Hipp a écrit : > > https://www.sqlite.org/draft/bindptr.html Thank you very much for this detailed rationale! Gwendal Roué ___ sqlite-users mailing list [email protected]

Re: [sqlite] New draft document on the new pointer-passing interfaces

2017-07-24 Thread Gwendal Roué
> Le 24 juil. 2017 à 19:02, petern a écrit : > > To those posting low information congratulatory notes on this thread, you'd > better hold off on popping those champagne corks. The current API already > contains irreversible additions to solve this problem that fell short. Congrats can also go

Re: [sqlite] New draft document on the new pointer-passing interfaces

2017-07-24 Thread Gwendal Roué
by a blob'ed pointer. Or did I miss something? Gwendal Roué ___ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] rowid as foreign key

2017-07-24 Thread Gwendal Roué
. For example : $ sqlite3 /tmp/db.sqlite sqlite> CREATE TABLE foo (c); sqlite> CREATE TABLE bar (c); sqlite> INSERT INTO foo (c) VALUES ('foo'); sqlite> INSERT INTO bar (c) VALUES ('bar'); sqlite> SELECT foo.rowid, foo.c, bar.rowid, bar.c FRO

Re: [sqlite] Problem with the new pointer-passing interface

2017-08-03 Thread Gwendal Roué
to write, would undermine the security of the > pointer-passing APIs. Thus, the requirement that pointer types be static > strings helps to prevent misuse of the pointer-passing interfaces. Gwendal Roué ___ sqlite-users mailing list sqlite-users@mai

Re: [sqlite] Problem with the new pointer-passing interface

2017-08-03 Thread Gwendal Roué
> Le 3 août 2017 à 15:27, Ulrich Telle a écrit : > > Thanks for the pointer. I have to admit that I referred to > http://sqlite.org/c3ref/bind_blob.html > . No offense :-) The SQLite documentation has organically grown, and information is often scatter

Re: [sqlite] Problem with the new pointer-passing interface

2017-08-03 Thread Gwendal Roué
But... why don't you simply ask your users for a static string as well??? C++ makes it trivial to support this requirement of the C API. // pointerType should be a static string void wxSQLite3Statement::Bind(int paramIndex, void* pointer, char *pointerType, void(*DeletePointer)(v

Re: [sqlite] Problem with the new pointer-passing interface

2017-08-04 Thread Gwendal Roué
I agree that it's impossible to enforce "static strings" or "strings that live long enough" with the C/C++ type system. You chose to force key management down the throat of your users, with two problems : - All the potential memory leaks, thread races, etc that may occur if your key management

Re: [sqlite] Is it safe to use same sqlite connection sequentially between threads ?

2017-08-15 Thread Gwendal Roué
urpose, identical to single-threaded code. Serialized accesses from multiple threads is OK when the connection is in the "Multi-thread" or "Serialized" threading modes, but not in the "Single-thread" threading mode.

Re: [sqlite] Is it safe to use same sqlite connection sequentially between threads ?

2017-08-16 Thread Gwendal Roué
> Le 16 août 2017 à 08:38, Clemens Ladisch a écrit : > > Gwendal Roué wrote: >> Serialized accesses from multiple threads is OK when the connection is >> in the "Multi-thread" or "Serialized" threading modes, but not in the >> "Single

Re: [sqlite] Question of Table/Indices common to multiple Databases

2017-08-31 Thread Gwendal Roué
Hello John, ATTACH DATABASE may well be the statement that you need: https://www.sqlite.org/lang_attach.html <https://www.sqlite.org/lang_attach.html> It lets you use several sqlite files from a single database connection, and execute queries across all tables of all attached files. G

[sqlite] [Announcement] Mix and match Objective-C and Swift for SQLite access

2017-09-02 Thread Gwendal Roué
library will help developers that maintain Objective-C applications enjoy more Swift, at minimal cost. Links: - GRDBObjc: https://github.com/groue/GRDBObjc - GRDB: https://github.com/groue/GRDB.swift Thanks for reading, Gwendal Roué ___ sqlite-users

Re: [sqlite] Is the file I'm about to open an SQLite Database

2017-09-04 Thread Gwendal Roué
id database, read something. For example: "SELECT * FROM sqlite_master LIMIT 1" (I'm sure there are shorter/smarter test access, but this one does the job). SQLite will then fail unless the file is actually a database. Gwendal Roué ___ sqlite

Re: [sqlite] Binding an order by

2017-10-05 Thread Gwendal Roué
> Le 5 oct. 2017 à 20:45, Stephen Chrzanowski a écrit : > > Given the query: > > select EventID, Airline, ContactInfo,TicketID,CreateDate from tEvents where > Resolved=:Resolved order by :OrderBy > > I wanted to bind :OrderBy with field names and conditions based on user > preferences, but I t

Re: [sqlite] What is the most flexible way to exact the table name from a SQL statement

2017-10-29 Thread Gwendal Roué
e.html>). Find attached a C program that demonstrates the technique. $ cc -lsqlite3 created_table.c && ./a.out Create table foo: CREATE TABLE foo(a, b) No table creation: INSERT INTO bar (a) VALUES (1) No table creation: Some invalid SQL Gwendal Roué > Le 28 oct. 2017 à 14:44, Sh

Re: [sqlite] What is the most flexible way to exact the table name from a SQL statement

2017-10-29 Thread Gwendal Roué
I should have added that you can check for inserted/deleted/updated tables by looking for more codes than SQLITE_CREATE_TABLE. The provided sample code only checks for table creation. Gwendal > Le 29 oct. 2017 à 15:28, Gwendal Roué a écrit : > > Yes, there is a general way. > &g

Re: [sqlite] What is the most flexible way to exact the table name from a SQL statement

2017-10-29 Thread Gwendal Roué
Apologies: I have to amend again my suggestion. The authorizer has to be attached to a "real" database that already has a definition for the involved tables, if you need to know about insertions, deletions, and updates. Gwendal > Le 29 oct. 2017 à 15:37, Gwendal Roué a écrit :

[sqlite] advice about schema versioning and WAL

2017-12-28 Thread Gwendal Roué
er the schema at application start-up, which means that the schema is, practically speaking, stable after this initialisation phase. Do any of you have any better idea? Thanks in advance, regards, Gwendal Roué [1] https://sqlite.org/c3ref/set_authorizer.html

Re: [sqlite] advice about schema versioning and WAL

2017-12-29 Thread Gwendal Roué
pragma > will read the "database header" from the newest version of page 1 in the > wal file if required. > > Dan. > >> Le 28 déc. 2017 à 19:28, Gwendal Roué a écrit : >> >> Hello, >> >> Season's greetings to all SQLite fel

Re: [sqlite] SQLite 3.22.0 coming soon

2018-01-09 Thread Gwendal Roué
included. The latest version returns an empty string for the last parameter. 2. '^foo' used to be an invalid FTS5 pattern. It is valid in the latest version (but I did not check its behavior). Cheers, Gwendal Roué > Le 9 janv. 2018 à 19:46, Richard Hipp a écrit : > > Versio

Re: [sqlite] SQLite 3.22.0 coming soon

2018-01-09 Thread Gwendal Roué
> Le 9 janv. 2018 à 21:47, Richard Hipp a écrit : > > On 1/9/18, Gwendal Roué wrote: >> 1. For statements made of parameters, such as `SELECT ?, ?` or `SELECT :a, >> :b`, the sqlite3_column_name used to return the parameter name ("?" or ":a" >>

Re: [sqlite] SQLite 3.22.0 coming soon

2018-01-09 Thread Gwendal Roué
No more glitch with sqlite3_column_name :-) Thanks Richard, Gwendal > Le 10 janv. 2018 à 02:06, Richard Hipp a écrit : > > All of the minor issues mentioned by prior emails in this thread > should now be fixed. Thanks to everybody for proof-reading and > testing! > > Fresh source code is now

[sqlite] Change the update hook from the update hook?

2018-01-14 Thread Gwendal Roué
heir database > connections for the meaning of "modify" in this paragraph. According to this documentation, I'm note sure if sqlite3_update_hook itself modifies the database connection for the meaning of "modify" in the quoted documentation paragraph, and is th

Re: [sqlite] Change the update hook from the update hook?

2018-01-14 Thread Gwendal Roué
is is a guaranteed behavior? Gwendal > Le 14 janv. 2018 à 18:05, Gwendal Roué a écrit : > > Hello, > > Is it valid to change the update hook from the update hook itself? > > The reason for this question is the following: when a notified database > change makes

[sqlite] 3.17.0 bug report: FTS5 insertion puts a wrong value in last_insert_rowid

2017-03-26 Thread Gwendal Roué
of the the SQL function last_insert_rowid() function is 1, not 10. Same for the C function sqlite3_last_insert_rowid(). This bug was not present in 3.16.2. This bug is very similar to http://www.sqlite.org/src/tktview?name=13137dccf3, which affected FTS3. Cheers, Gw

Re: [sqlite] 3.17.0 bug report: FTS5 insertion puts a wrong value in last_insert_rowid

2017-03-27 Thread Gwendal Roué
* Florian Weimer wrote: > * Gwendal Roué: > >> I have found a regression in SQLite 3.17.0. In the following SQL statements: >> >>CREATE VIRTUAL TABLE t1 USING FTS5(content); >>INSERT INTO t1(content) VALUES ('some text'); >>SELECT l

[sqlite] Feature request: please have the sqlite3_set_authorizer callback given the full list of tables and columns used by a statement

2017-04-07 Thread Gwendal Roué
So here is my feature request: please have the sqlite3_set_authorizer callback given the full list of tables and columns used by a statement. Cheers, Gwendal Roué [1] http://github.com/groue/GRDB.swift [2] https://sqlite.org/c3ref/set_authorizer.html _

[sqlite] Proposition: introduce a new SQLITE_READ_TABLE Authorizer Action Code

2017-05-06 Thread Gwendal Roué
it is not found by sqlite3LocateTableItem(), either it has to be authorized by the authorization callback. I'm not familiar with the way code and feature requests are handled within the SQLite community. If you are interested about this patch, let me know how I can help! Gwendal Roué $ fossil

Re: [sqlite] Proposition: introduce a new SQLITE_READ_TABLE Authorizer Action Code

2017-05-06 Thread Gwendal Roué
> Le 6 mai 2017 à 15:12, Gwendal Roué a écrit : > > Hello, > > This email contains a patch that introduces a new authorizer action code: > SQLITE_READ_TABLE. My patch did not work when the authorizer callback would not return SQLITE_OK. Please find the fixed patch bel

Re: [sqlite] Proposition: introduce a new SQLITE_READ_TABLE Authorizer Action Code

2017-05-08 Thread Gwendal Roué
at the table t1 is used, and can forbid this access. Gwendal Roué > Gwendal. Your proposal last month for adding column names to the callback > parameters seemed more sensible. > > The first question that comes to mind when new callback modes are to being > proposed is what els

Re: [sqlite] Proposition: introduce a new SQLITE_READ_TABLE Authorizer Action Code

2017-05-08 Thread Gwendal Roué
#x27;t come from thin air, but can be implemented. Yes, I wish the core team would give at least an acknowledgement that something could be improved. Gwendal Roué ___ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Proposition: introduce a new SQLITE_READ_TABLE Authorizer Action Code

2017-05-08 Thread Gwendal Roué
lves. Forking SQLite is a very hard path, unfortunately :-) Gwendal Roué ___ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Proposition: introduce a new SQLITE_READ_TABLE Authorizer Action Code

2017-05-08 Thread Gwendal Roué
e team may prefer not implementing my suggested SQLITE_READ_TABLE. But I wish they would react to the above scenario. Gwendal Roué [1] https://www.sqlite.org/c3ref/update_hook.html <https://www.sqlite.org/c3ref/update_hook.html> [2] https://sqlite.org/c3ref/commit_hook.html <https

Re: [sqlite] Proposition: introduce a new SQLITE_READ_TABLE Authorizer Action Code

2017-05-09 Thread Gwendal Roué
> Le 9 mai 2017 à 08:23, Gwendal Roué a écrit : > > As a reminder, I intend to use the authorisation system in order to tell if a > statement has an opportunity to impact on another statement, as a support for > a general database observation feature. > > Here is the ge

Re: [sqlite] Proposition: introduce a new SQLITE_READ_TABLE Authorizer Action Code

2017-05-09 Thread Gwendal Roué
> Le 9 mai 2017 à 15:02, Simon Slavin a écrit : > > On 9 May 2017, at 7:23am, Gwendal Roué <mailto:[email protected]>> wrote: > >> As a reminder, I intend to use the authorisation system in order to tell if >> a statement has an opportunity to impact o

Re: [sqlite] foreign key constraint failure

2017-05-09 Thread Gwendal Roué
eleted. Make sure to rollback the failed transaction, and restore foreign key checks: ROLLBACK PRAGMA foreign_keys = ON Gwendal Roué > Le 10 mai 2017 à 06:57, Mark Wagner a écrit : > > Is there a way to get sqlite to tell which foreign key constraint is > causing a failure? Some

Re: [sqlite] Proposition: introduce a new SQLITE_READ_TABLE Authorizer Action Code

2017-05-10 Thread Gwendal Roué
> Le 9 mai 2017 à 15:41, Gwendal Roué a écrit : > >>> As a reminder, I intend to use the authorisation system in order to tell if >>> a statement has an opportunity to impact on another statement, as a support >>> for a general database observation feature. &

Re: [sqlite] Proposition: introduce a new SQLITE_READ_TABLE Authorizer Action Code

2017-05-10 Thread Gwendal Roué
> Le 10 mai 2017 à 15:06, Dominique Devienne a écrit : > > On Wed, May 10, 2017 at 1:35 PM, Gwendal Roué > wrote: > >>> Le 9 mai 2017 à 15:41, Gwendal Roué a écrit : >>>> How are you going to handle TRIGGERs ? >>> >>> That's a

Re: [sqlite] Proposition: introduce a new SQLITE_READ_TABLE Authorizer Action Code

2017-05-10 Thread Gwendal Roué
{ case SQLITE_READ: if (strcmp(s1, "users") == 0 && strcmp(s2, "token") == 0) { return SQLITE_DENIED; } else { return SQLITE_OK; } default: ret

Re: [sqlite] Proposition: introduce a new SQLITE_READ_TABLE Authorizer Action Code

2017-05-11 Thread Gwendal Roué
> Le 11 mai 2017 à 14:29, Richard Hipp a écrit : > > On 5/11/17, Gwendal Roué wrote: > >> 1. Existing callbacks that catch SQLITE_READ expect a non-NULL column >> > > Very well. The behavior has been changed so that an SQLITE_READ with > an empty-stri

Re: [sqlite] NOT NULL integer primary key

2017-05-18 Thread Gwendal Roué
as the value that is eventually inserted in the database is NOT NULL. Gwendal Roué ___ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite3_reset and sqlite3_clear_bindings

2017-05-28 Thread Gwendal Roué
Hello Bart, > Le 28 mai 2017 à 13:03, Bart Smissaert a écrit : > > Using SQLite3 3.19.0 on a Windows machine. > I have some general questions about sqlite3_reset and > sqlite3_clear_bindings: > I am processing data from a 2D variant array (this is VB6). > > 1. I understand that after processing

Re: [sqlite] sqlite3_reset and sqlite3_clear_bindings

2017-05-28 Thread Gwendal Roué
> Le 28 mai 2017 à 13:24, Bart Smissaert a écrit : > >> Calling sqlite3_clear_bindings does the same thing as calling > sqlite3_bind_null for all arguments. > > Yes, I understand that, just thinking about efficiency. Then I don't know. Your experience will tell. >> I personnally call sqlite3_

[sqlite] Possible inaccuracy in "Isolation In SQLite" paper

2017-07-18 Thread Gwendal Roué
Hello all, The following sentence in https://www.sqlite.org/isolation.html does not exactly describe the behavior of SQLite (since many versions): > In WAL mode, SQLite exhibits "snapshot isolation". When a read transaction > starts, that reader continues to see an unchanging "snapshot" of the

Re: [sqlite] Possible inaccuracy in "Isolation In SQLite" paper

2017-07-18 Thread Gwendal Roué
e filesystem. Locks are not acquired until the first > read or write operation. The first read operation against a database creates > a SHARED lock and the first write operation creates a RESERVED lock." > > > -Original Message- > From: sqlite-users [mailto:sqlite-user

Re: [sqlite] Possible inaccuracy in "Isolation In SQLite" paper

2017-07-20 Thread Gwendal Roué
t#L516-L540 for an implementation For a description of the benefits that users can have from such precision snapshotting, read: https://github.com/groue/GRDB.swift/blob/master/README.md#advanced-databasepool And on such robust ground, you can build very high-level constructs like https://github.co

[sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
ex. Thank you for considering this issue. Cheers, Gwendal Roué ___ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
> Le 8 déc. 2014 à 14:14, Richard Hipp a écrit : > > On Mon, Dec 8, 2014 at 4:55 AM, Gwendal Roué wrote: > >> Hi, >> >> Unique indexes make some valid update queries fail. >> >> Please find below the SQL queries that lead to the unexpected error

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
age- > From: Richard Hipp > To: General Discussion of SQLite Database > Sent: Mon, Dec 8, 2014 8:14 am > Subject: Re: [sqlite] sqlite bugreport : unique index causes valid updates to > fail > > > On Mon, Dec 8, 2014 at 4:55 AM, Gwendal Roué wrote: > >> Hi, >&g

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
, and then re-create it after the update. This solution is good enough as my table is not that big, and the "pure" code path remains intact, with only two inserted statements that are easily described and commented. Gwendal Roué > Le 8 déc. 2014 à 14:24, J T a écrit : > > Try h

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
> Le 8 déc. 2014 à 14:39, Simon Slavin a écrit : > > On 8 Dec 2014, at 1:31pm, Gwendal Roué wrote: > >> We share the same conclusion. I even tried to decorate the update query with >> "ORDER" clauses, in a foolish attempt to reverse the ordering of row &g

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
> Le 8 déc. 2014 à 14:48, RSmith a écrit : > > > On 2014/12/08 11:55, Gwendal Roué wrote: >> Hi, >> >> Unique indexes make some valid update queries fail. >> >> Please find below the SQL queries that lead to the unexpected error: >> >> -

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
> Le 8 déc. 2014 à 15:18, John McKown a écrit : > > On Mon, Dec 8, 2014 at 8:15 AM, Marc L. Allen > wrote: > >> I am like you, Gwendal, in that I don't like that behavior in SQLite; >> however, not liking it doesn't make it a bug. >> > > ​On another of my forums, this is called a BAD - Broke

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
_ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > >> Le 8 déc. 2014 à 10:55, Gwendal Roué a écrit : >> >> Hi, >> >> Unique indexes make some val

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
> Le 8 déc. 2014 à 17:21, Simon Slavin a écrit : > >> Why not an opt-in way to ask for deferred constraint checking. The key here >> is only to allow perfectly legit requests to run. With all the due respect >> to sqlite implementors and the wonderful design of sqlite. > > SQL-99 includes a s

[sqlite] Issue report: sqlite3_set_authorizer triggers error 4/516 (SQLITE_ABORT_ROLLBACK) during statement iteration

2019-08-01 Thread Gwendal Roué
the trouble: I could only trigger the error with the provided query, that involve two tables. Finally, I post this message after investigation for an issue in the GRDB Swift library: https://github.com/groue/GRDB.swift/issues/583 Thanks for reading, Gwendal Roué #include #include int author

Re: [sqlite] Issue report: sqlite3_set_authorizer triggers error 4/516 (SQLITE_ABORT_ROLLBACK) during statement iteration

2019-08-01 Thread Gwendal Roué
Yes, Richard, this fixes the problem! Tested with my local copy of SQLite 3.28.0. On Thu, Aug 1, 2019 at 9:23 PM Richard Hipp wrote: > On 8/1/19, Gwendal Roué wrote: > > > > 1. set authorizer > > 2. compile statement > > 3. reset authorizer > > 4. step > &

Re: [sqlite] Issue report: sqlite3_set_authorizer triggers error 4/516 (SQLITE_ABORT_ROLLBACK) during statement iteration

2019-08-01 Thread Gwendal Roué
rt for raw SQL. I'm not sure this is what authorizers were designed for, but... I can't live without them now :-) On Thu, Aug 1, 2019 at 10:26 PM Gwendal Roué wrote: > Yes, Richard, this fixes the problem! Tested with my local copy of SQLite > 3.28.0. > > On Thu, Aug 1, 201

Re: [sqlite] Issue report: sqlite3_set_authorizer triggers error 4/516 (SQLITE_ABORT_ROLLBACK) during statement iteration

2019-08-01 Thread Gwendal Roué
depending of the invalidated statements. But the real fix for "my" issue is to refactor my use of authorizers. On Thu, Aug 1, 2019 at 10:47 PM Gwendal Roué wrote: > For the context, GRDB uses authorizers as a support for its database > observation features: > > - during the

Re: [sqlite] Issue report: sqlite3_set_authorizer triggers error 4/516 (SQLITE_ABORT_ROLLBACK) during statement iteration

2019-08-02 Thread Gwendal Roué
this can still be seen as a misuse of the library? Some insights would be appreciated. Thanks in advance On Thursday, August 1, 2019, Richard Hipp wrote: > On 8/1/19, Gwendal Roué wrote: > > > > 1. set authorizer > > 2. compile statement > > 3. reset authorizer > &

Re: [sqlite] Issue report: sqlite3_set_authorizer triggers error 4/516 (SQLITE_ABORT_ROLLBACK) during statement iteration

2019-08-02 Thread Gwendal Roué
pection features provided by SQLite authorizers (what will be read/written). And prevention of the truncate optimization. Now that I hope I have better explained where I talk from, I hope you will read again my previous question. Thanks in advance, Gwendal Roué

[sqlite] Undo sqlite3_snapshot_open?

2019-09-19 Thread Gwendal Roué
it correct? Thanks is advance, Gwendal Roué ___ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Undo sqlite3_snapshot_open?

2019-09-19 Thread Gwendal Roué
Woohoo, thanks Dan! I'm going to try this very soon :-) Gwendal On Thu, Sep 19, 2019 at 1:18 PM Dan Kennedy wrote: > > On 19/9/62 18:13, Gwendal Roué wrote: > > Hello, > > > > I am looking at the snapshot experimental APIs, and it looks like once a >

[sqlite] Conflict between snapshots and checkpoints

2019-09-26 Thread Gwendal Roué
get(). If it is not, then I humbly suggest that this feature would be added, and am willing to listen to the opinion of SQLite experts on this subject. Regards, Gwendal Roué [1] https://www.sqlite.org/c3ref/snapshot_open.html [2] https://www.sqlite.org/c3ref/snapshot_get.html [3] https://www.sqlite

Re: [sqlite] Conflict between snapshots and checkpoints

2019-09-26 Thread Gwendal Roué
, and I would appreciate a confirmation! Thanks is advance, Gwendal Roué On Thu, Sep 26, 2019 at 6:13 PM Gwendal Roué wrote: > Hello, > > The documentation for sqlite3_snapshot_open() [1] says: > > > A call to sqlite3_snapshot_open() will fail to open if the specified > snapshot ha

Re: [sqlite] Conflict between snapshots and checkpoints

2019-09-27 Thread Gwendal Roué
y transactions can prevent checkpoints from running to completion. Thank you very much Richard! Gwendal On Fri, Sep 27, 2019 at 12:35 PM Richard Hipp wrote: > On 9/26/19, Gwendal Roué wrote: > > > > My question is: is it possible to prevent checkpoints from completing > >

Re: [sqlite] The LIKE operator and Swift

2019-09-27 Thread Gwendal Roué
E_OK {do whatever} For a more detailed explanation of the reasons why you get an error with this LIKE query see this dedicated FAQ: https://github.com/groue/GRDB.swift/blob/master/README.md#sqlite-error-21-wrong-number-of-statement-arguments-with-like-queries Gwendal Roué On Thu, Sep 26, 2019 at 3:

Re: [sqlite] Conflict between snapshots and checkpoints

2019-09-28 Thread Gwendal Roué
ipp wrote: > On 9/26/19, Gwendal Roué wrote: > > > > My question is: is it possible to prevent checkpoints from completing > > successfully when a snapshot is alive? > > > > That depends on what you mean by "alive"? > > An sqlite3_snapshot_get() simp

Re: [sqlite] Conflict between snapshots and checkpoints

2019-09-29 Thread Gwendal Roué
ists snapshots, with sqlite3_wal_hook(). I **really** hope this protects snapshots for good. Of course, a confirmation from knowledgeable people would be appreciated :-) Gwendal On Sat, Sep 28, 2019 at 4:06 PM Richard Damon wrote: > On 9/26/19 12:13 PM, Gwendal Roué wrote: > > Hello,

Re: [sqlite] Conflict between snapshots and checkpoints

2019-09-29 Thread Gwendal Roué
t 2:13 PM Keith Medcalf wrote: > > On Sunday, 29 September, 2019 01:28, Gwendal Roué > wrote: > > >But now I fail to understand the indented use case of sqlite3 snapshots.. > >Why allow to reuse snapshots with several calls to open()? Why do they > >exist at all, sin

Re: [sqlite] Conflict between snapshots and checkpoints

2019-09-29 Thread Gwendal Roué
have been very helpful by completing the existing documentation :-) Gwendal On Sun, Sep 29, 2019 at 7:41 PM Richard Damon wrote: > On 9/29/19 11:40 AM, Gwendal Roué wrote: > > Thank you very much Keith. > > > > Apologies for my imprecise vocabulary, and the use of the same &qu

Re: [sqlite] Conflict between snapshots and checkpoints

2019-09-30 Thread Gwendal Roué
ts phantom reads, and so we actually get actual SNAPSHOT ISOLATION (as written in https://www.sqlite.org/isolation.html). On Mon, Sep 30, 2019 at 10:06 AM Dominique Devienne wrote: > On Sun, Sep 29, 2019 at 2:13 PM Keith Medcalf wrote: > > > On Sunday, 29 September, 2019 01:28, Gwen

Re: [sqlite] PRAGMA table_info fails with "no such tokenizer"

2019-09-30 Thread Gwendal Roué
t does not use any custom FTS5 tokenizer. Gwendal Roué On Sun, Sep 29, 2019 at 12:24 PM Anatoli Babenia wrote: > Python 3.7.4 (default, Jul 9 2019, 16:32:37) > [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] on linux > Type "help", "copyright", "credits" or &quo

Re: [sqlite] Ensure a snapshot remains readable

2019-10-15 Thread Gwendal Roué
;writer" connection. 5. And now you can read from the "snapshot" connection and access a guaranteed "official state" until the end of the "snapshot" transaction. Hope this helps, Gwendal Roué ___ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users