Re: [sqlite] BedrockDB interview on Floss Weekly

2017-10-29 Thread David Barrett
On Fri, Oct 27, 2017 at 4:34 AM, Warren Young wrote: > Before I get to the questions, I haven’t listened to the FLOSS episode > yet, so please forgive me if these were asked and answered on the podcast. > Just tell me if so, because I will eventually get to it. > > 1. I don’t

Re: [sqlite] BedrockDB interview on Floss Weekly

2017-10-29 Thread David Barrett
Thanks for the fantastic questions! Answers inline: I had never heard of you guys, this looks amazing! How can you only have > 222 github stars?! > Heh, feel free to give it one more! > Paxos, so needs at least 3 nodes? > It works with any number of nodes, but I recommend 6 as the ideal: two

Re: [sqlite] sqlite_stat4 table

2017-10-29 Thread Richard Hipp
On 10/29/17, korablev wrote: > > Probably the main question is not "why there are 2 samples for 1 value", but > "why there is so strange (if not wrong) statistics?". > STAT4 is designed to help SQLite run faster for queries of tables with millions of rows. For a table

Re: [sqlite] sqlite_stat4 table

2017-10-29 Thread korablev
Richard Hipp-3 wrote > See https://www.sqlite.org/fileformat.html#the_sqlite_stat4_table Thanks, I have already read it, but there is no explanation about this: korablev wrote > statistics in the second row seems to be wrong: there are 0 rows which are > less than 1(for the reason that the only

Re: [sqlite] sqlite_stat4 table

2017-10-29 Thread Richard Hipp
On 10/29/17, korablev wrote: > DROP TABLE IF EXISTS t1; > create table t1(id primary key, a, b) without rowid; > create index t1a on t1(a); > insert into t1 values(1, 1, 2), (2, 1, 3); > analyze t1; > select * from sqlite_stat4 where idx = 't1a'; > > t1|t1a|2 1|0 0|0 0|

[sqlite] Top 10 web development mistakes leading to security vulnerabuilities

2017-10-29 Thread Simon Slavin
This article gives details and pointers to examples. The final list has not yet been announced, but this is about a late draft. "Every few years, the Open Web Application Security

[sqlite] sqlite_stat4 table

2017-10-29 Thread korablev
DROP TABLE IF EXISTS t1; create table t1(id primary key, a, b) without rowid; create index t1a on t1(a); insert into t1 values(1, 1, 2), (2, 1, 3); analyze t1; select * from sqlite_stat4 where idx = 't1a'; t1|t1a|2 1|0 0|0 0| t1|t1a|2 1|0 1|0 1| Firstly, there is no blob values for

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

2017-10-29 Thread Bart Smissaert
I have a VB6/VBA procedure that takes a SQL and produces the table that was altered by that SQL. I think it works with any SQL, but not sure if is of any help to you. RBS On Sat, Oct 28, 2017 at 1:44 PM, Shane Dev wrote: > Hello, > > Let's say I have a table containing of

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

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

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

2017-10-29 Thread Gwendal Roué
Yes, there is a general way. To know if a statement creates a database table, 1. Open a private, in-memory, database connection 2. Register an authorizer with sqlite3_set_authorizer (https://sqlite.org/c3ref/set_authorizer.html ). 3. Compile the