Re: [sqlite] why block at sqlite3_prepare_v2(*)?

2010-04-13 Thread Pavel Ivanov
To prepare a statement SQLite needs to read the information about schema of your database. So it should inevitably obtain a SHARED lock on the database while doing so. If you have another process having EXCLUSIVE or PENDING on the database then SQLite cannot read schema information and cannot

[sqlite] why block at sqlite3_prepare_v2(*)?

2010-04-13 Thread liubin liu
my program is blocked at the point of sqlite3_prepare_v2(*). Why? 512 513 sqlite3_stmt *p_stmt = NULL; 514 printf (" ### 500, %p, %s, %p\n", g_db_base, sql, p_stmt); 515 ret = sqlite3_prepare_v2 (g_db_base, sql, -1, _stmt, NULL); 516 printf ("

[sqlite] why block at sqlite3_prepare_v2(*)?

2010-04-13 Thread liubin liu
my program is blocked at the point of sqlite3_prepare_v2(*). Why? 512 513 sqlite3_stmt *p_stmt = NULL; 514 printf (" ### 500, %p, %s, %p\n", g_db_base, sql, p_stmt); 515 ret = sqlite3_prepare_v2 (g_db_base, sql, -1, _stmt, NULL); 516 printf ("