2012-12-16 00:06 UTC+0100 Viktor Szakats (harbour syenar.net)

* contrib/3rd/sqlite3/sqlite3.hbp
  * contrib/3rd/sqlite3/*
    * updated to 3.7.15

  * contrib/hbsqlit3/core.c
  * contrib/hbsqlit3/hbsqlit3.hbx
    + added sqlite3_errstr(), new in 3.7.15
    * minor cleanups
This commit is contained in:
Viktor Szakats
2012-12-15 23:07:56 +00:00
parent 50b4490f77
commit dfbf06eae2
7 changed files with 3899 additions and 2733 deletions

View File

@@ -10,6 +10,16 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2012-12-16 00:06 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/3rd/sqlite3/sqlite3.hbp
* contrib/3rd/sqlite3/*
* updated to 3.7.15
* contrib/hbsqlit3/core.c
* contrib/hbsqlit3/hbsqlit3.hbx
+ added sqlite3_errstr(), new in 3.7.15
* minor cleanups
2012-12-12 01:12 UTC+0100 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.prg
+ use implibs (if available) as source of information

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
diff -urN sqlite3.orig\sqlite3.c sqlite3\sqlite3.c
--- sqlite3.orig\sqlite3.c Thu Oct 11 19:37:32 2012
+++ sqlite3\sqlite3.c Thu Oct 11 19:37:32 2012
@@ -26293,7 +26293,11 @@
--- sqlite3.orig\sqlite3.c Sat Dec 15 23:55:32 2012
+++ sqlite3\sqlite3.c Sat Dec 15 23:55:33 2012
@@ -26421,7 +26421,11 @@
** is the same technique used by glibc to implement posix_fallocate()
** on systems that do not have a real fallocate() system call.
*/
@@ -13,7 +13,7 @@ diff -urN sqlite3.orig\sqlite3.c sqlite3\sqlite3.c
i64 iWrite; /* Next offset to write to */
if( robust_ftruncate(pFile->h, nSize) ){
@@ -31418,6 +31422,11 @@
@@ -31729,6 +31733,11 @@
** substitute.
*/
/* #include <time.h> */
@@ -25,7 +25,7 @@ diff -urN sqlite3.orig\sqlite3.c sqlite3\sqlite3.c
struct tm *__cdecl localtime(const time_t *t)
{
static struct tm y;
@@ -31425,7 +31434,7 @@
@@ -31736,7 +31745,7 @@
SYSTEMTIME pTm;
sqlite3_int64 t64;
t64 = *t;

View File

@@ -107,9 +107,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION "3.7.14.1"
#define SQLITE_VERSION_NUMBER 3007014
#define SQLITE_SOURCE_ID "2012-10-04 19:37:12 091570e46d04e84b67228e0bdbcd6e1fb60c6bdb"
#define SQLITE_VERSION "3.7.15"
#define SQLITE_VERSION_NUMBER 3007015
#define SQLITE_SOURCE_ID "2012-12-12 13:36:53 cd0b37c52658bfdf992b1e3dc467bae1835a94ae"
/*
** CAPI3REF: Run-Time Library Version Numbers
@@ -474,10 +474,12 @@ SQLITE_API int sqlite3_exec(
#define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20<<8))
#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8))
#define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8))
#define SQLITE_IOERR_DELETE_NOENT (SQLITE_IOERR | (23<<8))
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
#define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8))
#define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2<<8))
#define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8))
#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8))
#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8))
#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8))
@@ -855,6 +857,26 @@ struct sqlite3_io_methods {
** compilation of the PRAGMA fails with an error. ^The [SQLITE_FCNTL_PRAGMA]
** file control occurs at the beginning of pragma statement analysis and so
** it is able to override built-in [PRAGMA] statements.
**
** <li>[[SQLITE_FCNTL_BUSYHANDLER]]
** ^This file-control may be invoked by SQLite on the database file handle
** shortly after it is opened in order to provide a custom VFS with access
** to the connections busy-handler callback. The argument is of type (void **)
** - an array of two (void *) values. The first (void *) actually points
** to a function of type (int (*)(void *)). In order to invoke the connections
** busy-handler, this function should be invoked with the second (void *) in
** the array as the only argument. If it returns non-zero, then the operation
** should be retried. If it returns zero, the custom VFS should abandon the
** current operation.
**
** <li>[[SQLITE_FCNTL_TEMPFILENAME]]
** ^Application can invoke this file-control to have SQLite generate a
** temporary filename using the same algorithm that is followed to generate
** temporary filenames for TEMP tables and other internal uses. The
** argument should be a char** which will be filled with the filename
** written into memory obtained from [sqlite3_malloc()]. The caller should
** invoke [sqlite3_free()] on the result to avoid a memory leak.
**
** </ul>
*/
#define SQLITE_FCNTL_LOCKSTATE 1
@@ -871,6 +893,8 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_VFSNAME 12
#define SQLITE_FCNTL_POWERSAFE_OVERWRITE 13
#define SQLITE_FCNTL_PRAGMA 14
#define SQLITE_FCNTL_BUSYHANDLER 15
#define SQLITE_FCNTL_TEMPFILENAME 16
/*
** CAPI3REF: Mutex Handle
@@ -1567,11 +1591,39 @@ struct sqlite3_mem_methods {
** disabled. The default value may be changed by compiling with the
** [SQLITE_USE_URI] symbol defined.
**
** [[SQLITE_CONFIG_COVERING_INDEX_SCAN]] <dt>SQLITE_CONFIG_COVERING_INDEX_SCAN
** <dd> This option takes a single integer argument which is interpreted as
** a boolean in order to enable or disable the use of covering indices for
** full table scans in the query optimizer. The default setting is determined
** by the [SQLITE_ALLOW_COVERING_INDEX_SCAN] compile-time option, or is "on"
** if that compile-time option is omitted.
** The ability to disable the use of covering indices for full table scans
** is because some incorrectly coded legacy applications might malfunction
** malfunction when the optimization is enabled. Providing the ability to
** disable the optimization allows the older, buggy application code to work
** without change even with newer versions of SQLite.
**
** [[SQLITE_CONFIG_PCACHE]] [[SQLITE_CONFIG_GETPCACHE]]
** <dt>SQLITE_CONFIG_PCACHE and SQLITE_CONFIG_GETPCACHE
** <dd> These options are obsolete and should not be used by new code.
** They are retained for backwards compatibility but are now no-ops.
** </dl>
**
** [[SQLITE_CONFIG_SQLLOG]]
** <dt>SQLITE_CONFIG_SQLLOG
** <dd>This option is only available if sqlite is compiled with the
** SQLITE_ENABLE_SQLLOG pre-processor macro defined. The first argument should
** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int).
** The second should be of type (void*). The callback is invoked by the library
** in three separate circumstances, identified by the value passed as the
** fourth parameter. If the fourth parameter is 0, then the database connection
** passed as the second argument has just been opened. The third argument
** points to a buffer containing the name of the main database file. If the
** fourth parameter is 1, then the SQL statement that the third parameter
** points to has just been executed. Or, if the fourth parameter is 2, then
** the connection being passed as the second parameter is being closed. The
** third parameter is passed NULL In this case.
** </dl>
*/
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */
@@ -1592,6 +1644,8 @@ struct sqlite3_mem_methods {
#define SQLITE_CONFIG_URI 17 /* int */
#define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */
#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */
#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */
#define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */
/*
** CAPI3REF: Database Connection Configuration Options
@@ -2600,7 +2654,7 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
** an error)^.
** ^If "ro" is specified, then the database is opened for read-only
** access, just as if the [SQLITE_OPEN_READONLY] flag had been set in the
** third argument to sqlite3_prepare_v2(). ^If the mode option is set to
** third argument to sqlite3_open_v2(). ^If the mode option is set to
** "rw", then the database is opened for read-write (but not create)
** access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had
** been set. ^Value "rwc" is equivalent to setting both
@@ -2752,6 +2806,11 @@ SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int
** However, the error string might be overwritten or deallocated by
** subsequent calls to other SQLite interface functions.)^
**
** ^The sqlite3_errstr() interface returns the English-language text
** that describes the [result code], as UTF-8.
** ^(Memory to hold the error message string is managed internally
** and must not be freed by the application)^.
**
** When the serialized [threading mode] is in use, it might be the
** case that a second error occurs on a separate thread in between
** the time of the first error and the call to these interfaces.
@@ -2770,6 +2829,7 @@ SQLITE_API int sqlite3_errcode(sqlite3 *db);
SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
SQLITE_API const char *sqlite3_errmsg(sqlite3*);
SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
SQLITE_API const char *sqlite3_errstr(int);
/*
** CAPI3REF: SQL Statement Object
@@ -4732,6 +4792,9 @@ SQLITE_API void *sqlite3_update_hook(
** future releases of SQLite. Applications that care about shared
** cache setting should set it explicitly.
**
** This interface is threadsafe on processors where writing a
** 32-bit integer is atomic.
**
** See Also: [SQLite Shared-Cache Mode]
*/
SQLITE_API int sqlite3_enable_shared_cache(int);

View File

@@ -45,8 +45,8 @@
sqlite3.c
# ORIGIN http://www.sqlite.org/
# VER 3.7.14.1
# URL http://www.sqlite.org/sqlite-amalgamation-3071401.zip
# VER 3.7.15
# URL http://www.sqlite.org/sqlite-amalgamation-3071500.zip
# DIFF sqlite3.dif
#
# MAP sqlite3.c

View File

@@ -535,7 +535,7 @@ HB_FUNC( SQLITE3_SOURCEID )
hb_retc( sqlite3_sourceid() );
#else
hb_retc_null();
#endif /* SQLITE_VERSION_NUMBER >= 3006018 */
#endif
}
/**
@@ -553,7 +553,7 @@ HB_FUNC( SQLITE3_INITIALIZE )
hb_retni( sqlite3_initialize() );
#else
hb_retni( -1 );
#endif /* SQLITE_VERSION_NUMBER >= 3006000 */
#endif
}
HB_FUNC( SQLITE3_SHUTDOWN )
@@ -562,7 +562,7 @@ HB_FUNC( SQLITE3_SHUTDOWN )
hb_retni( sqlite3_shutdown() );
#else
hb_retni( -1 );
#endif /* SQLITE_VERSION_NUMBER >= 3006000 */
#endif
}
/**
@@ -611,7 +611,7 @@ HB_FUNC( SQLITE3_EXTENDED_ERRCODE )
hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, 1, hb_paramError( 1 ) );
#else
hb_retni( -1 );
#endif /* SQLITE_VERSION_NUMBER >= 3006005 */
#endif
}
HB_FUNC( SQLITE3_ERRMSG )
@@ -624,6 +624,15 @@ HB_FUNC( SQLITE3_ERRMSG )
hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, 1, hb_paramError( 1 ) );
}
HB_FUNC( SQLITE3_ERRSTR )
{
#if SQLITE_VERSION_NUMBER >= 3007015
hb_retstr_utf8( sqlite3_errstr( hb_parni( 1 ) ) );
#else
hb_retc_null();
#endif
}
/**
Suspend Execution For A Short Time
@@ -763,7 +772,7 @@ HB_FUNC( SQLITE3_OPEN_V2 )
hb_xfree( pszFree );
#else
hb_retptr( NULL );
#endif /* SQLITE_VERSION_NUMBER >= 3005000 */
#endif
}
/**
@@ -895,7 +904,7 @@ HB_FUNC( SQLITE3_STMT_STATUS )
hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, 1, hb_paramError( 1 ) );
#else
hb_retni( -1 );
#endif /* SQLITE_VERSION_NUMBER >= 3006004 */
#endif
}
/**
@@ -914,7 +923,7 @@ HB_FUNC( SQLITE3_STMT_READONLY )
hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, 1, hb_paramError( 1 ) );
#else
hb_retni( -1 );
#endif /* SQLITE_VERSION_NUMBER >= 3007004 */
#endif
}
/**
@@ -1619,7 +1628,7 @@ HB_FUNC( SQLITE3_BLOB_REOPEN )
hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, 1, hb_paramError( 1 ) );
#else
hb_retni( -1 );
#endif /* SQLITE_VERSION_NUMBER >= 3007004 */
#endif
}
/**
@@ -2027,8 +2036,10 @@ HB_FUNC( SQLITE3_BACKUP_INIT )
hb_retptr( NULL );
}
else
#endif /* SQLITE_VERSION_NUMBER >= 3006011 */
hb_retptr( NULL );
#else
hb_retptr( NULL );
#endif
}
HB_FUNC( SQLITE3_BACKUP_STEP )
@@ -2043,7 +2054,7 @@ HB_FUNC( SQLITE3_BACKUP_STEP )
hb_retni( -1 );
#else
hb_retni( -1 );
#endif /* SQLITE_VERSION_NUMBER >= 3006011 */
#endif
}
HB_FUNC( SQLITE3_BACKUP_FINISH )
@@ -2058,7 +2069,7 @@ HB_FUNC( SQLITE3_BACKUP_FINISH )
hb_retni( -1 );
#else
hb_retni( -1 );
#endif /* SQLITE_VERSION_NUMBER >= 3006011 */
#endif
}
HB_FUNC( SQLITE3_BACKUP_REMAINING )
@@ -2073,7 +2084,7 @@ HB_FUNC( SQLITE3_BACKUP_REMAINING )
hb_retni( -1 );
#else
hb_retni( -1 );
#endif /* SQLITE_VERSION_NUMBER >= 3006011 */
#endif
}
HB_FUNC( SQLITE3_BACKUP_PAGECOUNT )
@@ -2088,7 +2099,7 @@ HB_FUNC( SQLITE3_BACKUP_PAGECOUNT )
hb_retni( -1 );
#else
hb_retni( -1 );
#endif /* SQLITE_VERSION_NUMBER >= 3006011 */
#endif
}
/**
@@ -2156,7 +2167,7 @@ HB_FUNC( SQLITE3_STATUS )
hb_retni( -1 );
#else
hb_retni( -1 );
#endif /* SQLITE_VERSION_NUMBER >= 3006000 */
#endif
}
/**
@@ -2184,7 +2195,7 @@ HB_FUNC( SQLITE3_DB_STATUS )
hb_retni( -1 );
#else
hb_retni( -1 );
#endif /* SQLITE_VERSION_NUMBER >= 3006001 */
#endif
}
/**
@@ -2204,7 +2215,7 @@ HB_FUNC( SQLITE3_LIMIT )
hb_retni( -1 );
#else
hb_retni( -1 );
#endif /* SQLITE_VERSION_NUMBER >= 3005008 */
#endif
}
/**
@@ -2220,7 +2231,7 @@ HB_FUNC( SQLITE3_COMPILEOPTION_USED )
hb_retl( ( HB_BOOL ) sqlite3_compileoption_used( hb_parc( 1 ) ) );
#else
hb_retl( HB_FALSE );
#endif /* SQLITE_VERSION_NUMBER >= 3006023 */
#endif
}
HB_FUNC( SQLITE3_COMPILEOPTION_GET )
@@ -2229,7 +2240,7 @@ HB_FUNC( SQLITE3_COMPILEOPTION_GET )
hb_retc( sqlite3_compileoption_get( hb_parni( 1 ) ) );
#else
hb_retc_null();
#endif /* SQLITE_VERSION_NUMBER >= 3006023 */
#endif
}

View File

@@ -76,6 +76,7 @@ DYNAMIC sqlite3_enable_load_extension
DYNAMIC sqlite3_enable_shared_cache
DYNAMIC sqlite3_errcode
DYNAMIC sqlite3_errmsg
DYNAMIC sqlite3_errstr
DYNAMIC sqlite3_exec
DYNAMIC sqlite3_extended_errcode
DYNAMIC sqlite3_extended_result_codes