Ticket https://www.sqlite.org/src/info/f00d7b65
Fixed on trunk https://www.sqlite.org/src/info/a2ead8aa4517b63c

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-----Original Message-----
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Luuk
>Sent: Friday, 19 April, 2019 12:11
>To: sqlite-users@mailinglists.sqlite.org
>Subject: Re: [sqlite] Table names starting with sqlite (not sqlite_)
>
>
>On 19-4-2019 16:19, Semih Hazar wrote:
>> Hi,
>>
>> With 3.28.0 I'm getting an inconsistent behavior if I try to rename
>a table
>> if its name starts with "sqlite". It's not "sqlite3_" by the way,
>which
>> just gives an error since it's a reserved keyword.
>>
>> After renaming, .table command shows the new name, but a select
>from the
>> table errors out. If I try to rename it again, things seems to be
>OK.
>> Please take a look at the output below which works fine with 3.24.0
>>
>> SQLite version 3.28.0 2019-04-16 19:49:53
>> Enter ".help" for usage hints.
>> sqlite> CREATE TABLE "sqlite1234" ("id" integer);
>> sqlite> ALTER TABLE "sqlite1234" RENAME TO "User";
>> sqlite> SELECT * FROM "User";
>> Error: no such table: User
>> sqlite> .table
>> User
>> sqlite> SELECT * FROM sqlite_master;
>> table|User|User|2|CREATE TABLE "sqlite1234" ("id" integer)
>> sqlite> ALTER TABLE "sqlite1234" RENAME TO "User";
>> sqlite> SELECT * FROM "User";
>> sqlite>
>>
>> Best Regards,
>> Semih Hazar
>
>This is the same behavior as in 3.27.2:
>
>D:\TEMP>sqlite3 temp.sqlite
>SQLite version 3.27.2 2019-02-25 16:06:06
>Enter ".help" for usage hints.
>sqlite> CREATE TABLE "sqlite1234" ("id" integer);
>sqlite> ALTER TABLE "sqlite1234" RENAME TO "User";
>sqlite>  SELECT * FROM "User";
>Error: no such table: User
>sqlite> .table
>User
>sqlite> SELECT * FROM sqlite_master;
>table|User|User|2|CREATE TABLE "sqlite1234" ("id" integer)
>sqlite> ALTER TABLE "sqlite1234" RENAME TO "User";
>sqlite> SELECT * FROM "User";
>sqlite>
>sqlite>
>sqlite> .table
>User
>sqlite> .schema
>CREATE TABLE IF NOT EXISTS "User" ("id" integer);
>sqlite>
>
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to