1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-03 16:53:36 +03:00

Change SQLITE_TESTCTRL_INITMODE to SQLITE_TESTCTRL_IMPOSTER. Revise the order

of parameters.  Give it the ability to reset the schema parse table so that
imposter tables can be erased.

FossilOrigin-Name: 42d5601739c90434e5adfda8fa99ef7b903877db
This commit is contained in:
drh
2015-01-30 20:59:27 +00:00
parent 0699f29a14
commit 1ffede8c86
10 changed files with 116 additions and 50 deletions

View File

@@ -3536,7 +3536,7 @@ static int do_meta_command(char *zLine, ShellState *p){
{ "scratchmalloc", SQLITE_TESTCTRL_SCRATCHMALLOC },
{ "byteorder", SQLITE_TESTCTRL_BYTEORDER },
{ "never_corrupt", SQLITE_TESTCTRL_NEVER_CORRUPT },
{ "initmode", SQLITE_TESTCTRL_INITMODE },
{ "imposter", SQLITE_TESTCTRL_IMPOSTER },
};
int testctrl = -1;
int rc = 0;
@@ -3629,14 +3629,14 @@ static int do_meta_command(char *zLine, ShellState *p){
break;
#endif
case SQLITE_TESTCTRL_INITMODE:
case SQLITE_TESTCTRL_IMPOSTER:
if( nArg==5 ){
rc = sqlite3_test_control(testctrl, p->db,
integerValue(azArg[2]),
azArg[2],
integerValue(azArg[3]),
integerValue(azArg[4]));
}else{
fprintf(stderr,"Usage: .testctrl initmode fBusy iDb newTnum\n");
fprintf(stderr,"Usage: .testctrl initmode dbName onoff tnum\n");
rc = 1;
}
break;