[sqlite] Assertion `memIsValid([i])' failed.

2020-01-03 Thread Yongheng Chen
Hi,

We found an assertion failed in sqlite. And this assertion seems not to be 
fixed completely. Here’s the POC:
—
CREATE TABLE v0 ( v1 INTEGER PRIMARY KEY ) ;
INSERT INTO v0 ( v1 ) VALUES ( NULL ) ,( NULL ) ;
SELECT ifnull ( v1 , max ( ( SELECT printf ( 's%' , 3 , 0 , 0.10 ) ) ) ) , 
max ( v1 ) , count ( v1 ) FROM v0 ;
—-

This exists in the latest development code built with debug flag.

Yongheng & Rui
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Question about passwords in System.Data.Sqlite

2020-01-03 Thread Keith Medcalf

On Thursday, 2 January, 2020 15:48, Mike King  wrote:

>I'm porting some code from .Net 4.8 to .Net Core 3.1 using the latest
>System.Data.Sqlite. How do I change / set a database password if my
>password is a byte array? It looks like I can use Pragma Key= if my
>password is text but I use hex passwords.

Assuming it is supported then one sends blobs the way one always sends 
arbitrary blobs:

pragma key=X'0123456789ABCDEF';

-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Crash bug in sqlite

2020-01-03 Thread Yongheng Chen
Hi,

We found a crash bug in sqlite. Here’s the POC:
—
CREATE VIRTUAL TABLE v0 USING fts4 ( v1 AS( typeof ( v5 ) ) , v6 UNIQUE 
GENERATED ALWAYS AS( v5 ) , v2 INT , v3 INT UNIQUE GENERATED ALWAYS AS( NULL ) 
, v4 INTEGER UNIQUE , v5 DOUBLE PRIMARY KEY CHECK( v4 ) , v7 VARCHAR(20) UNIQUE 
) ;
INSERT INTO v0 ( v5 ) VALUES ( 9223372036854775808.00 );
REPLACE INTO zipfile SELECT * FROM v0 WHERE EXISTS ( SELECT v2 FROM v0 
INTERSECT SELECT v4 FROM v0 ) ;
—-

This exists in the latest development code.

Yongheng & Rui
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FW: Questions about your "Performance Matters" talk re SQLite

2020-01-03 Thread sky5walk
I get SQLITE_MISUSE when attempting
sqlite3_config(SQLITE_CONFIG_MEMSTATUS, 0);
immediately after opening a db connection?
My connection has THREADSAFE = 1.

On Thu, Jan 2, 2020 at 7:32 PM Keith Medcalf  wrote:

>
> Indeed turning off memstatus leads to a 500% (from ~3s to ~0.5s)
> performance increase.
> Changing the threading mode or the indirection level of the mutexes calls
> seems to have no significant effect.
>
> --
> The fact that there's a Highway to Hell but only a Stairway to Heaven says
> a lot about anticipated traffic volume.
>
> >-Original Message-
> >From: sqlite-users  On
> >Behalf Of Richard Hipp
> >Sent: Thursday, 2 January, 2020 16:00
> >To: SQLite mailing list 
> >Subject: Re: [sqlite] FW: Questions about your "Performance Matters" talk
> >re SQLite
> >
> >On 1/2/20, Barry Smith  wrote:
> >> One thing that really stands is “creates 64 threads that operate on
> >> independent tables in the sqlite database, performing operations that
> >should
> >> be almost entirely independent.”
> >>
> >
> >Looking at the main.c file
> >(https://github.com/plasma-
> >umass/coz/blob/master/benchmarks/sqlite/main.c)
> >it appears that the test creates 64 separate database connections,
> >each with a separate in-memory database.
> >
> >There are two sources of contention here:
> >
> >(1) SQLite keeps track of the total amount of memory it is using on
> >all threads.  So for each malloc() and free() it has to take a mutex
> >to increase or decrease the counters.  This is probably the primary
> >source of contention.  It can be disabled by running:
> >
> >sqlite3_config(SQLITE_CONFIG_MEMSTATUS, 0);
> >
> >early in main(), before any other SQLite interface calls.  Make that
> >one change and I suspect that most of the thread contention will go
> >away.
> >
> >(2) SQLite has a single PRNG used by all threads.  And so there is a
> >mutex that has to be taken whenever a new random number is generated.
> >But the workload does not appear to be using any random numbers, so I
> >doubt that this is an actual problem in this case.
> >
> >> I’d encourage you *not* to use cpu cycles as a proxy for runtime.
> >Dynamic frequency
> >> scaling can mess up these measurements, especially if the clock
> >frequency is dropped
> >> in response to the program’s behavior.
> >
> >The task requires X number of CPU cycles *regardless* of the clock
> >frequency.  If the clock slows down, then it takes more elapse time to
> >run those X cycles, but it does not increase or decrease the number of
> >cycles required.  So in that sense, counting the number of CPU cycles
> >is an excellent measure of effort required to complete the
> >computation.
> >
> >Furthermore, the idea that thread contention will cause the CPU clock
> >to slow down seems silly.  Technically, I suppose such a think might
> >actually happen - IF you do all of your work as multiple threads
> >within the same process and they all blocked on the same resource.
> >The point is, you shouldn't do that.  Instead of one process with 64
> >threads, how about 64 processes with one thread each.  Since they are
> >all doing different things (serving independent HTTP requests, for
> >example) they might as well each have their own address space.
> >Keeping each job in a separate process provides isolation for added
> >security.  And it completely eliminates the need for mutexes and the
> >accompanying thread contention.
> >
> >If SQLite runs faster for you when you make direct calls to
> >pthread_mutex_lock() rather than indirect calls, how much faster would
> >it run if you completely eliminated all calls to pthread_mutex_lock()
> >by putting each task in a separate process?
> >
> >
> >--
> >D. Richard Hipp
> >d...@sqlite.org
> >___
> >sqlite-users mailing list
> >sqlite-users@mailinglists.sqlite.org
> >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FW: Questions about your "Performance Matters" talk re SQLite

2020-01-03 Thread Richard Hipp
On 1/3/20, sky5w...@gmail.com  wrote:
> Is there a query function for these and other config settings?
> I see no sqlite3_config_get() in sqlite3.h.

There is no query function for the SQLITE_CONFIG_MEMSTATUS setting.
-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FW: Questions about your "Performance Matters" talk re SQLite

2020-01-03 Thread Keith Medcalf

On Friday, 3 January, 2020 11:32, sky5w...@gmail.com wrote:

> Is there a query function for these and other config settings?
> I see no sqlite3_config_get() in sqlite3.h.

No.  There are config options to get specific config data where that might be 
useful.  
Otherwise, you simply set the configuration to match your requirements.

That is, if you need to have configuration X, Y, and Z then just set it the way 
you want it.  Either the configuration is set that way or you get an error 
return (you do check return codes right, that is what they are for).  There is 
not really much point in doing "if memstatus is on turn it off" when you can 
just turn it off.
 
-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.




___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FW: Questions about your "Performance Matters" talk re SQLite

2020-01-03 Thread Keith Medcalf
On Friday, 3 January, 2020 09:30, sky5w...@gmail.com wrote:

>I get SQLITE_MISUSE when attempting
>sqlite3_config(SQLITE_CONFIG_MEMSTATUS, 0);
>immediately after opening a db connection?
>My connection has THREADSAFE = 1.

That is correct.  You must configure the library before it is initialized, not 
after.

https://sqlite.org/c3ref/config.html

-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume. 



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FW: Questions about your "Performance Matters" talk re SQLite

2020-01-03 Thread sky5walk
Is there a query function for these and other config settings?
I see no sqlite3_config_get() in sqlite3.h.

On Fri, Jan 3, 2020 at 11:36 AM Keith Medcalf  wrote:

> On Friday, 3 January, 2020 09:30, sky5w...@gmail.com wrote:
>
> >I get SQLITE_MISUSE when attempting
> >sqlite3_config(SQLITE_CONFIG_MEMSTATUS, 0);
> >immediately after opening a db connection?
> >My connection has THREADSAFE = 1.
>
> That is correct.  You must configure the library before it is initialized,
> not after.
>
> https://sqlite.org/c3ref/config.html
>
> --
> The fact that there's a Highway to Hell but only a Stairway to Heaven says
> a lot about anticipated traffic volume.
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Upgrading from version 3.6.16 to 3.30.1

2020-01-03 Thread Richard Watt
I'm currently updating a C# .NET application that uses SQLite 3.6.16 to
run under a new Siemens Sinumerik version and I'd also like to update it
to use the latest SQLite, which is 3.30.1.

Does anyone know of any potential issues I might encounter and how to
correct them please? I've tried a Google search but not really finding
much that helps.

Best regards,

-- 
Richard Watt


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FW: Questions about your "Performance Matters" talk re SQLite

2020-01-03 Thread Eric Grange
> Indeed turning off memstatus leads to a 500% (from ~3s to ~0.5s)
performance increase.
> Changing the threading mode or the indirection level of the mutexes calls
seems to have no significant effect.

That is quite significant.
Looking at the code, it seems the mutex requirement is mostly for the soft
heap limit, maybe there could be a way to use atomic instruction to
maintain the stats ?
The highwater stat could be handled by a CAS (loop), and this should make
the memstatus data cheaper overall when soft heap limit is not required.

(my use case involved a hundreds of independent SQLite databases from a
single process, I have not benchmarked yet, but I am probably hitting that
mutex hard as well)

Eric




Le ven. 3 janv. 2020 à 17:36, Keith Medcalf  a écrit :

> On Friday, 3 January, 2020 09:30, sky5w...@gmail.com wrote:
>
> >I get SQLITE_MISUSE when attempting
> >sqlite3_config(SQLITE_CONFIG_MEMSTATUS, 0);
> >immediately after opening a db connection?
> >My connection has THREADSAFE = 1.
>
> That is correct.  You must configure the library before it is initialized,
> not after.
>
> https://sqlite.org/c3ref/config.html
>
> --
> The fact that there's a Highway to Hell but only a Stairway to Heaven says
> a lot about anticipated traffic volume.
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] INSERT OR REPLACE in trigger body fails with UNIQUE constraint

2020-01-03 Thread Mike _
Hello mailing list, happy new year! I was wondering if anyone can help
explain why this is an error:
---
sqlite> pragma foreign_keys = on;
sqlite> drop table if exists child;
sqlite> drop table if exists parent;
sqlite> drop table if exists changelog;
sqlite> create table parent (
   ...> parent_id text not null primary key,
   ...> parent_name text
   ...> );
sqlite> create table child (
   ...> child_id text not null primary key,
   ...> parent_id text not null references parent on update cascade,
   ...> child_name text
   ...> );
sqlite> create table changelog (
   ...> change_id integer not null primary key autoincrement,
   ...> tbl text not null,
   ...> id text not null,
   ...> unique (tbl, id)
   ...> );
sqlite> DROP TRIGGER IF EXISTS child_inserts;
sqlite> CREATE TRIGGER child_inserts AFTER INSERT ON child
   ...> BEGIN
   ...> INSERT OR REPLACE INTO changelog (tbl, id) VALUES ('child',
NEW.child_id);
   ...> END;
sqlite> DROP TRIGGER IF EXISTS child_updates;
sqlite> CREATE TRIGGER child_updates AFTER UPDATE ON child
   ...> BEGIN
   ...> INSERT OR REPLACE INTO changelog (tbl, id) VALUES ('child',
NEW.child_id);
   ...> END;
sqlite> insert into parent (parent_id, parent_name) VALUES
('some_parent_uuid', 'the parent');
sqlite> insert into child (child_id, parent_id, child_name) VALUES
('some_child_uuid', 'some_parent_uuid', 'the child');
sqlite> update parent set parent_id = 'updated' where parent_id =
'some_parent_uuid';
Error: UNIQUE constraint failed: changelog.tbl, changelog.id
---

The trigger documentation says: "An ON CONFLICT clause may be specified as
part of an UPDATE or INSERT action within the body of the trigger. However
if an ON CONFLICT clause is specified as part of the statement causing the
trigger to fire, then conflict handling policy of the outer statement is
used instead."

I tried adding an "OR REPLACE" to the update statement but that doesn't fix
the issue.
sqlite> update or replace parent set parent_id = 'updated' where parent_id
= 'some_parent_uuid';
Error: UNIQUE constraint failed: changelog.tbl, changelog.id

Is this because the "ON UPDATE CASCADE" action is considered to be the
statement causing the trigger to fire, meaning the default conflict
handling policy of ABORT is used? If so, is there any way to write
something like "ON UPDATE CASCADE OR REPLACE"? My current workaround is to
just manually delete from changelog in the child_updates trigger instead of
relying on INSERT OR REPLACE to do it.

Any insight would be much appreciated!
Thanks,
Mike
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] INSERT OR REPLACE in trigger body fails with UNIQUE constraint

2020-01-03 Thread Clemens Ladisch
Mike _ wrote:
> The trigger documentation says: "An ON CONFLICT clause may be specified as
> part of an UPDATE or INSERT action within the body of the trigger. However
> if an ON CONFLICT clause is specified as part of the statement causing the
> trigger to fire, then conflict handling policy of the outer statement is
> used instead."

Therefore, you should not ever use INSERT OR ... in a trigger.

> Is this because the "ON UPDATE CASCADE" action is considered to be the
> statement causing the trigger to fire,

This is the only thing that updates the child table.

> meaning the default conflict handling policy of ABORT is used?

Apparently.

> If so, is there any way to write something like "ON UPDATE CASCADE OR 
> REPLACE"?

No.  You have to do it by hand.


Regards,
Clemens
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FW: Questions about your "Performance Matters" talk re SQLite

2020-01-03 Thread sky5walk
Well, I told you I'm getting SQLITE_MISUSE so that kinda answers your side
question?
I am only interested in this topic for the performance gain so quoted.
I need to create a personal test case(my use model) to verify these
statements.
Querying the config state is helpful for a dll wrapped database, but I can
adapt without the '_get()' function.

On Fri, Jan 3, 2020 at 2:02 PM Keith Medcalf  wrote:

>
> On Friday, 3 January, 2020 11:32, sky5w...@gmail.com wrote:
>
> > Is there a query function for these and other config settings?
> > I see no sqlite3_config_get() in sqlite3.h.
>
> No.  There are config options to get specific config data where that might
> be useful.
> Otherwise, you simply set the configuration to match your requirements.
>
> That is, if you need to have configuration X, Y, and Z then just set it
> the way you want it.  Either the configuration is set that way or you get
> an error return (you do check return codes right, that is what they are
> for).  There is not really much point in doing "if memstatus is on turn it
> off" when you can just turn it off.
>
> --
> The fact that there's a Highway to Hell but only a Stairway to Heaven says
> a lot about anticipated traffic volume.
>
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Questions about your "Performance Matters" talk re SQLite

2020-01-03 Thread Tim Streater
On 03 Jan 2020, at 22:08, sky5walk  wrote:

> Querying the config state is helpful for a dll wrapped database, ...

What's one of them?


-- 
Cheers  --  Tim
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Question about passwords in System.Data.Sqlite

2020-01-03 Thread Warren Young
On Jan 2, 2020, at 3:47 PM, Mike King  wrote:
> 
> ...suspected administrivia! (not sure what that is -
> I guess it's a US English word but it's certainly not an English one).

It’s not defined in any of the mainstream dictionaries I have on my phone — 
three of them, because I’m a word nerd — but it’s only a matter of time before 
it’s added.

It’s appeared five times in the Corpus of Contemporary American English since 
2001, and that’s a lagging indicator of usage in the wider culture:

https://www.english-corpora.org/coca/

The term was commonly used at the high water mark of Usenet, the mid 1990s.  
There are 156 hits on faqs.org, which serves the old Usenet FAQs.

There’s a crowdsourced definition here, which is correct by my understanding of 
the term:

https://www.wordnik.com/words/administrivia

…but to drag this back on topic for the mailing list, the definition that 
matters is this one:


https://mailman.readthedocs.io/en/latest/src/mailman/rules/docs/administrivia.html

You’d have to tell us the subject you sent twice before for us to tell you 
which GNU Mailman administrivia rule you got caught by.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Question about passwords in System.Data.Sqlite

2020-01-03 Thread Mike King
This is the subject:

Hex Password with System.Data.Sqlite (.Net Core)

Very to the point I’d say :)

Cheers


On Fri, 3 Jan 2020 at 23:10, Warren Young  wrote:

> On Jan 2, 2020, at 3:47 PM, Mike King  wrote:
> >
> > ...suspected administrivia! (not sure what that is -
> > I guess it's a US English word but it's certainly not an English one).
>
> It’s not defined in any of the mainstream dictionaries I have on my phone
> — three of them, because I’m a word nerd — but it’s only a matter of time
> before it’s added.
>
> It’s appeared five times in the Corpus of Contemporary American English
> since 2001, and that’s a lagging indicator of usage in the wider culture:
>
> https://www.english-corpora.org/coca/
>
> The term was commonly used at the high water mark of Usenet, the mid
> 1990s.  There are 156 hits on faqs.org, which serves the old Usenet FAQs.
>
> There’s a crowdsourced definition here, which is correct by my
> understanding of the term:
>
> https://www.wordnik.com/words/administrivia
>
> …but to drag this back on topic for the mailing list, the definition that
> matters is this one:
>
>
> https://mailman.readthedocs.io/en/latest/src/mailman/rules/docs/administrivia.html
>
> You’d have to tell us the subject you sent twice before for us to tell you
> which GNU Mailman administrivia rule you got caught by.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Assertion `(mFlags_Blob)==0 || sqlite3BlobCompare(pMem, pX)==0'

2020-01-03 Thread Yongheng Chen
Hi,

We found an assertion failed in sqlite. Here’s the POC:
—
CREATE TABLE v0 ( v2 INTEGER PRIMARY KEY UNIQUE ON CONFLICT FAIL , v1 DOUBLE 
CHECK( ( v2 > 10 AND v1 >= 10 AND v2 <= 10 + 10 AND v1 BETWEEN 0 AND 10 AND v2 
IN ( '' , 'AIR REG' ) AND v2 NOT IN ( 0 , NULL , 10 ) AND v2 >= 10 ) + CASE v2 
WHEN 10 THEN 10 ELSE 10 END ) CHECK( julianday ( 10.10 ) ) ) ;
CREATE TRIGGER x AFTER UPDATE ON v0 BEGIN REPLACE INTO v0 SELECT v1 , SUM ( v1 
* ( 10 - v1 ) ) OVER( ORDER BY ( SELECT v1 FROM v0 AS x WHERE v1 IN ( v0 . v2 , 
127 , v0 . v1 ) GROUP BY v1 HAVING v2 + last_insert_rowid () ) ) AS REVENUE 
FROM v0 GROUP BY v2 ;
END ;
CREATE TEMP TRIGGER x BEFORE INSERT ON v0 BEGIN UPDATE v0 SET v1 = randomblob ( 
10 ) WHERE v1 >= 'EUROPE' AND v2 < ( SELECT v2 FROM v0 WHERE v2 < ( SELECT v1 
FROM v0 WHERE v0 . v2 = v0 . v2 GROUP BY v0 . v2 , v1 HAVING v1 > '18' ) GROUP 
BY v0 . v1 , v1 ) ;
END ;
INSERT INTO v0 ( v1 ) VALUES ( 'Y' ) ,( '**%s**' ) ,( 'Brand#23' ) ,( 'CANADA' 
);
—-

This exists in the latest development code built with debug flag.

Yongheng & Rui
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FW: Questions about your "Performance Matters" talk re SQLite

2020-01-03 Thread Jens Alfke

> On Jan 2, 2020, at 11:54 AM, Doug  wrote:
> 
> I know there has been a lot of talk about what can and cannot be done with 
> the C calling interface because of compatibility issues and the myriad set of 
> wrappers on various forms. I’m having a hard time letting go of a possible 
> 25% performance improvement.

This was a heavily multithreaded benchmark (64 threads accessing the same 
connection) on a very hefty server-class CPU. From Dr Hipp’s results, it sounds 
like the speed up may be only in similar situations, not to more normal SQLite 
usage.

—Jens
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Crash bug in Sqlite

2020-01-03 Thread Yongheng Chen
Hi,

We found a crash bug in sqlite. Here’s the POC:
—
CREATE VIRTUAL TABLE v0 USING rtree ( v3 AS( '1994-01-01' ) CHECK( v3 ) CHECK( 
v3 NOT LIKE 'y' ) GENERATED ALWAYS AS( ( SELECT 10.10 * AVG ( v3 ) FROM v0 
WHERE v1 = v3 ) ) , v2 , v1 ) ;
SELECT count ( * ) , max ( v3 ) FROM v0 ;
CREATE TABLE v4 ( v6 INTEGER , v5 INT ) ;
INSERT INTO v4 ( v5 ) VALUES ( 10 ) ,( 0.10 ) ;
SELECT * FROM v4 LEFT JOIN v0 ON v1 IN ( SELECT DISTINCT v6 LIMIT 0 ) AND v2 IN 
( 10 , 10 , 10 ) WHERE v1 = v1 AND v3 = 10 ;
—-

This exists in the latest development code.

Yongheng & Rui
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Question about passwords in System.Data.Sqlite

2020-01-03 Thread Simon Slavin
On 4 Jan 2020, at 7:23am, Mike King  wrote:

> This is the subject:
> 
> Hex Password with System.Data.Sqlite (.Net Core)

I suppose the bot thought you wanted to change your password for accessing the 
mailing list.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Questions about your "Performance Matters" talk re SQLite

2020-01-03 Thread sky5walk
haha, that is a mangled way of saying I wrapped my db functions in a dll
for multiple app use. I did not expose this config setting as I never knew
its impact. To be honest, I still don't. ;)

On Fri, Jan 3, 2020 at 5:18 PM Tim Streater  wrote:

> On 03 Jan 2020, at 22:08, sky5walk  wrote:
>
> > Querying the config state is helpful for a dll wrapped database, ...
>
> What's one of them?
>
>
> --
> Cheers  --  Tim
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users