/ Check-in [dd1b34ba]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Disallow statements of the form "CREATE TEMP TABLE main.t1 ...".
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:dd1b34bab7edaaedd985882f6e16b16940a46d38
User & Date: dan 2010-09-28 15:55:48
Context
2010-09-28
17:34
Add tests to e_createtable.test. Allow a table to be created if there is an index of the same name in a different attached database. check-in: 6251e587 user: dan tags: trunk
17:34
Get ANALYZE working again with -DSQLITE_ENABLE_STAT2 and virtual tables. check-in: b7a26427 user: drh tags: trunk
15:55
Disallow statements of the form "CREATE TEMP TABLE main.t1 ...". check-in: dd1b34ba user: dan tags: trunk
15:25
Updates to e_vacuum.test so that it works when SQLITE_DEFAULT_AUTOVACUUM=1 is set. check-in: 890816c5 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/build.c.

722
723
724
725
726
727
728
729
730

731
732
733
734
735
736
737
  ** The call below sets the pName pointer to point at the token (pName1 or
  ** pName2) that stores the unqualified table name. The variable iDb is
  ** set to the index of the database that the table or view is to be
  ** created in.
  */
  iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
  if( iDb<0 ) return;
  if( !OMIT_TEMPDB && isTemp && iDb>1 ){
    /* If creating a temp table, the name may not be qualified */

    sqlite3ErrorMsg(pParse, "temporary table name must be unqualified");
    return;
  }
  if( !OMIT_TEMPDB && isTemp ) iDb = 1;

  pParse->sNameToken = *pName;
  zName = sqlite3NameFromToken(db, pName);







|
|
>







722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
  ** The call below sets the pName pointer to point at the token (pName1 or
  ** pName2) that stores the unqualified table name. The variable iDb is
  ** set to the index of the database that the table or view is to be
  ** created in.
  */
  iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
  if( iDb<0 ) return;
  if( !OMIT_TEMPDB && isTemp && pName2->n>0 && iDb!=1 ){
    /* If creating a temp table, the name may not be qualified. Unless 
    ** the database name is "temp" anyway.  */
    sqlite3ErrorMsg(pParse, "temporary table name must be unqualified");
    return;
  }
  if( !OMIT_TEMPDB && isTemp ) iDb = 1;

  pParse->sNameToken = *pName;
  zName = sqlite3NameFromToken(db, pName);