Re: [sqlite] Variable-length records

2013-04-19 Thread Bk
Thank You



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Variable-length-records-tp68277p68300.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Variable-length records

2013-04-18 Thread Bk
can some one tell me which of the tcl test script tests below two points of
SQLite ?

1)  Variable-length records

2) Internal or temporary databases: load the data into an in-memory SQLite
database and use queries with joins and ORDER BY clauses to extract the data
in the form and order needed


Thank you



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Variable-length-records-tp68277.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] TCL Test failures on ARM

2013-04-03 Thread Bk
Hi,

Thank you all for the reply.

i am still wondering why setting DSQLITE_DISABLE_LFS=1 had no effect on the
code when we have a clear #ifndef ? , 

1) if my application does not need LFS , how do i really make it here
(system uses : Linux nitrogen6x 3.0.15-ts-armv7l) ?

i was getting sizeof(off_t) to 8 in robust_ftruncate and 4 in ts_ftruncate

i was expecting DSQLITE_DISABLE_LFS=1 should make  sizeof(off_t) to 4 in
robust_ftruncate , but it didnt.

solution tried: 

2) Later i added below code in the begining of test_syscall.c which made
ts_ftruncate() 's  sizeof(off_t)  to change to 8. 

#ifndef SQLITE_DISABLE_LFS
# define _LARGE_FILE   1
# ifndef _FILE_OFFSET_BITS
#   define _FILE_OFFSET_BITS 64
# endif
# define _LARGEFILE_SOURCE 1
#endif

3) Another solution i tried was setting -D_FILE_OFFSET_BITS=64 while
building 





--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/TCL-Test-failures-on-ARM-tp67612p67995.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] TCL Test failures on ARM

2013-04-02 Thread Bk
Hi,

i have noticed that the tests pass if built with below command

TCC = armv7l-timesys-linux-gnueabi-gcc   -D_FILE_OFFSET_BITS=64 
-DSQLITE_OS_UNIX=1 -I. -I${TOP}/src -I${TOP}/ext/rtree

Where i have added "-D_FILE_OFFSET_BITS=64" . 

1) i am using Linux 32bit on the embedded device,  is it okey to give
"-D_FILE_OFFSET_BITS=64 " ? 

2) what is the significance of -D_FILE_OFFSET_BITS=64" ?


Thank You




--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/TCL-Test-failures-on-ARM-tp67612p67991.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] TCL Test failures on ARM

2013-04-01 Thread Bk
I have updated make file with "TCC = armv7l-timesys-linux-gnueabi-gcc   -g
-DSQLITE_OS_UNIX=1 -DSQLITE_DISABLE_LFS=1 -I. -I${TOP}/src
-I${TOP}/ext/rtree"


The test still fails with DSQLITE_DISABLE_LFS=1 with same error

sysfault-2.setup... Ok
ftruncate: : File too large
ftruncate: : File too large
ftruncate: : File too large
ftruncate: : File too large
sysfault-2.1-vfsfault-transient.1...
Expected: [0 ok]
 Got: [1 {nfail=1 rc=1 result=disk I/O error}]


Below is the debugger screen with value of "sizeof(off_t)" . The values
seems different 4 in ts_ftruncate and 8 in robust_ftruncate. I hope this is
what you asked me to check 

(gdb) break ts_ftruncate
Cannot access memory at address 0x0
Breakpoint 1 at 0x455e0: file ./src/test_syscall.c, line 273.
(gdb) continue
Continuing.

Breakpoint 1, ts_ftruncate (fd=5, n=284108) at ./src/test_syscall.c:273
273   if( tsIsFailErrno("ftruncate") ){
(gdb) p sizeof(off_t)
$1 = 4
(gdb) break robust_ftruncate
Breakpoint 2 at 0x6371c: file sqlite3.c, line 23440.
(gdb) continue
Continuing.

Breakpoint 2, robust_ftruncate (h=7, sz=0) at sqlite3.c:23440
23440 rc = osFtruncate(h,sz);
(gdb) p sizeof(off_t)
$2 = 8
(gdb) continue
Continuing.

Breakpoint 1, ts_ftruncate (fd=7, n=284108) at ./src/test_syscall.c:273
273   if( tsIsFailErrno("ftruncate") ){
(gdb) p sizeof(off_t)
$3 = 4
(gdb) continue
Continuing.

Breakpoint 2, robust_ftruncate (h=8, sz=0) at sqlite3.c:23440
23440 rc = osFtruncate(h,sz);
(gdb) p sizeof(off_t)
$4 = 8
(gdb) continue
Continuing.

Breakpoint 1, ts_ftruncate (fd=8, n=284108) at ./src/test_syscall.c:273
273   if( tsIsFailErrno("ftruncate") ){
(gdb) p sizeof(off_t)
$5 = 4
(gdb) continue
Continuing.

Breakpoint 2, robust_ftruncate (h=7, sz=0) at sqlite3.c:23440
23440 rc = osFtruncate(h,sz);
(gdb) p sizeof(off_t)
$6 = 8
(gdb) continue
Continuing.

Breakpoint 1, ts_ftruncate (fd=7, n=284108) at ./src/test_syscall.c:273
273   if( tsIsFailErrno("ftruncate") ){
(gdb) p sizeof(off_t)
$7 = 4
(gdb) continue
Continuing.

Breakpoint 2, robust_ftruncate (h=5, sz=24576) at sqlite3.c:23440
23440 rc = osFtruncate(h,sz);
(gdb) p sizeof(off_t)
$8 = 8
(gdb) 




--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/TCL-Test-failures-on-ARM-tp67612p67984.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] TCL Test failures on ARM

2013-03-29 Thread Bk
The perror("ftruncate") is printing ftruncate: : File too large . i have a
2GB card in the embedded device with 50% mem free. 

Below is the output window shows when the test executed.


sysfault-2.setup... Ok
ftruncate: : File too large
ftruncate: : File too large
ftruncate: : File too large
ftruncate: : File too large
sysfault-2.1-vfsfault-transient.1...
Expected: [0 ok]
 Got: [1 {nfail=1 rc=1 result=disk I/O error}]

Below is the backtrace when the failure is printed (the expected - Got
message)

(gdb) backtrace
#0  robust_ftruncate (h=5, sz=24576) at sqlite3.c:23440
#1  0x00065a1c in fcntlSizeHint (pFile=0x16fcb8, nByte=22528)
at sqlite3.c:26305
#2  0x00065d04 in unixFileControl (id=0x16fcb8, op=5, pArg=0x7effed80)
at sqlite3.c:26359
#3  0x00059560 in sqlite3OsFileControlHint (id=0x16fcb8, op=5,
pArg=0x7effed80)
at sqlite3.c:14920
#4  0x000702b4 in pager_write_pagelist (pPager=0x16fbc0, pList=0x181ffc)
at sqlite3.c:41001
#5  0x00072878 in sqlite3PagerCommitPhaseOne (pPager=0x16fbc0, 
zMaster=0x1b5a18 "/home/brijesh/SQLite-3.7.14.1/test.db-mjED751E9E4", 
noSync=0) at sqlite3.c:42879
#6  0x0007de8c in sqlite3BtreeCommitPhaseOne (p=0x16f718, 
zMaster=0x1b5a18 "/home/brijesh/SQLite-3.7.14.1/test.db-mjED751E9E4")
at sqlite3.c:51071
#7  0x0008e90c in vdbeCommit (db=0x16b360, p=0x1be590) at sqlite3.c:60059
#8  0x0008ef04 in sqlite3VdbeHalt (p=0x1be590) at sqlite3.c:60333
#9  0x00098168 in sqlite3VdbeExec (p=0x1be590) at sqlite3.c:66334
#10 0x000918b8 in sqlite3Step (p=0x1be590) at sqlite3.c:61775
#11 0x00091ad4 in sqlite3_step (pStmt=0x1be590) at sqlite3.c:61848
#12 0x0004fdd4 in dbEvalStep (p=0x7efff170) at ./src/tclsqlite.c:1400
#13 0x00051b38 in DbObjCmd (cd=0x14a470, interp=0x122f80, objc=3, 
objv=0x12a764) at ./src/tclsqlite.c:2251




--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/TCL-Test-failures-on-ARM-tp67612p67959.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] TCL Test failures on ARM

2013-03-28 Thread Bk
Hi, 

The osFtruncate is not returning zero value. i have put breakpoint at
ts_ftruncate abd robust_ftruncate 


(gdb) break robust_ftruncate 
Breakpoint 2 at 0x636ec: file sqlite3.c, line 23439. 
(gdb) continue 
Continuing. 

Breakpoint 2, robust_ftruncate (h=7, sz=0) at sqlite3.c:23439 
23439  do{ rc = osFtruncate(h,sz); }while( rc<0 && errno==EINTR ); 
(gdb) p rc 
$1 = 1 
(gdb) step 

Breakpoint 1, ts_ftruncate (fd=7, n=284060) at ./src/test_syscall.c:273 
273  if( tsIsFailErrno("ftruncate") ){ 
(gdb) continue 
Continuing. 

Breakpoint 2, robust_ftruncate (h=8, sz=0) at sqlite3.c:23439 
23439  do{ rc = osFtruncate(h,sz); }while( rc<0 && errno==EINTR ); 
(gdb) p rc 
$2 = 449088 
(gdb) continue 
Continuing. 

Breakpoint 1, ts_ftruncate (fd=8, n=284060) at ./src/test_syscall.c:273 
273  if( tsIsFailErrno("ftruncate") ){ 
(gdb) continue 
Continuing. 

Breakpoint 2, robust_ftruncate (h=7, sz=0) at sqlite3.c:23439 
23439  do{ rc = osFtruncate(h,sz); }while( rc<0 && errno==EINTR ); 
(gdb) p rc 
$3 = 365128 
(gdb) continue 
Continuing. 

Breakpoint 1, ts_ftruncate (fd=7, n=284060) at ./src/test_syscall.c:273 
273  if( tsIsFailErrno("ftruncate") ){ 
(gdb) continue 
Continuing. 

Breakpoint 2, robust_ftruncate (h=5, sz=24576) at sqlite3.c:23439 
23439  do{ rc = osFtruncate(h,sz); }while( rc<0 && errno==EINTR ); 
(gdb) 




--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/TCL-Test-failures-on-ARM-tp67612p67936.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] TCL Test failures on ARM

2013-03-28 Thread Bk
Hi, 

The osFtruncate is not returning non zero value. i have put breakpoint at
ts_ftruncate abd robust_ftruncate


(gdb) break robust_ftruncate
Breakpoint 2 at 0x636ec: file sqlite3.c, line 23439.
(gdb) continue
Continuing.

Breakpoint 2, robust_ftruncate (h=7, sz=0) at sqlite3.c:23439
23439 do{ rc = osFtruncate(h,sz); }while( rc<0 && errno==EINTR );
(gdb) p rc
$1 = 1
(gdb) step

Breakpoint 1, ts_ftruncate (fd=7, n=284060) at ./src/test_syscall.c:273
273   if( tsIsFailErrno("ftruncate") ){
(gdb) continue
Continuing.

Breakpoint 2, robust_ftruncate (h=8, sz=0) at sqlite3.c:23439
23439 do{ rc = osFtruncate(h,sz); }while( rc<0 && errno==EINTR );
(gdb) p rc
$2 = 449088
(gdb) continue
Continuing.

Breakpoint 1, ts_ftruncate (fd=8, n=284060) at ./src/test_syscall.c:273
273   if( tsIsFailErrno("ftruncate") ){
(gdb) continue
Continuing.

Breakpoint 2, robust_ftruncate (h=7, sz=0) at sqlite3.c:23439
23439 do{ rc = osFtruncate(h,sz); }while( rc<0 && errno==EINTR );
(gdb) p rc
$3 = 365128
(gdb) continue
Continuing.

Breakpoint 1, ts_ftruncate (fd=7, n=284060) at ./src/test_syscall.c:273
273   if( tsIsFailErrno("ftruncate") ){
(gdb) continue
Continuing.

Breakpoint 2, robust_ftruncate (h=5, sz=24576) at sqlite3.c:23439
23439 do{ rc = osFtruncate(h,sz); }while( rc<0 && errno==EINTR );
(gdb) 




--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/TCL-Test-failures-on-ARM-tp67612p67935.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] TCL Test failures on ARM

2013-03-17 Thread Bk
can some one point out what went wrong here ?



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/TCL-Test-failures-on-ARM-tp67612p67741.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] TCL Test failures on ARM

2013-03-14 Thread Bk
Hi,


can any one tel me how can i fix this issue ?



Thank you

Brijesh



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/TCL-Test-failures-on-ARM-tp67612p67727.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users