Ok this is how I got the fts working in python and .net...

 

In python 2.5 sqlite3 is automatically included as a builtin. However I
could not find any method which loads the extention or to enable it,

I COULD do it in SQL by using:

 

conn.cursor().execute("SELECT load_extension('fts2')")

 

however this will give an not authorized sql error, so you MUST call
enable_load_extension however this is not available in python, so I
recompiled the SQLite3.dll with directive SQLITE_ENABLE_LOAD_EXTENSION=1
set.

Notice I had to set this to =1 because this directive is still an older
#ifdef instead of if defined, which would work with just
SQLITE_ENABLE_LOAD_EXTENSION.

 

Now this is enabled by default and the above can work in python or .net
or anything im guessing whether it has the loadextension or not, as long
as FTS2.dll is present.

 

I obviously understand that for SQLite to enable this by default is a
security issue, which could allow attackers to load malicious dll's,
maybe it would be nice, if the authors could do the following:

 

Maybe provide a precompiled dll with extension enabled, OR with FTS1,
and 2 compiled in,

 

What I tried that would be nice is to compile FTS2 and 1 in the dll so
it just works by default without having to loadext or anything,

By enabling: SQLITE_ENABLE_FTS1 and SQLITE_ENABLE_FTS2

But I could NOT get this to work in M$ Visual Studio , I was getting
weird memory corruption in my DLL when I used maybe because Im a c noob?
Could be, I did not do something I was supposed to.

 

Just thought others trying to do the same thing might find this helpful,
or provide feedback.

Reply via email to