mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
SQLTester --result command: do not double-{}-wrap error messages and do not throw on db error.
FossilOrigin-Name: f7be20f5a62f8970f957e5c3a1d1c6536995df5c078dbac34a44f09682e43945
This commit is contained in:
@ -305,10 +305,13 @@ public class SQLTester {
|
||||
}
|
||||
|
||||
private void appendDbErr(sqlite3 db, StringBuilder sb, int rc){
|
||||
sb.append(org.sqlite.jni.ResultCode.getEntryForInt(rc))
|
||||
.append(" {")
|
||||
.append(escapeSqlValue(sqlite3_errmsg(db)))
|
||||
.append("}");
|
||||
sb.append(org.sqlite.jni.ResultCode.getEntryForInt(rc)).append(' ');
|
||||
final String msg = escapeSqlValue(sqlite3_errmsg(db));
|
||||
if( '{' == msg.charAt(0) ){
|
||||
sb.append(msg);
|
||||
}else{
|
||||
sb.append('{').append(msg).append('}');
|
||||
}
|
||||
}
|
||||
|
||||
public int execSql(sqlite3 db, boolean throwOnError,
|
||||
@ -662,7 +665,7 @@ class ResultCommand extends Command {
|
||||
t.incrementTestCounter();
|
||||
final String sql = t.takeInputBuffer();
|
||||
//t.verbose(argv[0]," SQL =\n",sql);
|
||||
int rc = t.execSql(null, true, bufferMode, ResultRowMode.ONELINE, sql);
|
||||
int rc = t.execSql(null, false, bufferMode, ResultRowMode.ONELINE, sql);
|
||||
final String result = t.getResultText().trim();
|
||||
final String sArgs = argv.length>1 ? Util.argvToString(argv) : "";
|
||||
if( !result.equals(sArgs) ){
|
||||
|
Reference in New Issue
Block a user