Re: [sqlite] Database locks

2018-08-09 Thread Rowan Worth
On 7 August 2018 at 21:25, David Raymond wrote: > Correct. > > In rollback journal mode when one connection says "I'm ready to write now" > it blocks any new transactions from being made, but it can't do anything > about existing read transactions. It has to wait for them to finish their > reads

Re: [sqlite] Bad implementation in mem5.c memsys5Roundup method in the latest version 3.25.0

2018-08-09 Thread David Yip
Do you have a benchmark demonstrating that time taken in memsys5Roundup is a bottleneck on some compiler and platform? gcc and clang both turn for(iFullSz=mem5.szAtom; iFullSz wrote: > We can increase the efficiency with the following code replace: > > > > > static int memsys5Roundup(int

[sqlite] Bad implementation in mem5.c memsys5Roundup method in the latest version 3.25.0

2018-08-09 Thread 2009110205
We can increase the efficiency with the following code replace: static int memsys5Roundup(int n){//changed by wjf if( n > 0x4000 ) return 0; int i = 0; while (_BlockSize[i++] 0x4000 ) return 0; //for(iFullSz=mem5.szAtom; iFullSzmem5.szAtom ){ mem5.szAtom =

[sqlite] Bad implementation in mem5.c memsys5Roundup method in the latest version 3.25.0

2018-08-09 Thread 2009110205
We can increase the efficiency with the following code replace: static int memsys5Roundup(int n){//changed by wjf if( n > 0x4000 ) return 0; int i = 0; while (_BlockSize[i++] 0x4000 ) return 0; //for(iFullSz=mem5.szAtom; iFullSzmem5.szAtom ){ mem5.szAtom =

[sqlite] A parser for sqlite databases to implement full ALTER TABLE support

2018-08-09 Thread Marco Bambini
More info at: https://github.com/marcobambini/sqlite-createtable-parser -- Marco Bambini http://www.sqlabs.com http://twitter.com/sqlabs ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] [EXTERNAL] Re: Can date('now') fire a trigger automatically after a day passed?

2018-08-09 Thread Hick Gunter
Maybe you are looking for coalesce(EndDate,datetime('now')) This will pretend that a NULL EndDate is always seen as the 'current datetime'. And you can find those records that need acting upon by the constraint EndDate IS NULL, run whenever your application feels like it needs to "do

Re: [sqlite] Can date('now') fire a trigger automatically after a day passed?

2018-08-09 Thread GB
That would require some sort of active process or cron job. But that's out of scope of SQLite. You will have to implement that on your own. But if your EndDate is always "now", why having a true column at all? If you do not want to take the current date from your environment, how about