mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Minor fixes for problems revealed by releasetest.tcl.
FossilOrigin-Name: 1a8aedc3376b7ae32fa7b2c367eedd483e2629908836efd10ee5bd1fe0784675
This commit is contained in:
10
src/alter.c
10
src/alter.c
@@ -1417,10 +1417,12 @@ static void renameTableFunc(
|
||||
}else{
|
||||
/* Modify any FK definitions to point to the new table. */
|
||||
#ifndef SQLITE_OMIT_FOREIGN_KEY
|
||||
FKey *pFKey;
|
||||
for(pFKey=pTab->pFKey; pFKey; pFKey=pFKey->pNextFrom){
|
||||
if( sqlite3_stricmp(pFKey->zTo, zOld)==0 ){
|
||||
renameTokenFind(&sParse, &sCtx, (void*)pFKey->zTo);
|
||||
if( db->flags & SQLITE_ForeignKeys ){
|
||||
FKey *pFKey;
|
||||
for(pFKey=pTab->pFKey; pFKey; pFKey=pFKey->pNextFrom){
|
||||
if( sqlite3_stricmp(pFKey->zTo, zOld)==0 ){
|
||||
renameTokenFind(&sParse, &sCtx, (void*)pFKey->zTo);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user