mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Updated libsqlite in ext/sqlite to 2.8.17.
Use in-memory database for tests.
This commit is contained in:
parent
5961160f95
commit
61c9b22536
1
NEWS
1
NEWS
@ -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
|
||||
|
@ -1 +1 @@
|
||||
2.8.16
|
||||
2.8.17
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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*);
|
||||
|
@ -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);
|
||||
|
@ -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:");
|
||||
?>
|
||||
|
@ -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:");
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user