On Thu, Jul 18, 2013 at 8:06 AM, Ashok Pitambar <ashokpitam...@gmail.com>wrote:

> Hi All,
>
>          I trying to run a query it is crashing before that I have created
> two prepared statements which are not finalized yet and after that I tried
> run a query (done sqlite3_prepare_v2) it  is crashing while
> doing sqlite3_step().
>
> Is there any problem with this kind of operation?
> How many such prepared statements sqlite allows for one sqlite connection?
>

There is no arbitrary limit on the number of prepared statements.

The crash you are encountering s probably due to heap corruption elsewhere
in your application and is unrelated to SQLite.  SQLite just happened to be
the first subsystem to stumble over the problem.  Please try running your
test case with valgrind and see if that doesn't shed a new light on the
problem.


>
> stack trace:
>
> pcache1TruncateUnsafe(
>     pCache = 0x27BA0994,
>     iLimit = 1)
>   h = 49
>   pp = 0x255AB258
>   pPage = 0xFF
>
> pcache1Truncate(
>   ?,
>     iLimit = 1)
>   pCache = 0x27BA0994
>
>
>
> sqlite3PcacheTruncate(
>     pCache = 0x27BB4ACC,
>     pgno = 0)
>
>
>
> pager_reset(
>   ?)
>
>
>
> pager_unlock(
>     pPager = 0x27BB4A14)
>
>
>
> pagerUnlockAndRollback(
>     pPager = 0x27BB4A14)
>
>
>
> pagerUnlockIfUnused(
>   ?)
>
>
>
> sqlite3PagerUnref(
>   ?)
>   pPager = 0x27BB4A14
>
>
>
> releasePage(
>   ?)
>
>
>
> unlockBtreeIfUnused(
>     pBt = 0x27BA0914)
>
>
>
> btreeEndTransaction(
>     p = 0x27BA0894)
>   pBt = 0x27BA0914
>
>
>
> sqlite3BtreeRollback(
>     p = 0x27BA0894,
>   ?)
>   rc = 0
>   pPage1 = 0x27BA0894
>
>
>
> sqlite3BtreeClose(
>     p = 0x27BA0894)
>   pBt = 0x27BA0914
>   pCur = 0x0
>
>
>
> sqlite3VdbeFreeCursor(
>     p = 0x27B92C14,
>     pCx = 0x27BB4014)
>
>
>
> closeAllCursors(
>     p = 0x27B92C14)
>   i = 6
>
>
>
> sqlite3VdbeHalt(
>     p = 0x27B92C14)
>   db = 0x25320C80
>
>
> sqlite3VdbeExec(
>     p = 0x27B92C14)
>   rc = 0
>   db = 0x25320C80
>   u = (aa = (pcDest = 626544448), ab = (cnt = 626544448), ac = (pVar =
> 0x25584F40), ad = (zMalloc = 0x25584F40, n = 626544
>   and_logic = (0, 0, 0, 0, 1, 2, 0, 2, 2)
>   or_logic = (0, 1, 2, 1, 1, 1, 2, 1, 2)
>   vfsFlags = 1054
>
>
> sqlite3Step(
>     p = 0x27B92C14)
>   db = 0x25320C80
>
>
> sqlite3_step(
>     pStmt = 0x27B92C14)
>   rc2 = 0
>   v = 0x27B92C14
>   cnt = 0
>   db = 0x25320C80
> _______________________________________________
> 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