842
843
844
845
846
847
848
849
850
851
852
853
854
855
|
while( pAllStmt ){
db_finalize(pAllStmt);
}
g.repositoryOpen = 0;
g.localOpen = 0;
g.configOpen = 0;
sqlite3_close(g.db);
g.db = 0;
}
/*
** Create a new empty repository database with the given name.
**
|
>
>
>
>
|
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
|
while( pAllStmt ){
db_finalize(pAllStmt);
}
g.repositoryOpen = 0;
g.localOpen = 0;
g.configOpen = 0;
sqlite3_close(g.db);
if(g.dbConfig) {
sqlite3_close(g.dbConfig);
g.configOpen = 0;
}
g.db = 0;
}
/*
** Create a new empty repository database with the given name.
**
|
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
|
** If g.useAttach that means the ~/.fossil database was opened with
** the useAttach flag set to 1. In that case no connection swap is required
** so this routine is a no-op.
*/
void db_swap_connections(void){
if( !g.useAttach ){
sqlite3 *dbTemp = g.db;
g.db = g.dbConfig;
g.dbConfig = dbTemp;
}
}
/*
** Get and set values from the CONFIG, GLOBAL_CONFIG and VVAR table in the
|
>
|
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
|
** If g.useAttach that means the ~/.fossil database was opened with
** the useAttach flag set to 1. In that case no connection swap is required
** so this routine is a no-op.
*/
void db_swap_connections(void){
if( !g.useAttach ){
sqlite3 *dbTemp = g.db;
assert( g.dbConfig!=0 );
g.db = g.dbConfig;
g.dbConfig = dbTemp;
}
}
/*
** Get and set values from the CONFIG, GLOBAL_CONFIG and VVAR table in the
|