-C Fix\sa\sproblem\swith\svirtual\stables\sand\sleft\sjoins\sintroduced\sby\ncheck-in\s(4761).\s\sTicket\s#2894\sand\s#2913.\s(CVS\s4765)
-D 2008-01-31T19:34:52
+C make\sos2Truncate()\sactually\sdo\ssomething\sand\sfix\sos2FullPathname()\sto\sbe\smore\selegant\sand\swork\smore\scorrectly\sin\sall\scases\s(Ticket\s#2904)\s(CVS\s4766)
+D 2008-02-01T00:31:59
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
F Makefile.in bc2b5df3e3d0d4b801b824b7ef6dec43812b049b
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/os.c 50c0c1706c35f872db312815aaecc4b5ebcd6a4c
F src/os.h d04706d54a072c7a30ab9e346ad916ef28c842d5
F src/os_common.h 98862f120ca6bf7a48ce8b16f158b77d00bc9d2f
-F src/os_os2.c 4aca68faa5fe20e41e1b123a46087ebd9e0bb170
+F src/os_os2.c 0c3e3f98ae76a59d42f6a72bbf2999eff3b059da
F src/os_os2.h c3f7d0af7e3453d1d7aa81b06c0a56f5a226530b
F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P cb5bf4642f30ccd9052d76c3a47e7c5afc32afe6
-R a37040921705bf91b118e412481fa829
-U drh
-Z 0aaeaf0fdf81d2ffa30bec3d67135f9d
+P ebeac2a499ce16ac7e6d12daa5ce9d41e9067d28
+R c6eab2721dc7a2503f5dba9236f9ecde
+U pweilbacher
+Z 3abc0ef4950723d8e67f5617acc8d019
*/
int os2Truncate( sqlite3_file *id, i64 nByte ){
APIRET rc = NO_ERROR;
- ULONG filePosition = 0L;
os2File *pFile = (os2File*)id;
OSTRACE3( "TRUNCATE %d %lld\n", pFile->h, nByte );
SimulateIOError( return SQLITE_IOERR_TRUNCATE );
- rc = DosSetFilePtr( pFile->h, nByte, FILE_BEGIN, &filePosition );
- if( rc != NO_ERROR ){
- return SQLITE_IOERR;
- }
- rc = DosSetFilePtr( pFile->h, 0L, FILE_END, &filePosition );
+ rc = DosSetFileSize( pFile->h, nByte );
return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
}
int nFull, /* Size of output buffer in bytes */
char *zFull /* Output buffer */
){
- if( strchr(zRelative, ':') ){
- sqlite3_snprintf( nFull, zFull, "%s", zRelative );
- }else{
- ULONG ulDriveNum = 0;
- ULONG ulDriveMap = 0;
- ULONG cbzBufLen = SQLITE_TEMPNAME_SIZE;
- char *zBuff = (char*)malloc( cbzBufLen );
- if( zBuff == 0 ){
- return SQLITE_NOMEM;
- }
- DosQueryCurrentDisk( &ulDriveNum, &ulDriveMap );
- if( DosQueryCurrentDir( ulDriveNum, (PBYTE)zBuff, &cbzBufLen ) == NO_ERROR ){
- sqlite3_snprintf( nFull, zFull, "%c:\\%s\\%s",
- (char)('A' + ulDriveNum - 1), zBuff, zRelative);
- }
- free( zBuff );
- }
- return SQLITE_OK;
+ APIRET rc = DosQueryPathInfo( zRelative, FIL_QUERYFULLNAME, zFull, nFull );
+ return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
}
#ifndef SQLITE_OMIT_LOAD_EXTENSION