Re: [sqlite] Code Error -- Cannot compile Amalgamation with SQLITE_THREADSAFE=0 on WIndows

2014-05-11 Thread Joe Mistachkin

Jan Nijtmans wrote:
>
> My suggestion (FWIW) would be to remove the os_win.h file
> altogether and put it's content in os_config.h. (except the
> #ifdef __CYGWIN__ part, which doesn't belong here)
>

I do not think removing the "os_win.h" file is a solution, per se.
Short term, modifying "mutex_w32.c" to include "os_win.h" inside a
SQLITE_OS_WIN block instead of the SQLITE_MUTEX_W32 block seems
better.  Long term, modifying the amalgamation tooling to better
handle includes that occur within #ifdef's would be nice.

--
Joe Mistachkin

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How do I know the python functions registered on SQLite ?

2014-05-11 Thread big stone
Hi,

I finally found that housekeeping was the best solution, as I needed anyway
to add a layer over the basic information kept by SQLite :
- the function ".__doc__" information,
- or even the full function creation script.

** discovery of the day : fibonacci works !**

pydef py_fib(n):
   "fibonacci : example with internal function call (external won't work) "
   fib = lambda n: n if n < 2 else fib(n-1) + fib(n-2)
   return("%s" % fib(n*1));

select py_fib(8), sqlite_version()
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Sqlite malformed after sqlite_full is reached

2014-05-11 Thread Dror Asaf
I'm using sqlite3.7.7.1
I am setting the database maximum size by using:
1. pragma pagesize to get the size of the page size
2 .pragma max_page_count in order to set the actual maximum size.

When I reach SQLITE_FULL.
There are 2 cases:
1. I'm using database as a file, everything works.
2. I'm using database in memory, the next operation on the DB, returns the
DB is malformed. (database corruption)

Does any one has any ideas? I have found some release notes from 2007:

   - Fix a bug in the handling of
SQLITE_FULL errors
   that could lead to database corruption. Ticket
#2686
   .
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Code Error -- Cannot compile Amalgamation with SQLITE_THREADSAFE=0 on WIndows

2014-05-11 Thread Jan Nijtmans
2014-05-11 12:02 GMT+02:00 Jan Nijtmans :
> 2014-05-11 1:15 GMT+02:00 Keith Medcalf :
>> Somewhere you have removed the Windows.h header from being included where it 
>> is needed when SQLITE_THREADSAFE is set to 0 resulting in a failure to 
>> recognize windows defines.
>>
>> In mutex_w32.c you need to include os_win.h whether or not SQLITE_MUTEX_W32 
>> is defined.
>>
>> In other words the sequence
>>
>> #ifdef SQLITE_MUTEX_W32
>> #include "os_win.h"
>>
>> needs to be
>>
>> #include "os_win.h"
>> #ifdef SQLITE_MUTEX_W32
>>
>> otherwise windows.h is not included early enough and compilation of the vfs 
>> fails.
>
> Confirmed!
>
> My suggestion (FWIW) would be to remove the os_win.h file
> altogether and put it's content in os_config.h. (except the
> #ifdef __CYGWIN__ part, which doesn't belong here)
>
> It's all about configuration isn't it? That's the
> simplest way to fix this problem.
>
> Regards,
>Jan Nijtmans

/os_config.h/os_setup.h/

(didn't have the sources at-hand)

Regards,
   Jan Nijtmans
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Code Error -- Cannot compile Amalgamation with SQLITE_THREADSAFE=0 on WIndows

2014-05-11 Thread Jan Nijtmans
2014-05-11 1:15 GMT+02:00 Keith Medcalf :
> Somewhere you have removed the Windows.h header from being included where it 
> is needed when SQLITE_THREADSAFE is set to 0 resulting in a failure to 
> recognize windows defines.
>
> In mutex_w32.c you need to include os_win.h whether or not SQLITE_MUTEX_W32 
> is defined.
>
> In other words the sequence
>
> #ifdef SQLITE_MUTEX_W32
> #include "os_win.h"
>
> needs to be
>
> #include "os_win.h"
> #ifdef SQLITE_MUTEX_W32
>
> otherwise windows.h is not included early enough and compilation of the vfs 
> fails.

Confirmed!

My suggestion (FWIW) would be to remove the os_win.h file
altogether and put it's content in os_config.h. (except the
#ifdef __CYGWIN__ part, which doesn't belong here)

It's all about configuration isn't it? That's the
simplest way to fix this problem.

Regards,
   Jan Nijtmans
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How do I know the python functions registered on SQLite ?

2014-05-11 Thread Baruch Burstein
On Thu, May 8, 2014 at 11:46 PM, Roger Binns  wrote:

>
> SQLite could provide the information as a virtual table or similar.  A
> ticket was created 7 years ago asking for it, and closed 2 months ago by
> the team with resolution "Rejected":
>
>   https://www.sqlite.org/src/tktview?name=5896edbe46


Just out of curiosity, why was this rejected? Especially after being left
open (supposedly "might do someday") for almost 7 years. What changed? It
seems like a logical request.

-- 
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users