/ Check-in [3f30f00a]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Simplify the test that determines if the name of a new table collides with a prior index name.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3f30f00a384d23582f3fe5e68add7fb7d7834926
User & Date: drh 2010-09-28 20:26:44
Context
2010-09-29
01:54
Updates to sqlite3_finalize() documentation. check-in: 8c5994cf user: drh tags: trunk
2010-09-28
20:26
Simplify the test that determines if the name of a new table collides with a prior index name. check-in: 3f30f00a user: drh tags: trunk
19:16
Fix some problems that can occur if a trigger has the same name as another database object. check-in: 655991ec user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/build.c.

   783    783       pTable = sqlite3FindTable(db, zName, zDb);
   784    784       if( pTable ){
   785    785         if( !noErr ){
   786    786           sqlite3ErrorMsg(pParse, "table %T already exists", pName);
   787    787         }
   788    788         goto begin_table_error;
   789    789       }
   790         -    if( sqlite3FindIndex(db, zName, zDb)!=0 && (iDb==0 || !db->init.busy) ){
          790  +    if( sqlite3FindIndex(db, zName, zDb)!=0 ){
   791    791         sqlite3ErrorMsg(pParse, "there is already an index named %s", zName);
   792    792         goto begin_table_error;
   793    793       }
   794    794     }
   795    795   
   796    796     pTable = sqlite3DbMallocZero(db, sizeof(Table));
   797    797     if( pTable==0 ){