diff options
author | drh <drh@noemail.net> | 2008-07-08 19:34:06 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-07-08 19:34:06 +0000 |
commit | f089aa459e97f6f8ed27efdc958e8ee642b0b4bb (patch) | |
tree | 345a713531ba65de2f6888ed1b76fafd5fb1dda8 /src/select.c | |
parent | 0880a7463364f3fd0428c8457c89c5fefae977ea (diff) | |
download | sqlite-f089aa459e97f6f8ed27efdc958e8ee642b0b4bb.tar.gz sqlite-f089aa459e97f6f8ed27efdc958e8ee642b0b4bb.zip |
Completely rework the sqlite3SetString() primitive so that it honors the
SQLITE_LIMIT_LENGTH and avoids the use of strlen(). (CVS 5374)
FossilOrigin-Name: 8ed04b1e26a55306e4baf3e93fb084514134d603
Diffstat (limited to 'src/select.c')
-rw-r--r-- | src/select.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/select.c b/src/select.c index 6effc49d5..f7c5780ad 100644 --- a/src/select.c +++ b/src/select.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle SELECT statements in SQLite. ** -** $Id: select.c,v 1.449 2008/07/08 18:05:26 drh Exp $ +** $Id: select.c,v 1.450 2008/07/08 19:34:07 drh Exp $ */ #include "sqliteInt.h" @@ -1111,7 +1111,7 @@ static void generateColumnNames( zTab = pTabList->a[j].zAlias; if( fullNames || zTab==0 ) zTab = pTab->zName; - sqlite3SetString(&zName, zTab, ".", zCol, (char*)0); + zName = sqlite3MPrintf(db, "%s.%s", zTab, zCol); sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, P4_DYNAMIC); }else{ sqlite3VdbeSetColName(v, i, COLNAME_NAME, zCol, strlen(zCol)); |