Re: [sqlite] SQLite on Nintndo DS?

2008-10-30 Thread Jay A. Kreibich
On Fri, Oct 31, 2008 at 12:21:50AM -0400, [EMAIL PROTECTED] scratched on the 
wall:

> I use it built in on iPhone -- oops. Can't talk about iPhone.

  Yes, you can.  On Oct. 1st Apple modified the SDK Agreement,
  essentially removing the developer NDA.  Some aspects (i.e. 
  pre-release software) are still covered, but in general discussing
  iPhone development in public forums is now allowed.

http://radar.oreilly.com/2008/10/apple-drops-iphone-nda.html
http://gizmodo.com/5057438/
http://www.engadget.com/2008/10/01/apple-drops-iphone-nda/
http://www.tuaw.com/2008/10/01/iphone-nda-dropped/

  I'm surprised we haven't seen more of it on the SQLite mailing lists,
  given how integrated SQLite is within the iPhone software environment.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Our opponent is an alien starship packed with atomic bombs.  We have
 a protractor."   "I'll go home and see if I can scrounge up a ruler
 and a piece of string."  --from Anathem by Neal Stephenson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite on Nintndo DS?

2008-10-30 Thread Regnirps

In a message dated 10/30/08 9:05:28 PM, [EMAIL PROTECTED] writes:


> If you have an official devkit, or care to grab a copy of the
> I-don't-know-if-it's-legal DevKit Pro, you can try it out yourself and let
> us know how it works.
> 

I have the DevKit and all the goodies and am able to make the DS jump though 
hoops. But I always have trouble with SQLite. I'm one of those who gets the 
very irritating huge numbers of compile errors that have something to do with 
compiler version versus SQLite version versus header file version. I was hoping 
to find the answer before spending the time to figure out the tools/versions 
fixes since if it won't fit, it is a total waste of time.

I use it built in on iPhone -- oops. Can't talk about iPhone.

-- Charlie Springer


**
Plan your next getaway with AOL Travel.  
Check out Today's Hot 5 Travel Deals! 
(http://pr.atwola.com/promoclk/10075x1212416248x1200771803/aol?redir=http://travel.aol.com/discount-travel?ncid=emlcnt
ustrav0001)
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite on Nintndo DS?

2008-10-30 Thread Sherief N. Farouk
> Has anyone used SQLite on the NintendoDS? Can it fit? Arm7 and ARM9 and
> a
> cartridge like an SD card. The database can be static in FLASH. But the
> rest?
> 
> -- Charlie Springer
> 

[Sherief N. Farouk] 

If you have an official devkit, or care to grab a copy of the
I-don't-know-if-it's-legal DevKit Pro, you can try it out yourself and let
us know how it works.

- Sherief

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


Re: [sqlite] insert speeds slowing down as database size increases (newb)

2008-10-30 Thread Julian Bui
Unless I did something wrong, I did observe constant time inserts in
Berkeley DB.  Is it possible that I had constant time inserts into a btree
as my db grew because of the nature of my data?  I was inserting records in
order of how they would be sorted by index.  In other words, every inserted
record's indexed field was greater than the previous one.  Perhaps the db
made use of this feature of my inserts because I set sortedDuplicates() on
which allows for a clustered index.

On Thu, Oct 30, 2008 at 6:11 PM, Alex Scotti <[EMAIL PROTECTED]> wrote:

>
> On Oct 29, 2008, at 4:59 AM, Julian Bui wrote:
>
> > Hi everyone,
> >
> > First off, I'm a database and sqlite newbie.  I'm inserting many many
> > records and indexing over one of the double attributes.  I am seeing
> > my insert times slowly degrade as the database grows in size until
> > it's unacceptable - less than 1 write per millisecond (other databases
> > have scaled well).  I'm using a intel core 2 duo with 2 GB of ram and
> > an ordinary HDD.
> >
> > I am trying to figure out why some of the other databases (firebird,
> > mysql, berkeley db) have provided constant insert speeds whereas
> > sqlite has not.
>
> i can tell you firsthand that berkeley db does not provide anything
> like constant time for random inserts into a btree as it's size grows.
>
>
>
> ___
> 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] insert speeds slowing down as database size increases (newb)

2008-10-30 Thread Alex Scotti

On Oct 29, 2008, at 4:59 AM, Julian Bui wrote:

> Hi everyone,
>
> First off, I'm a database and sqlite newbie.  I'm inserting many many
> records and indexing over one of the double attributes.  I am seeing
> my insert times slowly degrade as the database grows in size until
> it's unacceptable - less than 1 write per millisecond (other databases
> have scaled well).  I'm using a intel core 2 duo with 2 GB of ram and
> an ordinary HDD.
>
> I am trying to figure out why some of the other databases (firebird,
> mysql, berkeley db) have provided constant insert speeds whereas
> sqlite has not.

i can tell you firsthand that berkeley db does not provide anything  
like constant time for random inserts into a btree as it's size grows.



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


[sqlite] SQLite on Nintndo DS?

2008-10-30 Thread Regnirps
Has anyone used SQLite on the NintendoDS? Can it fit? Arm7 and ARM9 and a 
cartridge like an SD card. The database can be static in FLASH. But the rest?

-- Charlie Springer


**
Plan your next getaway with AOL Travel.  
Check out Today's Hot 5 Travel Deals! 
(http://pr.atwola.com/promoclk/10075x1212416248x1200771803/aol?redir=http://travel.aol.com/discount-travel?ncid=emlcnt
ustrav0001)
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite3_open() problem for ARM

2008-10-30 Thread MikeW
Leandro Ribeiro <[EMAIL PROTECTED]> writes:

> 
> Hello Guys.
> 
> I have a problem with running SQLite.
> I am running linux 2.6.17 on *ARM* and basically problem is that my 
> application
> is crushing on *sqlite3_open*()  function while the sqlite3 command 
> shell is
> running without problems.

> Please help
> 
> NOTE: the same appplication compiled for linux PC is working fine.
> 
> Best regards
> Leandro
> 

Could be a compiler issue - try turning OFF optimisation: "-O0"

MikeW






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


Re: [sqlite] Problem : SQLite Database error

2008-10-30 Thread MikeW
Mihai Limbasan <[EMAIL PROTECTED]> writes:

> 
> Hello, Aaron.
> 
> Have you tried Mr. Griggs' solution yet? Please be aware that posting 
> the same question for the *third* time in a row will not make it any 
> more visible, but will dramatically increase the chance that people will 
> become annoyed and will not help you.
> 
> Thank you for your consideration.
> 
> Mihai Limbasan

FYI -
http://article.gmane.org/gmane.comp.db.sqlite.general/41794/match=bluephoneelite

MikeW

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


Re: [sqlite] Making the binary small

2008-10-30 Thread Shane Harrelson
On Thu, Oct 30, 2008 at 1:02 PM, Shane Harrelson
<[EMAIL PROTECTED]> wrote:
> The sizes that I mentioned (315KB vs 205KB) are for the final .dll and


That should read (235KB and 205KB).
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Making the binary small

2008-10-30 Thread Shane Harrelson
The sizes that I mentioned (315KB vs 205KB) are for the final .dll and
.so size.  You might try linking your object files into a lib to see
how that affects size.   You could also try running the "strip"
command on the object files to ensure all the debugging symbols are
removed.

Any OMIT options you compile your application with must also be used
to compile the mkkeywordhash tool (used to generate keywordhash.h) and
passed to the lemon parser (used to generate parse.c).   They must
also be passed to gcc to compile sqlite3.c.

Note how the define for SQLITE_OMIT_LOAD_EXTENSION is used below:

gcc -o mkkeywordhash.exe -DSQLITE_OMIT_LOAD_EXTENSION=1  mkkeywordhash.c

./lemon.exe -DSQLITE_OMIT_LOAD_EXTENSION=1  parse.y

gcc -Os -DSQLITE_OS_WIN=1 -DNDEBUG -DSQLITE_OMIT_LOAD_EXTENSION=1  -c sqlite3.c


Another thing to check is that NDEBUG is defined.   SQLite makes
significant use of asserts for debugging and testing, and defining
NDEBUG will leave this code out.

HTH.
-Shane


2008/10/30 Pados Károly <[EMAIL PROTECTED]>:
>
> First a note: I removed -ffunction-sections from the compiler options, and it 
> is now better, but not good enough (365KB). It was an options the AVR IDE 
> defaulted to, that is why I not noticed it. OMIT_DISKIO is also NOT defined. 
> I am using SQLite version 3.6.4. OTHER_OS=1 and THREADSAFE=0.
>
> At first try, I just used the amalgamation from the site and put the 
> SQLITE_OMIT_* lines at the beginining of the source file. It was only after 
> then I noticed in the online docs that to correctly use the OMIT defines, I 
> have to start from full sources. So I got the tarball, used 
> Makefile.gcc-linux as a template to make my own makefile (I defined the OMIT 
> options), and issued a "make -f Makefile.gcc-avr sqlite3.c". (Although I have 
> no idea how the Tcl script would use defines from the makefile, I assume some 
> of the tools (lemon?) involved try to parse the make- and source files like a 
> very basic preprocessor, so it is possible.)
>
> Again, OMITs are prepended to sqlite3.c. I use the (atmel supplied) AVR32 gcc 
> compiler to compile with "-Os -fno-inline -Wall -c -fmessage-length=0 
> -mpart=uc3b1256es". These are all the gcc options in use, and now I get 
> 365KB. As an experiment, I also tried to compile with the x86 gcc 4.3.2 to 
> see the size it produces, with the same options I got 315KB. Definitely 
> better but still far too large. So, on one hand the AVR32 compiler is not 
> that good for producing small code, but I am also missing something 
> important, because the x86 object file is also much larger than the size you 
> mentioned (315KB vs 205KB). Not to mention that 315KB is without optional 
> features, the 205KB you mentioned is with them.
>
> These are the exact actions I took. Any help is appretiated. Thanks,
> Károly
>
>> Date: Wed, 29 Oct 2008 21:50:37 -0400
>> From: [EMAIL PROTECTED]
>> To: sqlite-users@sqlite.org
>> Subject: Re: [sqlite] Making the binary small
>>
>> Are you compiling the SQLite shell utility, or just the library?   The
>> Windows and Linux versions of the lib available from the download page
>> which are compiled with all the optional features are 235kb and 205kb
>> respectively.   It's surprising that the compiled version for AVR32 is
>> more than twice as large with all the optional features compiled out.
>>   Can you provide anymore information on how you are compiling it?
>> Which version are you compiling?   Are you using the amalgamation?
>> Are you compiling without debugging information?
>>
>> -Shane
>>
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
> _
> Connect to the next generation of MSN Messenger
> http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us=wlmailtagline
> ___
> 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


[sqlite] Disk I/O error on INSERT timeout expired

2008-10-30 Thread Darko Filipovic
Hello,

I'm having two independent processes that accessing SQLite db simultaneously. 
Process A writes db in transaction and Process B reads the same db 
simultaneously. If Process B reads db and timeout for Process A expires, SQLite 
returns code 10 (disk I/O error) instead of 5 (sqlite busy). 
Is this expected behaviour?

Thanks,
Darko F.



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


Re: [sqlite] Making the binary small

2008-10-30 Thread Pados Károly

Just one more clarification:
I am measuring the size of the produced .o object file, that is, before 
linking. That is why I remove -ffunction-sections, but of course, with -ffs 
would probably produce a smaller binary after linking. The reason is that it is 
not clear which microcontroller I'll be using, because the total code in the 
end might not fit at all into a 256KB flash (the rest of the code is not there 
yet, i.e. cannot be compiled and tested). So I am just evaluating a kind of 
worst case scenario.
Károly

_
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Making the binary small

2008-10-30 Thread Pados Károly

First a note: I removed -ffunction-sections from the compiler options, and it 
is now better, but not good enough (365KB). It was an options the AVR IDE 
defaulted to, that is why I not noticed it. OMIT_DISKIO is also NOT defined. I 
am using SQLite version 3.6.4. OTHER_OS=1 and THREADSAFE=0.

At first try, I just used the amalgamation from the site and put the 
SQLITE_OMIT_* lines at the beginining of the source file. It was only after 
then I noticed in the online docs that to correctly use the OMIT defines, I 
have to start from full sources. So I got the tarball, used Makefile.gcc-linux 
as a template to make my own makefile (I defined the OMIT options), and issued 
a "make -f Makefile.gcc-avr sqlite3.c". (Although I have no idea how the Tcl 
script would use defines from the makefile, I assume some of the tools (lemon?) 
involved try to parse the make- and source files like a very basic 
preprocessor, so it is possible.)

Again, OMITs are prepended to sqlite3.c. I use the (atmel supplied) AVR32 gcc 
compiler to compile with "-Os -fno-inline -Wall -c -fmessage-length=0 
-mpart=uc3b1256es". These are all the gcc options in use, and now I get 365KB. 
As an experiment, I also tried to compile with the x86 gcc 4.3.2 to see the 
size it produces, with the same options I got 315KB. Definitely better but 
still far too large. So, on one hand the AVR32 compiler is not that good for 
producing small code, but I am also missing something important, because the 
x86 object file is also much larger than the size you mentioned (315KB vs 
205KB). Not to mention that 315KB is without optional features, the 205KB you 
mentioned is with them.

These are the exact actions I took. Any help is appretiated. Thanks,
Károly

> Date: Wed, 29 Oct 2008 21:50:37 -0400
> From: [EMAIL PROTECTED]
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Making the binary small
> 
> Are you compiling the SQLite shell utility, or just the library?   The
> Windows and Linux versions of the lib available from the download page
> which are compiled with all the optional features are 235kb and 205kb
> respectively.   It's surprising that the compiled version for AVR32 is
> more than twice as large with all the optional features compiled out.
>   Can you provide anymore information on how you are compiling it?
> Which version are you compiling?   Are you using the amalgamation?
> Are you compiling without debugging information?
> 
> -Shane
> 
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us=wlmailtagline
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Separating error conditions that are all lumpe d as SQLITE_ERROR

2008-10-30 Thread MikeW
Roger Binns <[EMAIL PROTECTED]> writes:
> 
> 
> MikeW wrote:
> > Having looked at the source code, looks like the best way to do this
> > /would/ be to add another (!) numerical parameter to sqlite3ErrorMsg()
indicating
> > the extended error code that corresponds with the message.
> 
> http://www.sqlite.org/cvstrac/tktview?tn=3456
> 
> Roger
> 

Thanks Roger !

I also thought of a semi-kludge that prefixed an error code "character"
greater than 0x7F say, to the beginning of each string, using string catenation,
(#define SQLITE_EXT_ERR_MISC "\x82"
 ...
 sqlite3ErrorMsg(SQLITE_EXT_ERR_MISC "Misc error", ...
)
Then sqlite3ErrorMsg() could retain the first byte as an error code if
it was > 0x7F and skip on one char to get the text.
This would allow retrofitting of codes gradually.

BUT - it's a kludge, so I await the 'developers' to address the issue 
that you refer to.

Cheers,
MikeW



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


Re: [sqlite] sqlite3_total_changes() doesn't include schema changes?

2008-10-30 Thread David Barrett
Ah, thanks.  I think I'll wait for the next stable release and go to 
that; in the meantime I'll use the WHERE 1 trick.  Thanks!

-david

Dan wrote:
> On Oct 30, 2008, at 3:10 PM, David Barrett wrote:
> 
>> Ok, getting close: now I test for changes in sqlite3_total_changes()  
>> and
>> PRAGMA schema_version and that works, except for one case:
>>
>>  DELETE FROM table;
>>
>> I see in the docs for sqlite_total_changes() that I can solve this  
>> by doing:
>>
>>  DELETE FROM table WHERE 1;
>>
>> Is there any other way to detect the change without losing that
>> optimization?  Thanks!
> 
> This has been changed in cvs. In version 3.6.5 sqlite3_change()
> and total_changes() will correctly report the number of rows deleted
> by "DELETE FROM table".
> 
> So upgrading to cvs head would work.
> 
> Dan.
> 
> 
> 
>> -david
>>
>> Igor Tandetnik wrote:
>>> David Barrett <[EMAIL PROTECTED]> wrote:
 If so, is there any general way to determine -- given an arbitrary
 query -- whether or not it changed the database?
>>> Run PRAGMA schema_version before and after.
>>>
>>> Igor Tandetnik
>>>
>>>
>>>
>>> ___
>>> 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
> 
> ___
> 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] sqlite3_total_changes() doesn't include schema changes?

2008-10-30 Thread Dan

On Oct 30, 2008, at 3:10 PM, David Barrett wrote:

> Ok, getting close: now I test for changes in sqlite3_total_changes()  
> and
> PRAGMA schema_version and that works, except for one case:
>
>   DELETE FROM table;
>
> I see in the docs for sqlite_total_changes() that I can solve this  
> by doing:
>
>   DELETE FROM table WHERE 1;
>
> Is there any other way to detect the change without losing that
> optimization?  Thanks!

This has been changed in cvs. In version 3.6.5 sqlite3_change()
and total_changes() will correctly report the number of rows deleted
by "DELETE FROM table".

So upgrading to cvs head would work.

Dan.



> -david
>
> Igor Tandetnik wrote:
>> David Barrett <[EMAIL PROTECTED]> wrote:
>>> If so, is there any general way to determine -- given an arbitrary
>>> query -- whether or not it changed the database?
>>
>> Run PRAGMA schema_version before and after.
>>
>> Igor Tandetnik
>>
>>
>>
>> ___
>> 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

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


Re: [sqlite] sqlite3_total_changes() doesn't include schema changes?

2008-10-30 Thread David Barrett
Ok, getting close: now I test for changes in sqlite3_total_changes() and 
PRAGMA schema_version and that works, except for one case:

DELETE FROM table;

I see in the docs for sqlite_total_changes() that I can solve this by doing:

DELETE FROM table WHERE 1;

Is there any other way to detect the change without losing that 
optimization?  Thanks!

-david

Igor Tandetnik wrote:
> David Barrett <[EMAIL PROTECTED]> wrote:
>> If so, is there any general way to determine -- given an arbitrary
>> query -- whether or not it changed the database?
> 
> Run PRAGMA schema_version before and after.
> 
> Igor Tandetnik 
> 
> 
> 
> ___
> 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