vtworks wrote:
Hi,

I am using the latest sqlite library on unix.

I run the following sequence of operations:

db=sqlite_open("test.a",0,&f)
sqlite_exec db,"create table test(a,b)",0,0,&f
sqlite_close db

After creating & closing the table, test.a is of size 3072 bytes.

Now, if I try to open the same file again,
db=sqlite_open("test.a",0,&f)

I get the error "too few operands on stack at 13".

13 refers to opcode Callback.

I am able to open the 3072 byte test.a file using a sqlite datbase browser GUI application.

I appreciate if anyone can help.


I have examined your database file and it appears to be well-formed.


vtworks wrote again:
Following is trace:

   0 ColumnName      4    0 1
   1 Integer         1    0
Stack: i:1
   2 OpenRead        0    2 sqlite_temp_master
   3 Rewind          0    7
   7 Close           0    0
   8 Integer         0    0

A trace of sqlite_open should ALWAYS begin as follows:


   0 ColumnName      0    0 type
   1 ColumnName      1    0 name
   2 ColumnName      2    0 rootpage
   3 ColumnName      3    0 sql
   4 ColumnName      4    0 1
   5 Integer         1    0
Stack: i:1
   6 OpenRead        0    2 sqlite_temp_master
   7 Rewind          0   15
  15 Close           0    0
  16 Integer         0    0

The fact that your trace does not begin this way
shows that something very serious is wrong.  The fact
that SQLite works fine from within the standalone "sqlite"
executable, and from without thousands of other executables
that others have built, suggest that the problem is in
your code.

From the nature of your problem, I suspect that the
malloc/free/realloc routines you are using in your
program are not working quite right.  I suggest your
recompile using the following additional option on
the compiler command-line:

-DMEMORY_DEBUG=2

This will cause SQLite to print a message to stderr
every time it does a malloc, free, or realloc.  Perhaps
that output will contain clues that will help to clear
up this mystery.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to