It is not threadsafe
Some time i recived
*** glibc detected *** double free or corruption (fasttop): 0x08537c08 ***
#0 0xb7c7c941 in kill () from /lib/libc.so.6
#1 0xb7e4bc6d in pthread_kill () from /lib/libpthread.so.0
#2 0xb7e4bfc1 in raise () from /lib/libpthread.so.0
#3 0xb7c7c6f4 in raise () from /lib/libc.so.6
#4 0xb7c7da66 in abort () from /lib/libc.so.6
#5 0xb7cae0bc in __fsetlocking () from /lib/libc.so.6
#6 0xb7cb7542 in mallopt () from /lib/libc.so.6
#7 0xb7cb6332 in mallopt () from /lib/libc.so.6
#8 0xb7cb502e in free () from /lib/libc.so.6
#9 0x080e95f7 in sqlite3Pragma (pParse=0xb62fab30, pId1=0x0, pId2=0x0,
pValue=0xb7d5fff4, minusFlag=0) at pragma.c:402 <=========
#10 0x080e8751 in yy_reduce (yypParser=0xb2b0a3c8, yyruleno=255) at parse.y:912
#11 0x080e670a in sqlite3Parser (yyp=0xb2b0a3c8, yymajor=11, yyminor={z = 0x0,
dyn = 0, n = 1542623226}, pParse=0x0) at parse.c:3364