Fixed wrong result of sqlite_query on error
Added extension-functions.c

http://www.sqlite.org/contrib?orderby=date