mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-06 15:49:35 +03:00
Revamp SQLITE_TESTCTRL_TUNE to provide visibility of current turning
parameter values. FossilOrigin-Name: 677e645e69e1f06487c26da6671fc03f0fb89a0f8e0d35712e6bdcf7279bdfc4
This commit is contained in:
@@ -10131,8 +10131,24 @@ static int do_meta_command(char *zLine, ShellState *p){
|
||||
case SQLITE_TESTCTRL_TUNE: {
|
||||
if( nArg==4 ){
|
||||
int id = (int)integerValue(azArg[2]);
|
||||
i64 val = integerValue(azArg[3]);
|
||||
rc2 = sqlite3_test_control(testctrl, id, val);
|
||||
int val = (int)integerValue(azArg[3]);
|
||||
sqlite3_test_control(testctrl, id, &val);
|
||||
isOk = 3;
|
||||
}else if( nArg==3 ){
|
||||
int id = (int)integerValue(azArg[2]);
|
||||
sqlite3_test_control(testctrl, -id, &rc2);
|
||||
isOk = 1;
|
||||
}else if( nArg==2 ){
|
||||
int id = 1;
|
||||
while(1){
|
||||
int val = 0;
|
||||
rc2 = sqlite3_test_control(testctrl, -id, &val);
|
||||
if( rc2!=SQLITE_OK ) break;
|
||||
if( id>1 ) utf8_printf(p->out, " ");
|
||||
utf8_printf(p->out, "%d: %d", id, val);
|
||||
id++;
|
||||
}
|
||||
if( id>1 ) utf8_printf(p->out, "\n");
|
||||
isOk = 3;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user