Re: [sqlite] Developing a SQLite3 DB remotely

2017-03-23 Thread Roman Fleysher
I do not have big experience in the area, but have some. I think that light weight use is not the right thing to ask. I have seen NFS delays of 20 seconds: file was created on one machine and showed up on another after 20 seconds. This depends on how heavy OTHER things are, not how heavy

Re: [sqlite] Developing a SQLite3 DB remotely

2017-03-23 Thread Roman Fleysher
No. I was not aware of these tools. Are any of them good? Maintained? I am mostly using sqlite3 shell from bash scripts. Do you know if some of them are suitable replacements? Is this off the topic of the original question? Thank you, Roman From:

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-23 Thread Daniel Anderson
Sybase has one. there is even a way to get objects dependencies, I have been working on a project for the last 5 years using sybase (ASE). very huge project and whenever we must alter the schema we have tools to tell us which store proc, triggers, views will be impacted. it allow us to reach the

Re: [sqlite] Memoization in sqlite json1 functions

2017-03-23 Thread Deon Brewis
It has more to do with how you parse JSON - if you want to build it into an object tree, sure, then you're obviously dead in the water with any kind of json. If you however can use a forward-only push or pull parser like a SAX or StAX parse, it's a different story. I'm using a StAX-like pull

Re: [sqlite] Developing a SQLite3 DB remotely

2017-03-23 Thread Joshua J. Kugler
Are you aware options for true network access? https://www.sqlite.org/cvstrac/wiki?p=SqliteNetwork Just thought I'd throw that out there. j -- Joshua J. Kugler - Fairbanks, Alaska Azariah Enterprises - Programming and Website Design jos...@azariah.com - Jabber: pedah...@gmail.com PGP Key:

[sqlite] Still running 3.7.x. Was: RIGHT JOIN! still not supported?

2017-03-23 Thread Richard Hipp
On 3/23/17, Hick Gunter wrote: > I am still runnning SQLIte > 3.7.14.1 Why? 3.17.0 is backwards compatible, fixes obscure bugs, has many new features, and runs twice as fast. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-23 Thread Domingo Alvarez Duarte
Hello ! This problem and other related with the lack of a "data dictionary" in sqlite, would be nice to have the sql parser exposed that way we could get the database structure on the fly and solve problems like the one discussed on this thread. Cheers ! On 23/03/17 00:59, 邱朗 wrote: “Much

Re: [sqlite] RIGHT JOIN! still not supported?

2017-03-23 Thread Hick Gunter
After some thinking I came up with this: First, set up the example (note: no CTE as I am still runnning SQLIte 3.7.14.1): CREATE temp TABLE stock(id, cid, sid); CREATE temp TABLE clients(id,name); CREATE temp TABLE suppliers(id,name); insert into stock (id) values (1),(2),(3),(4),(5),(6),(7);

Re: [sqlite] Memoization in sqlite json1 functions

2017-03-23 Thread Richard Hipp
On 3/22/17, Domingo Alvarez Duarte wrote: > Hello Richard ! > > I noticed that sqlite do not use any memoization in json1 functions. > > For example jsonExtractFunc and others parse the json string every time > it's called even when the json string is the same. > > minimal

Re: [sqlite] Memoization in sqlite json1 functions

2017-03-23 Thread Deon Brewis
That would be nice. I've resorted to a few horrible hacks like this: SELECT parse(data), extract("name"), extract("address"), release(data) FROM some_table; It works, but it relies on LTR parsing of arguments (which it does now, but I seriously doubt is a guarantee), as well as

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-23 Thread Daniel Anderson
Yep Sybase preparse it. When you create a view/sproc/triggers/function the objects referenced must exist or your DDL will fail. this create some complexity when we want to recreate all the objects, order of creation is very important. 2017-03-23 21:15 GMT-04:00 Simon Slavin

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-23 Thread Domingo Alvarez Duarte
Hello ! It's not that complicated, sqlite already do all work right now but it doesn't store that information in a structured way "data dictionary". Cheers ! On 23/03/17 21:17, Simon Slavin wrote: On 23 Mar 2017, at 10:52pm, Daniel Anderson wrote: Sybase has one.

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-23 Thread Simon Slavin
On 24 Mar 2017, at 12:45am, Domingo Alvarez Duarte wrote: > It's not that complicated, sqlite already do all work right now but it > doesn't store that information in a structured way "data dictionary". SQLite does not seem to parse views or triggers for dependencies. If

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-23 Thread Simon Slavin
On 23 Mar 2017, at 10:52pm, Daniel Anderson wrote: > Sybase has one. > > there is even a way to get objects dependencies Okay, thanks for the answers. The only way to do this involves quite a complicated set of dependencies. Consider, for example, having to parse a

Re: [sqlite] Developing a SQLite3 DB remotely

2017-03-23 Thread Stephen Chrzanowski
Roman, I've never seen or heard of a file taking 20 seconds to show up, except MAYBE in the case of a caching system that hasn't had the chance to physically write the file out to the real destination, or a situation where temp files are being written to somewhere else, then being dumped to

Re: [sqlite] Developing a SQLite3 DB remotely

2017-03-23 Thread Stephen Chrzanowski
For development, until I get the machine going, could be as far as a local VM, or, a VM I build on one of our ESX boxes in the office. The connection would probably be via SMB while developing. I'll start with the 10 seconds timeout on the remote. I've stumbled across a couple of examples Mr.

Re: [sqlite] Memoization in sqlite json1 functions

2017-03-23 Thread Jens Alfke
> On Mar 23, 2017, at 3:17 PM, Deon Brewis wrote: > > If you however can use a forward-only push or pull parser like a SAX or StAX > parse, it's a different story. I'm using a StAX-like pull parser for a binary > json-ish internal format we have, and reading & parsing

[sqlite] Second beta for SQLite 3.18.0.

2017-03-23 Thread Richard Hipp
The second beta release for SQLite 3.18.0 is now available on the website: https://www.sqlite.org/download.html This second beta adds a new SQL function: json_patch(). See https://www.sqlite.org/draft/json1.html#jpatch for details. Final testing will begin soon, so please do not delay in

Re: [sqlite] Memoization in sqlite json1 functions

2017-03-23 Thread Jens Alfke
> On Mar 23, 2017, at 4:30 AM, Richard Hipp wrote: > > BLOBs are reserved for a future enhancement in which BLOBs will store the > binary encoding for JSON. I’ve been down this road. There are a number of JSON-compatible binary encoding formats, but most of them don’t save

Re: [sqlite] Developing a SQLite3 DB remotely

2017-03-23 Thread Simon Slavin
On 23 Mar 2017, at 5:45pm, Stephen Chrzanowski wrote: > The remote > system is a Linux based OS. […] How 'remote' is this ? What protocol is used to do the remote access ? > What would be a recommended way to setup the > connections for a DEV-only arena where the below

Re: [sqlite] Memoization in sqlite json1 functions

2017-03-23 Thread Scott Hess
What is the goal, though? Your app knows your data and performance needs, so if you find yourself running the same query to read off the same result set over and over, change your app to do the right thing. If it's somehow more convenient to have SQLite do it, populate a temporary table and pull

[sqlite] Developing a SQLite3 DB remotely

2017-03-23 Thread Stephen Chrzanowski
Right up front, I'm fully aware about the How To Corrupt document (Believe me, I've preached about network access in this forum), and with the development tools I have in Windows vs the destination OS and the purpose of the DB, I'm asking for other peoples experience on remote developing a

Re: [sqlite] Drop view ?automatically? when its associated table is dropped?

2017-03-23 Thread James K. Lowden
On Wed, 22 Mar 2017 15:07:41 + Simon Slavin wrote: > On 22 Mar 2017, at 11:52am, R Smith wrote: > > > > May I add further that views are tricky things. They can refer to > > multiple tables, or other views which in turn refer to multiple > > tables

Re: [sqlite] RIGHT JOIN! still not supported?

2017-03-23 Thread James K. Lowden
On Wed, 22 Mar 2017 10:53:09 -0500 Jeffrey Mattox wrote: > Isn't it possible to get the same results of a RIGHT JOIN by using > two selects with a UNION or UNION ALL between them. Yes. By definition, an outer join is the union of the rows that meet the matching criteria

Re: [sqlite] Drop view ?automatically? when its associated table is dropped?

2017-03-23 Thread James K. Lowden
On Thu, 23 Mar 2017 11:56:00 + Simon Slavin wrote: > > This problem and other related with the lack of a "data dictionary" > > in sqlite, > > Not sure what you expect here. Can you point me at a "data > dictionary" for some other implementation of SQL ?

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-23 Thread Simon Slavin
On 23 Mar 2017, at 11:25am, Domingo Alvarez Duarte wrote: > This problem and other related with the lack of a "data dictionary" in > sqlite, Not sure what you expect here. Can you point me at a "data dictionary" for some other implementation of SQL ? Simon.

[sqlite] about sqlite db.delete the file

2017-03-23 Thread z...@tofocus.cn
hi, recently, I have a prolbem, that my android(4.3) application use sqlite db to store the data. my had two thread visit the db, and offten happen delete db table, so my data lose. 03-18 14:25:04.134 2345-2384/? E/SQLiteLog: (26) statement aborts at 78: [SELECT locale FROM

Re: [sqlite] Possibly pointless assert

2017-03-23 Thread Dan Kennedy
On 03/23/2017 11:46 PM, Scott Robison wrote: On Thu, Mar 23, 2017 at 10:17 AM, Scott Robison wrote: On Thu, Mar 23, 2017 at 9:21 AM, Dan Kennedy wrote: How did you trip the assert()? i.e. what is the database schema and query that cause it to

Re: [sqlite] Still running 3.7.x. Was: RIGHT JOIN! still not supported?

2017-03-23 Thread Hick Gunter
As we build from canonical sources and have some proprietary patches, a new release does not just "pop in" but requires merging changes via CVS, upgrading is a lengthy process, done when resources are available. Last try was with release 3.14, and - apart from changes in the handling of OMIT

Re: [sqlite] Memoization in sqlite json1 functions

2017-03-23 Thread Domingo Alvarez Duarte
Hello Richard ! Yes I do see "because the implementation parsing the JSON anew each time" and this is a recurring pattern in some sqlite functions, would be nice if we could have a "session/query/row" storage space to store query information that can be reused, for example on the json

Re: [sqlite] QUERY: Usage of malloc and free in SQLite

2017-03-23 Thread J Decker
On Thu, Mar 23, 2017 at 9:01 AM, Dan Kennedy wrote: > On 03/23/2017 10:00 PM, Subramaniyan, Ganesan (G.) wrote: > >> Hi, >> We are facing dynamic memory pool corruption issue while using SQLite. >> Based on our investigation we suspect SQLite freeing memory bypassing the

Re: [sqlite] Possibly pointless assert

2017-03-23 Thread Scott Robison
On Thu, Mar 23, 2017 at 11:05 AM, Dan Kennedy wrote: > On 03/23/2017 11:46 PM, Scott Robison wrote: >> >> Note: I'm on Windows 10 and reproduced this with the amalgamation >> downloaded today from >> http://sqlite.com/2017/sqlite-amalgamation-317.zip >> >> Step 1: Using

Re: [sqlite] about sqlite db.delete the file

2017-03-23 Thread Clemens Ladisch
z...@tofocus.cn wrote: >recently, I have a prolbem, that my android(4.3) application use sqlite db > to store the data. > my had two thread visit the db, and offten happen delete db table, so my > data lose. > [...] > 03-18 14:25:04.194 2345-2384/? E/SQLiteLog: (26) statement aborts at 0:

Re: [sqlite] Possibly pointless assert

2017-03-23 Thread Dan Kennedy
On 03/23/2017 04:45 AM, Scott Robison wrote: Take a look at http://www.sqlite.org/cgi/src/artifact/3ed64afc49c0a222?ln=2214,2233 (especially the assert within). I may not be understanding something, but that assert seems pointless to me. The assert() says that if the buffer pointed to by

[sqlite] QUERY: Usage of malloc and free in SQLite

2017-03-23 Thread Subramaniyan, Ganesan (G.)
Hi, We are facing dynamic memory pool corruption issue while using SQLite. Based on our investigation we suspect SQLite freeing memory bypassing the memory management API'S registered as below. We have registered the memory allocation routines as below. static const sqlite3_mem_methods mqxmem =

Re: [sqlite] Possibly pointless assert

2017-03-23 Thread Scott Robison
On Thu, Mar 23, 2017 at 9:21 AM, Dan Kennedy wrote: > On 03/23/2017 04:45 AM, Scott Robison wrote: >> >> Take a look at >> http://www.sqlite.org/cgi/src/artifact/3ed64afc49c0a222?ln=2214,2233 >> (especially the assert within). >> >> I may not be understanding something, but

Re: [sqlite] QUERY: Usage of malloc and free in SQLite

2017-03-23 Thread Dan Kennedy
On 03/23/2017 10:00 PM, Subramaniyan, Ganesan (G.) wrote: Hi, We are facing dynamic memory pool corruption issue while using SQLite. Based on our investigation we suspect SQLite freeing memory bypassing the memory management API'S registered as below. We have registered the memory allocation

Re: [sqlite] Possibly pointless assert

2017-03-23 Thread Scott Robison
On Thu, Mar 23, 2017 at 10:17 AM, Scott Robison wrote: > On Thu, Mar 23, 2017 at 9:21 AM, Dan Kennedy wrote: >> How did you trip the assert()? i.e. what is the database schema and query >> that cause it to fail? > > In trying to track down issues

Re: [sqlite] Memoization in sqlite json1 functions

2017-03-23 Thread Domingo Alvarez Duarte
Hello Jens ! Nice to know this project, I'll look at it. Cheers ! On 23/03/17 15:05, Jens Alfke wrote: On Mar 23, 2017, at 4:30 AM, Richard Hipp wrote: BLOBs are reserved for a future enhancement in which BLOBs will store the binary encoding for JSON. I’ve been down this