Re: [sqlite] HELP sqlite3 used in vxworks has some problem

2014-09-02 Thread


firstly :
Even if I used 
#if OS_VXWORKS
|| osAccess(zPath,0) != 0
#endif


or I used 
#if OS_VXWORKS
}else if(errno == 0x380003 || errno == 13 )
  rc  = SQLITE_IOERR_DELETE_NOENT:
#endif 


Without the SQLITE_ENABLE_LOCKING_STYLE compile option, I tried the above two 
method, but  it still told me the error : disk I/o error.


secondly,
I found another problem. When I download the *.out file, it tells me Unresolved 
Symbols List: sem_post, ftruncate, sem_trywait,sem_open.
when building with spec:PPC604gnu, have the above problem, build spec:SIMNTdiab 
do not. 









At 2014-09-01 11:40:53, Andy Ling andy.l...@quantel.com wrote:


 -Original Message-
 From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
 boun...@sqlite.org] On Behalf Of Richard Hipp
 Sent: 01 September 2014 15:30
 To: General Discussion of SQLite Database
 Subject: Re: [sqlite] HELP sqlite3 used in vxworks has some problem
   Please try the patch at
  
 http://www.sqlite.org/src/info/b0f6b91f36b503d8ba8d5257bb194f8c1afb483
   3 and
   see if that fixes the problem.
  
 
  I think that fixes unixDelete. Running on the vxWorks dosFs disk
  everything works as before.
 
  If I use the host filing system, then I think the delete of the
  non-existent file works, but it then fails in unixSync followed by a fail
  in unixDelete
 
  os_unix.c:27830: (35) full_fsync(/tgtsvr/testdb.sql-journal) -  (1034)
 
 
 
 Error code 35 is ENOTSUP - fsync is apparently not supported on your
 filesystem.
 

OK. So it sounds like the answer to Wang Qinggang at the moment is that the 
host filing system is not supported.

I'm slightly surprised fsync isn't supported, but a quick test here proves 
that it isn't. I will try and raise it with WindRiver and see what they say. 
It may be a general problem with any network filing system under vxWorks.

I'm happy that dosFs works. That's all I need for the time being.

Regards

Andy Ling


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] HELP sqlite3 used in vxworks has some problem

2014-09-02 Thread

Thank  Andy Ling. best wishes.
 
 
regards
 
Wang Qinggang.







At 2014-09-02 09:45:47, Andy Ling andy.l...@quantel.com wrote:
 -Original Message-
 From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
 boun...@sqlite.org] On Behalf Of ???
 Sent: 02 September 2014 13:41
 To: General Discussion of SQLite Database
 Subject: Re: [sqlite] HELP sqlite3 used in vxworks has some problem
 
 
 
 firstly :
 Even if I used
 #if OS_VXWORKS
 || osAccess(zPath,0) != 0
 #endif
 
 
 or I used
 #if OS_VXWORKS
 }else if(errno == 0x380003 || errno == 13 )
   rc  = SQLITE_IOERR_DELETE_NOENT:
 #endif
 
 
 Without the SQLITE_ENABLE_LOCKING_STYLE compile option, I tried the
 above two method, but  it still told me the error : disk I/o error.
 

If you read what I wrote in the email you are answering, you will see that the 
problem is that the host file system does not support fsync.

So the short answer is that you cannot use SQLite with a database that is 
stored on your host PC. You must use a file system that is part of the target 
system.

Regards

Andy Ling

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-29 Thread
hi, Andy Ling
 I have removed the SQLITE_ENABLE_LOCKING_STYLE compile option, so it tell 
me the error : disk I/o error.
   but when I set breakpoint in unixdelete funtion , I found it not enter 
the funtion. I do not know why.
  
 You are right! What OS your host system is running (Windows in my case).
I want to get some information from the unixdelete funtion.


 Regards
 Wang Qinggang




At 2014-08-29 05:30:23, Andy Ling andy.l...@quantel.com wrote:


Have you removed the SQLITE_ENABLE_LOCKING_STYLE compile option?

 

On my vxWorks system, if I open a new database and create a table it always 
calls unixDelete trying to delete a “database name”-wal file. This doesn’t 
exist so it has to handle the error.

 

This patch that was added ….

 

#if OS_VXWORKS

}else if( errno==0x380003 ){ /* == S_dosFsLib_FILE_NOT_FOUND */

  rc = SQLITE_IOERR_DELETE_NOENT;

#endif

 

to handle the error code returned by a dosFs filing system. Before adding this 
patch I got the disk I/O error.

 

Because you are using the host filing system I would guess the error code 
returned will be something different.

 

Looking at the WindRiver documentation for the tsfs driver it says….

 

“The routines in this library return the VxWorks error codes that most closely 
match the errnos generated by the corresponding host function.”

 

So it looks like it will depend on what OS your host system is running (Windows 
I assume in your case).

 

Regards

 

Andy Ling

 

 

From: 163 [mailto:2004wqg2...@163.com]
Sent: 29 August 2014 03:34
To: Andy Ling
Cc:sqlite-users@sqlite.org; Jan Nijtmans
Subject: Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

 

i find it not enter the unixdelete.

发自我的 iPhone


在 2014年8月28日,22:42,Andy Ling andy.l...@quantel.com 写道:

Sorry, I meant unixDelete

 

My guess is that because you are using the host filing system vxWorks will be 
setting yet another error code for a file that doesn’t exist. So it will need 
another check adding to unixDelete

 

Regards

 

Andy Ling

 

 

From:王庆刚 [mailto:2004wqg2...@163.com]
Sent: 28 August 2014 15:01
To: Andy Ling
Cc:sqlite-users@sqlite.org; Jan Nijtmans
Subject: Re:RE: Re:RE: [sqlite] HELP sqlite3 used in vxworks has someproblem?

 

 

Is unixUnlink  an function? If it is , but I can not find the funtion in 
sqlite3.c.

 

Regards

 

Wang Qinggang

 







 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-28 Thread


Is unixUnlink  an function? If it is , but I can not find the funtion in 
sqlite3.c.



Regards

 

Wang Qinggang









At 2014-08-28 00:03:23, Andy Ling andy.l...@quantel.com wrote:


So you are using a host file system. You should be able to make the open work 
by using

 

rc = sqlite3_open(host:D:/WindRiver/SqliteOne.db,db);

 

You have to use a path and file name that works in the vxWorks domain.

 

It shouldn’t be necessary to use –DSQLITE_ENABLE_LOCKING_STYLE=1. In fact it 
has been said this will probably not work in other areas. So it would be good 
to find out what is causing the disk I/O error. Did you try putting some debug 
in unixUnlink?

 

Regards

 

Andy Ling

 

 

From:王庆刚 [mailto:2004wqg2...@163.com]
Sent: 27 August 2014 16:17
To: Andy Ling
Cc:sqlite-users@sqlite.org; Jan Nijtmans
Subject: Re:RE: [sqlite] HELP sqlite3 used in vxworks has someproblem?

 



Firstly:


I  fixed the disk I/O error by adding -DSQLITE_ENABLE_LOCKING_STYLE=1 to the 
build macro.
 

Secondly:

rc = sqlite3_open(D:\\WindRiver\\SqliteOne.db,db);

I change it to the following

cd(host:D:/WindRiver);

rc = sqlite3_open(SqliteOne.db,db);

can fix the problem : unable to open the database.

 

 

At 2014-08-26 08:55:31, Andy Ling andy.l...@quantel.com wrote:



As I said before, that doesn’t look like a vxWorks path to a file. Are you sure 
D:\\WindRiver really exists? In general vxWorks uses the forward slash (/) as a 
path separator. Is this a remote mounted host file system you are trying to use?

 

What is your current directory when it works the second time? i.e. what is the 
output from the “pwd” command? Can you use that directory as part of a full 
pathname?

 

I’m glad you have fixed the disk I/O problem. What did you have to do? Are 
there any more changes that need feeding back into the source?

 

Regards

 

Andy Ling

 

 

From:王庆刚 [mailto:2004wqg2...@163.com]
Sent: 26 August 2014 13:44
To: Andy Ling
Cc:sqlite-users@sqlite.org; Jan Nijtmans
Subject: Re:RE: Re:Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

 

hi, Andy Ling:

The error disk I / o error I have resolved ;

but when I used the following code:

rc = sqlite3_open(D:\\WindRiver\\SqliteOne.db,db);

it tell me  can not find the data base;

 

when I used the following code:

rc = sqlite3_open(SqliteOne.db,db);

It is OK

 

 

How could I resolve the prolblem?



 

At 2014-08-25 11:29:57, Andy Ling andy.l...@quantel.com wrote:

That file name in the first error doesn't look like a vxWorks file. What 
devices have you got mounted. You need to specify a file path that points to 
one of the vxWorks file IO devices. By just specifying the file name in your 
second example it is being created in the current directory.

The second disk I / O error is what I had before applying the patch to 
unixUnlink. The error returned by vxWorks when deleting a file that doesn't 
exist depends on the underlying file system. If it is a POSIX file system it 
should return ENOENT. For dosFS it returns S_dosFsLib_FILE_NOT_FOUND, which in 
vxWorks 6.9 is 0x380003

So if you are using yet another file system, maybe you are getting a different 
error code being set. start by adding a printf to unixUnlink to find out if 
that is your problem.

Regards

Andy Ling

From:王庆刚 [2004wqg2...@163.com]
Sent: 25 August 2014 13:13
To:sqlite-users@sqlite.org; Andy Ling; Jan Nijtmans
Subject: Re:Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

hi

  I modified the code sqlite3.c according to you method, as follow 

 

 
http://fossil-scm.org/index.html/vpatch?from=dd5743a8239d1ce9to=b68f65bb69a098a1
  or   http://fossil-scm.org/index.html/info/c2d4bd7365 

 

I test you method in workbench3.2(vxworks6.8) , the build macros which I used 
in build properties is : -DOS_VXWORKS=1 -DSQLITE_THREADSAFE=0  
-DSQLITE_OMIT_LOAD_EXTENSION -DHAVE_UTIME

 

but it still have some problems.

1.  if I do as follows:

rc = sqlite3_open(D:\\WindRiver\\SqliteOne.db,db);

it tell me the error  can not open the database.

 

 

2.  if I do as follows:

rc = sqlite3_open(SqliteOne.db,db);this will be ok .

but when I do the following thing 

sql =  create table stu(i int, name text);;

rc = sqlite3_exec(db,sql,NULL,NULL,err);

it tell me the error  : disk I / O  error.



 


在 2014-08-12 08:10:13,Jan Nijtmans jan.nijtm...@gmail.com 写道:

2014-08-03 9:56 GMT+02:00 Jan Nijtmans jan.nijtm...@gmail.com:

2014-08-02 16:00 GMT+02:00 王庆刚 2004wqg2...@163.com:

 hi , Can Sqlite3.c and sqlite.h be compiled in Workbench3.2 for 
 Vxworks6.8 ?
 When I  compile them , there have so many problems .

You can find the necessary changes here:

http://fossil-scm.org/index.html/vpatch?from=dd5743a8239d1ce9to=b68f65bb69a098a1
thanks to Andy Ling.

Still has to be reviewed by the SQLite developers for inclusion in 3.8.6
(not tested yet on other platforms than vxworks, win32/64 and Linux,
there it works fine)

 

New attempt here, base

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-27 Thread


Firstly:

I  fixed the disk I/O error by adding -DSQLITE_ENABLE_LOCKING_STYLE=1 to the 
build macro.
 
Secondly:

rc = sqlite3_open(D:\\WindRiver\\SqliteOne.db,db);

I change it to the following

cd(host:D:/WindRiver);

rc = sqlite3_open(SqliteOne.db,db);

can fix the problem : unable to open the database.





At 2014-08-26 08:55:31, Andy Ling andy.l...@quantel.com wrote:


As I said before, that doesn’t look like a vxWorks path to a file. Are you sure 
D:\\WindRiver really exists? In general vxWorks uses the forward slash (/) as a 
path separator. Is this a remote mounted host file system you are trying to use?

 

What is your current directory when it works the second time? i.e. what is the 
output from the “pwd” command? Can you use that directory as part of a full 
pathname?

 

I’m glad you have fixed the disk I/O problem. What did you have to do? Are 
there any more changes that need feeding back into the source?

 

Regards

 

Andy Ling

 

 

From:王庆刚 [mailto:2004wqg2...@163.com]
Sent: 26 August 2014 13:44
To: Andy Ling
Cc:sqlite-users@sqlite.org; Jan Nijtmans
Subject: Re:RE: Re:Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

 

hi, Andy Ling:

The error disk I / o error I have resolved ;

but when I used the following code:

rc = sqlite3_open(D:\\WindRiver\\SqliteOne.db,db);

it tell me  can not find the data base;

 

when I used the following code:

rc = sqlite3_open(SqliteOne.db,db);

It is OK

 

 

How could I resolve the prolblem?




 

At 2014-08-25 11:29:57, Andy Ling andy.l...@quantel.com wrote:



That file name in the first error doesn't look like a vxWorks file. What 
devices have you got mounted. You need to specify a file path that points to 
one of the vxWorks file IO devices. By just specifying the file name in your 
second example it is being created in the current directory.

The second disk I / O error is what I had before applying the patch to 
unixUnlink. The error returned by vxWorks when deleting a file that doesn't 
exist depends on the underlying file system. If it is a POSIX file system it 
should return ENOENT. For dosFS it returns S_dosFsLib_FILE_NOT_FOUND, which in 
vxWorks 6.9 is 0x380003

So if you are using yet another file system, maybe you are getting a different 
error code being set. start by adding a printf to unixUnlink to find out if 
that is your problem.

Regards

Andy Ling



From:王庆刚 [2004wqg2...@163.com]
Sent: 25 August 2014 13:13
To:sqlite-users@sqlite.org; Andy Ling; Jan Nijtmans
Subject: Re:Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

hi

  I modified the code sqlite3.c according to you method, as follow 

 

 
http://fossil-scm.org/index.html/vpatch?from=dd5743a8239d1ce9to=b68f65bb69a098a1
  or   http://fossil-scm.org/index.html/info/c2d4bd7365 

 

I test you method in workbench3.2(vxworks6.8) , the build macros which I used 
in build properties is : -DOS_VXWORKS=1 -DSQLITE_THREADSAFE=0  
-DSQLITE_OMIT_LOAD_EXTENSION -DHAVE_UTIME

 

but it still have some problems.

1.  if I do as follows:

rc = sqlite3_open(D:\\WindRiver\\SqliteOne.db,db);

it tell me the error  can not open the database.

 

 

2.  if I do as follows:

rc = sqlite3_open(SqliteOne.db,db);this will be ok .

but when I do the following thing 

sql =  create table stu(i int, name text);;

rc = sqlite3_exec(db,sql,NULL,NULL,err);

it tell me the error  : disk I / O  error.








在 2014-08-12 08:10:13,Jan Nijtmans jan.nijtm...@gmail.com 写道:



2014-08-03 9:56 GMT+02:00 Jan Nijtmans jan.nijtm...@gmail.com:

2014-08-02 16:00 GMT+02:00 王庆刚 2004wqg2...@163.com:

 hi , Can Sqlite3.c and sqlite.h be compiled in Workbench3.2 for 
 Vxworks6.8 ?
 When I  compile them , there have so many problems .

You can find the necessary changes here:

http://fossil-scm.org/index.html/vpatch?from=dd5743a8239d1ce9to=b68f65bb69a098a1
thanks to Andy Ling.

Still has to be reviewed by the SQLite developers for inclusion in 3.8.6
(not tested yet on other platforms than vxworks, win32/64 and Linux,
there it works fine)

 

New attempt here, base on current SQLite trunk:
  http://fossil-scm.org/index.html/info/c2d4bd7365

Regards,

  Jan Nijtmans

 

 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-26 Thread
hi, Andy Ling:
The error disk I / o error I have resolved ;
but when I used the following code:
rc = sqlite3_open(D:\\WindRiver\\SqliteOne.db,db);
it tell me  can not find the data base;
 
when I used the following code:
rc = sqlite3_open(SqliteOne.db,db);
It is OK
 
 
How could I resolve the prolblem?






At 2014-08-25 11:29:57, Andy Ling andy.l...@quantel.com wrote:

That file name in the first error doesn't look like a vxWorks file. What 
devices have you got mounted. You need to specify a file path that points to 
one of the vxWorks file IO devices. By just specifying the file name in your 
second example it is being created in the current directory.

The second disk I / O error is what I had before applying the patch to 
unixUnlink. The error returned by vxWorks when deleting a file that doesn't 
exist depends on the underlying file system. If it is a POSIX file system it 
should return ENOENT. For dosFS it returns S_dosFsLib_FILE_NOT_FOUND, which in 
vxWorks 6.9 is 0x380003

So if you are using yet another file system, maybe you are getting a different 
error code being set. start by adding a printf to unixUnlink to find out if 
that is your problem.

Regards

Andy Ling



From: 王庆刚 [2004wqg2...@163.com]
Sent: 25 August 2014 13:13
To:sqlite-users@sqlite.org; Andy Ling; Jan Nijtmans
Subject: Re:Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?


hi
  I modified the code sqlite3.c according to you method, as follow 


 
http://fossil-scm.org/index.html/vpatch?from=dd5743a8239d1ce9to=b68f65bb69a098a1
  or   http://fossil-scm.org/index.html/info/c2d4bd7365 


I test you method in workbench3.2(vxworks6.8) , the build macros which I used 
in build properties is : -DOS_VXWORKS=1 -DSQLITE_THREADSAFE=0  
-DSQLITE_OMIT_LOAD_EXTENSION -DHAVE_UTIME


but it still have some problems.
1.  if I do as follows:
rc = sqlite3_open(D:\\WindRiver\\SqliteOne.db,db);
it tell me the error  can not open the database.




2.  if I do as follows:
rc = sqlite3_open(SqliteOne.db,db);this will be ok .
but when I do the following thing 
sql =  create table stu(i int, name text);;
rc = sqlite3_exec(db,sql,NULL,NULL,err);
it tell me the error  : disk I / O  error.






在 2014-08-12 08:10:13,Jan Nijtmans jan.nijtm...@gmail.com 写道:

2014-08-03 9:56 GMT+02:00 Jan Nijtmans jan.nijtm...@gmail.com:

2014-08-02 16:00 GMT+02:00 王庆刚 2004wqg2...@163.com:

 hi , Can Sqlite3.c and sqlite.h be compiled in Workbench3.2 for 
 Vxworks6.8 ?
 When I  compile them , there have so many problems .


You can find the necessary changes here:

http://fossil-scm.org/index.html/vpatch?from=dd5743a8239d1ce9to=b68f65bb69a098a1
thanks to Andy Ling.

Still has to be reviewed by the SQLite developers for inclusion in 3.8.6
(not tested yet on other platforms than vxworks, win32/64 and Linux,
there it works fine)



New attempt here, base on current SQLite trunk:
  http://fossil-scm.org/index.html/info/c2d4bd7365


Regards,

  Jan Nijtmans




___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-25 Thread
hi
  I modified the code sqlite3.c according to you method, as follow 


 
http://fossil-scm.org/index.html/vpatch?from=dd5743a8239d1ce9to=b68f65bb69a098a1
  or   http://fossil-scm.org/index.html/info/c2d4bd7365 


I test you method in workbench3.2(vxworks6.8) , the build macros which I used 
in build properties is : -DOS_VXWORKS=1 -DSQLITE_THREADSAFE=0  
-DSQLITE_OMIT_LOAD_EXTENSION -DHAVE_UTIME


but it still have some problems.
1.  if I do as follows:
rc = sqlite3_open(D:\\WindRiver\\SqliteOne.db,db);
it tell me the error  can not open the database.




2.  if I do as follows:
rc = sqlite3_open(SqliteOne.db,db);this will be ok .
but when I do the following thing 
sql =  create table stu(i int, name text);;
rc = sqlite3_exec(db,sql,NULL,NULL,err);
it tell me the error  : disk I / O  error.






在 2014-08-12 08:10:13,Jan Nijtmans jan.nijtm...@gmail.com 写道:

2014-08-03 9:56 GMT+02:00 Jan Nijtmans jan.nijtm...@gmail.com:

2014-08-02 16:00 GMT+02:00 王庆刚 2004wqg2...@163.com:

 hi , Can Sqlite3.c and sqlite.h be compiled in Workbench3.2 for 
 Vxworks6.8 ?
 When I  compile them , there have so many problems .


You can find the necessary changes here:

http://fossil-scm.org/index.html/vpatch?from=dd5743a8239d1ce9to=b68f65bb69a098a1
thanks to Andy Ling.

Still has to be reviewed by the SQLite developers for inclusion in 3.8.6
(not tested yet on other platforms than vxworks, win32/64 and Linux,
there it works fine)



New attempt here, base on current SQLite trunk:
  http://fossil-scm.org/index.html/info/c2d4bd7365


Regards,

  Jan Nijtmans

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-02 Thread
hi , Can Sqlite3.c and sqlite.h be compiled in Workbench3.2 for Vxworks6.8 ?
When I  compile them , there have so many problems .
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users