1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Improved error messages in fuzzershell when unable to open the database.

FossilOrigin-Name: c404fcace83613a50015f15097b7f28123c221c3
This commit is contained in:
drh
2015-05-22 23:50:19 +00:00
parent f9def06160
commit c19bc9b6b0
3 changed files with 13 additions and 10 deletions

View File

@ -701,14 +701,17 @@ int main(int argc, char **argv){
do{
if( zDbName ){
rc = sqlite3_open_v2(zDbName, &db, SQLITE_OPEN_READWRITE, 0);
if( rc!=SQLITE_OK ){
abendError("Cannot open database file %s", zDbName);
}
}else{
rc = sqlite3_open_v2(
"main.db", &db,
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY,
0);
}
if( rc!=SQLITE_OK ){
abendError("Unable to open the in-memory database");
if( rc!=SQLITE_OK ){
abendError("Unable to open the in-memory database");
}
}
if( pLook ){
rc = sqlite3_db_config(db, SQLITE_DBCONFIG_LOOKASIDE,pLook,szLook,nLook);