1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Fix a problem with the way temporary tables mask permanent tables. (CVS 345)

FossilOrigin-Name: ba89da603135e5f63f6f97ba3adad02682375c07
This commit is contained in:
drh
2002-01-10 14:31:48 +00:00
parent be67d9cb4b
commit da9e034610
8 changed files with 142 additions and 54 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.54 2002/01/09 03:20:00 drh Exp $
** $Id: main.c,v 1.55 2002/01/10 14:31:49 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -73,7 +73,12 @@ static int sqliteOpenCb(void *pDb, int argc, char **argv, char **azColName){
*/
Index *pIndex = sqliteFindIndex(db, argv[1]);
if( pIndex==0 || pIndex->tnum!=0 ){
nErr++;
/* This can occur if there exists an index on a TEMP table which
** has the same name as another index on a permanent index. Since
** the permanent table is hidden by the TEMP table, we can also
** safely ignore the index on the permanent table.
*/
/* Do Nothing */;
}else{
pIndex->tnum = atoi(argv[2]);
}