sqlite3_btreeinfo causes sql logic error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

sqlite3_btreeinfo causes sql logic error

curmudgeon
Works OK for

SELECT name FROM sqlite_btreeinfo WHERE type='table'

But crashes with

SELECT name, nEntry FROM sqlite_btreeinfo WHERE type='table'

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3_btreeinfo causes sql logic error

curmudgeon
Seems to be if you include any non-text column (apart from rootpage) from
sqlite_btreeinfo in the select it causes an sql logic error.



--
Sent from: http://sqlite.1065341.n5.nabble.com/
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3_btreeinfo causes sql logic error

Richard Hipp-3
In reply to this post by curmudgeon
On 1/24/18, x <[hidden email]> wrote:
> Works OK for
>
> SELECT name FROM sqlite_btreeinfo WHERE type='table'
>
> But crashes with
>
> SELECT name, nEntry FROM sqlite_btreeinfo WHERE type='table'

Do it crash, or does it return an error?  There is a difference.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3_btreeinfo causes sql logic error

curmudgeon
Sorry Richard, it was my app that was triggering the exception in response to the error. The queries prepare OK but, for any select containing the aforementioned non-text cols, sqlite3_step returns 1 and (wchar_t*)sqlite3_errmsg16(DB) returns “SQL logic error”.



I’m using the amalgamation in c++ builder 10.2, 64 bit clang compiler on windows 10



________________________________
From: sqlite-users <[hidden email]> on behalf of Richard Hipp <[hidden email]>
Sent: Wednesday, January 24, 2018 1:16:22 PM
To: SQLite mailing list
Subject: Re: [sqlite] sqlite3_btreeinfo causes sql logic error

On 1/24/18, x <[hidden email]> wrote:
> Works OK for
>
> SELECT name FROM sqlite_btreeinfo WHERE type='table'
>
> But crashes with
>
> SELECT name, nEntry FROM sqlite_btreeinfo WHERE type='table'

Do it crash, or does it return an error?  There is a difference.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3_btreeinfo causes sql logic error

Richard Hipp-3
On 1/24/18, x <[hidden email]> wrote:
> Sorry Richard, it was my app that was triggering the exception in response
> to the error. The queries prepare OK but, for any select containing the
> aforementioned non-text cols, sqlite3_step returns 1 and
> (wchar_t*)sqlite3_errmsg16(DB) returns “SQL logic error”.
>
>
>
> I’m using the amalgamation in c++ builder 10.2, 64 bit clang compiler on
> windows 10

Please add -DSQLITE_ENABLE_DBPAGE_VTAB to your build.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3_btreeinfo causes sql logic error

curmudgeon
Thanks Richard, working now.

From: Richard Hipp<mailto:[hidden email]>
Sent: 24 January 2018 14:08
To: SQLite mailing list<mailto:[hidden email]>
Subject: Re: [sqlite] sqlite3_btreeinfo causes sql logic error

On 1/24/18, x <[hidden email]> wrote:
> Sorry Richard, it was my app that was triggering the exception in response
> to the error. The queries prepare OK but, for any select containing the
> aforementioned non-text cols, sqlite3_step returns 1 and
> (wchar_t*)sqlite3_errmsg16(DB) returns “SQL logic error”.
>
>
>
> I’m using the amalgamation in c++ builder 10.2, 64 bit clang compiler on
> windows 10

Please add -DSQLITE_ENABLE_DBPAGE_VTAB to your build.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users