1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Add the "ALTER TABLE xxx RENAME TO yyy" command. (CVS 2092)

FossilOrigin-Name: a1b2cc63e604785bd51e358ff72c485d858752e3
This commit is contained in:
danielk1977
2004-11-12 13:42:30 +00:00
parent 2958a4e6a5
commit 9fd2a9a028
9 changed files with 326 additions and 21 deletions

View File

@@ -15,7 +15,7 @@
** individual tokens and sends those tokens one-by-one over to the
** parser for analysis.
**
** $Id: tokenize.c,v 1.96 2004/11/12 03:56:15 drh Exp $
** $Id: tokenize.c,v 1.97 2004/11/12 13:42:31 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -65,7 +65,7 @@ static const char isIdChar[] = {
** Return the length of the token that begins at z[0].
** Store the token type in *tokenType before returning.
*/
static int sqliteGetToken(const unsigned char *z, int *tokenType){
int sqlite3GetToken(const unsigned char *z, int *tokenType){
int i, c;
switch( *z ){
case ' ': case '\t': case '\n': case '\f': case '\r': {
@@ -349,7 +349,7 @@ int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){
assert( i>=0 );
pParse->sLastToken.z = &zSql[i];
assert( pParse->sLastToken.dyn==0 );
pParse->sLastToken.n = sqliteGetToken((unsigned char*)&zSql[i], &tokenType);
pParse->sLastToken.n = sqlite3GetToken((unsigned char*)&zSql[i],&tokenType);
i += pParse->sLastToken.n;
switch( tokenType ){
case TK_SPACE: