[sqlite] Speaking of Ruby & Sqlite...a weekend oddity for someone

2016-12-09 Thread Don V Nielsen
I have an odd problem. It involves Linux & Windows, and it involves the ruby gem sqlite3. I've already contacted that author/maintainer of the gem, but I have not heard back in several weeks. I have a sql file that contains a ctas statement that employs cte with statements. On Windows, the sql

Re: [sqlite] Interactive shell tab completion for queries

2016-12-09 Thread Roger Binns
On 09/12/16 06:29, daveparr...@tutanota.com wrote: > I'm writing to ask if it is possible to have table completion for SQL queries > in the interactive shell? The APSW shell (compatible with the SQLite one) has completion and colouring: https://rogerbinns.github.io/apsw/shell.html

Re: [sqlite] org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)

2016-12-09 Thread Keith Medcalf
That would be my estimation. Of course, you could also try setting the busy timeout using the pragma: https://www.sqlite.org/pragma.html#pragma_busy_timeout as soon as you open the connection. On Friday, 9 December, 2016 15:17 Jay Weinstein said: > Hi Keith, > > Made

Re: [sqlite] Interactive shell tab completion for queries

2016-12-09 Thread Roger Binns
On 09/12/16 14:18, Dominique Devienne wrote: > How did you implement completion in APSW? [Long answer] at bottom. You get a callback from the readline or equivalent library when completion is needed, with it expecting you to provide 0 or more completions. You can get the input line, the current

Re: [sqlite] Interactive shell tab completion for queries

2016-12-09 Thread Roger Binns
On 09/12/16 14:18, Dominique Devienne wrote: > How did you implement completion in APSW? [Long answer] at bottom. You get a callback from the readline or equivalent library when completion is needed, with it expecting you to provide 0 or more completions. You can get the input line, the current

Re: [sqlite] sqlite3_changes() using 64 bit counters?

2016-12-09 Thread Gelin Yan
On Fri, Dec 9, 2016 at 10:09 PM, Detlef Golze wrote: > The maximal number of rows is 1e+13 (). > > I do have tables with more than 2^32 rows. Of course one should avoid > making that large transactions, but it is possible. > > Regards, > dg.

Re: [sqlite] I keep getting seg faults building my database using python sqlite3

2016-12-09 Thread Kevin O'Gorman
It wasn't memory. Or at least nothing obvious. I ran Memtest86+ 5.01 in SMP mode for 3 full passes (about 10 hours) with no errors. On reflection, it didn't seem likely to be a kernel freeze anyway. It wasn't that the light on the keyboard was unresponsive, or not just that, but that all the

Re: [sqlite] org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)

2016-12-09 Thread Jay Weinstein
Hi Keith, Made sure the timeouts are set to 1000 ms for both C and java implementations. Same error. So, you are suggesting this is an issue with the guys who wrote the driver for sqlite? Not sure who these guys are. On Fri, Dec 9, 2016 at 11:22 AM, Keith Medcalf

Re: [sqlite] Speaking of Ruby & Sqlite...a weekend oddity for someone

2016-12-09 Thread Roger Binns
On 09/12/16 14:09, Don V Nielsen wrote: > However, > it fails using the sqlite3 gem. The specific exception is "in > 'initialize': near "with": syntax error That will be a SQLite version issue - older SQLite's didn't support with. While you made some effort around versions, whatever is happening

Re: [sqlite] Interactive shell tab completion for queries

2016-12-09 Thread Dominique Devienne
On Fri, Dec 9, 2016 at 11:05 PM, Roger Binns wrote: > On 09/12/16 06:29, daveparr...@tutanota.com wrote: > > I'm writing to ask if it is possible to have table completion for SQL > queries in the interactive shell? > > The APSW shell (compatible with the SQLite one) has

[sqlite] About a potential error in sqlite3.c, could you please check it?

2016-12-09 Thread Zhendong Wu
Hi, I have downloaded the source code of SQLite Version 3.15.2 which is a big file called sqlite3.c. I statically analyzed the code and found a potential error. Could you please check it? Thank you. In file ‘sqlite3.c’, function ‘sqlite3PagerOpenWal’, the piece of code is shown as follow.

Re: [sqlite] sqlite3_changes() using 64 bit counters?

2016-12-09 Thread Detlef Golze
The maximal number of rows is 1e+13 (). I do have tables with more than 2^32 rows. Of course one should avoid making that large transactions, but it is possible. Regards, dg. -Original Message- From: sqlite-users

[sqlite] Interactive shell tab completion for queries

2016-12-09 Thread daveparrish
Hello, I'm writing to ask if it is possible to have table completion for SQL queries in the interactive shell? If not, can this be included as a feature request in the ticket database? David-- Securely sent with Tutanota. Claim your encrypted mailbox today! https://tutanota.com

Re: [sqlite] org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)

2016-12-09 Thread Keith Medcalf
Sounds like a java problem with the java interface, not an SQLite problem. Two observations however: 1) With the C API you set the busy timeout to 1000 ms but with the java api you set it to 100 ms 2) With the C API you set the busy timeout to the integer 1000 yet in the java api you set

Re: [sqlite] org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)

2016-12-09 Thread Jay Weinstein
When I run the two C programs using rc = sqlite3_busy_timeout(db, 1000); if ( rc != SQLITE_OK ) { fprintf(stderr, "SQL error: sqlite3_busy_timeout failed.\n"); exit(0); } everything works perfectly. No sqlite busy erros or table locked. But,

Re: [sqlite] About a potential error in sqlite3.c, could you please check it?

2016-12-09 Thread David Raymond
I believe DRH answered this on Tuesday: "The two lines at https://www.sqlite.org/src/artifact/4e4aea7c?ln=7314-7316 guaranteed that the NULL pointer deference at https://www.sqlite.org/src/artifact/4e4aea7c?ln=7328 never happens. -- D. Richard Hipp d...@sqlite.org" -Original Message-