[sqlite] Lawyers, encryption, and RC4

2015-08-11 Thread Eric Hill
Sorry to bother folks with this. We're getting some pushback from our lawyers suggesting that SQLite's use of RC4 even just to generate random numbers is, in their minds, encryption for export purposes. Now, this makes absolutely no sense to me, I can assure you, and I am not finding anything

[sqlite] Lawyers, encryption, and RC4

2015-08-12 Thread Eric Hill
To: General Discussion of SQLite Database Subject: Re: [sqlite] Lawyers, encryption, and RC4 On 8/11/15, Eric Hill wrote: > > We're getting some pushback from our lawyers suggesting that SQLite's > use of > RC4 even just to generate random numbers is, in their minds, > encryption for

[sqlite] Virtual Table query - why isn't SQLite using my indexes?

2015-06-08 Thread Eric Hill
Revisiting a thread from about 3 weeks back, I have another xBestIndex puzzler. The example query from that thread was: SELECT t1.rental_date, t1.inventory_id, t8.film_id, t5.title AS Title, t3."name" AS Category, t4.customer_id, t4.store_id, t4.email, t5.length FROM rental

[sqlite] Virtual Table query - why isn't SQLite using my indexes?

2015-06-08 Thread Eric Hill
N ( = ) And placing the fields first in the argument list And adding the fields only for symmetry reasons (they can never be used, because they point the "wrong way") -Urspr?ngliche Nachricht- Von: Eric Hill [mailto:Eric.Hill at jmp.com] Gesendet: Montag, 08. Juni 201

[sqlite] Virtual tables/xBestIndex: Is this a bug?

2015-06-10 Thread Eric Hill
Hey, This is a follow-up from the thread entitled "Virtual Table query - why isn't SQLite using my indexes?" in order to raise the visibility of this issue: Consider this SQL, where all of the tables involved are virtual: SELECT t2.rental_id, t2.rental_date, t1.film_id, t3.title,

[sqlite] Virtual tables/xBestIndex: Is this a bug?

2015-06-12 Thread Eric Hill
Kennedy Sent: Thursday, June 11, 2015 1:14 AM To: sqlite-users at mailinglists.sqlite.org Subject: Re: [sqlite] Virtual tables/xBestIndex: Is this a bug? On 06/11/2015 03:49 AM, Eric Hill wrote: > Is it a bug that SQLite changes the order of the constraints passed to > xBestIndex based

[sqlite] Segmentation faults when calling sqlite3_step

2015-06-30 Thread Eric Hill
If you are calling sqlite3_bind_ to bind parameters, what are you passing as the last parameter? Try SQLITE_TRANSIENT to force SQLite to make a copy of the value right away. Maybe currently you have values going out of scope before step is called. Eric

[sqlite] Please confirm what I THINK I know about blobs

2015-05-09 Thread Eric Hill
The comment approach could work, I guess, but why not just encode the type into the column's declared type? CREATE TABLE blob_table ( ModelNo TEXT, SerialNo TEXT, VSWR BLOB_DOUBLE ) That's what I do with numeric columns that I need to identify as actually containing dates. As I

[sqlite] Please confirm what I THINK I know about blobs

2015-05-10 Thread Eric Hill
This approach: CREATE TABLE blob_table ( ModelNo TEXT, SerialNo TEXT, VSWR BLOB_DOUBLE ) involves comments? I don't see how. Nothing wrong with the comments approach, but this is an approach that just takes advantage of the fact that SQLite does not have fixed data types. Eric From:

[sqlite] xBestIndex() implementation question

2015-05-14 Thread Eric Hill
I'm just a few days into an xBestIndex/xFilter implementation myself, but my approach is, if I can create the requested index, I set the cost to log(number of rows) of the table, and if I am choosing not to create the requested index, I set the cost to number of rows. I suspect that gives

[sqlite] Virtual Table query - why isn't SQLite using my indexes?

2015-05-15 Thread Eric Hill
Hey, Let me say up front that I'm sure this is my fault. I have SQLite version 3.8.9. I am using virtual tables, and I am trying to get xBestIndex and xFilter doing the right things so that I get optimal queries. Currently, I am working on the following query: SELECT

[sqlite] Virtual Table query - why isn't SQLite using my indexes?

2015-05-15 Thread Eric Hill
...@mailinglists.sqlite.org] On Behalf Of Richard Hipp Sent: Friday, May 15, 2015 12:23 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Virtual Table query - why isn't SQLite using my indexes? On 5/15/15, Eric Hill wrote: > > So, in the first case, I do not create an index (which I signify by >

[sqlite] Virtual Table query - why isn't SQLite using my indexes?

2015-05-17 Thread Eric Hill
Thanks, Dominique, for the tip on multifile amalgamation. After a few internet searches and the acquisition of gawk.exe and tclsh85.exe, I was able to build the multi-file amalgamation for 3.8.10. Tomorrow, I will see if I can tell why SQLite is choosing table scans over using my indexes. If

[sqlite] Virtual Table query - why isn't SQLite using my indexes?

2015-05-18 Thread Eric Hill
Per Richard's request, I have produced the WhereTrace for the query that uses virtual tables and the same query that is not using virtual tables. That output is at the end of this message. Ultimately, I think my question is, how should I respond to xBestIndex such that SQLite will perform the

[sqlite] Virtual Table query - why isn't SQLite using my indexes?

2015-05-19 Thread Eric Hill
indexes to maintain beforehand. -Urspr?ngliche Nachricht- Von: Eric Hill [mailto:Eric.Hill at jmp.com] Gesendet: Montag, 18. Mai 2015 22:22 An: General Discussion of SQLite Database Betreff: Re: [sqlite] Virtual Table query - why isn't SQLite using my indexes? Per Richard's request, I have pro

[sqlite] Virtual Table query - why isn't SQLite using my indexes?

2015-05-20 Thread Eric Hill
Eric had said: >> But then what about a query like this: >> >>SELECT * FROM T1 >>LEFT OUTER JOIN T2 ON ( T2.a = T1.a ) AND ( T2.b = T1.b ) AND >> ( T2.c = T1.c ); >> >> xBestIndex will get called here for T1 with 3 constraints, c, b, and a, in >> that order. To which

[sqlite] Virtual Table query - why isn't SQLite using my indexes?

2015-05-20 Thread Eric Hill
Sorry, scratch that. T2 was not a virtual table when I ran this query. My bad. Told you I was a noob. Eric -Original Message- From: Eric Hill Sent: Wednesday, May 20, 2015 12:32 PM To: 'General Discussion of SQLite Database' Subject: RE: [sqlite] Virtual Table query - why isn't

[sqlite] Can't create LEFT or RIGHT functions with sqlite3_create_function()

2016-02-08 Thread Eric Hill
Hey, It appears that LEFT and RIGHT are treated as reserved words by SQLite, so my attempts to use sqlite3_create_function() to create my own LEFT and RIGHT SQL functions have been unsuccessful (I'm using 3.8.11.1). Several databases (SQL Server, MySQL) define their own LEFT and RIGHT

[sqlite] Can't create LEFT or RIGHT functions with sqlite3_create_function()

2016-02-08 Thread Eric Hill
...@mailinglists.sqlite.org] On Behalf Of Richard Hipp Sent: Monday, February 08, 2016 3:39 PM To: SQLite mailing list Subject: Re: [sqlite] Can't create LEFT or RIGHT functions with sqlite3_create_function() On 2/8/16, Eric Hill wrote: > Hey, > > It appears that LEFT and RIGHT are treated as reser

[sqlite] CURRENT_DATE, CURRENT_TIME and CURRENT_TIMESTAMP

2016-02-10 Thread Eric Hill
Suggestion: Document the fact that CURRENT_DATE, CURRENT_TIME and CURRENT_TIMESTAMP are supported by SQLite on the Date And Time Functions page of the "SQL As Understood By SQLite" documentation. The only place you can currently find them is

[sqlite] MIN/MAX of column loses decltype

2016-02-22 Thread Eric Hill
Hey, I'm at 3.8.11.1 of SQLite - could move to more recent version if it would help. When I move date columns into SQLite, I declare their type as "REAL_DATE". I do this because I convert from my application's date (seconds since 1904) to Julian date (a date that SQLite likes, sort of) when

[sqlite] MIN/MAX of column loses decltype

2016-02-22 Thread Eric Hill
ry 22, 2016 11:12 AM To: SQLite mailing list Subject: Re: [sqlite] MIN/MAX of column loses decltype On 22 Feb 2016, at 4:02pm, Eric Hill wrote: > I can call sqlite3_column_decltype() and get back "REAL_DATE" and know I > should convert. > > However, if I execute th

[sqlite] custom collation sequence for numeric columns?

2016-03-23 Thread Eric Hill
Hey, SQLite has a brilliant facility for creating custom collations for columns with character affinity. And it won't stop you from creating a custom collation for a column with numeric affinity, but your comparison function will never be called, it seems. I wonder if you would ever consider

[sqlite] Fwd: ImportError: /usr/lib/libgdal.so.1: undefined symbol: sqlite3_column_table_name

2016-03-30 Thread Eric Hill
Make sure SQLITE_ENABLE_COLUMN_METADATA is on when you compile SQLite. Eric -Original Message- From: "Tinashe Mudavanhu" Sent: ?3/?30/?2016 8:57 AM To: "sqlite-users at mailinglists.sqlite.org" Subject: [sqlite] Fwd: ImportError: /usr/lib/libgdal.so.1: undefined