[sqlite] Understanding table and database locking mechanism in shared cache mode and normal mode

2016-03-30 Thread Srikanth Bemineni
Hi In shared cache mode the locking seems to be per table level basis. Which seems to not block my operations on the other tables in the same database. When there are multiple connections, any transaction is going to create a data base level lock, which may result in many write as well as read st

[sqlite] Understanding table and database locking mechanism in shared cache mode and normal mode

2016-03-30 Thread Srikanth Bemineni
Hi, if( (lastStatus == SQLITE_OK) && mystatement) { m_lastStatus = sqlite3_step(mp_statement); while( lastStatus == SQLITE_LOCKED || lastStatus == SQLITE_BUSY) { sleep(randomtime) lastStatus = sqlite3_step(mp_statement); } } My common e

[sqlite] calling Skip() on IQueryable with LINQ is generating incorrect sql

2016-03-30 Thread Simon Slavin
On 30 Mar 2016, at 6:35pm, Tim Stowell wrote: > SELECT TOP (20) [t0].[field1], [t0].[ field1], [t0].[field2] FROM [tablename] > AS [t0] > > Instead of the "TOP" keyword it should be "LIMIT" Hmm. I'd just like to point out that the syntax diagram for SQLite says that the LIMIT clause must ap

[sqlite] Calling some predefined SQL function from another custom SQL function?

2016-03-30 Thread Olivier Mascia
Hello, Writing a scalar SQL function, is there a C-level way to call some other scalar SQL function? For instance, writing some specialized date_xyz(), could it be possible to prepare some arguments and call strftime()? I see in the code that strftimeFunc() is the implementation for the predefi

[sqlite] calling Skip() on IQueryable with LINQ is generating incorrect sql

2016-03-30 Thread Tim Stowell
> The SQLiteConnection class has no "provider" connection string property. > Also, the DataContext class appears to be part of the LINQ-to-MSSQL > feature. > > You probably want to use the ObjectContext class. Thanks for the help. The ObjectContext class appears to be part of Entity Framework, I

[sqlite] calling Skip() on IQueryable with LINQ is generating incorrect sql

2016-03-30 Thread Tim Stowell
> Maybe it's somehow using LINQ-to-MSSQL instead? What does the C# code > look like that is actually performing the LINQ query? That would make sense. I'm actually using the dynamic linq library. First I get a context then I perform select and take operations on it var dbConnection = new SQLi

[sqlite] calling Skip() on IQueryable with LINQ is generating incorrect sql

2016-03-30 Thread Tim Stowell
> As far as I can tell, this cannot currently be generated by the > System.Data.SQLite.Linq (or EF6) assembly. In the past, I believe there was > an issue where it would not emit the LIMIT clause; however, that was fixed > long ago. > > Perhaps the project is picking up an outdated version of the

[sqlite] Understanding table and database locking mechanism in shared cache mode and normal mode

2016-03-30 Thread Srikanth Bemineni
My application is a multi threaded application, which uses sqlite to store data on a file. Our current architecture of using sqlite in shared cache mode seems to be working absolutely fine. In this case a new connection is being given to a thread in shared cache mode to the database. If one of the

[sqlite] Understanding table and database locking mechanism in shared cache mode and normal mode

2016-03-30 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 30/03/16 16:58, Simon Slavin wrote: > In both modes (whether you're using 'shared cache' or not) use > either > > https://www.sqlite.org/c3ref/busy_timeout.html The last time I dealt with shared cache mode, the busy timeout did not apply. You had

[sqlite] calling Skip() on IQueryable with LINQ is generating incorrect sql

2016-03-30 Thread Tim Stowell
> Are you using the latest System.Data.SQLite? Yes it's the newest package from Nuget, version 1.0.99 > Do you have an example of the generated SQL? It basically looks like this: SELECT TOP (20) [t0].[field1], [t0].[ field1], [t0].[field2] FROM [tablename] AS [t0] Instead of the "TOP" keyword

[sqlite] Debugging variable left in fts5_index.c?

2016-03-30 Thread Dan Kennedy
On 03/30/2016 04:38 PM, Ralf Junker wrote: > These 2 lines seem to serve no purpose. Also, they are not indented > like the reset of the code. This makes me think they might have been > left in from debugging: > > http://www.sqlite.org/src/artifact/b271b19dd28d3501?ln=3819-3820 Thanks for report

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

2016-03-30 Thread Tinashe Mudavanhu
-- Forwarded message -- From: Tinashe Mudavanhu Date: Wed, Mar 30, 2016 at 11:05 AM Subject: ImportError: /usr/lib/libgdal.so.1: undefined symbol: sqlite3_column_table_name To: sqlite-users at mailinglists.sqlite.org Hi, I am having the following error every time i try to import

[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 symbol: sqlite3_colu

[sqlite] calling Skip() on IQueryable with LINQ is generating incorrect sql

2016-03-30 Thread Joe Mistachkin
Tim Stowell wrote: > > var dbConnection = new SQLiteConnection( > "Data Source=db;provider=System.Data.SQLite.Linq;"); > var context = new DataContext(dbConnection); > The SQLiteConnection class has no "provider" connection string property. Also, the DataContext class appears to be part of the

[sqlite] Note, using SQLAR compared to TGZ archive

2016-03-30 Thread Kevin
Richard, Just a note of thanks for the SQLAR tool. I am using it to store SQLite ".dump" output, which is of text data. The SQLAR file is 125.2M bytes. The corresponding tgz file is 125.1M bytes. The raw text content is in 20 files, totally 746.9M bytes. regards, Kev Youren

[sqlite] Debugging variable left in fts5_index.c?

2016-03-30 Thread Ralf Junker
These 2 lines seem to serve no purpose. Also, they are not indented like the reset of the code. This makes me think they might have been left in from debugging: http://www.sqlite.org/src/artifact/b271b19dd28d3501?ln=3819-3820 Ralf

[sqlite] calling Skip() on IQueryable with LINQ is generating incorrect sql

2016-03-30 Thread Joe Mistachkin
Tim Stowell wrote: > > Thanks for the response, the strange thing is the System.Data.SQLite.Linq > dll doesn't seem to be getting used at all. If I remove the dll file from > my bin output folder there are no errors when I refresh the site. If I > remove System.Data.SQLite.dll then I get an error.

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

2016-03-30 Thread Tinashe Mudavanhu
Hi, I am having the following error every time i try to import cv2 in the Python Interpreter. I am operating on Ubuntu 14.04. ImportError: /usr/lib/libgdal.so.1: undefined symbol: sqlite3_column_table_name It all started when i build sqlite from source. How can i rectify the issue? Thank you.

[sqlite] calling Skip() on IQueryable with LINQ is generating incorrect sql

2016-03-30 Thread Joe Mistachkin
Tim Stowell wrote: > > SELECT TOP (20) [t0].[field1], [t0].[ field1], [t0].[field2] FROM > [tablename] AS [t0] > > Instead of the "TOP" keyword it should be "LIMIT" > As far as I can tell, this cannot currently be generated by the System.Data.SQLite.Linq (or EF6) assembly. In the past, I belie

[sqlite] Doc Typo

2016-03-30 Thread Dominique Devienne
In doc for new https://www.sqlite.org/c3ref/system_errno.html API s#the most reason I/O error#the most recent I/O error#g

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

2016-03-30 Thread Richard Hipp
On 3/30/16, Tinashe Mudavanhu wrote: > Hi, > > I am having the following error every time i try to import cv2 in the > Python Interpreter. I am operating on Ubuntu 14.04. > > ImportError: /usr/lib/libgdal.so.1: undefined symbol: > sqlite3_column_table_name > > It all started when i build sqlite fr

[sqlite] Broken database after experiments with fts.

2016-03-30 Thread Dan Kennedy
On 03/30/2016 12:14 AM, Cezary H. Noweta wrote: > Hello, > > On 2016-03-26 15:37, John Found wrote: >> Why cannot drop the table test? >> >> sqlite> begin transaction; >> sqlite> create virtual table test using fts5; >> Error: vtable constructor failed: test >> sqlite> commit; > > It is not require