Compiling SQLite and MAX_ATTACHED databases

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling SQLite and MAX_ATTACHED databases

Doug Nebeker
I was reading through the wiki yesterday and came across the following:
* Make sure you're compiling SQLite with -DTHREADSAFE=1

I didn't know about that #define!  I know about the defines that are
related
to the pragmas, but are there others (well, dumb question, of course
there
are).  Is there a single place I can go read about all of them?

On a separate note, when I was spelunking through code looking for my
answer,
I came across the following:
/*
** The maximum number of attached databases.  This must be at least 2
** in order to support the main database file (0) and the file used to
** hold temporary tables (1).  And it must be less than 32 because
** we use a bitmask of databases with a u32 in places (for example
** the Parse.cookieMask field).
*/
#define MAX_ATTACHED 10
 
Is this a per-process limit, or a per-sqlite3 handle limit?

Thanks
Doug
 
 


To find out more about Reuters visit www.about.reuters.com

Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd.

Reply | Threaded
Open this post in threaded view
|

Re: Compiling SQLite and MAX_ATTACHED databases

Dan Kennedy

> #define MAX_ATTACHED 10
>  
> Is this a per-process limit, or a per-sqlite3 handle limit?

It's per-handle.

Also, if you haven't found it already, this page has some of
the compilation options you can set:

http://www.sqlite.org/compile.html


               
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com