Updated libsqlite in ext/sqlite to 2.8.17.

Use in-memory database for tests.
This commit is contained in:
Ilia Alshanetsky 2005-12-20 15:26:26 +00:00
parent 5961160f95
commit 61c9b22536
9 changed files with 13 additions and 34 deletions

1
NEWS
View File

@ -1,6 +1,7 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Jan 2006, PHP 5.1.2
- Updated libsqlite in ext/sqlite to 2.8.17. (Ilia)
- Updated to libxml2-2.6.22 and libxslt-1.1.15 in the win32 bundle. (Rob)
- Added new extensions: (Ilia, Wez)
. XMLWriter

View File

@ -1 +1 @@
2.8.16
2.8.17

View File

@ -1778,6 +1778,7 @@ char *sqliteOsFullPathname(const char *zRelative){
sqliteSetString(&zFull, zRelative, (char*)0);
}else{
char zBuf[5000];
zBuf[0] = 0;
sqliteSetString(&zFull, getcwd(zBuf, sizeof(zBuf)), "/", zRelative,
(char*)0);
}

View File

@ -1929,7 +1929,7 @@ void sqlitepager_dont_write(Pager *pPager, Pgno pgno){
pPg = pager_lookup(pPager, pgno);
pPg->alwaysRollback = 1;
if( pPg && pPg->dirty ){
if( pPg && pPg->dirty && !pPager->ckptInUse ){
if( pPager->dbSize==(int)pPg->pgno && pPager->origDbSize<pPager->dbSize ){
/* If this pages is the last page in the file and the file has grown
** during the current transaction, then do NOT mark the page as clean.

View File

@ -28,7 +28,7 @@ extern "C" {
/*
** The version of the SQLite library.
*/
#define SQLITE_VERSION "2.8.16"
#define SQLITE_VERSION "2.8.17"
/*
** The version string is also compiled into the library so that a program

View File

@ -1120,7 +1120,7 @@ void sqliteRealToSortable(double r, char *);
#endif
char *sqliteMPrintf(const char*, ...);
char *sqliteVMPrintf(const char*, va_list);
void sqliteSetString(char **, const char *, ...);
void sqliteSetString(char **, ...);
void sqliteSetNString(char **, ...);
void sqliteErrorMsg(Parse*, const char*, ...);
void sqliteDequote(char*);

View File

@ -330,15 +330,15 @@ char *sqliteStrNDup(const char *z, int n){
** point to that string. The 1st argument must either be NULL or
** point to memory obtained from sqliteMalloc().
*/
void sqliteSetString(char **pz, const char *zFirst, ...){
void sqliteSetString(char **pz, ...){
va_list ap;
int nByte;
const char *z;
char *zResult;
if( pz==0 ) return;
nByte = strlen(zFirst) + 1;
va_start(ap, zFirst);
nByte = 1;
va_start(ap, pz);
while( (z = va_arg(ap, const char*))!=0 ){
nByte += strlen(z);
}
@ -348,9 +348,8 @@ void sqliteSetString(char **pz, const char *zFirst, ...){
if( zResult==0 ){
return;
}
strcpy(zResult, zFirst);
zResult += strlen(zResult);
va_start(ap, zFirst);
*zResult = 0;
va_start(ap, pz);
while( (z = va_arg(ap, const char*))!=0 ){
strcpy(zResult, z);
zResult += strlen(zResult);

View File

@ -1,17 +1,3 @@
<?php #vim:ft=php
$dbname = tempnam(dirname(__FILE__), "phpsql");
function cleanup() {
$retry = 10;
if (is_resource($GLOBALS['db'])) {
@sqlite_close($GLOBALS['db']);
}
do {
usleep(500000);
if (@unlink($GLOBALS['dbname']))
break;
} while (file_exists($GLOBALS['dbname']) && --$retry);
}
register_shutdown_function("cleanup");
$db = sqlite_open($dbname);
$db = sqlite_open(":memory:");
?>

View File

@ -1,11 +1,3 @@
<?php #vim:ft=php
$dbname = tempnam(dirname(__FILE__), "phpsql");
function cleanup() {
global $db, $dbname;
$db = NULL;
usleep(500000);
@unlink($dbname);
}
register_shutdown_function("cleanup");
$db = new SQLiteDatabase($dbname);
$db = new SQLiteDatabase(":memory:");
?>