SQLite

View Ticket
Login
Ticket Hash: 4722bdab08cb14546924f8ea44cf77fac1bffab0
Title: Another renameTokenCheckAll() fault
Status: Fixed Type: Code_Defect
Severity: Minor Priority: Low
Subsystem: Unknown Resolution: Fixed
Last Modified: 2020-04-03 11:26:37
Version Found In: 3.31.1
User Comments:
drh added on 2020-04-02 22:55:07: (text/x-fossil-wiki)
Henry Liu of Shenzhen Ankki Technologies Co.Ltd. sent in the following script
which causes a fault in the renameTokenCheckAll() routine:

<blockquote><verbatim>
CREATE TABLE a(a);
CREATE VIEW b AS SELECT(SELECT *FROM c JOIN a USING(d, a, a, a) JOIN a) IN();
ALTER TABLE a RENAME a TO e;
</verbatim></blockquote>

Henry reports that this asserts, but I only see failures if I run under valgrind.
Note that fault is in the error-checking routine renameTokenCheckAll().  That
routine only runs in debugging mode.  For release builds, this routine is
a no-op and so the fault never occurs.