pParse->nErr++;
void sqliteStartTable(  Parse *pParse,   /* Parser context */  Token *pStart,   /* The "CREATE" token */  Token *pName,    /* Name of table or view to create */  int isTemp,      /* True if this is a TEMP table */  int isView       /* True if this is a VIEW */){  Table *pTable;  Index *pIdx;  char *zName;  sqlite *db = pParse->db;  Vdbe *v;  int iDb;  pParse->sFirstToken = *pStart;  zName = sqliteTableNameFromToken(pName);  if( zName==0 ) return;  if( db->init.iDb==1 ) isTemp = 1;#ifndef SQLITE_OMIT_AUTHORIZATION  assert( (isTemp & 1)==isTemp );  {    int code;    char *zDb = isTemp ? "temp" : "main";    if( sqliteAuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(isTemp), 0, zDb) ){      sqliteFree(zName);      return;    }    if( isView ){      if( isTemp ){        code = SQLITE_CREATE_TEMP_VIEW;      }else{        code = SQLITE_CREATE_VIEW;      }    }else{      if( isTemp ){        code = SQLITE_CREATE_TEMP_TABLE;      }else{        code = SQLITE_CREATE_TABLE;      }    }    if( sqliteAuthCheck(pParse, code, zName, 0, zDb) ){      sqliteFree(zName);      return;    }  }#endif   /* Before trying to create a temporary table, make sure the Btree for  ** holding temporary tables is open.  */  if( isTemp && db->aDb[1].pBt==0 && !pParse->explain ){    int rc = sqliteBtreeFactory(db, 0, 0, MAX_PAGES, &db->aDb[1].pBt);    if( rc!=SQLITE_OK ){      sqliteErrorMsg(pParse, "unable to open a temporary database "        "file for storing temporary tables");      pParse->nErr++;      return;    }    if( db->flags & SQLITE_InTrans ){      rc = sqliteBtreeBeginTrans(db->aDb[1].pBt);      if( rc!=SQLITE_OK ){        sqliteErrorMsg(pParse, "unable to get a write lock on "          "the temporary database file");        pParse->nErr++;        return;      }    }  }  /* Make sure the new table name does not collide with an existing  ** index or table name.  Issue an error message if it does.  **  ** If we are re-reading the sqlite_master table because of a schema  ** change and a new permanent table is found whose name collides with  ** an existing temporary table, that is not an error.  */  pTable = sqliteFindTable(db, zName, 0);  iDb = isTemp ? 1 : db->init.iDb;  if( pTable!=0 && (pTable->iDb==iDb || !db->init.busy) ){    sqliteErrorMsg(pParse, "table %T already exists", pName);    sqliteFree(zName);    return;  }  if( (pIdx = sqliteFindIndex(db, zName, 0))!=0 &&          (pIdx->iDb==0 || !db->init.busy) ){    sqliteErrorMsg(pParse, "there is already an index named %s", zName);    sqliteFree(zName);    return;  }  pTable = sqliteMalloc( sizeof(Table) );  if( pTable==0 ){    sqliteFree(zName);    return;  }  pTable->zName = zName;  pTable->nCol = 0;  pTable->aCol = 0;  pTable->iPKey = -1;  pTable->pIndex = 0;  pTable->iDb = iDb;  if( pParse->pNewTable ) sqliteDeleteTable(db, pParse->pNewTable);  pParse->pNewTable = pTable;  /* Begin generating the code that will insert the table record into  ** the SQLITE_MASTER table.  Note in particular that we must go ahead  ** and allocate the record number for the table entry now.  Before any  ** PRIMARY KEY or UNIQUE keywords are parsed.  Those keywords will cause  ** indices to be created and the table record must come before the   ** indices.  Hence, the record number for the table must be allocated  ** now.  */  if( !db->init.busy && (v = sqliteGetVdbe(pParse))!=0 ){    sqliteBeginWriteOperation(pParse, 0, isTemp);    if( !isTemp ){      sqliteVdbeAddOp(v, OP_Integer, db->file_format, 0);      sqliteVdbeAddOp(v, OP_SetCookie, 0, 1);    }    sqliteOpenMasterTable(v, isTemp);    sqliteVdbeAddOp(v, OP_NewRecno, 0, 0);    sqliteVdbeAddOp(v, OP_Dup, 0, 0);    sqliteVdbeAddOp(v, OP_String, 0, 0);    sqliteVdbeAddOp(v, OP_PutIntKey, 0, 0);  }}