1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

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
This commit is contained in:
drh
2018-08-13 15:09:48 +00:00
parent 5fc22cdfde
commit 4a2c747c4c
4 changed files with 77 additions and 26 deletions

View File

@@ -2281,9 +2281,11 @@ struct IndexSample {
** 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 @@ struct Parse {
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
};