SQLite

View Ticket
Login
Ticket Hash: 0b803bff856c644c135d849d1a308e023713ecc9
Title: Return (error code) of xCurrentTime is always ignored
Status: Fixed Type: Code_Defect
Severity: Minor Priority: Immediate
Subsystem: VFS Resolution: Fixed
Last Modified: 2011-10-12 23:14:14
Version Found In: 3.6.2
Description:
xCurrentTime is defined to return an error code. However no SQLite code ever looks at the return code and consequently ignores any errors.

xCurrentTime is used in two places. One is for profile where failure doesn't matter. The other is for date/time functions. If xCurrentTime returns an error, then this should too:

   select date('now')
Looking at the supplied vfs, the unixCurrentTime imlementation is a little sloppy as it ignores any errors from getttimeofday() which can fail if you don't have permissions to read the time.

Also for some strange reason xCurrentTime is documented as returning zero on success and one on error. Why not just have it return a regular SQLite error code?

Windows CE code does check for error. Normal Windows doesn't although no possible errors are documented. OS/2 does return a status but no possible errors are documented