Re: [sqlite] [EXTERNAL] Trigger Question

2017-10-13 Thread Stephen Chrzanowski
Thanks for this. I've not implemented this yet as I discovered a minor issue with the wrapper I'm using in that it doesn't like sending multiple SQL commands in one go, so I need to adapt my code, or adapt the wrapper to allow for multiple statements. On Thu, Oct 12, 2017 at 9:38 AM, David

Re: [sqlite] Possible bug with strftime('%s') < strftime('%s')

2017-10-13 Thread Wout Mertens
I feel safer now :) On Fri, Oct 13, 2017, 12:57 PM Rowan Worth wrote: > In that case you would be well advised to use a monotonic clock source, > rather than a "date-generating" clock. In linux this is the difference > between providing CLOCK_MONOTONIC or CLOCK_REALTIME as the

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-13 Thread Keith Medcalf
Interesting, because you cannot have two rows (two tile_id) for the same combination of tile_zoom / tile_row / tile_column since the latter are a required to be unique primary keys. That is, the map table is declared as if it were the dictionary: map[tile_zoom, tile_row, tile_column] =

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-13 Thread Simon Slavin
On 13 Oct 2017, at 3:32am, Fiona wrote: > delete/insert operations: > The two screenshots are useful. Your two commands do not have the same WHERE clause. I agree that it looks like they should have the same

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-13 Thread Kees Nuyt
On Thu, 12 Oct 2017 19:32:53 -0700 (MST), Fiona wrote: > schema: > Not related to your problem, just a hint: Swapping the columns tile_data and tile_id may improve performance significantly, especially if the BLOB

Re: [sqlite] Possible bug with strftime('%s') < strftime('%s')

2017-10-13 Thread Rowan Worth
In that case you would be well advised to use a monotonic clock source, rather than a "date-generating" clock. In linux this is the difference between providing CLOCK_MONOTONIC or CLOCK_REALTIME as the first argument to clock_gettime(). But any API you might use to set a trigger for 2 seconds

Re: [sqlite] Possible bug with strftime('%s') < strftime('%s')

2017-10-13 Thread R Smith
On 2017/10/13 12:42 PM, Wout Mertens wrote: Thank you, very interesting! The leap second behavior is slightly worrying, basically anything time-based (animations etc) will take a second longer? What if you want an engine burn to last 2 seconds, set a trigger for 2 seconds from now, and then

Re: [sqlite] Possible bug with strftime('%s') < strftime('%s')

2017-10-13 Thread Wout Mertens
Thank you, very interesting! The leap second behavior is slightly worrying, basically anything time-based (animations etc) will take a second longer? What if you want an engine burn to last 2 seconds, set a trigger for 2 seconds from now, and then it's burning 50% longer? On Thu, Oct 12, 2017,

Re: [sqlite] Script Embedded SQLite With TCL

2017-10-13 Thread yaro
Thanks for your reply Peter da Silva. Since I want to embed TCL, my intent is to include only the TCL core code and SQLite code in my project and build them into one exec file. This way I can use SQLite in my C++ code as well as in TCL. Is this achievable? Or should I build TCL with SQLite as the

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-13 Thread Richard Hipp
On 10/12/17, Fiona wrote: > > As you can see, insert works, and I can also delete/update this last > inserted record. It seems some pages of my db file is locked or something. Before running your query, enter ".mode quote". Then show us what the output of this query is:

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-13 Thread Fiona
>> SQLite does none of those. Have your program print out the actual command it’s trying to execute. Then try typing it manually. See if it works when you type it by hand. Yes, I manually type all the command, also I check all the records I wanna delete by SELECT with the same where clause.

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-13 Thread Fiona
Sorry about my ambiguous description. Here is what I wanna do. Normally I use Python code to insert/update data of two tables in my sqlite database file: *map and images*, table *map* stores the indexs of pics, while table *images* stores the contents of these pics. My Python code works well,

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-13 Thread Andy Ling
Try changing the "DELETE FROM table WHERE " to "SELECT COUNT(1) FROM table WHERE " and see if you get a number bigger than 0. If not, then your WHERE isn't matching the rows you think it should. Regards Andy Ling -Original Message- From: sqlite-users