Fix legacy comments on Token. Begin commenting the new ALTER TABLE RENAME
COLUMN code. Fix a memory leak in the sqlite_rename_column() SQL function.
FossilOrigin-Name: 32edc8920376aabb84ebe1900eaa9512d23f1b44d6459e4916dc6b07db66e27c
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 5a4fe94..7b01bb2 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -2281,9 +2281,11 @@
** Each token coming out of the lexer is an instance of
** this structure. Tokens are also used as part of an expression.
**
-** Note if Token.z==0 then Token.dyn and Token.n are undefined and
-** may contain random values. Do not make any assumptions about Token.dyn
-** and Token.n when Token.z==0.
+** The memory that "z" points to is owned by other objects. Take care
+** that the owner of the "z" string does not deallocate the string before
+** the Token goes out of scope! Very often, the "z" points to some place
+** in the middle of the Parse.zSql text. But it might also point to a
+** static string.
*/
struct Token {
const char *z; /* Text of the token. Not NULL-terminated! */
@@ -3114,7 +3116,7 @@
With *pWith; /* Current WITH clause, or NULL */
With *pWithToFree; /* Free this WITH object at the end of the parse */
#ifndef SQLITE_OMIT_ALTERTABLE
- RenameToken *pRename;
+ RenameToken *pRename; /* Tokens subject to renaming by ALTER TABLE */
#endif
};