o join our team building
products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
-Original Message-
From: Virgilio Fornazin [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 11, 2007 2:21 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] how t
I'm thinking about this.. to get a 'exact' copy of a sqlite database we
should implement a new public API:
sqlite3 * sqlite3_clonedb(sqlite3 * db, const char * szOutput);
sqlite3 * sqlite3_clonedb16(sqlite3 * db, const void * szOutput); // utf-16
version
this api can do the real file copy without
> > sqlite3OsFileHandle no longer exists.
> Can you tell me the first sqlite3 version to include this change?
I'm guessing that it's 3.5.0 when most of the code was revised.
Yahoo! oneSearch: Finally, m
On Wed, 10 Oct 2007, Joe Wilson wrote:
> --- Andy Spencer <[EMAIL PROTECTED]> wrote:
> > I'm not sure what you mean by database "main", and I did not
> > write the functions.
>
> The default database name (really more of an alias) is "main".
> So "SELECT * from foo" and "SELECT * from main.foo"
--- Andy Spencer <[EMAIL PROTECTED]> wrote:
> I'm not sure what you mean by database "main", and I did not
> write the functions.
The default database name (really more of an alias) is "main".
So "SELECT * from foo" and "SELECT * from main.foo" are the same.
Attached databases are known by the na
On Wed, 10 Oct 2007, Joe Wilson wrote:
> > At Schrodinger, we added two functions to our version of sqlite3:
> >
> > /* The sqlite3 APIs to get file descriptors fo the open files */
> > int sqlite3_get_database_file_fd( sqlite3* sqlite3_db_ptr );
> > int sqlite3_get_journal_file_fd( sqlite3* sqlit
Andy,
Thank you for your note. It is very useful.
Andy Spencer wrote:
On Tue, 9 Oct 2007, Joe Wilson wrote:
--- Cyrus Durgin <[EMAIL PROTECTED]> wrote:
i'm wondering if there's a "standard" way to get an open file handle from an
sqlite3 pointer using the C API. anyone know?
No such fun
--- Andy Spencer <[EMAIL PROTECTED]> wrote:
> On Tue, 9 Oct 2007, Joe Wilson wrote:
>
> > --- Cyrus Durgin <[EMAIL PROTECTED]> wrote:
> > > i'm wondering if there's a "standard" way to get an open file handle from
> > > an
> > > sqlite3 pointer using the C API. anyone know?
> >
> > No such func
On Tue, 9 Oct 2007, Joe Wilson wrote:
> --- Cyrus Durgin <[EMAIL PROTECTED]> wrote:
> > i'm wondering if there's a "standard" way to get an open file handle from an
> > sqlite3 pointer using the C API. anyone know?
>
> No such function exists, but it would be a useful addition to the API.
> Copy
--
From: "Cyrus Durgin" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, October 10, 2007 6:41 PM
Subject: Re: [sqlite] how to get file handle from sqlite3 object?
Agreed - it seems like this would be useful enough functionality that
I'm
not sure everyone who needs it should be rei
> statement and then copy the database file.
>
> - Original Message -
> From: "Cyrus Durgin" <[EMAIL PROTECTED]>
> To:
> Sent: Wednesday, October 10, 2007 6:41 PM
> Subject: Re: [sqlite] how to get file handle from sqlite3 object?
>
>
> > Agree
> There is a better workaround: get the code from the .dump command of sqlite3
> utility and use it...
> it creates a fresh copy of your database like using
>
> sqlite3 dbold .dump | sqlite3 newdb (not sure about the syntax, thereĀ“s a
> example of this
> case on internet)
This will always work a
: Ronny Dierckx [mailto:[EMAIL PROTECTED]
Sent: quarta-feira, 10 de outubro de 2007 13:55
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] how to get file handle from sqlite3 object?
I think a possible solution is to lock the database with a "BEGIN EXCLUSIVE"
statement and then copy th
I think a possible solution is to lock the database with a "BEGIN EXCLUSIVE"
statement and then copy the database file.
- Original Message -
From: "Cyrus Durgin" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, October 10, 2007 6:41 PM
Subject: Re: [sqlite] h
Agreed - it seems like this would be useful enough functionality that I'm
not sure everyone who needs it should be reinventing the wheel...
So is it fair to say that the sqlite3_file API methods are not useful for
this purpose? The docs are a bit sparse regarding their intended purposes.
On 10/1
There is a good case to have an Sqlite API call to take a snapshot of a
database. It would integrate with the locking logic and secure an
exclusive lock before taking the snapshot. That is a safer and handier
approach than extracting a file descriptor and perhaps creating mayhem.
Cyrus Durgi
Two approaches - use sqlite, or use OS code.
Use proper filesystem synchronization as appropriate for the given OS &
filesystem, where you guarantee that your db copy is the only one that
holds an exclusive lock. Then do the file copy and release the lock.
The better approach, IMHO would be to
Maybe it would help to state my use case: without this functionality, what
is the proper way to copy a database using the C API without introducing a
race condition?
On 10/9/07, Robert Simpson <[EMAIL PROTECTED]> wrote:
>
> > -Original Message-
> > From: Cyrus Durgin [mailto:[EMAIL PROTECT
--- Cyrus Durgin <[EMAIL PROTECTED]> wrote:
> i'm wondering if there's a "standard" way to get an open file handle from an
> sqlite3 pointer using the C API. anyone know?
Patch below implements getting a file descriptor for a UNIX database
using the existing sqlite3 API function sqlite3_file_con
> -Original Message-
> From: Cyrus Durgin [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 09, 2007 5:02 PM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] how to get file handle from sqlite3 object?
>
> i'm wondering if there's a "standard" way to get an open file
> handle from an
>
--- Cyrus Durgin <[EMAIL PROTECTED]> wrote:
> i'm wondering if there's a "standard" way to get an open file handle from an
> sqlite3 pointer using the C API. anyone know?
No such function exists, but it would be a useful addition to the API.
Copying the database during an exclusive lock without s
Can you please clarify why this would be needed? Sqlite databases are
opened by name, thereby you can use standard OS or stdlib functions to
open the same file with a different handle.
Cyrus Durgin wrote:
i'm wondering if there's a "standard" way to get an open file handle from an
sqlite3 poi
22 matches
Mail list logo