Re: [sqlite] Truncate Issue

2007-06-08 Thread Dan Kennedy
On Fri, 2007-06-08 at 09:50 +0530, Jimmy Mathew Ambalathuruthel wrote:
> Hi all,
> 
>   I am working in a porting project of SQLite from windows.
> 
>   I Could not port the Truncate () function (For Eg: WinTruncate () in
> windows code in the file os_win.c ) as the same logic cannot be applied
> to my platform.
> 
>   Can I make it a dummy function by just returning SQLITE_OK?
> 
>   Please help.

I think it's important to implement. SQLite sometimes needs 
to truncate files during VACUUM, when committing transactions 
in either auto-vacuum or exclusive access mode, and during 
rollback or statement rollback. There might be more uses in
the future (based on the idea that truncating a file is 
often cheaper than deleting and recreating it). 

Why can't you truncate files? What platform are you working on?

Dan.



>  
> 
> Regards
> 
> Jimmy Mathew
> 
>  
> 


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Truncate Issue

2007-06-07 Thread John Stanton
If you don't truncate a file then you may have untruncated files.  Why 
can't you truncate a file?  It is implemented one way or another on 
pretty much every OS.


Sqlite uses truncate in it b-tree logic and probably elsewhere so you 
would very likely encounter problems with no truncate.


Jimmy Mathew Ambalathuruthel wrote:

Hi all,

  I am working in a porting project of SQLite from windows.

  I Could not port the Truncate () function (For Eg: WinTruncate () in
windows code in the file os_win.c ) as the same logic cannot be applied
to my platform.

  Can I make it a dummy function by just returning SQLITE_OK?

  Please help.

 


Regards

Jimmy Mathew

 






-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Truncate Issue

2007-06-07 Thread Jimmy Mathew Ambalathuruthel
Hi all,

  I am working in a porting project of SQLite from windows.

  I Could not port the Truncate () function (For Eg: WinTruncate () in
windows code in the file os_win.c ) as the same logic cannot be applied
to my platform.

  Can I make it a dummy function by just returning SQLITE_OK?

  Please help.

 

Regards

Jimmy Mathew