Re: [sqlite] A problem with 'pragma table_info(...)'

2016-09-21 Thread Dan Kennedy
On 09/21/2016 02:57 PM, Stepan Zakharov wrote: Nothing & Nothing. Just returns SQLITE_OK, doesn't enter into Callback. To avoid any doubts, when I change query to "select sql from sqlite_master where (type='table' AND name='TABLE_NAME');" I do enter into Callback and have a result. Perhaps,

Re: [sqlite] A problem with 'pragma table_info(...)'

2016-09-21 Thread Clemens Ladisch
Stepan Zakharov wrote: > Nothing & Nothing. Just returns SQLITE_OK, doesn't enter into Callback. This program: #include #include static int callback(void *p, int cols, char **data, char **names) { printf("%s %s %s %s %s %s\n", data[0], data[1], data[2], data[3], data[4],

Re: [sqlite] Consistency, rollback and such

2016-09-21 Thread Dominique Devienne
On Wed, Sep 21, 2016 at 12:02 AM, Richard Hipp wrote: > If you do a "BEGIN;" followed by a "SELECT..." then the transaction > starts before the SELECT is run. So it is serializable. > > But if you do just a "BEGIN", then some other process might jump in > line ahead of you and

Re: [sqlite] A problem with 'pragma table_info(...)'

2016-09-21 Thread Stepan Zakharov
Nothing & Nothing. Just returns SQLITE_OK, doesn't enter into Callback. To avoid any doubts, when I change query to "select sql from sqlite_master where (type='table' AND name='TABLE_NAME');" I do enter into Callback and have a result. Perhaps, PRAGMA is somehow broken or disabled in my sqlite.

Re: [sqlite] A problem with 'pragma table_info(...)'

2016-09-21 Thread Dan Kennedy
On 09/21/2016 01:44 PM, Stepan Zakharov wrote: Yes, of course it looks different.pragma table_info(TABLENAME);Where TABLENAME is my table name.I've tried it with single-quotes as well: pragma table_info('TABLENAME');No results in any case.And no errors. Returns SQLITE_OK.A very strange

Re: [sqlite] [BUG REPORT] Transaction that has the key violation is very slow

2016-09-21 Thread Dan Kennedy
On 09/21/2016 04:34 AM, Yuri wrote: I import bulk data into SQLite DB. I run 50k records per transaction. When some bug or data inconsistency occurs and causes the key violation, this violation is reported only in the end of the transaction (this is okay and has been discussed before). But

Re: [sqlite] A problem with 'pragma table_info(...)'

2016-09-21 Thread Stepan Zakharov
Yes, of course it looks different.pragma table_info(TABLENAME);Where TABLENAME is my table name.I've tried it with single-quotes as well: pragma table_info('TABLENAME');No results in any case.And no errors. Returns SQLITE_OK.A very strange behaviour. > To: sqlite-users@mailinglists.sqlite.org

Re: [sqlite] A problem with 'pragma table_info(...)'

2016-09-21 Thread Clemens Ladisch
Stepan Zakharov wrote: > it does not return any results That is because the table name is not correctly quoted: sqlite> pragma table_info(...); Error: near ".": syntax error Or does your statement look different? Regards, Clemens ___