> -----Original Message-----
> From: Andy Ling
> Sent: 29 August 2014 16:15
> To: '???'; sqlite-users@sqlite.org
> Subject: RE: Re:RE: [sqlite] HELP sqlite3 used in vxworks has someproblem?
> 
> I would add a printf statement in unixDelete rather than rely on a break point
> working.
> 


I finally had 5 minutes to try this out. I added the following to unixDelete

    }else{
      printf ("Error deleting file %s error %d\n", zPath, errno) ;
      rc = unixLogError(SQLITE_IOERR_DELETE, "unlink", zPath);
    }

I then ran the following

func call &sql_open "/tgtsvr/testdb.sql" &
func call &sql_execute "CREATE TABLE t (id INTEGER PRIMARY KEY ASC)" &

Where /tgtsvr is a mount of the file system on my Windows PC.  This generates 
the following

Error deleting file /tgtsvr/testdb.sql-wal error 13
Error executing statement CREATE TABLE t (id INTEGER PRIMARY KEY ASC) - disk 
I/O error
Error message disk I/O error

So as suspected, the host file system is returning yet another error code when 
deleting a file that doesn't exist.

This can be fixed by changing the patch to something like...

#if OS_VXWORKS
    }else if( errno==0x380003  || errno == 13){ /* == S_dosFsLib_FILE_NOT_FOUND 
*/
      rc = SQLITE_IOERR_DELETE_NOENT;
#endif

Although this doesn't feel right having to keep extending the list of error 
codes that are checked.
I'm not sure what else can be done though. Maybe some compile options that let 
you choose.

Regards

Andy Ling

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to