[sqlite] attach db limit

2016-03-04 Thread Simon Slavin
On 4 Mar 2016, at 4:02pm, Tim Uy wrote: > So Richard, theoretically, if you use negative numbers, you can get another > x2? Tim, are you actually considering attaching lots of databases at once ? This is a terrible idea. Every time you refer to an attached database SQLite has to find it.

[sqlite] attach db limit

2016-03-04 Thread Richard Hipp
On 3/4/16, Tim Uy wrote: > > Re: below, what happens if I change the sqlite3_limit to 10 when I have 20 > attached. Will it complain? No. It just won't let you ATTACH new databases until you DETACH enough to get the count down below 10. -- D. Richard Hipp drh at sqlite.org

[sqlite] attach db limit

2016-03-04 Thread Tim Uy
Dear Richard, Re: below, what happens if I change the sqlite3_limit to 10 when I have 20 attached. Will it complain? Can I shift the limit back and forth over time? Thanks, Tim "The maximum number of attached databases can be lowered at run-time using the sqlite3_limit

[sqlite] attach db limit

2016-03-04 Thread Tim Uy
Well, probably only like a dozen, no worries. On Fri, Mar 4, 2016 at 8:07 AM, Simon Slavin wrote: > > On 4 Mar 2016, at 4:02pm, Tim Uy wrote: > > > So Richard, theoretically, if you use negative numbers, you can get > another > > x2? > > Tim, > > are you actually considering attaching lots of d

[sqlite] attach db limit

2016-03-04 Thread Tim Uy
(or use unsigned) On Fri, Mar 4, 2016 at 8:02 AM, Tim Uy wrote: > So Richard, theoretically, if you use negative numbers, you can get > another x2? > > On Thu, Mar 3, 2016 at 2:07 PM, Tim Uy wrote: > >> (Thanks Richard for the explanation of "main" and "temp".) >> >> On Thu, Mar 3, 2016 at 2:02

[sqlite] attach db limit

2016-03-04 Thread Tim Uy
So Richard, theoretically, if you use negative numbers, you can get another x2? On Thu, Mar 3, 2016 at 2:07 PM, Tim Uy wrote: > (Thanks Richard for the explanation of "main" and "temp".) > > On Thu, Mar 3, 2016 at 2:02 PM, Tim Uy wrote: > >> So comment in sqliteLimit just needs an update? >> >>

[sqlite] attach db limit

2016-03-03 Thread Richard Hipp
On 3/3/16, John McKown wrote: > Why 125 would be a good question. The maximum value of an signed 8-bit integer is 127. Take away two for the "main" and "temp" databases. -- D. Richard Hipp drh at sqlite.org

[sqlite] attach db limit

2016-03-03 Thread John McKown
In the source to 3.12.0, the source in src/main.c has: #if SQLITE_MAX_ATTACHED<0 || SQLITE_MAX_ATTACHED>125 # error SQLITE_MAX_ATTACHED must be between 0 and 125 #endif The limits.html on the Web site also says 125. As does the changes for 3.8.6. Why 125 would be a good question. The value relate

[sqlite] attach db limit

2016-03-03 Thread Tim Uy
(Thanks Richard for the explanation of "main" and "temp".) On Thu, Mar 3, 2016 at 2:02 PM, Tim Uy wrote: > So comment in sqliteLimit just needs an update? > > On Thu, Mar 3, 2016 at 1:20 PM, Richard Hipp wrote: > >> On 3/3/16, John McKown wrote: >> > Why 125 would be a good question. >> >> Th

[sqlite] attach db limit

2016-03-03 Thread Tim Uy
So comment in sqliteLimit just needs an update? On Thu, Mar 3, 2016 at 1:20 PM, Richard Hipp wrote: > On 3/3/16, John McKown wrote: > > Why 125 would be a good question. > > The maximum value of an signed 8-bit integer is 127. Take away two > for the "main" and "temp" databases. > > -- > D. R

[sqlite] attach db limit

2016-03-03 Thread Tim Uy
Hi, I see that there is a default limit of 10 attached databases. And from the docs, 125 is limit. However, in the file sqliteLimit.h it says /* ** The maximum number of attached databases. This must be between 0 ** and 62. The upper bound on 62 is because a 64-bit integer bitmap ** is used inte