On Fri, Jul 1, 2011 at 11:02 AM, Pavel Ivanov <paiva...@gmail.com> wrote:

> > To put it another way, if I call sqlite3_create_function to install a
> > custom function, is that function now available to all threads using
> > SQLite or is it available only to the thread that made the
> > sqlite3_create_function call?
>
> Yes, it's available to all threads using the same connection.
>

Pavel is exactly right.  But it is important to read and understand the
qualifier that Pavel attaches to his answer.

One suspects that the OP is working under the assumption that
thread==connection, in which case the answer would be "No".  Only if all
threads share the same database connection is the answer "Yes".


>
> > And does the same rule apply to the application-defined pointer that can
> > optionally be supplied in the sqlite3_create_function call via parameter
> > 5???
>
> Yes. What's wrong with that?
>
>
> Pavel
>
>
> On Fri, Jul 1, 2011 at 10:53 AM, Technology Lighthouse
> <tlho...@gmail.com> wrote:
> >  From the docs it's unclear to me whether the use of
> > sqlite3_create_function is thread-specific or not.
> >
> > To put it another way, if I call sqlite3_create_function to install a
> > custom function, is that function now available to all threads using
> > SQLite or is it available only to the thread that made the
> > sqlite3_create_function call?
> >
> > And does the same rule apply to the application-defined pointer that can
> > optionally be supplied in the sqlite3_create_function call via parameter
> > 5???
> >
> > --
> > Paul Roberts
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to