Re: [sqlite] Ensure a snapshot remains readable

2019-10-15 Thread Gwendal Roué
ot; 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 sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

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] 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] 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 sam

Re: [sqlite] Conflict between snapshots and checkpoints

2019-09-29 Thread Gwendal Roué
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, since we can

Re: [sqlite] Conflict between snapshots and checkpoints

2019-09-29 Thread Gwendal Roué
ere exists 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: > > Hel

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] The LIKE operator and Swift

2019-09-27 Thread Gwendal Roué
hatever} 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:26 PM Dani

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] Conflict between snapshots and checkpoints

2019-09-26 Thread Gwendal Roué
uld 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 has been ove

[sqlite] Conflict between snapshots and checkpoints

2019-09-26 Thread Gwendal Roué
. 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.org/

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] Undo sqlite3_snapshot_open?

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

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

2019-08-02 Thread Gwendal Roué
ction 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é _

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-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-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, 2019 at 9:23

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 > &

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

2019-08-01 Thread Gwendal Roué
ing 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] Change the update hook from the update hook?

2018-01-14 Thread Gwendal Roué
if this is a guaranteed behavior? Gwendal > Le 14 janv. 2018 à 18:05, Gwendal Roué <gwendal.r...@gmail.com> 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

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

2018-01-14 Thread Gwendal Roué
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 thus forbid

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

Re: [sqlite] SQLite 3.22.0 coming soon

2018-01-09 Thread Gwendal Roué
> Le 9 janv. 2018 à 21:47, Richard Hipp <d...@sqlite.org> a écrit : > > On 1/9/18, Gwendal Roué <gwendal.r...@gmail.com> wrote: >> 1. For statements made of parameters, such as `SELECT ?, ?` or `SELECT :a, >> :b`, the sqlite3_column_name used to return the p

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 <d...@sqlite.org> a écrit : >

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é <gwendal.r...@gmail.com> a écrit : >> >> Hello, >> >> Season's greetings to

[sqlite] advice about schema versioning and WAL

2017-12-28 Thread Gwendal Roué
eans 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 ___ sqlite-users mailing list sqlite-users@mai

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é <gwenda

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é <gwendal.r...@gmail.com> a écrit :

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] 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

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

2017-09-04 Thread Gwendal Roué
check if the file is a valid 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] [Announcement] Mix and match Objective-C and Swift for SQLite access

2017-09-02 Thread Gwendal Roué
this 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] 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

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 <clem...@ladisch.de> 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 th

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

2017-08-16 Thread Gwendal Roué
> it is, for practical purpose, 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 m

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

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,

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

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

2017-08-03 Thread Gwendal Roué
a new SQL > function that can manufacture pointer values directly from SQL. Such a > function, if possible 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.

Re: [sqlite] rowid as foreign key

2017-07-24 Thread Gwendal Roué
M foo, bar WHERE foo.rowid = bar.rowid; 1|foo|1|bar Gwendal Roué ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

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

2017-07-24 Thread Gwendal Roué
f the content pointed by a blob'ed pointer. Or did I miss something? Gwendal Roué ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

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

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 <d...@sqlite.org> a écrit : > > https://www.sqlite.org/draft/bindptr.html Thank you very much for this detailed rationale! Gwendal Roué ___ sqlite-users mailing list sqlite-users@mailinglists.

Re: [sqlite] SQLite 3.20.0 postponed

2017-07-22 Thread Gwendal Roué
> Le 22 juil. 2017 à 08:14, Gwendal Roué <gwendal.r...@gmail.com> 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

Re: [sqlite] SQLite 3.20.0 postponed

2017-07-22 Thread Gwendal Roué
> Le 21 juil. 2017 à 18:50, Richard Hipp <d...@sqlite.org> a écrit : > > On 7/21/17, Gwendal Roué <gwendal.r...@gmail.com> wrote: >> >> First, this strcmp() give a lot of work to languages that wrap SQLite and >> lack support for "stat

Re: [sqlite] SQLite 3.20.0 postponed

2017-07-21 Thread Gwendal Roué
> Le 21 juil. 2017 à 17:55, Gwendal Roué <gwendal.r...@gmail.com> 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 deal

Re: [sqlite] SQLite 3.20.0 postponed

2017-07-21 Thread Gwendal Roué
want such API pollution. What were your rationale behind this choice? Thanks in advance, Gwendal Roué ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

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

2017-07-20 Thread Gwendal Roué
0a2f7097acbb71e41fb55baeda9d98c441d/GRDB/Core/DatabasePool.swift#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 ro

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

2017-07-18 Thread Gwendal Roué
thing to the 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-use

[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] 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. >>

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

Re: [sqlite] NOT NULL integer primary key

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

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 <d...@sqlite.org> a écrit : > > On 5/11/17, Gwendal Roué <gwendal.r...@gmail.com> wrote: > >> 1. Existing callbacks that catch SQLITE_READ expect a non-NULL column >> > > Very well. The behavior has been chan

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

2017-05-11 Thread Gwendal Roué
*s3, const char *s4) { switch(code) { case SQLITE_READ: if (strcmp(s1, "users") == 0 && strcmp(s2, "token") == 0) { return SQLITE_DENIED; } else {

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 <ddevie...@gmail.com> a écrit : > > On Wed, May 10, 2017 at 1:35 PM, Gwendal Roué <gwendal.r...@gmail.com> > wrote: > >>> Le 9 mai 2017 à 15:41, Gwendal Roué <gwendal.r...@gmail.com> a écrit :

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é <gwendal.r...@gmail.com> 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 d

Re: [sqlite] foreign key constraint failure

2017-05-10 Thread Gwendal Roué
d. 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 <m...@google.com> a écrit : > > Is there a way to get sqlite to tell which foreign key constraint is > causing

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 <slav...@bigfraud.org> a écrit : > > On 9 May 2017, at 7:23am, Gwendal Roué <gwendal.r...@gmail.com > <mailto:gwendal.r...@gmail.com>> wrote: > >> As a reminder, I intend to use the authorisation system

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é <gwendal.r...@gmail.com> 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 observati

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

2017-05-09 Thread Gwendal Roué
se, the core 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_ho

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

2017-05-08 Thread Gwendal Roué
couraged to write their own extensions and host them themselves. Forking SQLite is a very hard path, unfortunately :-) Gwendal Roué ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org 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é
sal doesn'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 sqlite-users@mailinglists.sqlite.org 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é
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 else would be miss

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é <gwendal.r...@gmail.com> 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. Ple

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

2017-05-06 Thread Gwendal Roué
ther 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 info

[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é
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-users

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 <f...@deneb.enyo.de> 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'); >

[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, Gwendal Roué

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. >

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

2014-12-08 Thread Gwendal Roué
xists in a "sessions" branch.) > > Nico > -- > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > >> Le 8 déc. 2014 à 10:55, Gwendal Roué <g...@pierlis.com> a écrit : >> >&g

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. >>

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 <rsm...@rsweb.co.za> 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

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 <slav...@bigfraud.org> a écrit : > > On 8 Dec 2014, at 1:31pm, Gwendal Roué <g...@pierlis.com> wrote: > >> We share the same conclusion. I even tried to decorate the update query with >> "ORDER" clauses, in a

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 <drenho...@aol.com> a écri

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

2014-12-08 Thread Gwendal Roué
Original Message- > From: Richard Hipp <d...@sqlite.org> > To: General Discussion of SQLite Database <sqlite-users@sqlite.org> > Sent: Mon, Dec 8, 2014 8:14 am > Subject: Re: [sqlite] sqlite bugreport : unique index causes valid updates to > fail > > >

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 <d...@sqlite.org> a écrit : > > On Mon, Dec 8, 2014 at 4:55 AM, Gwendal Roué <g...@pierlis.com> wrote: > >> Hi, >> >> Unique indexes make some valid update queries fail. >> >> Please find b

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

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