Probable bug with SQLITE_DQS=0 regarding shell .schema command?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Probable bug with SQLITE_DQS=0 regarding shell .schema command?

Olivier Mascia
Using 3.29.0 with SQLITE_DQS.

sqlite3 test1.db "create table A(I integer);"
sqlite3 test2.db "create table B(J integer);"

sqlite3 test1.db
sqlite> .schema
CREATE TABLE A(I integer);

sqlite> attach 'test2.db' as cloud;
sqlite> .schema
Error: no such column: cloud
sqlite> detach cloud;

sqlite> attach 'test2.db' as 'cloud';
sqlite> .schema
Error: no such column: cloud
sqlite> detach cloud;

sqlite> attach 'test2.db' as "cloud";
sqlite> .schema
Error: no such column: cloud
sqlite> detach cloud;

sqlite> .schema
CREATE TABLE A(I integer);
sqlite>

?

I haven't bisected but as a quick check "SQLite version 3.24.0 2018-06-04 14:10:15" on my macOS (which obviously has not been compiled with SQLITE_DQS) works OK:

sqlite> .schema
CREATE TABLE A(I integer);

sqlite> attach 'test2.db' as cloud;
sqlite> .schema
CREATE TABLE A(I integer);
CREATE TABLE cloud.X(I integer primary key);
CREATE TABLE cloud.B(J integer);
sqlite> detach cloud;

sqlite> attach 'test2.db' as 'cloud';
sqlite> .schema
CREATE TABLE A(I integer);
CREATE TABLE cloud.X(I integer primary key);
CREATE TABLE cloud.B(J integer);
sqlite> detach cloud;

sqlite> attach 'test2.db' as "cloud";
sqlite> .schema
CREATE TABLE A(I integer);
CREATE TABLE cloud.X(I integer primary key);
CREATE TABLE cloud.B(J integer);
sqlite> detach cloud;

sqlite>

I don't know yet if anything else than shell .schema command is affected. At least, I can run statements referencing cloud.B without issue.

BTW, just removed my -DSQLITE_DQS=0 and things back to normal with 3.29.

—  
Best Regards, Meilleures salutations, Met vriendelijke groeten, Mit besten Grüßen,
Olivier Mascia
https://www.integral.be


_______________________________________________
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: Probable bug with SQLITE_DQS=0 regarding shell .schema command?

Olivier Mascia
> Le 6 août 2019 à 10:27, Olivier Mascia <[hidden email]> a écrit :
>
> Using 3.29.0 with SQLITE_DQS.
>
> sqlite3 test1.db "create table A(I integer);"
> sqlite3 test2.db "create table B(J integer);"
>
> sqlite3 test1.db
> sqlite> .schema
> CREATE TABLE A(I integer);
>
> sqlite> attach 'test2.db' as cloud;
> sqlite> .schema
> Error: no such column: cloud
> sqlite> detach cloud;
>
> sqlite> attach 'test2.db' as 'cloud';
> sqlite> .schema
> Error: no such column: cloud
> sqlite> detach cloud;
>
> sqlite> attach 'test2.db' as "cloud";
> sqlite> .schema
> Error: no such column: cloud
> sqlite> detach cloud;

I can confirm that this checkin (after 3.29.0 release):
https://www.sqlite.org/src/info/fcd937d9786a82ef
already fixed this issue.

—  
Best Regards, Meilleures salutations, Met vriendelijke groeten, Mit besten Grüßen,
Olivier Mascia



_______________________________________________
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: Probable bug with SQLITE_DQS=0 regarding shell .schema command?

Richard Hipp-3
In reply to this post by Olivier Mascia
On 8/6/19, Olivier Mascia <[hidden email]> wrote:
> Using 3.29.0 with SQLITE_DQS.

Is this the problem that was fixed here:
https://www.sqlite.org/src/timeline?c=fcd937d9786a82ef


--
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: Probable bug with SQLITE_DQS=0 regarding shell .schema command?

Olivier Mascia
> Le 6 août 2019 à 12:45, Richard Hipp <[hidden email]> a écrit :
>
> On 8/6/19, Olivier Mascia <[hidden email]> wrote:
>> Using 3.29.0 with SQLITE_DQS.
>
> Is this the problem that was fixed here:
> https://www.sqlite.org/src/timeline?c=fcd937d9786a82ef

Indeed.
—  
Best Regards, Meilleures salutations, Met vriendelijke groeten, Mit besten Grüßen,
Olivier Mascia
https://www.integral.be


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