Re: [sqlite] Problems loading extensions on Windows 10

2019-03-05 Thread Kyle
As indicated by "Random Coder", the problem was that I was missing the
required dependencies.

Thank you.

On Tue, Mar 5, 2019 at 8:03 PM Thomas Kurz  wrote:

> Are both of the same architecture, either 32bit or 64bit?
>
> - Original Message -
> From: Kyle 
> To: sqlite-users@mailinglists.sqlite.org <
> sqlite-users@mailinglists.sqlite.org>
> Sent: Tuesday, March 5, 2019, 23:30:35
> Subject: [sqlite] Problems loading extensions on Windows 10
>
> I am having problems loading sqlite3 extensions on Windows 10.
>
> I have downloaded both sqlite3 and mod_spatialite.dll (the extension) and
> copied them to C:\Windows\System32.
>
> When I run
> SELECT load_extension('mod_spatialite')
> sqlite returns "Error: the specified module could not be found"
>
> I have also tried
> SELECT load_extension('C:\Windows\System32\mod_spatialite.dll')
> which returns the same error.
>
> These commands work perfectly fine in Ubuntu and the extension loads with
> no problems. What do I need to do differently on Windows?
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems loading extensions on Windows 10

2019-03-05 Thread Thomas Kurz
Are both of the same architecture, either 32bit or 64bit?

- Original Message - 
From: Kyle 
To: sqlite-users@mailinglists.sqlite.org 
Sent: Tuesday, March 5, 2019, 23:30:35
Subject: [sqlite] Problems loading extensions on Windows 10

I am having problems loading sqlite3 extensions on Windows 10.

I have downloaded both sqlite3 and mod_spatialite.dll (the extension) and
copied them to C:\Windows\System32.

When I run
SELECT load_extension('mod_spatialite')
sqlite returns "Error: the specified module could not be found"

I have also tried
SELECT load_extension('C:\Windows\System32\mod_spatialite.dll')
which returns the same error.

These commands work perfectly fine in Ubuntu and the extension loads with
no problems. What do I need to do differently on Windows?
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

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


Re: [sqlite] Problems loading extensions on Windows 10

2019-03-05 Thread Random Coder
On Tue, Mar 5, 2019 at 2:30 PM Kyle  wrote:
> I have downloaded both sqlite3 and mod_spatialite.dll (the extension) and
> copied them to C:\Windows\System32.
>
> When I run
> SELECT load_extension('mod_spatialite')
> sqlite returns "Error: the specified module could not be found"

Helpfully, on Windows, the error message for unable to find a DLL, and
unable to find a dependency of that DLL are the same error.

The version of mod_spatialite.dll I'm familiar with has several
dependencies.  You'll need to make sure all of the dependent DLL files
are also copied to somewhere in your path.  You might try using
Dependency Walker ( http://www.dependencywalker.com/ ) to see which
DLLs a component is missing.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems with compiling SQLite for MUSL.

2018-09-03 Thread John Found
On Sun, 02 Sep 2018 22:25:16 -0600
"Keith Medcalf"  wrote:

> Interesting ... Sounds like the optimizer in the compiler is broken ... 
> unless someone has ideas about how to debug this.  Can you compile with no 
> optimization and SQLITE_DEBUG defined and see what happens?  Though, to me it 
> sounds like the compiler and/or the optimizer is just broken (or perhaps the 
> replacement standard library is broken and does not return properly aligned 
> memory allocations) ... 

Well, the problem is solved. The crashes was caused because gcc compiled sqlite 
with requirement for stack alignment on 16 bytes,
regardles of that it was compiled to 32bit code. On the other hand, my code 
aligns the stack on 4 bytes as an usual 32bit program.

The option -mpreferred-stack-boundary=2 fixed the issue.

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


Re: [sqlite] Problems with compiling SQLite for MUSL.

2018-09-02 Thread Keith Medcalf

On Sunday, 2 September, 2018 20:32, John Found  wrote:

>On Sun, 02 Sep 2018 14:18:50 -0600 "Keith Medcalf"  wrote:

>> This is a compiler issue and has nothing to do with SQLite3.
>>Anything you compiled using that compiler would exhibit the same
>>problems ...

>Well, I was almost sure, but as long as here I can find people
>understanding gcc and I am compiling sqlite after all,
>considered a good place to ask. ;)

>> However, that the compiler does not automatically use the correct
>>alignment for the cpu architecture in use is puzzling, since this is
>>something that one would normally expect to be correct by default.
>>You did not say what Operating System or CPU you are using ... this
>>is probably important information.  As is likely the version of GCC
>>(use gcc -v or musl-gcc -v to get the compiler's compile
>>configuration).

>The OS is 64bit Linux (Manjaro/Arch), the CPU is AMD A4-1200
>(supports almost all extensions), gcc version is 8.2.0;

>BTW, compiling with -O1 sometimes produces working result (but pretty
>slow) which only entagles the puzzle.

Interesting ... Sounds like the optimizer in the compiler is broken ... unless 
someone has ideas about how to debug this.  Can you compile with no 
optimization and SQLITE_DEBUG defined and see what happens?  Though, to me it 
sounds like the compiler and/or the optimizer is just broken (or perhaps the 
replacement standard library is broken and does not return properly aligned 
memory allocations) ... 

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.



>
>--
>John Found 
>___
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



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


Re: [sqlite] Problems with compiling SQLite for MUSL.

2018-09-02 Thread John Found
On Sun, 02 Sep 2018 14:18:50 -0600
"Keith Medcalf"  wrote:

> 
> This is a compiler issue and has nothing to do with SQLite3.  Anything you 
> compiled using that compiler would exhibit the same problems ...

Well, I was almost sure, but as long as here I can find people understanding 
gcc and I am compiling sqlite after all, 
considered a good place to ask. ;)

> However, that the compiler does not automatically use the correct alignment 
> for the cpu architecture in use is puzzling, since this is something that one 
> would normally expect to be correct by default.  You did not say what 
> Operating System or CPU you are using ... this is probably important 
> information.  As is likely the version of GCC (use gcc -v or musl-gcc -v to 
> get the compiler's compile configuration).

The OS is 64bit Linux (Manjaro/Arch), the CPU is AMD A4-1200 (supports almost 
all extensions), gcc version is 8.2.0;

BTW, compiling with -O1 sometimes produces working result (but pretty slow) 
which only entagles the puzzle.

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


Re: [sqlite] Problems with compiling SQLite for MUSL.

2018-09-02 Thread Keith Medcalf

This is a compiler issue and has nothing to do with SQLite3.  Anything you 
compiled using that compiler would exhibit the same problems ...

The source for SQLite3 does not change the default compiler packing or 
alignment, so whatever alignment the compiler thinks is appropriate is what 
gets used.  

That said, the packing overrides for GCC (they are however dependent on the 
target CPU, and there are a myriad of different options which vary by target 
CPU and how the compiler was built) are likely:

-fpack-struct=n (where n is in bytes)
-mstructure-size-boundary=b (where b is in bits)
-malign-double (presumably this means double-word boundaries, or 64-bits)

However, that the compiler does not automatically use the correct alignment for 
the cpu architecture in use is puzzling, since this is something that one would 
normally expect to be correct by default.  You did not say what Operating 
System or CPU you are using ... this is probably important information.  As is 
likely the version of GCC (use gcc -v or musl-gcc -v to get the compiler's 
compile configuration).

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of John Found
>Sent: Sunday, 2 September, 2018 12:18
>To: sqlite-users@mailinglists.sqlite.org
>Subject: [sqlite] Problems with compiling SQLite for MUSL.
>
>
>I am trying to compile SQLite with 32bit MUSL, but probably mess some
>compiler options.
>
>The command I am using is:
>
>musl-gcc -O3 -shared -fno-stack-protector -
>DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -
>DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_OMIT_DEPRECATED -D
>SQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -
>DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_FTS5 -DSQLITE_OMIT_COMPLETE -
>DSQLITE_OMIT_GET_TABLE -DSQLITE_OMIT_UTF16 -DSQLITE_THREADSAFE=1
>./sqlite3.c -o ./libsqlite3.so
>
>The code compiles without errors. The problem is that the code is
>compiled with SSE instructions, but in runtime crashes on reads and
>writes to unaligned memory addresses. In most cases the crashes are
>random, but mostly in sqlite3_prepare_v2 function;
>
>So, the question, how to make sqlite to compile with properly aligned
>variables in order to not crash. Is there some option about this (my
>gcc and generally C/C++ skills are pretty low) or I somehow messed
>the options elsewhere. Then what to check?
>
>
>--
>John Found 
>___
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



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


Re: [sqlite] Problems compiling FTS5 extension

2017-10-19 Thread Eugene Mirotin
Thanks for the tips!

Don't know about the segfault too but can ignore it for now — this same
file works well with the GUI app and with my Node.js program.

On Thu, Oct 19, 2017 at 6:38 PM Dan Kennedy  wrote:

> On 10/19/2017 08:40 PM, Eugene Mirotin wrote:
> > Hm, I think that's because the extension is already preloaded with my
> > version if sqlite. Which means I didn't even have to build it :)
> > But now is the question how would I reliably load / not load it in
> > production env if the target user may or may not have sqlite precompiled
> > with it?
>
> Right, it's an error to try to register a new version of a module -
> "fts5" in this case - that has already been registered.
>
> You could just assume that if the attempt to load fts5 dynamically fails
> it is already registered. Or you could try preparing the statement
> "SELECT fts5_source_id()" before loading the extension. If preparing the
> statement succeeds, fts5 is already present and you don't need to load it.
>
> Don't know why you might be getting the segfault.
>
> Dan.
>
>
> >
> > On Thu, Oct 19, 2017 at 3:30 PM Eugene Mirotin 
> wrote:
> >
> >> Well, now I have troubles loading this extension.
> >>
> >> I've built another one before, fts5stemmer.
> >>
> >> When using the CLI sqlite3 (version 3.20.1 from MacPorts):
> >>
> >> ❯ sqlite3
> >> SQLite version 3.20.1 2017-08-24 16:21:36
> >> Enter ".help" for usage hints.
> >> Connected to a transient in-memory database.
> >> Use ".open FILENAME" to reopen on a persistent database.
> >> sqlite> .load './fts5.dylib'
> >> Error: error during initialization:
> >> sqlite> .load './fts5stemmer.dylib'
> >> [1]35952 segmentation fault  sqlite3
> >>
> >> When using the GUI DB Browser for SQLite:
> >> fts5 extension reports the same error "Error: error during
> initialization:"
> >> fst5stemmer loads fine (or at least reports to)
> >>
> >> On Thu, Oct 19, 2017 at 3:09 PM Eugene Mirotin 
> wrote:
> >>
> >>> Thanks a lot Dan, that worked!
> >>> I'm fine with the trunk version for now but hope to see this in stable
> >>> eventually as I'll have to later build this extension for various
> platforms
> >>> for the release of my app.
> >>> Thanks again for the quick fix
> >>>
> >>> On Wed, Oct 18, 2017 at 6:06 PM Dan Kennedy 
> >>> wrote:
> >>>
>  On 10/18/2017 06:32 PM, Eugene Mirotin wrote:
> > In short the error I get is
> > fts5_storage.c:305:9: error: 'sqlite3_api_routines' has no member
> named
> > '__builtin___snprintf_chk'
> >
> > More details in SO question here:
> >
> 
> https://stackoverflow.com/questions/46793988/sqlite-trouble-building-fts5-loadable-extension
>  ,
> > please let me know if I should paste everything in my email.
> >
> > I've seen a similar problem reported before and somehow related to
>  XCode,
> > but that issue was reported to be fixed.
> >
> > Would be thankful for any tips, I haven't used C for years and have
> no
>  idea
> > where to start.
>  Please try with the latest trunk checkin:
> 
>  http://www.sqlite.org/src/info/cd0471ca9f75e7c8
> 
>  (click the "ZIP archive" link to download if you're not using fossil)
> 
>  To generate the sqlite3ext.h and sqlite3.h files required when
> compiling
>  fts5.c, run [make sqlite3.h sqlite3ext.h]. So, altogether, something
>  like:
> 
>  ./configure
>  make fts5.c sqlite3.h sqlite3ext.h
>  gcc -O2 -fPIC -shared fts5.c -o fts5.dylib
> 
>  Or, if you want to use a released version, after [make sqlite3ext.h]
>  replace the two instances of "snprintf" in the sqlite3ext.h with
>  "xsnprintf".
> 
>  Dan.
> 
> 
> 
> 
>  ___
>  sqlite-users mailing list
>  sqlite-users@mailinglists.sqlite.org
>  http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems compiling FTS5 extension

2017-10-19 Thread Dan Kennedy

On 10/19/2017 08:40 PM, Eugene Mirotin wrote:

Hm, I think that's because the extension is already preloaded with my
version if sqlite. Which means I didn't even have to build it :)
But now is the question how would I reliably load / not load it in
production env if the target user may or may not have sqlite precompiled
with it?


Right, it's an error to try to register a new version of a module - 
"fts5" in this case - that has already been registered.


You could just assume that if the attempt to load fts5 dynamically fails 
it is already registered. Or you could try preparing the statement 
"SELECT fts5_source_id()" before loading the extension. If preparing the 
statement succeeds, fts5 is already present and you don't need to load it.


Don't know why you might be getting the segfault.

Dan.




On Thu, Oct 19, 2017 at 3:30 PM Eugene Mirotin  wrote:


Well, now I have troubles loading this extension.

I've built another one before, fts5stemmer.

When using the CLI sqlite3 (version 3.20.1 from MacPorts):

❯ sqlite3
SQLite version 3.20.1 2017-08-24 16:21:36
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .load './fts5.dylib'
Error: error during initialization:
sqlite> .load './fts5stemmer.dylib'
[1]35952 segmentation fault  sqlite3

When using the GUI DB Browser for SQLite:
fts5 extension reports the same error "Error: error during initialization:"
fst5stemmer loads fine (or at least reports to)

On Thu, Oct 19, 2017 at 3:09 PM Eugene Mirotin  wrote:


Thanks a lot Dan, that worked!
I'm fine with the trunk version for now but hope to see this in stable
eventually as I'll have to later build this extension for various platforms
for the release of my app.
Thanks again for the quick fix

On Wed, Oct 18, 2017 at 6:06 PM Dan Kennedy 
wrote:


On 10/18/2017 06:32 PM, Eugene Mirotin wrote:

In short the error I get is
fts5_storage.c:305:9: error: 'sqlite3_api_routines' has no member named
'__builtin___snprintf_chk'

More details in SO question here:


https://stackoverflow.com/questions/46793988/sqlite-trouble-building-fts5-loadable-extension
,

please let me know if I should paste everything in my email.

I've seen a similar problem reported before and somehow related to

XCode,

but that issue was reported to be fixed.

Would be thankful for any tips, I haven't used C for years and have no

idea

where to start.

Please try with the latest trunk checkin:

http://www.sqlite.org/src/info/cd0471ca9f75e7c8

(click the "ZIP archive" link to download if you're not using fossil)

To generate the sqlite3ext.h and sqlite3.h files required when compiling
fts5.c, run [make sqlite3.h sqlite3ext.h]. So, altogether, something
like:

./configure
make fts5.c sqlite3.h sqlite3ext.h
gcc -O2 -fPIC -shared fts5.c -o fts5.dylib

Or, if you want to use a released version, after [make sqlite3ext.h]
replace the two instances of "snprintf" in the sqlite3ext.h with
"xsnprintf".

Dan.




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


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



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


Re: [sqlite] Problems compiling FTS5 extension

2017-10-19 Thread Eugene Mirotin
Hm, I think that's because the extension is already preloaded with my
version if sqlite. Which means I didn't even have to build it :)
But now is the question how would I reliably load / not load it in
production env if the target user may or may not have sqlite precompiled
with it?

On Thu, Oct 19, 2017 at 3:30 PM Eugene Mirotin  wrote:

> Well, now I have troubles loading this extension.
>
> I've built another one before, fts5stemmer.
>
> When using the CLI sqlite3 (version 3.20.1 from MacPorts):
>
> ❯ sqlite3
> SQLite version 3.20.1 2017-08-24 16:21:36
> Enter ".help" for usage hints.
> Connected to a transient in-memory database.
> Use ".open FILENAME" to reopen on a persistent database.
> sqlite> .load './fts5.dylib'
> Error: error during initialization:
> sqlite> .load './fts5stemmer.dylib'
> [1]35952 segmentation fault  sqlite3
>
> When using the GUI DB Browser for SQLite:
> fts5 extension reports the same error "Error: error during initialization:"
> fst5stemmer loads fine (or at least reports to)
>
> On Thu, Oct 19, 2017 at 3:09 PM Eugene Mirotin  wrote:
>
>> Thanks a lot Dan, that worked!
>> I'm fine with the trunk version for now but hope to see this in stable
>> eventually as I'll have to later build this extension for various platforms
>> for the release of my app.
>> Thanks again for the quick fix
>>
>> On Wed, Oct 18, 2017 at 6:06 PM Dan Kennedy 
>> wrote:
>>
>>> On 10/18/2017 06:32 PM, Eugene Mirotin wrote:
>>> > In short the error I get is
>>> > fts5_storage.c:305:9: error: 'sqlite3_api_routines' has no member named
>>> > '__builtin___snprintf_chk'
>>> >
>>> > More details in SO question here:
>>> >
>>> https://stackoverflow.com/questions/46793988/sqlite-trouble-building-fts5-loadable-extension
>>> ,
>>> > please let me know if I should paste everything in my email.
>>> >
>>> > I've seen a similar problem reported before and somehow related to
>>> XCode,
>>> > but that issue was reported to be fixed.
>>> >
>>> > Would be thankful for any tips, I haven't used C for years and have no
>>> idea
>>> > where to start.
>>>
>>> Please try with the latest trunk checkin:
>>>
>>>http://www.sqlite.org/src/info/cd0471ca9f75e7c8
>>>
>>> (click the "ZIP archive" link to download if you're not using fossil)
>>>
>>> To generate the sqlite3ext.h and sqlite3.h files required when compiling
>>> fts5.c, run [make sqlite3.h sqlite3ext.h]. So, altogether, something
>>> like:
>>>
>>>./configure
>>>make fts5.c sqlite3.h sqlite3ext.h
>>>gcc -O2 -fPIC -shared fts5.c -o fts5.dylib
>>>
>>> Or, if you want to use a released version, after [make sqlite3ext.h]
>>> replace the two instances of "snprintf" in the sqlite3ext.h with
>>> "xsnprintf".
>>>
>>> Dan.
>>>
>>>
>>>
>>>
>>> ___
>>> sqlite-users mailing list
>>> sqlite-users@mailinglists.sqlite.org
>>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>>
>>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems compiling FTS5 extension

2017-10-19 Thread Eugene Mirotin
Well, now I have troubles loading this extension.

I've built another one before, fts5stemmer.

When using the CLI sqlite3 (version 3.20.1 from MacPorts):

❯ sqlite3
SQLite version 3.20.1 2017-08-24 16:21:36
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .load './fts5.dylib'
Error: error during initialization:
sqlite> .load './fts5stemmer.dylib'
[1]35952 segmentation fault  sqlite3

When using the GUI DB Browser for SQLite:
fts5 extension reports the same error "Error: error during initialization:"
fst5stemmer loads fine (or at least reports to)

On Thu, Oct 19, 2017 at 3:09 PM Eugene Mirotin  wrote:

> Thanks a lot Dan, that worked!
> I'm fine with the trunk version for now but hope to see this in stable
> eventually as I'll have to later build this extension for various platforms
> for the release of my app.
> Thanks again for the quick fix
>
> On Wed, Oct 18, 2017 at 6:06 PM Dan Kennedy  wrote:
>
>> On 10/18/2017 06:32 PM, Eugene Mirotin wrote:
>> > In short the error I get is
>> > fts5_storage.c:305:9: error: 'sqlite3_api_routines' has no member named
>> > '__builtin___snprintf_chk'
>> >
>> > More details in SO question here:
>> >
>> https://stackoverflow.com/questions/46793988/sqlite-trouble-building-fts5-loadable-extension
>> ,
>> > please let me know if I should paste everything in my email.
>> >
>> > I've seen a similar problem reported before and somehow related to
>> XCode,
>> > but that issue was reported to be fixed.
>> >
>> > Would be thankful for any tips, I haven't used C for years and have no
>> idea
>> > where to start.
>>
>> Please try with the latest trunk checkin:
>>
>>http://www.sqlite.org/src/info/cd0471ca9f75e7c8
>>
>> (click the "ZIP archive" link to download if you're not using fossil)
>>
>> To generate the sqlite3ext.h and sqlite3.h files required when compiling
>> fts5.c, run [make sqlite3.h sqlite3ext.h]. So, altogether, something like:
>>
>>./configure
>>make fts5.c sqlite3.h sqlite3ext.h
>>gcc -O2 -fPIC -shared fts5.c -o fts5.dylib
>>
>> Or, if you want to use a released version, after [make sqlite3ext.h]
>> replace the two instances of "snprintf" in the sqlite3ext.h with
>> "xsnprintf".
>>
>> Dan.
>>
>>
>>
>>
>> ___
>> sqlite-users mailing list
>> sqlite-users@mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems compiling FTS5 extension

2017-10-19 Thread Eugene Mirotin
Thanks a lot Dan, that worked!
I'm fine with the trunk version for now but hope to see this in stable
eventually as I'll have to later build this extension for various platforms
for the release of my app.
Thanks again for the quick fix

On Wed, Oct 18, 2017 at 6:06 PM Dan Kennedy  wrote:

> On 10/18/2017 06:32 PM, Eugene Mirotin wrote:
> > In short the error I get is
> > fts5_storage.c:305:9: error: 'sqlite3_api_routines' has no member named
> > '__builtin___snprintf_chk'
> >
> > More details in SO question here:
> >
> https://stackoverflow.com/questions/46793988/sqlite-trouble-building-fts5-loadable-extension
> ,
> > please let me know if I should paste everything in my email.
> >
> > I've seen a similar problem reported before and somehow related to XCode,
> > but that issue was reported to be fixed.
> >
> > Would be thankful for any tips, I haven't used C for years and have no
> idea
> > where to start.
>
> Please try with the latest trunk checkin:
>
>http://www.sqlite.org/src/info/cd0471ca9f75e7c8
>
> (click the "ZIP archive" link to download if you're not using fossil)
>
> To generate the sqlite3ext.h and sqlite3.h files required when compiling
> fts5.c, run [make sqlite3.h sqlite3ext.h]. So, altogether, something like:
>
>./configure
>make fts5.c sqlite3.h sqlite3ext.h
>gcc -O2 -fPIC -shared fts5.c -o fts5.dylib
>
> Or, if you want to use a released version, after [make sqlite3ext.h]
> replace the two instances of "snprintf" in the sqlite3ext.h with
> "xsnprintf".
>
> Dan.
>
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems compiling FTS5 extension

2017-10-18 Thread Dan Kennedy

On 10/18/2017 06:32 PM, Eugene Mirotin wrote:

In short the error I get is
fts5_storage.c:305:9: error: 'sqlite3_api_routines' has no member named
'__builtin___snprintf_chk'

More details in SO question here:
https://stackoverflow.com/questions/46793988/sqlite-trouble-building-fts5-loadable-extension,
please let me know if I should paste everything in my email.

I've seen a similar problem reported before and somehow related to XCode,
but that issue was reported to be fixed.

Would be thankful for any tips, I haven't used C for years and have no idea
where to start.


Please try with the latest trunk checkin:

  http://www.sqlite.org/src/info/cd0471ca9f75e7c8

(click the "ZIP archive" link to download if you're not using fossil)

To generate the sqlite3ext.h and sqlite3.h files required when compiling 
fts5.c, run [make sqlite3.h sqlite3ext.h]. So, altogether, something like:


  ./configure
  make fts5.c sqlite3.h sqlite3ext.h
  gcc -O2 -fPIC -shared fts5.c -o fts5.dylib

Or, if you want to use a released version, after [make sqlite3ext.h] 
replace the two instances of "snprintf" in the sqlite3ext.h with 
"xsnprintf".


Dan.




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


Re: [sqlite] Problems uploading CSV into sqlite3 DB

2014-09-09 Thread Simon Slavin

On 10 Sep 2014, at 3:45am, Carlos A. Gorricho (HGSAS) 
 wrote:

> The problem was a field with a very long blank string, something like 40
> space-characters.

Was this value correctly delimited with quotes, or was it just 40 spaces 
between two commas separating the fields ?

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


Re: [sqlite] Problems uploading CSV into sqlite3 DB

2014-09-05 Thread RSmith

Humour us and paste the first 4 lines or so of your CSV text here


On 2014/09/05 04:17, Carlos A. Gorricho (HGSAS) wrote:

So, any ideas on how to solve this issue will be more than welcome. I have
tried several shortcuts...none works.

Latest was to install an Ubuntu 14.04 Virtual Machine on my Mac, via
Parallels software.

Downloaded sqlite de Linux way:

$ sudo apt-get install sqlite3


Ran the CSV .import protocol and didn't work Result was eve weirder, since
it create a table using ALL the records as columns headers...



Saludos/Cheers,



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


Re: [sqlite] Problems uploading CSV into sqlite3 DB

2014-09-04 Thread David Empson
I get similar results on OS X 10.9.4 if I try to use the version of SQLite 
supplied with the operating system (3.7.13) to import a CSV.

The simple ".mode csv" and ".import  tab1" method works if I run the 
copy of SQLite 3.8.5 I built myself from the source code, or if I use the Mac 
OS X precompiled SQLite 3.8.5 shell from the web site. (I prefer to build my 
own copy because the one on the web site doesn't include the readline library, 
so if used interactively it can't recall previous command lines with up-arrow.)

The problem is likely to be that the method you are using to launch sqlite3, 
which is using the system's default search path to locate sqlite3, and that 
will be the Apple-supplied version (3.7.13) which is located at 
/usr/bin/sqlite3. It appears that version doesn't import CSVs properly.

The easiest way to avoid the problem is to specify the path to your downloaded 
copy of sqlite3.

Assuming you have put the downloaded sqlite3 in your Applications folder, then 
to run it from Terminal you can use this command:

$ /Applications/sqlite3 newDB.db < my_script_file

On 4/09/2014, at 3:24 am, Carlos A. Gorricho (HGSAS) 
 wrote:

> ​When I start sqlite double clicking the icon in the Mac Applications
> folder:
> 
> Last login: Wed Sep  3 10:13:32 on ttys000
> 
> HEPTAGON-GROUP-SAS:~ carlosgorricho$ /Applications/sqlite3 ; exit;
> 
> SQLite version 3.8.5 2014-06-04 14:06:34
> 
> Enter ".help" for usage hints.
> 
> Connected to a *transient in-memory database*.
> 
> Use ".open FILENAME" to reopen on a persistent database.
> 
> sqlite>
> 
> ​
> When starting sqlite on a Terminal Window:
> 
> Last login: Wed Sep  3 10:11:42 on ttys002
> 
> HEPTAGON-GROUP-SAS:~ carlosgorricho$ sqlite3
> 
> SQLite version 3.7.13 2012-07-17 17:46:21
> 
> Enter ".help" for instructions
> 
> Enter SQL statements terminated with a ";"
> 
> sqlite>
> 
> 
> I downloaded the only precompile binary currently available for Mac in
> www.sqlite.org website.
> 
> To perform the job described earlier, I run the Terminal version in batch
> mode. That is, I created a script file with all the .commands to upload de
> CSV file, and ran it on a new database:
> 
> $ sqlite3 newDB.db < my_script_file
> 
> 
> When I got the tab1 error message, I reverted to performing the job from
> inside the database, creating first the table and then uploading the data.
> The result was the huge single-record-field DB I shared earlier.
> 
> I would venture to say I did this from the Terminal sqlite version, but I
> am not certain...
> 
> Thanks in advance for your comments and guidance. Please let me know if I
> can do anything to help you in other fronts.
> 
> 
> 
> 
> Saludos/Cheers,

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


Re: [sqlite] Problems uploading CSV into sqlite3 DB

2014-09-04 Thread Nelson, Erik - 2
Carlos A. Gorricho (HGSAS) wrote on Friday, September 05, 2014 4:17 AM

>So, any ideas on how to solve this issue will be more than welcome. I have 
>tried several shortcuts...none works.
>Latest was to install an Ubuntu 14.04 Virtual Machine on my Mac, via Parallels 
>software.
>

Maybe line endings...

--
This message, and any attachments, is for the intended recipient(s) only, may 
contain information that is privileged, confidential and/or proprietary and 
subject to important terms and conditions available at 
http://www.bankofamerica.com/emaildisclaimer.   If you are not the intended 
recipient, please delete this message.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems uploading CSV into sqlite3 DB

2014-09-04 Thread Carlos A. Gorricho (HGSAS)
So, any ideas on how to solve this issue will be more than welcome. I have
tried several shortcuts...none works.

Latest was to install an Ubuntu 14.04 Virtual Machine on my Mac, via
Parallels software.

Downloaded sqlite de Linux way:

$ sudo apt-get install sqlite3


Ran the CSV .import protocol and didn't work Result was eve weirder, since
it create a table using ALL the records as columns headers...



Saludos/Cheers,


*CARLOS A. GORRICHO*
Managing Partner
Heptagon Group S.A.S.
cgorri...@heptagongroup.co
Cel COL +57 314 771 0660
Cell USA +1 713 574 2242


2014-09-03 10:24 GMT-05:00 Carlos A. Gorricho (HGSAS) <
cgorri...@heptagongroup.co>:

> ​When I start sqlite double clicking the icon in the Mac Applications
> folder:
>
> Last login: Wed Sep  3 10:13:32 on ttys000
>
> HEPTAGON-GROUP-SAS:~ carlosgorricho$ /Applications/sqlite3 ; exit;
>
> SQLite version 3.8.5 2014-06-04 14:06:34
>
> Enter ".help" for usage hints.
>
> Connected to a *transient in-memory database*.
>
> Use ".open FILENAME" to reopen on a persistent database.
>
> sqlite>
>
> ​
> When starting sqlite on a Terminal Window:
>
> Last login: Wed Sep  3 10:11:42 on ttys002
>
> HEPTAGON-GROUP-SAS:~ carlosgorricho$ sqlite3
>
> SQLite version 3.7.13 2012-07-17 17:46:21
>
> Enter ".help" for instructions
>
> Enter SQL statements terminated with a ";"
>
> sqlite>
>
>
> I downloaded the only precompile binary currently available for Mac in
> www.sqlite.org website.
>
> To perform the job described earlier, I run the Terminal version in batch
> mode. That is, I created a script file with all the .commands to upload de
> CSV file, and ran it on a new database:
>
> $ sqlite3 newDB.db < my_script_file
>
>
> When I got the tab1 error message, I reverted to performing the job from
> inside the database, creating first the table and then uploading the data.
> The result was the huge single-record-field DB I shared earlier.
>
> I would venture to say I did this from the Terminal sqlite version, but I
> am not certain...
>
> Thanks in advance for your comments and guidance. Please let me know if I
> can do anything to help you in other fronts.
>
>
>
>
> Saludos/Cheers,
>
>
> *CARLOS A. GORRICHO*
> Managing Partner
> Heptagon Group S.A.S.
> cgorri...@heptagongroup.co
> Cel COL +57 314 771 0660
> Cell USA +1 713 574 2242
>
>
> 2014-09-03 9:25 GMT-05:00 Simon Slavin :
>
>
>> On 3 Sep 2014, at 1:51pm, Richard Hipp  wrote:
>>
>> > What version of SQLite is installed?
>>
>> Or rather, when you start the shell tool 'sqlite3' what version does it
>> report itself as ?
>>
>> Simon.
>> ___
>> 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] Problems uploading CSV into sqlite3 DB

2014-09-03 Thread Carlos A. Gorricho (HGSAS)
​When I start sqlite double clicking the icon in the Mac Applications
folder:

Last login: Wed Sep  3 10:13:32 on ttys000

HEPTAGON-GROUP-SAS:~ carlosgorricho$ /Applications/sqlite3 ; exit;

SQLite version 3.8.5 2014-06-04 14:06:34

Enter ".help" for usage hints.

Connected to a *transient in-memory database*.

Use ".open FILENAME" to reopen on a persistent database.

sqlite>

​
When starting sqlite on a Terminal Window:

Last login: Wed Sep  3 10:11:42 on ttys002

HEPTAGON-GROUP-SAS:~ carlosgorricho$ sqlite3

SQLite version 3.7.13 2012-07-17 17:46:21

Enter ".help" for instructions

Enter SQL statements terminated with a ";"

sqlite>


I downloaded the only precompile binary currently available for Mac in
www.sqlite.org website.

To perform the job described earlier, I run the Terminal version in batch
mode. That is, I created a script file with all the .commands to upload de
CSV file, and ran it on a new database:

$ sqlite3 newDB.db < my_script_file


When I got the tab1 error message, I reverted to performing the job from
inside the database, creating first the table and then uploading the data.
The result was the huge single-record-field DB I shared earlier.

I would venture to say I did this from the Terminal sqlite version, but I
am not certain...

Thanks in advance for your comments and guidance. Please let me know if I
can do anything to help you in other fronts.




Saludos/Cheers,


*CARLOS A. GORRICHO*
Managing Partner
Heptagon Group S.A.S.
cgorri...@heptagongroup.co
Cel COL +57 314 771 0660
Cell USA +1 713 574 2242


2014-09-03 9:25 GMT-05:00 Simon Slavin :

>
> On 3 Sep 2014, at 1:51pm, Richard Hipp  wrote:
>
> > What version of SQLite is installed?
>
> Or rather, when you start the shell tool 'sqlite3' what version does it
> report itself as ?
>
> Simon.
> ___
> 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] Problems uploading CSV into sqlite3 DB

2014-09-03 Thread Simon Slavin

On 3 Sep 2014, at 1:51pm, Richard Hipp  wrote:

> What version of SQLite is installed?

Or rather, when you start the shell tool 'sqlite3' what version does it report 
itself as ?

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


Re: [sqlite] Problems with INT columns

2014-04-29 Thread Simon Slavin

On 29 Apr 2014, at 10:15am, Kleiner Werner  wrote:

> If I understand the SQLite Docu correct there is no difference between INT or 
> INTEGER, except if you use a column as Primary Autoincrement.
> I thought an Int column in SQLite is always 64bit integer, but why does the 
> SQLiteDatareader does it recognize as integer 32?

The problem is not inside SQLite itself.  As far as SQLite is concerned INT and 
INTEGER are treated identically.  You can verify this for yourself by doing

SELECT myColumn, typeof(myColumn) FROM myTable LIMIT 1

Both versions of your database should return exactly the string 'integer' for 
the type.  If they don't please post again because I'd love to see it.

The problem must lie in your interface to SQLite, which is probably 
SQLiteDatareader itself.  I suspect that the problem is somewhere in or around

private SQLiteType GetSQLiteType(int i)

which is on line 965 of



but I don't know c# well enough to get any closer.  From what I can see, 
though, it assumes that SQLite has column types which is, of course, not true.

> What is the difference if I declare a column as bigint or int?

In SQLite, none.  As you correctly understood from section 2.2 of



both pieces of text are actually interpreted as meaning "INTEGER".  However, it 
looks like SQLiteDataReader does things differently.

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


Re: [sqlite] Problems with executereader in System.Data.SQLite

2014-04-15 Thread Simon Slavin

On 15 Apr 2014, at 10:14am, Ralf  wrote:

> Yes. Everything is Working as expected when i access the DB with any Browser. 
> It is just the powershell environment

Then the chances are that the problem is with PowerShell, not SQLite.

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


Re: [sqlite] Problems with executereader in System.Data.SQLite

2014-04-15 Thread Ralf
On 15. April 2014 09:46:43 MESZ, Joe Mistachkin  wrote:
>
>Ralf wrote:
>>
>> I just tried... No change :-(
>>
>
>Have you looked at the contents of the database using the SQLite
>command
>line tool for Windows?
>
>   https://www.sqlite.org/2014/sqlite-shell-win32-x86-3080403.zip
>
>--
>Joe Mistachkin
>
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Yes. Everything is Working as expected when i access the DB with any Browser. 
It is just the powershell environment
-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems with executereader in System.Data.SQLite

2014-04-15 Thread Joe Mistachkin

Ralf wrote:
>
> I just tried... No change :-(
>

Have you looked at the contents of the database using the SQLite command
line tool for Windows?

https://www.sqlite.org/2014/sqlite-shell-win32-x86-3080403.zip

--
Joe Mistachkin

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


Re: [sqlite] Problems with executereader in System.Data.SQLite

2014-04-15 Thread Ralf
On 15. April 2014 01:55:40 MESZ, Joe Mistachkin  wrote:
>
>Ralf Jantschek wrote:
>>
>> The connection as such is ok. Updates are working. It is only the
>> executereader that is troubling me
>>
> 
>For database files that need a UNC path, four leading backslashes are
>required.
>
>Without them, some things may appear to work correctly; however, it
>might
>also
>exhibit the type of behavior you are seeing.
>
>Please try using the four leading backslashes and let us know the
>outcome.
>
>--
>Joe Mistachkin
>
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

I just tried... No change :-(
-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems with executereader in System.Data.SQLite

2014-04-14 Thread Joe Mistachkin

Ralf Jantschek wrote:
>
> The connection as such is ok. Updates are working. It is only the
> executereader that is troubling me
>
 
For database files that need a UNC path, four leading backslashes are
required.

Without them, some things may appear to work correctly; however, it might
also
exhibit the type of behavior you are seeing.

Please try using the four leading backslashes and let us know the outcome.

--
Joe Mistachkin

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


Re: [sqlite] Problems with executereader in System.Data.SQLite

2014-04-14 Thread Ralf Jantschek
The connection as such is ok. Updates are working. It is only the
executereader that is troubling me

> -Ursprüngliche Nachricht-
> Von: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] Im Auftrag von Joe Mistachkin
> Gesendet: Montag, 14. April 2014 20:36
> An: 'General Discussion of SQLite Database'
> Betreff: Re: [sqlite] Problems with executereader in System.Data.SQLite
> 
> 
> Ralf Jantschek wrote:
> >
> >$cn.ConnectionString = "Data Source=\\..."
> >
> 
> If you are opening a database on a network share, there must now be
> four leading backslashes.
> 
> --
> Joe Mistachkin
> 
> ___
> 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] Problems with executereader in System.Data.SQLite

2014-04-14 Thread Joe Mistachkin

Ralf Jantschek wrote:
>
>$cn.ConnectionString = "Data Source=\\..."
>

If you are opening a database on a network share, there must now be four
leading
backslashes.

--
Joe Mistachkin

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


Re: [sqlite] Problems with executereader in System.Data.SQLite

2014-04-14 Thread Ralf Jantschek
Hi,
sorry for the delay.
Here is the Info

Table definition:
CREATE TABLE next_key (max_key NUMERIC, next_key NUMERIC);
 
Snippet>>>>>>>>>>>>>>>>>>>>>>>>>
try{
[void][System.Reflection.Assembly]::LoadFrom("D:\Program
Files\System.Data.SQLite\2008\bin\x32\System.Data.SQLite.dll")
}
catch
{
[void][System.Reflection.Assembly]::LoadFrom("C:\Program
Files\System.Data.SQLite\2008\bin\x32\System.Data.SQLite.dll")
}   
$template = $listbox2.text
$cn = New-Object -TypeName System.Data.SQLite.SQLiteConnection
$cn.ConnectionString = "Data Source=\\..."
$cn.Open()
#
$cm = New-Object -TypeName System.Data.SQLite.SQLiteCommand
$sql = "SELECT * FROM next_key"
$cm.Connection = $cn
#$cm1.connection = $cn
$cm.CommandText = $sql
$dr = $cm.ExecuteReader()
while($dr.read()){
$max_key = $dr.getint32(0)
$current_key = $dr.getint32(1)
if ($current_key -eq $max_key) {
$next_key = 1
}
else {
$next_key = $current_key + 1
}
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

> -Ursprüngliche Nachricht-
> Von: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] Im Auftrag von Joe Mistachkin
> Gesendet: Freitag, 11. April 2014 21:02
> An: 'General Discussion of SQLite Database'
> Betreff: Re: [sqlite] Problems with executereader in System.Data.SQLite
> 
> 
> Ralf Jantschek wrote:
> >
> > I have the following table:
> >
> > Table:
> >
> > Field1Field2
> >
> > 12
> >
> 
> Could you please show the schema for the table involved in this query?
> 
> >
> > I am trying to access the values with
> >
> > "Select * from table;"
> >
> > But the select doesn't return "1 2" as expected, it returns the
> > FieldCount which is 2
> >
> > I  am accessing SQlite in a powershell script
> >
> 
> Could you also please show the PowerShell script that is being used to
> load the System.Data.SQLite assembly and to execute the query?
> 
> --
> Joe Mistachkin
> 
> ___
> 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] Problems with executereader in System.Data.SQLite

2014-04-11 Thread Joe Mistachkin

Ralf Jantschek wrote:
>
> I have the following table:
> 
> Table:
> 
> Field1Field2
> 
> 12
> 

Could you please show the schema for the table involved in this query?

>  
> I am trying to access the values with 
> 
> "Select * from table;"
>  
> But the select doesn't return "1 2" as expected, it returns the FieldCount
> which is 2
> 
> I  am accessing SQlite in a powershell script
> 

Could you also please show the PowerShell script that is being used to load
the System.Data.SQLite assembly and to execute the query?

--
Joe Mistachkin

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


Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command

2013-01-03 Thread Marco ten Thije

On 12/21/2012 05:18 PM, Dan Kennedy wrote:


Thanks. I think it's this:

  http://www.sqlite.org/src/info/0cfd98ee20

Dan.
You are right. I have been re-reading our mail thread and this is 
exactly what happens. I have build a SQLite
version from the latest version in the archive (3.7.16) and this version 
creates a correct backup.


Thanks for the fix.

--
Regards,
Marco ten Thije
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command

2013-01-02 Thread Marco ten Thije



On 01/02/2013 11:03 AM, Marco ten Thije wrote:

On 01/02/2013 10:04 AM, Dan Kennedy wrote:

What series of commands did you pass to 3.7.5 to create
this file?
This file was copied from an existing product which uses QT 4.7 
libraries to populate the database. I cannot
reproduce the exact commands which resulted in this file, because it 
is populated dynamically by the

software.

I found out that QT 4.7 is using the 3.6.19 SQLite library. The 
databases were created using the 3.7.5 version,
so you were right about this. The database is created with a 3.7.5 
version and populated with 3.6.19


I did some more testing and found out that the backup database which 
SQLite 3.7.5 reports to be corrupted, is
reported OK by SQLite 3.6.19, although this backup was created by the 
3.7.5 SQLite version.


I created a ASCII dump (using the .dump command) of the backup database 
using 3.6.19 and this dump is
identical (except for the 'PRAGMA foreign_keys=OFF') to a dump of the 
original database.


So it looks like SQLITE 3.7.5 and 3.7.15.1 (and probably all versions in 
between) have a problem reading the backup file,

while 3.6.19 can read it.

I have stored a copy of the original database on 
http://www.cbbio.nl/sqlite/energy.sqlite for further analysing


Regards,

Marco ten Thije


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


Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command

2013-01-02 Thread Marco ten Thije

On 01/02/2013 10:04 AM, Dan Kennedy wrote:

What series of commands did you pass to 3.7.5 to create
this file?
This file was copied from an existing product which uses QT 4.7 
libraries to populate the database. I cannot
reproduce the exact commands which resulted in this file, because it is 
populated dynamically by the

software.

I found out that QT 4.7 is using the 3.6.19 SQLite library. The 
databases were created using the 3.7.5 version,
so you were right about this. The database is created with a 3.7.5 
version and populated with 3.6.19



Perhaps there is a bug in 3.7.5 causing this. What happens
if you use 3.7.15 to create the original and do the backup?
I have recreated the database using a dump from the original database. I 
have created database using
this dump with both 3.7.5 (on a ARM9 platform) and 3.7.15.1 (on Intel). 
To my surprise this resulted in quite
different files. The one created with 3.7.5 is 125952 bytes in size, the 
3.7.15.1 is 116736 bytes in size.


These are the first 100 bytes in hex of both files:

3.7.5:
000 5153 694c 6574 6620 726f 616d 2074 0033
010 0004 0101 4000 2020  0100  7b00
020      0300  0100
030      0100  
040        
050        0100
060 2d00 1de2 000d  0004 00e3 7202 2002
070 7301 e300      
080        

3.7.15.1:
000 5153 694c 6574 6620 726f 616d 2074 0033
010 0004 0101 4000 2020  0100  7200
020      0300  0400
030      0100  
040        
050        0100
060 2d00 27e2 000d  0004 00e3 7202 2002
070 7301 e300      
080        

The created database files are both different from the one created with 
the .backup command. Both are reporting
'ok' with 'pragma integrity_check;'. The one created with .backup report 
errors:


*** in database main ***
Main freelist: invalid page number 151
On tree page 10 cell 10: invalid page number 154
On tree page 10 cell 10: Child page depth differs
On tree page 10 cell 11: invalid page number 145
On tree page 10 cell 12: Child page depth differs
On tree page 10 cell 13: invalid page number 120
On tree page 10 cell 13: Child page depth differs
On tree page 10 cell 14: invalid page number 121
On tree page 10 cell 15: invalid page number 152
On tree page 10 cell 16: Child page depth differs
On tree page 10 cell 18: invalid page number 157
On tree page 10 cell 18: Child page depth differs
On tree page 10 cell 19: invalid page number 153
On tree page 10 cell 20: Child page depth differs
On tree page 10 cell 21: invalid page number 141
On tree page 10 cell 21: Child page depth differs
On tree page 10 cell 22: Child page depth differs
On tree page 10 cell 53: invalid page number 132
On tree page 10 cell 53: Child page depth differs
On tree page 10 cell 54: Child page depth differs
On tree page 11 cell 0: invalid page number 143
On tree page 11 cell 1: invalid page number 129
On tree page 11 cell 2: Child page depth differs
On tree page 11 cell 4: invalid page number 125
On tree page 11 cell 4: Child page depth differs
On tree page 11 cell 5: Child page depth differs
On tree page 11 cell 9: invalid page number 122
On tree page 11 cell 9: Child page depth differs
On tree page 11 cell 10: Child page depth differs
On tree page 11 cell 11: invalid page number 119
On tree page 11 cell 11: Child page depth differs
On tree page 11 cell 12: Child page depth differs
On tree page 11 cell 18: invalid page number 128
On tree page 11 cell 18: Child page depth differs
On tree page 11 cell 19: invalid page number 149
On tree page 11 cell 20: Child page depth differs
On tree page 11 cell 24: invalid page number 123
On tree page 11 cell 24: Child page depth differs
On tree page 11 cell 25: Child page depth differs
On tree page 11 cell 28: invalid page number 139
On tree page 11 cell 28: Child page depth differs
On tree page 11 cell 29: Child page depth differs
On tree page 11 cell 36: invalid page number 137
On tree page 11 cell 36: Child page depth differs
On tree page 11 cell 37: invalid page number 156
On tree page 11 cell 38: invalid page number 147
On tree page 11 cell 39: invalid page number 146
On tree page 11 cell 40: Child page depth differs
On tree page 11 cell 44: invalid page number 155
On tree page 11 cell 44: Child page depth differs
On tree page 11 cell 45: Child page depth differs
On tree page 11 cell 53: invalid page number 136
On tree page 11 cell 53: Child page depth differs
On tree page 11 cell 54: Child page depth differs
On page 11 at right child: invalid page number 138
Page 32 is never used
Page 41 is never used
Page 46 is never used
Page 48 is never used
Page 51 is never used
Page 53 is never used
Page 

Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command

2013-01-02 Thread Dan Kennedy

On 01/02/2013 03:27 PM, Marco ten Thije wrote:

On 12/21/2012 05:18 PM, Dan Kennedy wrote:

Thanks. I think it's this:

http://www.sqlite.org/src/info/0cfd98ee20

Dan.

Thanks. I have looked into ticket, but we also see this problem when the
backup is written and read by the
same SQLite version (3.7.5).

I have recreated a backup using the 3.7.5 version. These are the
hexdumps of both the original file and
the backup created with SQLite 3.7.5:

The original file:

000 5153 694c 6574 6620 726f 616d 2074 0033
010 0004 0101 4000 2020  f1d0  7600
020  9700  2100  0300  0100
030      0100  
040        
050        0200
060 2d00 1de2 000d  0004 00e3 7202 2002
070 7301 e300      
080        


What series of commands did you pass to 3.7.5 to create
this file?

That the change counters at byte offsets 24 and 92 are
different makes this file look like it was created using
3.7.5 and then populated using an older version.

Perhaps there is a bug in 3.7.5 causing this. What happens
if you use 3.7.15 to create the original and do the backup?

Dan.

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


Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command

2013-01-02 Thread Marco ten Thije

On 12/21/2012 05:18 PM, Dan Kennedy wrote:

Thanks. I think it's this:

  http://www.sqlite.org/src/info/0cfd98ee20

Dan.
Thanks. I have looked into ticket, but we also see this problem when the 
backup is written and read by the

same SQLite version (3.7.5).

I have recreated a backup using the 3.7.5 version. These are the 
hexdumps of both the original file and

the backup created with SQLite 3.7.5:

The original file:

000 5153 694c 6574 6620 726f 616d 2074 0033
010 0004 0101 4000 2020  f1d0  7600
020  9700  2100  0300  0100
030      0100  
040        
050        0200
060 2d00 1de2 000d  0004 00e3 7202 2002
070 7301 e300      
080        

The backup created with SQLite 3.7.5:

000 5153 694c 6574 6620 726f 616d 2074 0033
010 0004 0101 4000 2020  0100  7600
020  9700  2100  0100  0100
030      0100  
040        
050        0100
060 2d00 1de2 000d  0004 00e3 7202 2002
070 7301 e300      
080        

--
Regards,
Marco ten Thije
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command

2012-12-21 Thread Dan Kennedy

On 12/21/2012 10:54 PM, Marco ten Thije wrote:



What is the size of the two database files?

The size of both files is 160768 bytes.


Also, can we have the first 6 lines of each hex dump
(i.e. enough to see the first 100 bytes)?

The first bytes of the original database:

000 5153 694c 6574 6620 726f 616d 2074 0033
010 0004 0101 4000 2020  f1d0  7600
020  9700  2100  0300  0100
030      0100  
040        
050        0200
060 2d00 1de2 000d  0004 00e3 7202 2002
070 7301 e300      
080        

The first bytes of the backup database:

000 5153 694c 6574 6620 726f 616d 2074 0033
010 0004 0101 4000 2020  0100  7600
020  9700  2100  0100  0100
030      0100  
040        
050        0100
060 2d00 27e2 000d  0004 00e3 7202 2002
070 7301 e300      
080        


Thanks. I think it's this:

  http://www.sqlite.org/src/info/0cfd98ee20

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


Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command

2012-12-21 Thread Marco ten Thije



What is the size of the two database files?

The size of both files is 160768 bytes.


Also, can we have the first 6 lines of each hex dump
(i.e. enough to see the first 100 bytes)?

The first bytes of the original database:

000 5153 694c 6574 6620 726f 616d 2074 0033
010 0004 0101 4000 2020  f1d0  7600
020  9700  2100  0300  0100
030      0100  
040        
050        0200
060 2d00 1de2 000d  0004 00e3 7202 2002
070 7301 e300      
080        

The first bytes of the backup database:

000 5153 694c 6574 6620 726f 616d 2074 0033
010 0004 0101 4000 2020  0100  7600
020  9700  2100  0100  0100
030      0100  
040        
050        0100
060 2d00 27e2 000d  0004 00e3 7202 2002
070 7301 e300      
080        

I can send the binary database, but the mailinglist strips the attachments.

Best regards,

Marco ten Thije



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


Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command

2012-12-21 Thread Dan Kennedy

On 12/21/2012 08:46 PM, Marco ten Thije wrote:

It returns 'ok':

./sqlite3 energy.sqlite
SQLite version 3.7.15.1 2012-12-19 20:39:10
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> pragma integrity_check;
ok
sqlite>

So, the original database looks ok.

I have compared the two databases (original and backup) and they
only differ in a few bytes in the header. The sizes match.

This is a diff between the hexdumps of both databases:

diff energy.hex backup.hex


What is the size of the two database files?

Also, can we have the first 6 lines of each hex dump
(i.e. enough to see the first 100 bytes)?

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


Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command

2012-12-21 Thread Marco ten Thije

It returns 'ok':

./sqlite3 energy.sqlite
SQLite version 3.7.15.1 2012-12-19 20:39:10
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> pragma integrity_check;
ok
sqlite>

So, the original database looks ok.

I have compared the two databases (original and backup) and they
only differ in a few bytes in the header. The sizes match.

This is a diff between the hexdumps of both databases:

 diff energy.hex backup.hex
2,3c2,3
< 010 0004 0101 4000 2020  f1d0  7600
< 020  9700  2100  0300  0100
---
> 010 0004 0101 4000 2020  0100  7600
> 020  9700  2100  0100  0100
6,7c6,7
< 050        0200
< 060 2d00 1de2 000d  0004 00e3 7202 2002
---
> 050        0100
> 060 2d00 27e2 000d  0004 00e3 7202 2002



On 12/21/2012 02:34 PM, Eric Minbiole wrote:

Can you please try running "pragma integrity_check;" on the original
database?  That will give an indication of whether the original database
has any data corruption.


On Fri, Dec 21, 2012 at 4:13 AM, Marco ten Thije<
marco.tenth...@usetechnology.nl>  wrote:


Hello,

We are facing a problem with the '.backup' command using the SQLite
command line interface. The resulting backup-database seems to be corrupt.

We ran into this problem on a ARM9 platform using SQLite 3.7.5, but it can
also be reproduced on the latest 3.7.15.1 version on Intel.

I have attached our database to this email.  These are the steps to
reproduce it:

./sqlite3 energy.sqlite
SQLite version 3.7.15.1 2012-12-19 20:39:10
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>  select count(*) from EnergyLogData;
3306
sqlite>  .backup backup.sqlite
sqlite>  .exit

The above shows the number of records in one of the tables and creates a
backup to a new 'backup.sqlite' database file. But this new file
seems to be corrupt:

./sqlite3 backup.sqlite
SQLite version 3.7.15.1 2012-12-19 20:39:10
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>  select count(*) from EnergyLogData;
Error: database disk image is malformed
sqlite>  .exit

I have look into the Bug database and found ticket 3858, but that one
should already be fixed and we are not writing to the database during
the backup.

Is this a bug or some other problem?

--
Regards,
Marco ten Thije
--**--**


*Use system engineering bv*
Loc: Industriestraat 77 - 7482 EW HAAKSBERGEN - The Netherlands  Mail
Address: Postbus 236 - 7480 AE HAAKSBERGEN - The Netherlands
T: +31 53 5741456  F: +31 53 5741458   E: marco.tenthije@usetechnology.**
nl  >I:
www.usetechnology.nl
Chamber of Commerce nr: Veluwe en Twente 528 98210  VAT nr.: NL
8506.54.713B01
--**--**

/This message (including any attachments) is confidential and may be
privileged. If you have received it by mistake please notify the sender by
return e-mail and delete this message from your system. Any unauthorised
use or dissemination of this message in whole or in part is strictly
prohibited. Please note that e-mails are susceptible to change. Use system
engineering bv shall not be liable for the improper or incomplete
transmission of the information contained in this communication nor for any
delay in its receipt or damage to your system. Use system engineering bv
does not guarantee that the integrity of this communication has been
maintained nor that this communication is free of viruses, interceptions or
interference. /

___
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



--
Met een vriendelijke groet,
Marco ten Thije


*Use system engineering bv*
Bezoekadres: Industriestraat 77 - 7482 EW HAAKSBERGEN - The 
Netherlands  Postadres: Postbus 236 - 7480 AE HAAKSBERGEN - The Netherlands
T: 053 5741456  F: 053 5741458   E: marco.tenth...@usetechnology.nl 
   I: www.usetechnology.nl 


KvK nr: Veluwe en Twente 528 98210  BTW nr.: NL 8506.54.713B01

/Dit bericht (inclusief de eventuele bijlagen) is vertrouwelijk. Wanneer 
u dit bericht ten onrechte heeft ontvangen, dient u de afzender hiervan 
onmiddellijk per kerende e-mail op de hoogte te brengen en dit bericht 
te verwijderen uit uw systeem. Elk onbevoegd gebruik en/of 

Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command

2012-12-21 Thread Eric Minbiole
Can you please try running "pragma integrity_check;" on the original
database?  That will give an indication of whether the original database
has any data corruption.


On Fri, Dec 21, 2012 at 4:13 AM, Marco ten Thije <
marco.tenth...@usetechnology.nl> wrote:

> Hello,
>
> We are facing a problem with the '.backup' command using the SQLite
> command line interface. The resulting backup-database seems to be corrupt.
>
> We ran into this problem on a ARM9 platform using SQLite 3.7.5, but it can
> also be reproduced on the latest 3.7.15.1 version on Intel.
>
> I have attached our database to this email.  These are the steps to
> reproduce it:
>
> ./sqlite3 energy.sqlite
> SQLite version 3.7.15.1 2012-12-19 20:39:10
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> select count(*) from EnergyLogData;
> 3306
> sqlite> .backup backup.sqlite
> sqlite> .exit
>
> The above shows the number of records in one of the tables and creates a
> backup to a new 'backup.sqlite' database file. But this new file
> seems to be corrupt:
>
> ./sqlite3 backup.sqlite
> SQLite version 3.7.15.1 2012-12-19 20:39:10
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> select count(*) from EnergyLogData;
> Error: database disk image is malformed
> sqlite> .exit
>
> I have look into the Bug database and found ticket 3858, but that one
> should already be fixed and we are not writing to the database during
> the backup.
>
> Is this a bug or some other problem?
>
> --
> Regards,
> Marco ten Thije
> --**--**
> 
>
> *Use system engineering bv*
> Loc: Industriestraat 77 - 7482 EW HAAKSBERGEN - The Netherlands  Mail
> Address: Postbus 236 - 7480 AE HAAKSBERGEN - The Netherlands
> T: +31 53 5741456  F: +31 53 5741458   E: marco.tenthije@usetechnology.**
> nl   usetechnology.nl >   I:
> www.usetechnology.nl 
> Chamber of Commerce nr: Veluwe en Twente 528 98210  VAT nr.: NL
> 8506.54.713B01
> --**--**
> 
> /This message (including any attachments) is confidential and may be
> privileged. If you have received it by mistake please notify the sender by
> return e-mail and delete this message from your system. Any unauthorised
> use or dissemination of this message in whole or in part is strictly
> prohibited. Please note that e-mails are susceptible to change. Use system
> engineering bv shall not be liable for the improper or incomplete
> transmission of the information contained in this communication nor for any
> delay in its receipt or damage to your system. Use system engineering bv
> does not guarantee that the integrity of this communication has been
> maintained nor that this communication is free of viruses, interceptions or
> interference. /
>
> ___
> 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] Problems in VFS file read

2012-10-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 30/09/12 19:16, Roger Binns wrote:
> Looking through the code for both VFS I don't see any attempt to check
> the amount parameter is positive, and in both cases it silently gets
> passed to a routine expecting unsigned (size_t or DWORD).

http://www.sqlite.org/src/info/daebe3bd2d9bd7b6f876a8110cf5045eb3fee078

Can I suggest just returning IOError if the value is outside of reasonable
bounds?  Silently truncating it as that patch does still leaves the
possibility of buffer overflow - for example a 1kb buffer could be passed
in with a negative 1kb length and would result in a buffer overflow.

As to how a negative number could end being passed in, someone could have
their own VFS that calls through to the underlying SQLite provided ones.
(That is considerably less work than doing your own entire VFS.)  Or some
combination of values could unintentionally cause it such as code trying
to return a negative number as an error code but it being taken as is (an
example is sectorsize where again signed and unsigned are mixed).

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAlBp5BgACgkQmOOfHg372QSNBQCeIOQ0lYodqgbHmOWgd3R96ZTc
eqkAoMxiHoRBbnlZgFjMvUeAK3dIg1OU
=rlUn
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems encountered while upgrading Sqlite from 3.6.7 to 3.7.9

2012-01-10 Thread John Elrick
On Tue, Jan 10, 2012 at 10:14 AM, Richard Hipp  wrote:
> On Tue, Jan 10, 2012 at 10:08 AM, John Elrick wrote:
>
>> On Tue, Jan 10, 2012 at 8:31 AM, Richard Hipp  wrote:
>> > On Tue, Jan 10, 2012 at 8:14 AM, John Elrick > >wrote:
>> >
>> >> I will have to get back to you on this.  While running tests against
>> >> isolated queries, I noticed an unusual circumstance.  When I isolate
>> >> the queries into a test program, running through our present
>> >> libraries, 3.7.9 is roughly 4 times faster executing the exact same
>> >> queries where it is running roughly 5 times slower in the context of
>> >> the application.  As those queries do not execute in the same order, I
>> >> suspect that page swapping and caching issues may be involved.  I'm
>> >> proceeding on that assumption.
>> >>
>> >
>> >
>> > Are you using the same compile-time options when building your
>> application
>> > as were used when building the shell program?
>>
>> Yes.
>>
>
> Have you run "SELECT sqlite_source_id();" to verify that your build is
> really picking up the version of SQLite that you think it is?
>
> Do you have code like this in your application:
>
> assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
> assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
> assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );
>
> To verify that your SQLite source code and "sqlite3.h" header file match?

Nope.  I assume that the resulting .OBJ files are self contained.
I'll run the tests you suggest just to make certain.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems encountered while upgrading Sqlite from 3.6.7 to 3.7.9

2012-01-10 Thread Richard Hipp
On Tue, Jan 10, 2012 at 10:08 AM, John Elrick wrote:

> On Tue, Jan 10, 2012 at 8:31 AM, Richard Hipp  wrote:
> > On Tue, Jan 10, 2012 at 8:14 AM, John Elrick  >wrote:
> >
> >> I will have to get back to you on this.  While running tests against
> >> isolated queries, I noticed an unusual circumstance.  When I isolate
> >> the queries into a test program, running through our present
> >> libraries, 3.7.9 is roughly 4 times faster executing the exact same
> >> queries where it is running roughly 5 times slower in the context of
> >> the application.  As those queries do not execute in the same order, I
> >> suspect that page swapping and caching issues may be involved.  I'm
> >> proceeding on that assumption.
> >>
> >
> >
> > Are you using the same compile-time options when building your
> application
> > as were used when building the shell program?
>
> Yes.
>

Have you run "SELECT sqlite_source_id();" to verify that your build is
really picking up the version of SQLite that you think it is?

Do you have code like this in your application:

assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );

To verify that your SQLite source code and "sqlite3.h" header file match?




> ___
> 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


Re: [sqlite] Problems encountered while upgrading Sqlite from 3.6.7 to 3.7.9

2012-01-10 Thread John Elrick
On Tue, Jan 10, 2012 at 8:31 AM, Richard Hipp  wrote:
> On Tue, Jan 10, 2012 at 8:14 AM, John Elrick wrote:
>
>> I will have to get back to you on this.  While running tests against
>> isolated queries, I noticed an unusual circumstance.  When I isolate
>> the queries into a test program, running through our present
>> libraries, 3.7.9 is roughly 4 times faster executing the exact same
>> queries where it is running roughly 5 times slower in the context of
>> the application.  As those queries do not execute in the same order, I
>> suspect that page swapping and caching issues may be involved.  I'm
>> proceeding on that assumption.
>>
>
>
> Are you using the same compile-time options when building your application
> as were used when building the shell program?

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


Re: [sqlite] Problems encountered while upgrading Sqlite from 3.6.7 to 3.7.9

2012-01-10 Thread Richard Hipp
On Tue, Jan 10, 2012 at 8:14 AM, John Elrick wrote:

> I will have to get back to you on this.  While running tests against
> isolated queries, I noticed an unusual circumstance.  When I isolate
> the queries into a test program, running through our present
> libraries, 3.7.9 is roughly 4 times faster executing the exact same
> queries where it is running roughly 5 times slower in the context of
> the application.  As those queries do not execute in the same order, I
> suspect that page swapping and caching issues may be involved.  I'm
> proceeding on that assumption.
>


Are you using the same compile-time options when building your application
as were used when building the shell program?

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


Re: [sqlite] Problems encountered while upgrading Sqlite from 3.6.7 to 3.7.9

2012-01-10 Thread John Elrick
I will have to get back to you on this.  While running tests against
isolated queries, I noticed an unusual circumstance.  When I isolate
the queries into a test program, running through our present
libraries, 3.7.9 is roughly 4 times faster executing the exact same
queries where it is running roughly 5 times slower in the context of
the application.  As those queries do not execute in the same order, I
suspect that page swapping and caching issues may be involved.  I'm
proceeding on that assumption.

On Mon, Jan 9, 2012 at 12:11 PM, Richard Hipp  wrote:
> Thank you for sending the sample database file.
>
> Rather than forcing me to understand your log database, and fill in
> parameters with reasonable values, I wonder if you could simply email one
> or more queries (with the parameters filled in) which you find to be slower
> in 3.7.9 versus 3.6.7?
>
> On Mon, Jan 9, 2012 at 11:13 AM, Richard Hipp  wrote:
>
>> Please send private email to d...@sqlite.org.  CC to d...@sqlite.org and
>> j...@sqlite.org.
>>
>>
>> On Mon, Jan 9, 2012 at 11:09 AM, John Elrick wrote:
>>
>>> Sorry "The combined files are 2.4 MB zipped"
>>>
>>> On Mon, Jan 9, 2012 at 11:09 AM, John Elrick 
>>> wrote:
>>> > Richard,
>>> >
>>> > I have the information available for you.  Unfortunately, it appears
>>> > that I cannot actually reduce the case, however, the issues appear to
>>> > be fairly confined.
>>> >
>>> > The test database is 6 MB and I have a database showing the
>>> > performance tracking for each of the queries which is about 140KB.
>>> > The combined files are 2.4 MB.  How would you prefer I send this file
>>> > to you?
>>> >
>>> > On Fri, Jan 6, 2012 at 4:51 PM, John Elrick 
>>> wrote:
>>> >> Yes.  Look for it on Monday.  I'm about to leave for the day. The
>>> >> queries are automatically generated and will require some mining to
>>> >> get specific examples.  I should be able to reduce the range to a
>>> >> simple repeatable case but it may take a while.
>>> >>
>>> >> Thanks very much and have a great weekend.
>>> >>
>>> >> On Fri, Jan 6, 2012 at 4:42 PM, Richard Hipp  wrote:
>>> >>> Can you publish for us:
>>> >>>
>>> >>> (1) A sample database
>>> >>> (2) The specific queries that are causing your problems
>>> >>>
>>> >>> So that we can investigate further?
>>> >>>
>>> >>> On Fri, Jan 6, 2012 at 4:31 PM, John Elrick >> >wrote:
>>> >>>
>>>  Background
>>>  =
>>>  We have been using Sqlite3 in a project since 2007.   Because of the
>>>  release cycles involved, we normally upgrade infrequently.  We
>>>  recently upgraded from 3.6.7 to 3.7.9 and encountered two serious
>>>  issues. We need assistance in narrowing down the causes.
>>> 
>>>  We are developing using Delphi.  We are using the amalgamation and
>>> are
>>>  compiling it using the free Borland BCC complier.  The result is an
>>>  obj file which is statically linked into our application.  We have
>>>  been using this technique since we began using Sqlite.
>>> 
>>>  In the tests below, the strategy for changing between versions is to
>>>  change which obj file is statically linked into the application.  The
>>>  application was recompiled between each test.
>>> 
>>>  Issues Encountered
>>>  ===
>>> 
>>>  1.  After changing there is an order of magnitude performance
>>>  reduction.  Using GP Profile to monitor operations, here are the
>>>  results for identical application uses:
>>> 
>>>  Operation executes _sqlite3_step 49,152 times
>>> 
>>>  3.6.7 time 5.24 seconds
>>>  3.7.9 time 41.19 seconds
>>> 
>>>  2.  During testing we encountered a bug which had not been
>>> encountered
>>>  before.  Research by our CTO established that in 3.7.9 a row was
>>>  returned from this query which contained empty values.  In 3.6.7
>>> there
>>>  were no results from the query.
>>> 
>>>  Summation
>>>  =
>>>  Given how throughly Sqlite is tested I have difficulty believing
>>> there
>>>  is an actual bug in Sqlite.  I believe an interaction is occurring
>>>  which is a result of changes to the Sqlite code base which are
>>>  producing unexpected resulted when compiled into our application.  To
>>>  help resolve the problem, I would like to know if there is an
>>>  historical record of the amalgamations.  If so, I can carry out
>>>  testing to determine in what version the problem manifests.
>>> 
>>>  If anyone has any other recommendations I would be pleased to hear
>>>  them.  For the moment we are reverting to 3.6.7 as a temporary
>>>  solution.
>>> 
>>>  --
>>>  John Elrick
>>>  Fenestra Technologies
>>>  540-868-1377
>>>  ___
>>>  sqlite-users 

Re: [sqlite] Problems encountered while upgrading Sqlite from 3.6.7 to 3.7.9

2012-01-09 Thread Richard Hipp
Thank you for sending the sample database file.

Rather than forcing me to understand your log database, and fill in
parameters with reasonable values, I wonder if you could simply email one
or more queries (with the parameters filled in) which you find to be slower
in 3.7.9 versus 3.6.7?

On Mon, Jan 9, 2012 at 11:13 AM, Richard Hipp  wrote:

> Please send private email to d...@sqlite.org.  CC to d...@sqlite.org and
> j...@sqlite.org.
>
>
> On Mon, Jan 9, 2012 at 11:09 AM, John Elrick wrote:
>
>> Sorry "The combined files are 2.4 MB zipped"
>>
>> On Mon, Jan 9, 2012 at 11:09 AM, John Elrick 
>> wrote:
>> > Richard,
>> >
>> > I have the information available for you.  Unfortunately, it appears
>> > that I cannot actually reduce the case, however, the issues appear to
>> > be fairly confined.
>> >
>> > The test database is 6 MB and I have a database showing the
>> > performance tracking for each of the queries which is about 140KB.
>> > The combined files are 2.4 MB.  How would you prefer I send this file
>> > to you?
>> >
>> > On Fri, Jan 6, 2012 at 4:51 PM, John Elrick 
>> wrote:
>> >> Yes.  Look for it on Monday.  I'm about to leave for the day. The
>> >> queries are automatically generated and will require some mining to
>> >> get specific examples.  I should be able to reduce the range to a
>> >> simple repeatable case but it may take a while.
>> >>
>> >> Thanks very much and have a great weekend.
>> >>
>> >> On Fri, Jan 6, 2012 at 4:42 PM, Richard Hipp  wrote:
>> >>> Can you publish for us:
>> >>>
>> >>> (1) A sample database
>> >>> (2) The specific queries that are causing your problems
>> >>>
>> >>> So that we can investigate further?
>> >>>
>> >>> On Fri, Jan 6, 2012 at 4:31 PM, John Elrick > >wrote:
>> >>>
>>  Background
>>  =
>>  We have been using Sqlite3 in a project since 2007.   Because of the
>>  release cycles involved, we normally upgrade infrequently.  We
>>  recently upgraded from 3.6.7 to 3.7.9 and encountered two serious
>>  issues. We need assistance in narrowing down the causes.
>> 
>>  We are developing using Delphi.  We are using the amalgamation and
>> are
>>  compiling it using the free Borland BCC complier.  The result is an
>>  obj file which is statically linked into our application.  We have
>>  been using this technique since we began using Sqlite.
>> 
>>  In the tests below, the strategy for changing between versions is to
>>  change which obj file is statically linked into the application.  The
>>  application was recompiled between each test.
>> 
>>  Issues Encountered
>>  ===
>> 
>>  1.  After changing there is an order of magnitude performance
>>  reduction.  Using GP Profile to monitor operations, here are the
>>  results for identical application uses:
>> 
>>  Operation executes _sqlite3_step 49,152 times
>> 
>>  3.6.7 time 5.24 seconds
>>  3.7.9 time 41.19 seconds
>> 
>>  2.  During testing we encountered a bug which had not been
>> encountered
>>  before.  Research by our CTO established that in 3.7.9 a row was
>>  returned from this query which contained empty values.  In 3.6.7
>> there
>>  were no results from the query.
>> 
>>  Summation
>>  =
>>  Given how throughly Sqlite is tested I have difficulty believing
>> there
>>  is an actual bug in Sqlite.  I believe an interaction is occurring
>>  which is a result of changes to the Sqlite code base which are
>>  producing unexpected resulted when compiled into our application.  To
>>  help resolve the problem, I would like to know if there is an
>>  historical record of the amalgamations.  If so, I can carry out
>>  testing to determine in what version the problem manifests.
>> 
>>  If anyone has any other recommendations I would be pleased to hear
>>  them.  For the moment we are reverting to 3.6.7 as a temporary
>>  solution.
>> 
>>  --
>>  John Elrick
>>  Fenestra Technologies
>>  540-868-1377
>>  ___
>>  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
>> >>
>> >>
>> >>
>> >> --
>> >> John Elrick
>> >> Fenestra Technologies
>> >> 540-868-1377
>> >
>> >
>> >
>> > --
>> > John Elrick
>> > Fenestra Technologies
>> > 540-868-1377
>>
>>
>>
>> --
>> John Elrick
>> Fenestra Technologies
>> 540-868-1377
>> ___
>> 

Re: [sqlite] Problems encountered while upgrading Sqlite from 3.6.7 to 3.7.9

2012-01-09 Thread Richard Hipp
Please send private email to d...@sqlite.org.  CC to d...@sqlite.org and
j...@sqlite.org.

On Mon, Jan 9, 2012 at 11:09 AM, John Elrick wrote:

> Sorry "The combined files are 2.4 MB zipped"
>
> On Mon, Jan 9, 2012 at 11:09 AM, John Elrick 
> wrote:
> > Richard,
> >
> > I have the information available for you.  Unfortunately, it appears
> > that I cannot actually reduce the case, however, the issues appear to
> > be fairly confined.
> >
> > The test database is 6 MB and I have a database showing the
> > performance tracking for each of the queries which is about 140KB.
> > The combined files are 2.4 MB.  How would you prefer I send this file
> > to you?
> >
> > On Fri, Jan 6, 2012 at 4:51 PM, John Elrick 
> wrote:
> >> Yes.  Look for it on Monday.  I'm about to leave for the day. The
> >> queries are automatically generated and will require some mining to
> >> get specific examples.  I should be able to reduce the range to a
> >> simple repeatable case but it may take a while.
> >>
> >> Thanks very much and have a great weekend.
> >>
> >> On Fri, Jan 6, 2012 at 4:42 PM, Richard Hipp  wrote:
> >>> Can you publish for us:
> >>>
> >>> (1) A sample database
> >>> (2) The specific queries that are causing your problems
> >>>
> >>> So that we can investigate further?
> >>>
> >>> On Fri, Jan 6, 2012 at 4:31 PM, John Elrick  >wrote:
> >>>
>  Background
>  =
>  We have been using Sqlite3 in a project since 2007.   Because of the
>  release cycles involved, we normally upgrade infrequently.  We
>  recently upgraded from 3.6.7 to 3.7.9 and encountered two serious
>  issues. We need assistance in narrowing down the causes.
> 
>  We are developing using Delphi.  We are using the amalgamation and are
>  compiling it using the free Borland BCC complier.  The result is an
>  obj file which is statically linked into our application.  We have
>  been using this technique since we began using Sqlite.
> 
>  In the tests below, the strategy for changing between versions is to
>  change which obj file is statically linked into the application.  The
>  application was recompiled between each test.
> 
>  Issues Encountered
>  ===
> 
>  1.  After changing there is an order of magnitude performance
>  reduction.  Using GP Profile to monitor operations, here are the
>  results for identical application uses:
> 
>  Operation executes _sqlite3_step 49,152 times
> 
>  3.6.7 time 5.24 seconds
>  3.7.9 time 41.19 seconds
> 
>  2.  During testing we encountered a bug which had not been encountered
>  before.  Research by our CTO established that in 3.7.9 a row was
>  returned from this query which contained empty values.  In 3.6.7 there
>  were no results from the query.
> 
>  Summation
>  =
>  Given how throughly Sqlite is tested I have difficulty believing there
>  is an actual bug in Sqlite.  I believe an interaction is occurring
>  which is a result of changes to the Sqlite code base which are
>  producing unexpected resulted when compiled into our application.  To
>  help resolve the problem, I would like to know if there is an
>  historical record of the amalgamations.  If so, I can carry out
>  testing to determine in what version the problem manifests.
> 
>  If anyone has any other recommendations I would be pleased to hear
>  them.  For the moment we are reverting to 3.6.7 as a temporary
>  solution.
> 
>  --
>  John Elrick
>  Fenestra Technologies
>  540-868-1377
>  ___
>  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
> >>
> >>
> >>
> >> --
> >> John Elrick
> >> Fenestra Technologies
> >> 540-868-1377
> >
> >
> >
> > --
> > John Elrick
> > Fenestra Technologies
> > 540-868-1377
>
>
>
> --
> John Elrick
> Fenestra Technologies
> 540-868-1377
> ___
> 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


Re: [sqlite] Problems encountered while upgrading Sqlite from 3.6.7 to 3.7.9

2012-01-09 Thread John Elrick
Sorry "The combined files are 2.4 MB zipped"

On Mon, Jan 9, 2012 at 11:09 AM, John Elrick  wrote:
> Richard,
>
> I have the information available for you.  Unfortunately, it appears
> that I cannot actually reduce the case, however, the issues appear to
> be fairly confined.
>
> The test database is 6 MB and I have a database showing the
> performance tracking for each of the queries which is about 140KB.
> The combined files are 2.4 MB.  How would you prefer I send this file
> to you?
>
> On Fri, Jan 6, 2012 at 4:51 PM, John Elrick  wrote:
>> Yes.  Look for it on Monday.  I'm about to leave for the day. The
>> queries are automatically generated and will require some mining to
>> get specific examples.  I should be able to reduce the range to a
>> simple repeatable case but it may take a while.
>>
>> Thanks very much and have a great weekend.
>>
>> On Fri, Jan 6, 2012 at 4:42 PM, Richard Hipp  wrote:
>>> Can you publish for us:
>>>
>>> (1) A sample database
>>> (2) The specific queries that are causing your problems
>>>
>>> So that we can investigate further?
>>>
>>> On Fri, Jan 6, 2012 at 4:31 PM, John Elrick wrote:
>>>
 Background
 =
 We have been using Sqlite3 in a project since 2007.   Because of the
 release cycles involved, we normally upgrade infrequently.  We
 recently upgraded from 3.6.7 to 3.7.9 and encountered two serious
 issues. We need assistance in narrowing down the causes.

 We are developing using Delphi.  We are using the amalgamation and are
 compiling it using the free Borland BCC complier.  The result is an
 obj file which is statically linked into our application.  We have
 been using this technique since we began using Sqlite.

 In the tests below, the strategy for changing between versions is to
 change which obj file is statically linked into the application.  The
 application was recompiled between each test.

 Issues Encountered
 ===

 1.  After changing there is an order of magnitude performance
 reduction.  Using GP Profile to monitor operations, here are the
 results for identical application uses:

 Operation executes _sqlite3_step 49,152 times

 3.6.7 time 5.24 seconds
 3.7.9 time 41.19 seconds

 2.  During testing we encountered a bug which had not been encountered
 before.  Research by our CTO established that in 3.7.9 a row was
 returned from this query which contained empty values.  In 3.6.7 there
 were no results from the query.

 Summation
 =
 Given how throughly Sqlite is tested I have difficulty believing there
 is an actual bug in Sqlite.  I believe an interaction is occurring
 which is a result of changes to the Sqlite code base which are
 producing unexpected resulted when compiled into our application.  To
 help resolve the problem, I would like to know if there is an
 historical record of the amalgamations.  If so, I can carry out
 testing to determine in what version the problem manifests.

 If anyone has any other recommendations I would be pleased to hear
 them.  For the moment we are reverting to 3.6.7 as a temporary
 solution.

 --
 John Elrick
 Fenestra Technologies
 540-868-1377
 ___
 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
>>
>>
>>
>> --
>> John Elrick
>> Fenestra Technologies
>> 540-868-1377
>
>
>
> --
> John Elrick
> Fenestra Technologies
> 540-868-1377



-- 
John Elrick
Fenestra Technologies
540-868-1377
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems encountered while upgrading Sqlite from 3.6.7 to 3.7.9

2012-01-09 Thread John Elrick
Richard,

I have the information available for you.  Unfortunately, it appears
that I cannot actually reduce the case, however, the issues appear to
be fairly confined.

The test database is 6 MB and I have a database showing the
performance tracking for each of the queries which is about 140KB.
The combined files are 2.4 MB.  How would you prefer I send this file
to you?

On Fri, Jan 6, 2012 at 4:51 PM, John Elrick  wrote:
> Yes.  Look for it on Monday.  I'm about to leave for the day. The
> queries are automatically generated and will require some mining to
> get specific examples.  I should be able to reduce the range to a
> simple repeatable case but it may take a while.
>
> Thanks very much and have a great weekend.
>
> On Fri, Jan 6, 2012 at 4:42 PM, Richard Hipp  wrote:
>> Can you publish for us:
>>
>> (1) A sample database
>> (2) The specific queries that are causing your problems
>>
>> So that we can investigate further?
>>
>> On Fri, Jan 6, 2012 at 4:31 PM, John Elrick wrote:
>>
>>> Background
>>> =
>>> We have been using Sqlite3 in a project since 2007.   Because of the
>>> release cycles involved, we normally upgrade infrequently.  We
>>> recently upgraded from 3.6.7 to 3.7.9 and encountered two serious
>>> issues. We need assistance in narrowing down the causes.
>>>
>>> We are developing using Delphi.  We are using the amalgamation and are
>>> compiling it using the free Borland BCC complier.  The result is an
>>> obj file which is statically linked into our application.  We have
>>> been using this technique since we began using Sqlite.
>>>
>>> In the tests below, the strategy for changing between versions is to
>>> change which obj file is statically linked into the application.  The
>>> application was recompiled between each test.
>>>
>>> Issues Encountered
>>> ===
>>>
>>> 1.  After changing there is an order of magnitude performance
>>> reduction.  Using GP Profile to monitor operations, here are the
>>> results for identical application uses:
>>>
>>> Operation executes _sqlite3_step 49,152 times
>>>
>>> 3.6.7 time 5.24 seconds
>>> 3.7.9 time 41.19 seconds
>>>
>>> 2.  During testing we encountered a bug which had not been encountered
>>> before.  Research by our CTO established that in 3.7.9 a row was
>>> returned from this query which contained empty values.  In 3.6.7 there
>>> were no results from the query.
>>>
>>> Summation
>>> =
>>> Given how throughly Sqlite is tested I have difficulty believing there
>>> is an actual bug in Sqlite.  I believe an interaction is occurring
>>> which is a result of changes to the Sqlite code base which are
>>> producing unexpected resulted when compiled into our application.  To
>>> help resolve the problem, I would like to know if there is an
>>> historical record of the amalgamations.  If so, I can carry out
>>> testing to determine in what version the problem manifests.
>>>
>>> If anyone has any other recommendations I would be pleased to hear
>>> them.  For the moment we are reverting to 3.6.7 as a temporary
>>> solution.
>>>
>>> --
>>> John Elrick
>>> Fenestra Technologies
>>> 540-868-1377
>>> ___
>>> 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
>
>
>
> --
> John Elrick
> Fenestra Technologies
> 540-868-1377



-- 
John Elrick
Fenestra Technologies
540-868-1377
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems encountered while upgrading Sqlite from 3.6.7 to 3.7.9

2012-01-06 Thread John Elrick
Yes.  Look for it on Monday.  I'm about to leave for the day. The
queries are automatically generated and will require some mining to
get specific examples.  I should be able to reduce the range to a
simple repeatable case but it may take a while.

Thanks very much and have a great weekend.

On Fri, Jan 6, 2012 at 4:42 PM, Richard Hipp  wrote:
> Can you publish for us:
>
> (1) A sample database
> (2) The specific queries that are causing your problems
>
> So that we can investigate further?
>
> On Fri, Jan 6, 2012 at 4:31 PM, John Elrick wrote:
>
>> Background
>> =
>> We have been using Sqlite3 in a project since 2007.   Because of the
>> release cycles involved, we normally upgrade infrequently.  We
>> recently upgraded from 3.6.7 to 3.7.9 and encountered two serious
>> issues. We need assistance in narrowing down the causes.
>>
>> We are developing using Delphi.  We are using the amalgamation and are
>> compiling it using the free Borland BCC complier.  The result is an
>> obj file which is statically linked into our application.  We have
>> been using this technique since we began using Sqlite.
>>
>> In the tests below, the strategy for changing between versions is to
>> change which obj file is statically linked into the application.  The
>> application was recompiled between each test.
>>
>> Issues Encountered
>> ===
>>
>> 1.  After changing there is an order of magnitude performance
>> reduction.  Using GP Profile to monitor operations, here are the
>> results for identical application uses:
>>
>> Operation executes _sqlite3_step 49,152 times
>>
>> 3.6.7 time 5.24 seconds
>> 3.7.9 time 41.19 seconds
>>
>> 2.  During testing we encountered a bug which had not been encountered
>> before.  Research by our CTO established that in 3.7.9 a row was
>> returned from this query which contained empty values.  In 3.6.7 there
>> were no results from the query.
>>
>> Summation
>> =
>> Given how throughly Sqlite is tested I have difficulty believing there
>> is an actual bug in Sqlite.  I believe an interaction is occurring
>> which is a result of changes to the Sqlite code base which are
>> producing unexpected resulted when compiled into our application.  To
>> help resolve the problem, I would like to know if there is an
>> historical record of the amalgamations.  If so, I can carry out
>> testing to determine in what version the problem manifests.
>>
>> If anyone has any other recommendations I would be pleased to hear
>> them.  For the moment we are reverting to 3.6.7 as a temporary
>> solution.
>>
>> --
>> John Elrick
>> Fenestra Technologies
>> 540-868-1377
>> ___
>> 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



-- 
John Elrick
Fenestra Technologies
540-868-1377
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems encountered while upgrading Sqlite from 3.6.7 to 3.7.9

2012-01-06 Thread Richard Hipp
Can you publish for us:

(1) A sample database
(2) The specific queries that are causing your problems

So that we can investigate further?

On Fri, Jan 6, 2012 at 4:31 PM, John Elrick wrote:

> Background
> =
> We have been using Sqlite3 in a project since 2007.   Because of the
> release cycles involved, we normally upgrade infrequently.  We
> recently upgraded from 3.6.7 to 3.7.9 and encountered two serious
> issues. We need assistance in narrowing down the causes.
>
> We are developing using Delphi.  We are using the amalgamation and are
> compiling it using the free Borland BCC complier.  The result is an
> obj file which is statically linked into our application.  We have
> been using this technique since we began using Sqlite.
>
> In the tests below, the strategy for changing between versions is to
> change which obj file is statically linked into the application.  The
> application was recompiled between each test.
>
> Issues Encountered
> ===
>
> 1.  After changing there is an order of magnitude performance
> reduction.  Using GP Profile to monitor operations, here are the
> results for identical application uses:
>
> Operation executes _sqlite3_step 49,152 times
>
> 3.6.7 time 5.24 seconds
> 3.7.9 time 41.19 seconds
>
> 2.  During testing we encountered a bug which had not been encountered
> before.  Research by our CTO established that in 3.7.9 a row was
> returned from this query which contained empty values.  In 3.6.7 there
> were no results from the query.
>
> Summation
> =
> Given how throughly Sqlite is tested I have difficulty believing there
> is an actual bug in Sqlite.  I believe an interaction is occurring
> which is a result of changes to the Sqlite code base which are
> producing unexpected resulted when compiled into our application.  To
> help resolve the problem, I would like to know if there is an
> historical record of the amalgamations.  If so, I can carry out
> testing to determine in what version the problem manifests.
>
> If anyone has any other recommendations I would be pleased to hear
> them.  For the moment we are reverting to 3.6.7 as a temporary
> solution.
>
> --
> John Elrick
> Fenestra Technologies
> 540-868-1377
> ___
> 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


Re: [sqlite] Problems with SQLite when used with MPI

2011-11-22 Thread Teg
Hello Gaurav,

What does a debugger show you?

C


Tuesday, November 22, 2011, 2:07:38 AM, you wrote:

GV> Here is the situation. I am using a cluster on which you can use MPI to
GV> split the processing time on to different processors. I was using
GV> PostgreSQL but since the data was on different server than the one I am
GV> running the code, it was slowing down the simulation due to connection
GV> overhead on PostgreSQL server. Then I switched to on-disk management
GV> software and so I chose SQLite. I first ran it without MPI on server,  and
GV> it ran (compile g++). Then I switched to MPI (mpicc compiler), it is not
GV> even running for one node (on which I am using one thread). It gives error
GV> "Database or Disk is full". Further debugging revlealed that sqlite3_step()
GV> was returning 1  and that means "SQL error or Database missing". It was
GV> able to get the number of columns with the same database and SQL querry. I
GV> dont understand why I am getting this error.

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




-- 
Best regards,
 Tegmailto:t...@djii.com

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


Re: [sqlite] Problems building/running SQLite test.exe withICU enabled

2011-10-04 Thread Joe Mistachkin
 
Marc Henrickson wrote:
>
> I copied those dll files to my folder and still get the same error.
>

Ok.  At this point, the best thing to do is to run the SysInternals ProcMon
tool
and carefully go over the logs it generates to determine which DLL is not
being
found and where the system is searching for it.

The ProcMon tool (and quite a few other useful tools) can be found on the
SysInternals (now Microsoft) web site at:

http://technet.microsoft.com/en-us/sysinternals

Please let me (us?) know what you find out because I'm curious what other
things
can cause the error message you are seeing.

--
Joe Mistachkin

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


Re: [sqlite] Problems building/running SQLite test.exe with ICU enabled

2011-10-04 Thread Marc Henrickson
I copied those dll files to my folder and still get the same error.

-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Joe Mistachkin
Sent: Monday, October 03, 2011 4:14 PM
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Problems building/running SQLite test.exe with ICU enabled


Your list does not seem to include the ICU DLLs that I mentioned, including:

icuuc48.dll
icuin48.dll

The necessary ICU files can be obtained from the official web site:

http://site.icu-project.org/

--
Joe Mistachkin

___
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] Problems building/running SQLite test.exe with ICU enabled

2011-10-03 Thread Joe Mistachkin

Your list does not seem to include the ICU DLLs that I mentioned, including:

icuuc48.dll
icuin48.dll

The necessary ICU files can be obtained from the official web site:

http://site.icu-project.org/

--
Joe Mistachkin

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


Re: [sqlite] Problems building/running SQLite test.exe with ICU enabled

2011-10-03 Thread Marc Henrickson
All DLL's are in the same folder.
Test.exe
SQLite.Interop.DLL
System.Data.SQLite.DLL

We have tried everything and cannot get this to run with ICU enabled.

Is there somewhere I can post my VS project files so someone can look at this?  
It seems like it should be pretty straightforward, but nothing seems to work.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems building/running SQLite test.exe with ICU enabled

2011-10-02 Thread Joe Mistachkin

Marc Henrickson wrote:
> 
> System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. --->
> System.TypeInitializationException: The type initializer for
'System.Data.SQLite.SQLiteFactory' threw an exception. ---> 
> System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.DLL': The
specified module could not be found. (Exception from 
> HRESULT: 0x8007007E)
>at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config(Int32 op,
SQLiteLogCallback func, IntPtr pvUser)
>at System.Data.SQLite.SQLite3.SetLogCallback(SQLiteLogCallback func) in
c:\SQLiteTest\System.Data.SQLite\SQLite3.cs:line 935
>at System.Data.SQLite.SQLiteFactory..ctor() in
c:\SQLiteTest\System.Data.SQLite\SQLiteFactory.cs:line 121
>at System.Data.SQLite.SQLiteFactory..cctor() in
c:\SQLiteTest\System.Data.SQLite\SQLiteFactory.cs:line 131
> 

Please make sure the necessary ICU DLLs are located in the same directory as
the SQLite.Interop.dll OR somewhere along your PATH and the problem should
go away.

--
Joe Mistachkin

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


Re: [sqlite] Problems building/running SQLite test.exe with ICU enabled

2011-10-01 Thread Alexey Pechnikov
Yes, on linux host I have a lot of problems in SQLite tests with ICU enabled.

2011/9/30 Marc Henrickson :
> I have downloaded the SQLite source code (sqlite-netFx-source-1.0.74.0) as 
> well as the latest ICU libraries (icu4c-4_8-Win32-msvc10).  I then build the 
> SQLite projects and run the test.2008 application and it runs fine when 
> SQLITE_ENABLE_ICU is undefined.  However, when I do define SQLITE_ENABLE_ICU, 
> I get the following exception when I click "Run" on the test.exe application.
>
> System.Reflection.TargetInvocationException: Exception has been thrown by the 
> target of an invocation. ---> System.TypeInitializationException: The type 
> initializer for 'System.Data.SQLite.SQLiteFactory' threw an exception. ---> 
> System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.DLL': The 
> specified module could not be found. (Exception from HRESULT: 0x8007007E)
>   at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config(Int32 op, 
> SQLiteLogCallback func, IntPtr pvUser)
>   at System.Data.SQLite.SQLite3.SetLogCallback(SQLiteLogCallback func) in 
> c:\SQLiteTest\System.Data.SQLite\SQLite3.cs:line 935
>   at System.Data.SQLite.SQLiteFactory..ctor() in 
> c:\SQLiteTest\System.Data.SQLite\SQLiteFactory.cs:line 121
>   at System.Data.SQLite.SQLiteFactory..cctor() in 
> c:\SQLiteTest\System.Data.SQLite\SQLiteFactory.cs:line 131
>
> I am building and running the application with Visual Studio 2008 on a 
> Windows 7 64-bit machine.
> SQLite.Interop.2008 is set to the Win32 configuration.
> Both test.2008 and System.Data.SQLite.2008 projects are set to x86 
> configuration.
>
> I have updated the SQLite.Interop.2008 project to build the 
> SQLite.Interop.DLL and both the Interop.DLL and the System.Data.SQLite.DLL is 
> included in the test.exe folder.  I have also updated the SQLite.Interop.2008 
> project to include the proper ICU library files.  The project builds without 
> error and the test.exe will open up the main window.  I get the exception 
> when clicking "Run".  When I remove the SQLITE_ENABLE_ICU definition from the 
> SQLite.Interop.2008 project, it will build, and run as expected without error.
>
> Has anyone seen this before, and have a solution?  I am happy to provide more 
> details if needed.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems building/running SQLite test.exe with ICU enabled

2011-09-29 Thread Marc Henrickson
What I'm looking for is to be able to compile SQLite with ICU enabled and have 
the test application run at all.  I don't necessarily need to debug or run from 
the IDE.  It seems no matter which configuration I use, or which settings I 
tweak, nothing will work.  

In order to get the test application to not error out when I click "Run", I 
have to have my project configured as follows:
SQLite.Interop.2008 set to Win32
System.Data.SQLite.2008 set to x86 or AnyCPU
test.2008 set to x86
If those are set up like that, then the test.exe will run properly only if ICU 
is NOT enabled.  Using those same project configurations will cause test.exe to 
fail if ICU is enabled.

Why does enabling ICU cause it to fail, when it would work fine without ICU 
enabled?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems building/running SQLite test.exe with ICU enabled

2011-09-29 Thread Joe Mistachkin

>
> System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. --->
> System.TypeInitializationException: The type initializer for
'System.Data.SQLite.SQLiteFactory' threw an exception. --->
> System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.DLL': The
specified module could not be found.
> (Exception from HRESULT: 0x8007007E)
> 

This exception is almost always caused by a failure to locate the DLL in
question (i.e. SQLite.Interop.dll).  If you are building from source and
wish to run the test executable from within the IDE, you'll need to select
"DebugNativeOnly" or "ReleaseNativeOnly" as the build configuration.  Also,
if you want to debug a "pure" managed process, like the test executable, on
an x64 machine, you will need to set the platform to x64, not Win32;
otherwise, you'll simply get a BadImageFormatException when the managed
process (which will actually start as a 64-bit process) tries to load a
32-bit SQLite.Interop.dll.

--
Joe Mistachkin

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


Re: [sqlite] Problems

2011-09-14 Thread Simon Slavin

On 13 Sep 2011, at 7:36pm, David Holtkamp wrote:

> I was unaware of this. I thought it started to write to a Journal file
> during the backup and then persisted it afterward. However, if this
> scenario was happening, wouldn't the file size tend to jump around
> sporadically around 200Mb instead of settling into one specific size?

I think that although the backup API is starting again from scratch, it does 
not reduce the size of the file it is generating.  So since it got as far as 
180Meg, the file size stays at 180Meg until the backup API manages to get 
further than that point.

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


Re: [sqlite] Problems

2011-09-14 Thread David Holtkamp
I was unaware of this. I thought it started to write to a Journal file
during the backup and then persisted it afterward. However, if this
scenario was happening, wouldn't the file size tend to jump around
sporadically around 200Mb instead of settling into one specific size?

On Tue, Sep 13, 2011 at 2:29 PM, Richard Hipp  wrote:
> On Tue, Sep 13, 2011 at 2:23 PM, David Holtkamp  wrote:
>
>> Hello,
>> I have been using Membase (a nosql database), which uses sqlite3 to
>> persist data to disk and have run into some problems when attempting
>> to backup the database files. Membase uses 4 different database files
>> to store the data on each Node and in my particular case, each file is
>> around 800 Mb. When I issue the backup statement:
>>
>> /opt/membase/bin/sqlite3 /mnt/data-store/default-data/default-1.mb
>> '.backup /mnt/data-backup/mbfiles/default-1-backup.mb'
>>
>
> When some other process writes to the database file, the backup
> automatically starts over again from the beginning.  (It has to do this,
> since it has no way of knowing what parts of the file changed.)  Probably
> membase is writing to the database a periodic intervals that are
> approximately the same amount of time it takes you to copy 200MB.
>
> Is there any way to ask membase to stop persisting for long enough for you
> to complete your backup?
>
>
>>
>> The command executes and almost immediately copies 180Mb and then
>> comes to a near standstill. It continues in tiny spurts until it
>> reaches 260915200 bytes, and then the file stops growing but the
>> process continues to consume CPU resources. I've been trying to get a
>> successful backup for weeks now with no avail.
>>
>> If it matters, this system is set up on the Amazon Cloud via EC2 and
>> is using EBS drives. Additionally, this is a production environment so
>> the db is being accessed and restarts cannot be performed.
>>
>> Also here is a list of the files (I have set them and the destination
>> directory to 777 permissions to fix some access issues)
>>
>> drwxrwxrwx 2 membase  membase       4096 Sep 13 18:19 .
>> drwxrwxrwx 4 membase  root          4096 Aug  5 01:10 ..
>> -rwxrwxrwx 1 membase  membase      53248 Sep 13 18:19 default
>> -rwxrwxrwx 1 membase  membase  892068864 Sep 13 18:19 default-0.mb
>> -rwxrwxrwx 1 membase  membase      32768 Sep 13 18:19 default-0.mb-shm
>> -rwxrwxrwx 1 membase  membase    1858136 Sep 13 18:19 default-0.mb-wal
>> -rwxrwxrwx 1 membase  membase  892246016 Sep 13 18:19 default-1.mb
>> -rwxrwxrwx 1 membase  membase      32768 Sep 13 18:19 default-1.mb-shm
>> -rwxrwxrwx 1 membase  membase    1422168 Sep 13 18:19 default-1.mb-wal
>> -rwxrwxrwx 1 membase  membase  891885568 Sep 13 18:19 default-2.mb
>> -rwxrwxrwx 1 membase  membase      32768 Sep 13 18:19 default-2.mb-shm
>> -rwxrwxrwx 1 membase  membase    1322608 Sep 13 18:19 default-2.mb-wal
>> -rwxrwxrwx 1 membase  membase  892113920 Sep 13 18:18 default-3.mb
>> -rwxrwxrwx 1 membase  membase      32768 Sep 13 18:19 default-3.mb-shm
>> -rwxrwxrwx 1 membase  membase    1359288 Sep 13 18:19 default-3.mb-wal
>> -rwxrwxrwx 1 ec2-user ec2-user         0 Sep 12 17:12 default-4.mb
>> -rwxrwxrwx 1 ec2-user ec2-user         0 Sep 12 16:27 default.mb
>> -rwxrwxrwx 1 membase  membase      32768 Sep 13 18:19 default-shm
>> -rwxrwxrwx 1 membase  membase    1083664 Sep 13 18:19 default-wal
>>
>> Any help would be greatly appropriated.
>> Thanks!
>> David
>> ___
>> 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
>



-- 
David Holtkamp
Crimson Moon Entertainment LLC
Founder / CEO
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems

2011-09-13 Thread Richard Hipp
Another thing you might think about is to modify the membase code (it is
open-source after all) such that membase itself invokes the backup using the
sqlite3_backup() interfaces.  If the backup is being performed using the
same database connection that is doing the writes, then the backup will know
which pages of the original database file change, and only the changed pages
will have to be rewritten.  Hence, the backup doesn't need to start over
again at the beginning as it does when a write occurs because of a separate
process.

On Tue, Sep 13, 2011 at 2:39 PM, David Holtkamp  wrote:

> I was unaware of this. I thought it started to write to a Journal file
> during the backup and then persisted it afterward. However, if this
> scenario was happening, wouldn't the file size tend to jump around
> sporadically around 200Mb instead of settling into one specific size?
>

I don't follow your reasoning here.



>
> >
> > On Tue, Sep 13, 2011 at 2:29 PM, Richard Hipp  wrote:
> >> On Tue, Sep 13, 2011 at 2:23 PM, David Holtkamp 
> wrote:
> >>
> >>> Hello,
> >>> I have been using Membase (a nosql database), which uses sqlite3 to
> >>> persist data to disk and have run into some problems when attempting
> >>> to backup the database files. Membase uses 4 different database files
> >>> to store the data on each Node and in my particular case, each file is
> >>> around 800 Mb. When I issue the backup statement:
> >>>
> >>> /opt/membase/bin/sqlite3 /mnt/data-store/default-data/default-1.mb
> >>> '.backup /mnt/data-backup/mbfiles/default-1-backup.mb'
> >>>
> >>
> >> When some other process writes to the database file, the backup
> >> automatically starts over again from the beginning.  (It has to do this,
> >> since it has no way of knowing what parts of the file changed.)
>  Probably
> >> membase is writing to the database a periodic intervals that are
> >> approximately the same amount of time it takes you to copy 200MB.
> >>
> >> Is there any way to ask membase to stop persisting for long enough for
> you
> >> to complete your backup?
> >>
> >>
> >>>
> >>> The command executes and almost immediately copies 180Mb and then
> >>> comes to a near standstill. It continues in tiny spurts until it
> >>> reaches 260915200 bytes, and then the file stops growing but the
> >>> process continues to consume CPU resources. I've been trying to get a
> >>> successful backup for weeks now with no avail.
> >>>
> >>> If it matters, this system is set up on the Amazon Cloud via EC2 and
> >>> is using EBS drives. Additionally, this is a production environment so
> >>> the db is being accessed and restarts cannot be performed.
> >>>
> >>> Also here is a list of the files (I have set them and the destination
> >>> directory to 777 permissions to fix some access issues)
> >>>
> >>> drwxrwxrwx 2 membase  membase   4096 Sep 13 18:19 .
> >>> drwxrwxrwx 4 membase  root  4096 Aug  5 01:10 ..
> >>> -rwxrwxrwx 1 membase  membase  53248 Sep 13 18:19 default
> >>> -rwxrwxrwx 1 membase  membase  892068864 Sep 13 18:19 default-0.mb
> >>> -rwxrwxrwx 1 membase  membase  32768 Sep 13 18:19 default-0.mb-shm
> >>> -rwxrwxrwx 1 membase  membase1858136 Sep 13 18:19 default-0.mb-wal
> >>> -rwxrwxrwx 1 membase  membase  892246016 Sep 13 18:19 default-1.mb
> >>> -rwxrwxrwx 1 membase  membase  32768 Sep 13 18:19 default-1.mb-shm
> >>> -rwxrwxrwx 1 membase  membase1422168 Sep 13 18:19 default-1.mb-wal
> >>> -rwxrwxrwx 1 membase  membase  891885568 Sep 13 18:19 default-2.mb
> >>> -rwxrwxrwx 1 membase  membase  32768 Sep 13 18:19 default-2.mb-shm
> >>> -rwxrwxrwx 1 membase  membase1322608 Sep 13 18:19 default-2.mb-wal
> >>> -rwxrwxrwx 1 membase  membase  892113920 Sep 13 18:18 default-3.mb
> >>> -rwxrwxrwx 1 membase  membase  32768 Sep 13 18:19 default-3.mb-shm
> >>> -rwxrwxrwx 1 membase  membase1359288 Sep 13 18:19 default-3.mb-wal
> >>> -rwxrwxrwx 1 ec2-user ec2-user 0 Sep 12 17:12 default-4.mb
> >>> -rwxrwxrwx 1 ec2-user ec2-user 0 Sep 12 16:27 default.mb
> >>> -rwxrwxrwx 1 membase  membase  32768 Sep 13 18:19 default-shm
> >>> -rwxrwxrwx 1 membase  membase1083664 Sep 13 18:19 default-wal
> >>>
> >>> Any help would be greatly appropriated.
> >>> Thanks!
> >>> David
> >>> ___
> >>> 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
> >>
> >
> >
> >
> > --
> > David Holtkamp
> > Crimson Moon Entertainment LLC
> > Founder / CEO
> >
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> 

Re: [sqlite] Problems

2011-09-13 Thread David Holtkamp
I was unaware of this. I thought it started to write to a Journal file
during the backup and then persisted it afterward. However, if this
scenario was happening, wouldn't the file size tend to jump around
sporadically around 200Mb instead of settling into one specific size?

>
> On Tue, Sep 13, 2011 at 2:29 PM, Richard Hipp  wrote:
>> On Tue, Sep 13, 2011 at 2:23 PM, David Holtkamp  wrote:
>>
>>> Hello,
>>> I have been using Membase (a nosql database), which uses sqlite3 to
>>> persist data to disk and have run into some problems when attempting
>>> to backup the database files. Membase uses 4 different database files
>>> to store the data on each Node and in my particular case, each file is
>>> around 800 Mb. When I issue the backup statement:
>>>
>>> /opt/membase/bin/sqlite3 /mnt/data-store/default-data/default-1.mb
>>> '.backup /mnt/data-backup/mbfiles/default-1-backup.mb'
>>>
>>
>> When some other process writes to the database file, the backup
>> automatically starts over again from the beginning.  (It has to do this,
>> since it has no way of knowing what parts of the file changed.)  Probably
>> membase is writing to the database a periodic intervals that are
>> approximately the same amount of time it takes you to copy 200MB.
>>
>> Is there any way to ask membase to stop persisting for long enough for you
>> to complete your backup?
>>
>>
>>>
>>> The command executes and almost immediately copies 180Mb and then
>>> comes to a near standstill. It continues in tiny spurts until it
>>> reaches 260915200 bytes, and then the file stops growing but the
>>> process continues to consume CPU resources. I've been trying to get a
>>> successful backup for weeks now with no avail.
>>>
>>> If it matters, this system is set up on the Amazon Cloud via EC2 and
>>> is using EBS drives. Additionally, this is a production environment so
>>> the db is being accessed and restarts cannot be performed.
>>>
>>> Also here is a list of the files (I have set them and the destination
>>> directory to 777 permissions to fix some access issues)
>>>
>>> drwxrwxrwx 2 membase  membase       4096 Sep 13 18:19 .
>>> drwxrwxrwx 4 membase  root          4096 Aug  5 01:10 ..
>>> -rwxrwxrwx 1 membase  membase      53248 Sep 13 18:19 default
>>> -rwxrwxrwx 1 membase  membase  892068864 Sep 13 18:19 default-0.mb
>>> -rwxrwxrwx 1 membase  membase      32768 Sep 13 18:19 default-0.mb-shm
>>> -rwxrwxrwx 1 membase  membase    1858136 Sep 13 18:19 default-0.mb-wal
>>> -rwxrwxrwx 1 membase  membase  892246016 Sep 13 18:19 default-1.mb
>>> -rwxrwxrwx 1 membase  membase      32768 Sep 13 18:19 default-1.mb-shm
>>> -rwxrwxrwx 1 membase  membase    1422168 Sep 13 18:19 default-1.mb-wal
>>> -rwxrwxrwx 1 membase  membase  891885568 Sep 13 18:19 default-2.mb
>>> -rwxrwxrwx 1 membase  membase      32768 Sep 13 18:19 default-2.mb-shm
>>> -rwxrwxrwx 1 membase  membase    1322608 Sep 13 18:19 default-2.mb-wal
>>> -rwxrwxrwx 1 membase  membase  892113920 Sep 13 18:18 default-3.mb
>>> -rwxrwxrwx 1 membase  membase      32768 Sep 13 18:19 default-3.mb-shm
>>> -rwxrwxrwx 1 membase  membase    1359288 Sep 13 18:19 default-3.mb-wal
>>> -rwxrwxrwx 1 ec2-user ec2-user         0 Sep 12 17:12 default-4.mb
>>> -rwxrwxrwx 1 ec2-user ec2-user         0 Sep 12 16:27 default.mb
>>> -rwxrwxrwx 1 membase  membase      32768 Sep 13 18:19 default-shm
>>> -rwxrwxrwx 1 membase  membase    1083664 Sep 13 18:19 default-wal
>>>
>>> Any help would be greatly appropriated.
>>> Thanks!
>>> David
>>> ___
>>> 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
>>
>
>
>
> --
> David Holtkamp
> Crimson Moon Entertainment LLC
> Founder / CEO
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems

2011-09-13 Thread Richard Hipp
On Tue, Sep 13, 2011 at 2:23 PM, David Holtkamp  wrote:

> Hello,
> I have been using Membase (a nosql database), which uses sqlite3 to
> persist data to disk and have run into some problems when attempting
> to backup the database files. Membase uses 4 different database files
> to store the data on each Node and in my particular case, each file is
> around 800 Mb. When I issue the backup statement:
>
> /opt/membase/bin/sqlite3 /mnt/data-store/default-data/default-1.mb
> '.backup /mnt/data-backup/mbfiles/default-1-backup.mb'
>

When some other process writes to the database file, the backup
automatically starts over again from the beginning.  (It has to do this,
since it has no way of knowing what parts of the file changed.)  Probably
membase is writing to the database a periodic intervals that are
approximately the same amount of time it takes you to copy 200MB.

Is there any way to ask membase to stop persisting for long enough for you
to complete your backup?


>
> The command executes and almost immediately copies 180Mb and then
> comes to a near standstill. It continues in tiny spurts until it
> reaches 260915200 bytes, and then the file stops growing but the
> process continues to consume CPU resources. I've been trying to get a
> successful backup for weeks now with no avail.
>
> If it matters, this system is set up on the Amazon Cloud via EC2 and
> is using EBS drives. Additionally, this is a production environment so
> the db is being accessed and restarts cannot be performed.
>
> Also here is a list of the files (I have set them and the destination
> directory to 777 permissions to fix some access issues)
>
> drwxrwxrwx 2 membase  membase   4096 Sep 13 18:19 .
> drwxrwxrwx 4 membase  root  4096 Aug  5 01:10 ..
> -rwxrwxrwx 1 membase  membase  53248 Sep 13 18:19 default
> -rwxrwxrwx 1 membase  membase  892068864 Sep 13 18:19 default-0.mb
> -rwxrwxrwx 1 membase  membase  32768 Sep 13 18:19 default-0.mb-shm
> -rwxrwxrwx 1 membase  membase1858136 Sep 13 18:19 default-0.mb-wal
> -rwxrwxrwx 1 membase  membase  892246016 Sep 13 18:19 default-1.mb
> -rwxrwxrwx 1 membase  membase  32768 Sep 13 18:19 default-1.mb-shm
> -rwxrwxrwx 1 membase  membase1422168 Sep 13 18:19 default-1.mb-wal
> -rwxrwxrwx 1 membase  membase  891885568 Sep 13 18:19 default-2.mb
> -rwxrwxrwx 1 membase  membase  32768 Sep 13 18:19 default-2.mb-shm
> -rwxrwxrwx 1 membase  membase1322608 Sep 13 18:19 default-2.mb-wal
> -rwxrwxrwx 1 membase  membase  892113920 Sep 13 18:18 default-3.mb
> -rwxrwxrwx 1 membase  membase  32768 Sep 13 18:19 default-3.mb-shm
> -rwxrwxrwx 1 membase  membase1359288 Sep 13 18:19 default-3.mb-wal
> -rwxrwxrwx 1 ec2-user ec2-user 0 Sep 12 17:12 default-4.mb
> -rwxrwxrwx 1 ec2-user ec2-user 0 Sep 12 16:27 default.mb
> -rwxrwxrwx 1 membase  membase  32768 Sep 13 18:19 default-shm
> -rwxrwxrwx 1 membase  membase1083664 Sep 13 18:19 default-wal
>
> Any help would be greatly appropriated.
> Thanks!
> David
> ___
> 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


Re: [sqlite] problems on importing quoted csv files

2011-05-19 Thread Thomas Mittelstaedt
Am Dienstag, den 17.05.2011, 13:53 +0800 schrieb jiajianying:
> Hello,
> 
> I'm using sqlite to process some csv files. It is very disappointing 
> that sqlite's csv mode doesn't support quoted csv format. I tried 
> spatialite which can only strip quote marks but can't parse it correctly.
> 
> Is there any suitable modules or tools for importing quoted csv files?
> 
> Thanks
> 
> Justin
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Have you tried to use a tab ('\t') as the field delimiter? I tried that
when exporting a calendar from gnome evolution to a csv file and
importing it into an OpenOffice spreadsheet.

 
-- 
thomas


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


Re: [sqlite] problems on importing quoted csv files

2011-05-17 Thread Sylvain Pointeau
I made one, as a command line tool.

the announcement:
http://spointeau.blogspot.com/2011/03/sylisa-csv2db-is-born.html

the sources:
https://gitorious.org/sylisa-csv2db/sylisa-csv2db


Another option, you can also use the shell (in python) apsw
http://apidoc.apsw.googlecode.com/hg/index.html
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] problems on importing quoted csv files

2011-05-17 Thread Andrew Sigmund
Justin,

If you're comfortable with perl, try perl's Text::CSV module with 
DBD::SQLite.  I have used Text::CSV, which has a good set of format options 
that it parses.  I have not used DBD::SQLite myself.

Andy

-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of jiajianying
Sent: Monday, May 16, 2011 22:53
To: sqlite-users@sqlite.org
Subject: [sqlite] problems on importing quoted csv files

Hello,

I'm using sqlite to process some csv files. It is very disappointing
that sqlite's csv mode doesn't support quoted csv format. I tried
spatialite which can only strip quote marks but can't parse it correctly.

Is there any suitable modules or tools for importing quoted csv files?

Thanks

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


Confidentiality Notice.
This message may contain information that is confidential or otherwise 
protected from disclosure. If you are not the intended recipient, you are 
hereby notified that any use, disclosure, dissemination, distribution,  or 
copying  of this message, or any attachments, is strictly prohibited.  If you 
have received this message in error, please advise the sender by reply e-mail, 
and delete the message and any attachments.  Thank you.

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


Re: [sqlite] Problems while upgrading to 3.7.3

2011-04-21 Thread Dan Kennedy
On 04/21/2011 05:42 PM, Gaurav Srivastava wrote:
> Hi
>
> I have recently upgraded my sqlite version from 3.5.1 to 3.7.3. With the
> update I have been seeing some issues with sqlite3_prepare_v2() API.
> The workflow here is:
> sqlite3VdbeSetSql(pVDbe, zSql, saveSqlflag)
>  ^
>  |
>  |
> sqlite3prepare(...)
>  ^
>  |
>  |
> sqlite3LockandPrepare(...)
>  ^
>  |
>  |
> sqlite3_prepare_v2(savesqlflag=1).
>
> I have created a statement using sqlite3_prepare_v2. I execute a query and
> then use sqlite3_step(stmt) to step over the results. Firstly, it fails due
> to SQLITE_SCHEMA error and then uses sqlite3_reprepare to retry. In that
> function the isPrepareV2 variable becomes false and so I am getting the
> value SQLITE_OK instead of SQLITE_ROW. The second thing is in
> sqlite3VdbeSwap function, we are not properly swapping the isPrepareV2
> values.

I think the code is Ok there. The important part is that after the
call to sqlite3Reprepare() returns, the isPrepareV2 flag is still set.
Are you finding this is not the case?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] problems with running test suite

2010-07-29 Thread Gerry Snyder
package require Tcl 8.5

is all it takes


Gerry

On 7/29/10, Richard Hipp  wrote:
> On Thu, Jul 29, 2010 at 4:44 PM, Paweł Hajdan, Jr.
> wrote:
>
>> I'm planning to contribute some patches (upstreaming patches Chromium
>> project applies to its local copy of sqlite).
>>
>> I've checked out the fossil repository, configured and compiled sqlite,
>> and
>> tried running "make test" (I didn't make any changes).
>>
>> I'm pasting below the test result and some fossil info. Please let me know
>> if you need more. This is on Ubuntu Lucid. Do you have any ideas what
>> makes
>> these tests fail? Should I be doing it some other way?
>>
>> wal2-10.2.1... Ok
>> wal2-10.2.2... Ok
>> wal2-10.2.3... Ok
>> wal2-11.0... Ok
>> wal2-11.1.1... Ok
>> ./testfixture: bad field specifier "t"
>>while executing
>>
>
>
> The test suite now requires Tcl 8.5.  You appear to be running Tcl 8.4.
>
> It would be relatively easy for use to enhance the test suite so that it
> automatically detects a too-old version of Tcl and prints a warning or
> error.  We'll try to make that change for you soon.
>
> --
> -
> D. Richard Hipp
> d...@sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

-- 
Sent from my mobile device
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] problems with running test suite

2010-07-29 Thread Simon Slavin

On 30 Jul 2010, at 1:14am, Paweł Hajdan, Jr. wrote:

> On Thu, Jul 29, 2010 at 16:34, Richard Hipp  wrote:
> 
>> The test suite now requires Tcl 8.5.  You appear to be running Tcl 8.4.
>> 
> 
> That's right. After upgrading from tcl8.4 to tcl8.5 the tests run just fine.

Can you insert a new test, right at the beginning, that checks to see you're 
running a sufficiently high version of tcl ?

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


Re: [sqlite] problems with running test suite

2010-07-29 Thread Paweł Hajdan , Jr .
On Thu, Jul 29, 2010 at 16:34, Richard Hipp  wrote:

> The test suite now requires Tcl 8.5.  You appear to be running Tcl 8.4.
>

That's right. After upgrading from tcl8.4 to tcl8.5 the tests run just fine.

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


Re: [sqlite] problems with running test suite

2010-07-29 Thread Richard Hipp
On Thu, Jul 29, 2010 at 4:44 PM, Paweł Hajdan, Jr.
wrote:

> I'm planning to contribute some patches (upstreaming patches Chromium
> project applies to its local copy of sqlite).
>
> I've checked out the fossil repository, configured and compiled sqlite, and
> tried running "make test" (I didn't make any changes).
>
> I'm pasting below the test result and some fossil info. Please let me know
> if you need more. This is on Ubuntu Lucid. Do you have any ideas what makes
> these tests fail? Should I be doing it some other way?
>
> wal2-10.2.1... Ok
> wal2-10.2.2... Ok
> wal2-10.2.3... Ok
> wal2-11.0... Ok
> wal2-11.1.1... Ok
> ./testfixture: bad field specifier "t"
>while executing
>


The test suite now requires Tcl 8.5.  You appear to be running Tcl 8.4.

It would be relatively easy for use to enhance the test suite so that it
automatically detects a too-old version of Tcl and prints a warning or
error.  We'll try to make that change for you soon.

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


Re: [sqlite] Problems with 'make test' on 3.7.0

2010-07-26 Thread Andy Gibbs
On Friday, July 23, 2010 1:26 PM, Richard Hipp wrote:

> You need TCL 8.5 or (even better) 8.6.  TCL 8.4 is not adequate
> to run the newer parts of the test suite.

Again, thank you for your quick response.

Please can I suggest that the configure scripts be updated to reflect this 
change in dependencies?

For example, at line 12262 in 'configure', "for ac_prog in tclsh8.4 tclsh" 
should perhaps be changed to "for ac_prog in tclsh8.6 tclsh8.5 tclsh"? 
There is also a similar line in configure.ac (line 142).  Line numbers are 
appropriate to the latest versions of these files in fossil.

Best regards and thanks

Andy


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


Re: [sqlite] Problems with 'make test' on 3.7.0

2010-07-22 Thread Andy Gibbs
On Thursday, July 22, 2010 8:21 PM, Richard Hipp wrote:

>> > The configure command I'm using is:
>> >
>> > ./configure
>> > CFLAGS="-std=c99 -Werror" --enable-threadsafe --enable-debug
>> --with-tcl=/usr/lib/tcl8.4
>> >
>>
>> Sorry, I should add, I'm running on Debian Linux Lenny, with gcc 4.4.4,
>> because this is probably useful information ;o)
>>
>
> Have you tried omitting the CFLAGS argument?
>

Thank you for your reply.  I have tried it without the CFLAGS, although I 
have found that CFLAGS="-std=gnu99 -Werror" also compiles without error. 
(It turns out the usleep and fsync are only prototyped in unistd.h if 
__USE_BSD is defined).  Either way, I now get as far as this:

wal2-10.1.1... Ok
wal2-10.1.2... Ok
wal2-10.1.3... Ok
wal2-10.1.4... Ok
wal2-10.2.1... Ok
wal2-10.2.2... Ok
wal2-10.2.3... Ok
wal2-11.0... Ok
wal2-11.1.1... Ok
./testfixture: bad field specifier "t"
while executing
"binary scan $I t* L"
(file "../checkout.new/test/wal2.test" line 987)
invoked from within
"source ../checkout.new/test/wal2.test"
invoked from within
"interp eval tinterp $script"
(procedure "slave_test_script" line 24)
invoked from within
"slave_test_script [list source $zFile] "
invoked from within
"time { slave_test_script [list source $zFile] }"
(procedure "slave_test_file" line 14)
invoked from within
"slave_test_file $::testdir/$file"
(procedure "run_tests" line 12)
invoked from within
"run_tests veryquick -presql {} -files {bigfile.test shared3.test 
tkt3419.test where9.test fts2f.test sync.test fts1o.test misc2.test 
server1.test tkt3..."
("uplevel" body line 1)
invoked from within
"uplevel run_tests $name $::testspec($name)"
(procedure "run_test_suite" line 5)
invoked from within
"run_test_suite veryquick"
(file "../checkout.new/test/veryquick.test" line 16)
make: *** [test] Error 1


Thanks for your help.

Regards
Andy

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


Re: [sqlite] Problems with 'make test' on 3.7.0

2010-07-22 Thread Richard Hipp
On Thu, Jul 22, 2010 at 12:39 PM, Andy Gibbs wrote:

> On Thursday, July 22, 2010 6:36 PM, Andy Gibbs wrote:
>
> > The configure command I'm using is:
> >
> > ./configure
> > CFLAGS="-std=c99 -Werror" --enable-threadsafe --enable-debug
> --with-tcl=/usr/lib/tcl8.4
> >
>
> Sorry, I should add, I'm running on Debian Linux Lenny, with gcc 4.4.4,
> because this is probably useful information ;o)
>

Have you tried omitting the CFLAGS argument?


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


Re: [sqlite] Problems with 'make test' on 3.7.0

2010-07-22 Thread Andy Gibbs
On Thursday, July 22, 2010 6:36 PM, Andy Gibbs wrote:

> The configure command I'm using is:
>
> ./configure
> CFLAGS="-std=c99 -Werror" --enable-threadsafe --enable-debug 
> --with-tcl=/usr/lib/tcl8.4
>

Sorry, I should add, I'm running on Debian Linux Lenny, with gcc 4.4.4, 
because this is probably useful information ;o)

Cheers
Andy

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


Re: [sqlite] Problems with loosing data

2009-12-13 Thread Simon Slavin

On 13 Dec 2009, at 11:04am, Marek Staniewski wrote:

> We are using some application, which uses sqlite over the network.
> Sometimes I observed that last entered data into application is lost. 

What programming language are you calling the SQLite function library from ?
What operating system is the computer that runs that program running ?

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


Re: [sqlite] Problems passing parameters between SQLite + TCL

2009-11-11 Thread Brett Schwarz
>
> 
>
>   Here is the cut-down program...
>
> 
> #!/usr/bin/tclsh
> set lat_degrees [expr [lindex $argv 0]]
> set long_degrees [expr [lindex $argv 1]]
> set radius  [expr [lindex $argv 2]]

Not sure why you are using expr in the above (i.e. you probably don't need 
it)...but 
that's not the problem. Also, if you are using Tcl 8.5, you can use lassign as 
well:

lassign $argv lat_degrees long_degress radius

> load /usr/lib/sqlite-3.6.17/libtclsqlite3.so
> sqlite3 db :memory:
> # Note: GIS convention has longitude negative in the western hemisphere.
> # But end-users will get annoyed at having to enter the minus sign all the
> # time.  So the conversion is done internally in the distance() function.
> proc sql_distance {lat1, long1, lat2, long2} {

The variable "lat1" does not exist, but the variable "lat1," does. Tcl 
procedures do not use commas to 
separate args...just spaces...so:

proc sql_distance {lat1 long1 lat2 long2} {


>   set radian [expr 180 / 3.1415926]
>   set lat1 [expr $lat1 / $radian ]
>   set long1 [expr $long1 / $radian * (-1) ]
>   set lat2 [expr $lat2 / $radian ]
>   set long2 [expr $long2 / $radian ]

Just a tip, most of the time you want to brace expr args to avoid Tcl's double 
substitution. 
No harm, just has a slight performance impact. For example:

set lat1 [expr {$lat1 / $radian}]


HTH,
--brett


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


Re: [sqlite] Problems with the UPDATE command

2009-11-05 Thread Rodney Cocker

Hi Igor,

 

Thanks for your reply.

 

I have a database with a table in it called local_episodes, it has about 8000 
entries in it.

 

Each record in the table holds a reference to the location of a file on my 
computer.

 

Currently the files are stored on 3 different drives (D:, F:, H:).  I am doing 
some consolidation and file management tasks and wish to move all the files on 
my F & H drives to a new drive named J:

 

So I want to run an update query that looks up all files that are listed in the 
database as being on either the F or H drives and change the location to be J:

 

For example:

 

Currently in the database I have the following entries:

 

F:\movie\antarctica.avi

H:\movie\iceblues.avi

 

I wish to change these entries to read:

 

J:\movie\antarctica.avi

J:\movie\iceblues.avi

 

In order to do this, I opened the database in SQLite Database Browser

 

Clicked on the Execute SQL Tab

 

Entered the following query:


UPDATE local_episodes
SET EpisodeFilename = 'j:' || SUBSTR(EpisodeFilename, 
3,LENGTH(EpisodeFilename)) 
WHERE SUBSTR(EpisodeFilename,1,3)='F:\' 


This worked perfectly and as expected F:\movie\antarctica.avi became 
J:\movie\antarctica.avi

 

I then tried entering the same SQL query but this time using H: in the where 
condition

 

UPDATE local_episodes
SET EpisodeFilename = 'j:' || SUBSTR(EpisodeFilename, 
3,LENGTH(EpisodeFilename)) 
WHERE SUBSTR(EpisodeFilename,1,3)='H:\' 


This is where it didn't work, and by this I mean this resulted in no records 
being changed at all.  There were no error messages, just no changes made.

 

I then took the original database with none of the records changed and did this 
in reverse order ie I ran the update query with H in the where condition first. 
 In this case the records were changed, but after that if I ran the update 
query with F in the where condition this also resulted in no records being 
changed and no error messages.

 

It seems for whatever reason that the update query only works once on the table 
and after that if fails to have any effect.

 

I thought I would be clever and so tried this again with a fresh copy of the 
database and this time I tried to change both F & H at the same time with the 
following update query.

 

UPDATE local_episodes
SET EpisodeFilename = 'j:' || SUBSTR(EpisodeFilename, 
3,LENGTH(EpisodeFilename)) 
WHERE SUBSTR(EpisodeFilename,1,3)='F:\' OR SUBSTR(EpisodeFilename,1,3)='H:\' 


But this also resulted in no records being changed and no error messages.

 

So whatever I attempt I only seem to be able to change the file locations for 
the files in one drive not both.

 

I don't think the backslash is causing a problem because it works in the first 
instance.

 

The only thing I haven't tried which I will give a go later tonight when I get 
home is to change all the references to files on the f drive to J and then see 
if I can change them back again to f.

 

Any suggestions would be greatly appreciated.

 

Regards

 

 

Rodney

 

 


 
> To: sqlite-users@sqlite.org
> From: itandet...@mvps.org
> Date: Thu, 5 Nov 2009 14:42:30 -0500
> Subject: Re: [sqlite] Problems with the UPDATE command
> 
> Rodney Cocker <rodneycoc...@hotmail.com>
> wrote: 
> > I ran the following SQL command
> > 
> > UPDATE local_episodes
> > SET EpisodeFilename = 'j:' || SUBSTR(EpisodeFilename,
> > 3,LENGTH(EpisodeFilename)) 
> > WHERE SUBSTR(EpisodeFilename,1,3)='F:\'
> > 
> > Which worked perfectly, but when I went to run it the next time to
> > change any files stored on my H: drive it didn't work. 
> 
> Define "didn't work". What statement did you run, and how did the outcome 
> differ from your expectations?
> 
> How do you run the statement? Be careful with that backslash - many 
> programming languages and shell environments treat those as escape characters 
> (SQLlite itself doesn't).
> 
> Igor Tandetnik
> 
> 
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
  
_
Looking for a date? View photos of singles in your area!
http://clk.atdmt.com/NMN/go/150855801/direct/01/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems with the UPDATE command

2009-11-05 Thread P Kishor
On Thu, Nov 5, 2009 at 1:28 PM, Rodney Cocker  wrote:
>
> I ran the following SQL command
>
> UPDATE local_episodes
> SET EpisodeFilename = 'j:' || SUBSTR(EpisodeFilename, 
> 3,LENGTH(EpisodeFilename))
> WHERE SUBSTR(EpisodeFilename,1,3)='F:\'
>
> Which worked perfectly, but when I went to run it the next time to change any 
> files stored on my H: drive it didn't work.
>
> I performed several tests and I can change either all the records on the F: 
> drive or all the records on the H: drive but not both.
>
> It seems that after the first command, it won't work a second time.
>
> I even tried:
>
> UPDATE local_episodes
> SET EpisodeFilename = 'j:' || SUBSTR(EpisodeFilename, 
> 3,LENGTH(EpisodeFilename))
> WHERE SUBSTR(EpisodeFilename,1,3)='F:\' OR SUBSTR(EpisodeFilename,1,3)='H:\'
>
> But this results in none of the records being changed.
>
> Any ideas as to the cause of this behaviour?
>
>

No enough information to generate any ideas whatsoever. From what you
describe, the following works for me

sqlite> CREATE TABLE local_episodes (EpisodeFilename TEXT);
sqlite> INSERT INTO local_episodes VALUES ('F:\somefile');
sqlite> INSERT INTO local_episodes VALUES ('F:\someother file');
sqlite> INSERT INTO local_episodes VALUES ('H:\a file on h drive');
sqlite> INSERT INTO local_episodes VALUES ('H:\another file on h drive');
sqlite> SELECT * FROM local_episodes;
EpisodeFilename
---
F:\somefile
F:\someother file
H:\a file on h drive
H:\another file on h drive
sqlite> UPDATE local_episodes
   ...> SET EpisodeFilename = 'j:' || Substr(EpisodeFilename, 3,
Length(EpisodeFilename))
   ...> WHERE Substr(EpisodeFilename, 1, 3)= 'F:\';
sqlite> SELECT * FROM local_episodes;
EpisodeFilename
---
j:\somefile
j:\someother file
H:\a file on h drive
H:\another file on h drive
sqlite> UPDATE local_episodes
   ...> SET EpisodeFilename = 'j:' || Substr(EpisodeFilename, 3,
Length(EpisodeFilename))
   ...> WHERE Substr(EpisodeFilename, 1, 3)= 'H:\';
sqlite> SELECT * FROM local_episodes;
EpisodeFilename
---
j:\somefile
j:\someother file
j:\a file on h drive
j:\another file on h drive
sqlite>



--
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
---
Assertions are politics; backing up assertions with evidence is science
===
Sent from Madison, Wisconsin, United States
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problems with the UPDATE command

2009-11-05 Thread Igor Tandetnik
Rodney Cocker 
wrote: 
> I ran the following SQL command
> 
> UPDATE local_episodes
> SET EpisodeFilename = 'j:' || SUBSTR(EpisodeFilename,
> 3,LENGTH(EpisodeFilename)) 
> WHERE SUBSTR(EpisodeFilename,1,3)='F:\'
> 
> Which worked perfectly, but when I went to run it the next time to
> change any files stored on my H: drive it didn't work. 

Define "didn't work". What statement did you run, and how did the outcome 
differ from your expectations?

How do you run the statement? Be careful with that backslash - many programming 
languages and shell environments treat those as escape characters (SQLlite 
itself doesn't).

Igor Tandetnik


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


Re: [sqlite] Problems with SQLite under Cygwin

2009-10-20 Thread Pavel Ivanov
Another idea: make sure that you're telling linker to link with
libsqlite3.a - it cannot guess it for you.

Pavel

On Tue, Oct 20, 2009 at 6:13 AM, Michal Seliga  wrote:
> just an idea - make sure you are crosscompiling and libsqlite3.a is for
> arm-linux and not for cygwin
>
> j.hermanussen wrote:
>> Hi to all, I'm new on this list.
>>
>> I'm working on an application that runs on a small ARM-LINUX device, too
>> small to contain GCC. So I've installed Cygwin on my Win XP desktop PC.
>> Cygwin has arm-linux.gcc installed. Compiling & link works fine. The
>> exec is FTP'd to the ARM device. Works great.
>> Now I want to incorporate SQLite in my application. I unzipped it to a
>> directory under Cygwin, did the configure, make & make install steps.
>> The library libsqlite3.a is in place but when I make a small main.c with
>> a call to sqlite3_open(...) in it, the linker says:
>> undefined reference for sqlite3_open
>>
>> Does anybody have any idea on what causes this link error?
>>
>> Thanks for your attention,
>> John
>>
>> ___
>> 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] Problems with SQLite under Cygwin

2009-10-20 Thread Michal Seliga
just an idea - make sure you are crosscompiling and libsqlite3.a is for
arm-linux and not for cygwin

j.hermanussen wrote:
> Hi to all, I'm new on this list.
> 
> I'm working on an application that runs on a small ARM-LINUX device, too 
> small to contain GCC. So I've installed Cygwin on my Win XP desktop PC. 
> Cygwin has arm-linux.gcc installed. Compiling & link works fine. The 
> exec is FTP'd to the ARM device. Works great.
> Now I want to incorporate SQLite in my application. I unzipped it to a 
> directory under Cygwin, did the configure, make & make install steps. 
> The library libsqlite3.a is in place but when I make a small main.c with 
> a call to sqlite3_open(...) in it, the linker says:
> undefined reference for sqlite3_open
> 
> Does anybody have any idea on what causes this link error?
> 
> Thanks for your attention,
> John
> 
> ___
> 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] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread P Kishor
On Thu, Sep 3, 2009 at 10:30 AM, Jim Showalter<j...@jimandlisa.com> wrote:
> At the risk of throwing gasoline on a fire...
>
> I didn't react badly to Rod's original post.

The original post was fine. It was the third post that was inflammatory.

> Yes, it could have been
> worded more diplomatically, but why so thin-skinned about it?

a! so it *could* have been worded more diplomatically, so it
*should* have been worded more diplomatically. The subsequent dialog
could have been --

Rod: blah blah

Someone else: I take umbrage at that

Rod: Sorry, if I came off as disgruntled. I really appreciate all this
free software that usually works great. Was frustrated with the snafus
I encountered. I hope someone can help me.

Someone else: Oh, no problem. Happens to all of us. Let's see now...

> He
> reported some issues. The response was that they weren't issues. Can
> you see how that might be construed as unhelpful?

Not at all. DRH's response was matter of fact and looking forward.
Pavel responded with 4 very helpful posts.


>
> As for:
>
> "You see, the fact is that most people ported their applications from
> SQLite2 to SQLite3 back in 2004."
>
> while that may very well be true, it sure didn't help Rod, did it?
> What he asked for was a migration guide (actually, he just asked for
> some clarifying language in the documentation). Just because most
> people don't need a migration guide because they already ported
> doesn't mean that a user who hasn't ported doesn't need a migration
> guide. That's arguing from the specific to the general, one of the
> classic logical fallicies.


Very true. But this free and open software. If a migration guide to
fit Rod's specifics doesn't exist, then Rod can ask questions and
create one and put it back into public domain so others can benefit. I
guess it all boils down to the attitude one displays. No one grudges
anyone their moments of venting frustration as long as those displays
come with also a wry smile and some self-deprecation. But, DRH already
commented on that.



>
> - Original Message -
> From: "D. Richard Hipp" <d...@hwaci.com>
> To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
> Sent: Thursday, September 03, 2009 8:05 AM
> Subject: Re: [sqlite] Problems encountered on upgrade from SQLite2
> to -3
>
>
>>
>> On Sep 3, 2009, at 10:43 AM, Rod Dav4is wrote:
>>
>>>    *re applied affinity:* If that is what is meant, then the
>>> document
>>> should say it, instead of leaving it to the reader's imagination.
>>>    Since column typing was superfluous in version2, it seems that
>>> the
>>> version3 adoption of typing, as defined, would perhaps be an
>>> upgrade
>>> compatibility issue, no?
>>
>>
>> I might be wrong, but I'm guessing you'll find the people here will
>> help you more if you take the chip off of your shoulder and ask
>> nicely.
>>
>> You see, the fact is that most people ported their applications from
>> SQLite2 to SQLite3 back in 2004.  A dare say that most current
>> readers
>> of this mailing list didn't discover SQLite until after SQLite3 was
>> already well established, and hence have no memory of what SQLite2
>> did
>> or how it was different from SQLite3.  So porting from SQLite2 to
>> SQLite3 is not a topic that is a high priority to people here.  And
>> hence, they tend to respond unsupportively when addressing a
>> complaint
>> by a user who is clearly miffed that SQLite3 does not work exactly
>> the
>> way SQLite2 used to work.
>>
>> I suggest a do-over.
>>
>> Rod, I suggest you re-register for this mailing list under a
>> different
>> name, then log on and send a request that is worded something like
>> this:
>>
>>    "Hi!  I'm porting an older application from SQLite2 to SQLite3
>> and
>> am running into a couple of compatibility issues.  [explain the two
>> problems here.]  Can somebody suggest ways of either (1) getting
>> SQLite3 to work more like SQLite2 used to work, or (2) how I can
>> change my code to work the way SQLite3 expects?  Thanks!"
>>
>> Note that the sample request in the previous paragraph does not
>> contain an impatient claim that SQLite3 is broken and needs fixing.
>> And in particular, it does not contain such a claim coming from
>> someone who does not understand how SQLite3 works.
>>
>> I think if you try my do-over suggestion you will find the people
>> here
>> will be nice, friendly, and much, much more helpful.
>>
>> D. Richard Hipp
>> d...@hwaci.com
>>
>>
>

Re: [sqlite] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread Jim Showalter
At the risk of throwing gasoline on a fire...

I didn't react badly to Rod's original post. Yes, it could have been 
worded more diplomatically, but why so thin-skinned about it? He 
reported some issues. The response was that they weren't issues. Can 
you see how that might be construed as unhelpful?

As for:

"You see, the fact is that most people ported their applications from 
SQLite2 to SQLite3 back in 2004."

while that may very well be true, it sure didn't help Rod, did it? 
What he asked for was a migration guide (actually, he just asked for 
some clarifying language in the documentation). Just because most 
people don't need a migration guide because they already ported 
doesn't mean that a user who hasn't ported doesn't need a migration 
guide. That's arguing from the specific to the general, one of the 
classic logical fallicies.

- Original Message - 
From: "D. Richard Hipp" <d...@hwaci.com>
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
Sent: Thursday, September 03, 2009 8:05 AM
Subject: Re: [sqlite] Problems encountered on upgrade from SQLite2 
to -3


>
> On Sep 3, 2009, at 10:43 AM, Rod Dav4is wrote:
>
>>*re applied affinity:* If that is what is meant, then the 
>> document
>> should say it, instead of leaving it to the reader's imagination.
>>Since column typing was superfluous in version2, it seems that 
>> the
>> version3 adoption of typing, as defined, would perhaps be an 
>> upgrade
>> compatibility issue, no?
>
>
> I might be wrong, but I'm guessing you'll find the people here will
> help you more if you take the chip off of your shoulder and ask 
> nicely.
>
> You see, the fact is that most people ported their applications from
> SQLite2 to SQLite3 back in 2004.  A dare say that most current 
> readers
> of this mailing list didn't discover SQLite until after SQLite3 was
> already well established, and hence have no memory of what SQLite2 
> did
> or how it was different from SQLite3.  So porting from SQLite2 to
> SQLite3 is not a topic that is a high priority to people here.  And
> hence, they tend to respond unsupportively when addressing a 
> complaint
> by a user who is clearly miffed that SQLite3 does not work exactly 
> the
> way SQLite2 used to work.
>
> I suggest a do-over.
>
> Rod, I suggest you re-register for this mailing list under a 
> different
> name, then log on and send a request that is worded something like 
> this:
>
>"Hi!  I'm porting an older application from SQLite2 to SQLite3 
> and
> am running into a couple of compatibility issues.  [explain the two
> problems here.]  Can somebody suggest ways of either (1) getting
> SQLite3 to work more like SQLite2 used to work, or (2) how I can
> change my code to work the way SQLite3 expects?  Thanks!"
>
> Note that the sample request in the previous paragraph does not
> contain an impatient claim that SQLite3 is broken and needs fixing.
> And in particular, it does not contain such a claim coming from
> someone who does not understand how SQLite3 works.
>
> I think if you try my do-over suggestion you will find the people 
> here
> will be nice, friendly, and much, much more helpful.
>
> D. Richard Hipp
> d...@hwaci.com
>
>
>
> ___
> 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] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread D. Richard Hipp

On Sep 3, 2009, at 10:43 AM, Rod Dav4is wrote:

>*re applied affinity:* If that is what is meant, then the document
> should say it, instead of leaving it to the reader's imagination.
>Since column typing was superfluous in version2, it seems that the
> version3 adoption of typing, as defined, would perhaps be an upgrade
> compatibility issue, no?


I might be wrong, but I'm guessing you'll find the people here will  
help you more if you take the chip off of your shoulder and ask nicely.

You see, the fact is that most people ported their applications from  
SQLite2 to SQLite3 back in 2004.  A dare say that most current readers  
of this mailing list didn't discover SQLite until after SQLite3 was  
already well established, and hence have no memory of what SQLite2 did  
or how it was different from SQLite3.  So porting from SQLite2 to  
SQLite3 is not a topic that is a high priority to people here.  And  
hence, they tend to respond unsupportively when addressing a complaint  
by a user who is clearly miffed that SQLite3 does not work exactly the  
way SQLite2 used to work.

I suggest a do-over.

Rod, I suggest you re-register for this mailing list under a different  
name, then log on and send a request that is worded something like this:

"Hi!  I'm porting an older application from SQLite2 to SQLite3 and  
am running into a couple of compatibility issues.  [explain the two  
problems here.]  Can somebody suggest ways of either (1) getting  
SQLite3 to work more like SQLite2 used to work, or (2) how I can  
change my code to work the way SQLite3 expects?  Thanks!"

Note that the sample request in the previous paragraph does not  
contain an impatient claim that SQLite3 is broken and needs fixing.   
And in particular, it does not contain such a claim coming from  
someone who does not understand how SQLite3 works.

I think if you try my do-over suggestion you will find the people here  
will be nice, friendly, and much, much more helpful.

D. Richard Hipp
d...@hwaci.com



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


Re: [sqlite] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread Rod Dav4is
Whoa! All I did was report two problems that I encountered when 
upgrading from version2 to version3! I was told that my problems were 
not problems at all; In fact one of them was a feature!  That sounds 
kinda arrogant to me.
As far as freezing the language, I made no such statement or 
request. But I did imply that a migration document would have been 
useful. I certainly don't feel qualified to write such a document 
because I'm pretty sure that my puny application hardly represents an 
exhaustive test of SQLite version compatibly -- and software testing is 
something that I happen to know quite a bit about.
*re documentation suggestions:* Well, in fact I have. I suggested 
that a definition of exactly what is meant by "applied affinity" is needed.

-R.

Jean-Christophe Deschamps wrote:
> Umm,
>
> At 05:16 03/09/2009, you wrote:
> ´¯¯¯
>   
>> Thanks for reminding me: A thing's value is generally proportional to
>> its cost. And the attitude of its support team figures in there, too.
>> -R.
>>
>> 
 Whether _you_ consider them problems or not, they were certainly
 problems for me, migrating a working application to version 3 and 
 
>> having
>> 
 it fall over in subtle ways because of these undocumented two vs three
 differences. They cost me several hours of unnecessary analysis time.

 
>>> You should bill DRH for this. Or, ask for your money back. Seriously,
>>> esp. since the product is still under warranty.
>>>   
> `---
>
> What a wonderful example of arrogant attitude!  What a brilliant 
> understanding you demonstrate of what "open (and _free_) software" means!
>
> DRH, other developpers and hundreds of contributors really should have 
> frozen SQLite design from the day You Mighty wrote the first line of 
> Your Mighty code, just to avoid You Mighty the horrible frustration of 
> having to change Your Mighty code at all.  And this of course until the 
> sun goes nova: think of Your Mighty descendants!
>
> What have you contributed so far to allow yourself such superior 
> position?  Have you ever shown the faintest step of commitment that so 
> many here constantly bring to SQLite, openly or silently?
>
> Are you the author of one definitive "Guide for migrating SQLite v2x to 
> v3x applications" that will be available in the Wiki for anyone to 
> benefit?  Have you made any proposal to improve existing documentation 
> or code?
>
>
> Please, make us the favor to switch to Oracle or any other utterly 
> expensive RDBMS and go whine elsewhere for lack of support/reactivity 
> (esp. Oracle).
>
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>   

-- 
Regards, Rod Dav4is / P.O. Box 118 / Hyde Park, NY 12538 / USA
Genealogy, et Cetera: http://freepages.rootsweb.ancestry.com/~dav4is/
538 ancestral & collateral families, mostly 17°-19° century 
New England & European roots. Total population: 136,000+
Annex: http://www.gencircles.com/users/dav4is/
email: dav...@yahoo.com
A Democrat, a Republican and a giraffe walk into a bar. The 
bartender looks up from his want ads and says, "What is this, a joke?"
-unknown


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


Re: [sqlite] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread Rod Dav4is
*re applied affinity:* If that is what is meant, then the document 
should say it, instead of leaving it to the reader's imagination.
Since column typing was superfluous in version2, it seems that the 
version3 adoption of typing, as defined, would perhaps be an upgrade 
compatibility issue, no?
-R.
Pavel Ivanov wrote in part:
> These are not equivalent actions. When we are talking about conversion
> of text into number "affinity is applied" means that conversion is
> made if possible otherwise the value keeps its text type, but
> "conversion is applied" means that conversion is made in any case i.e.
> if text doesn't contain number it will be converted to 0.
>
> Pavel
>
>   
-- 
Regards, Rod Dav4is / P.O. Box 118 / Hyde Park, NY 12538 / USA
Genealogy, et Cetera: http://freepages.rootsweb.ancestry.com/~dav4is/
538 ancestral & collateral families, mostly 17°-19° century 
New England & European roots. Total population: 136,000+
Annex: http://www.gencircles.com/users/dav4is/
email: dav...@yahoo.com
A Democrat, a Republican and a giraffe walk into a bar. The 
bartender looks up from his want ads and says, "What is this, a joke?"
-unknown


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


Re: [sqlite] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread Jean-Christophe Deschamps
Umm,

At 05:16 03/09/2009, you wrote:
´¯¯¯
>Thanks for reminding me: A thing's value is generally proportional to
>its cost. And the attitude of its support team figures in there, too.
>-R.
>
> >> Whether _you_ consider them problems or not, they were certainly
> >> problems for me, migrating a working application to version 3 and 
> having
> >> it fall over in subtle ways because of these undocumented two vs three
> >> differences. They cost me several hours of unnecessary analysis time.
> >>
> >
> > You should bill DRH for this. Or, ask for your money back. Seriously,
> > esp. since the product is still under warranty.
`---

What a wonderful example of arrogant attitude!  What a brilliant 
understanding you demonstrate of what "open (and _free_) software" means!

DRH, other developpers and hundreds of contributors really should have 
frozen SQLite design from the day You Mighty wrote the first line of 
Your Mighty code, just to avoid You Mighty the horrible frustration of 
having to change Your Mighty code at all.  And this of course until the 
sun goes nova: think of Your Mighty descendants!

What have you contributed so far to allow yourself such superior 
position?  Have you ever shown the faintest step of commitment that so 
many here constantly bring to SQLite, openly or silently?

Are you the author of one definitive "Guide for migrating SQLite v2x to 
v3x applications" that will be available in the Wiki for anyone to 
benefit?  Have you made any proposal to improve existing documentation 
or code?


Please, make us the favor to switch to Oracle or any other utterly 
expensive RDBMS and go whine elsewhere for lack of support/reactivity 
(esp. Oracle).




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


Re: [sqlite] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread Pavel Ivanov
> Yes, I know how it works. But that seems to contradict the
> documentation. The first field of the record inserted should have a type
> of numeric, as types are associated with the data not with the column
> declaration. So the phrase Where n = '1' should fall into the first
> bullet case

Rod, type != affinity. While in my example value in the field n in the
inserted record has type numeric it has no affinity (because column
has no type declared) thus it doesn't fall into first bullet. Affinity
is associated with columns, not with the data inserted. Thus in my
earlier example (when column n had type integer) even though column n
had integer affinity expression +n has no affinity (though integer
type) and thus comparison +n = '1' is always false because no
conversions applied.

> (Reading "conversion is applied" for "affinity is applied".)

These are not equivalent actions. When we are talking about conversion
of text into number "affinity is applied" means that conversion is
made if possible otherwise the value keeps its text type, but
"conversion is applied" means that conversion is made in any case i.e.
if text doesn't contain number it will be converted to 0.

Pavel

On Thu, Sep 3, 2009 at 9:33 AM, Rod Dav4is wrote:
>
> Pavel Ivanov wrote:
>>> Perhaps the fact that my column definitions declared no
>>> typing has an effect here?
>>>
>>
>> Yes, that means that your columns have no affinity, all data stored in
>> it as you give and no conversions done during insertions and
>> comparisons:
>>
>> sqlite> create table t (n, t);
>> sqlite> insert into t values (1, '3');
>> sqlite> select * from t where n = 1;
>> 1|3
>> sqlite> select * from t where n = '1';
>> sqlite>
>>
>> Everything is well described at http://www.sqlite.org/datatype3.html
>> and link there goes even from http://www.sqlite.org/version3.html
>> which I presume you've already seen.
>>
>>
>> Pavel
>>
>>
> Yes, I know how it works. But that seems to contradict the
> documentation. The first field of the record inserted should have a type
> of numeric, as types are associated with the data not with the column
> declaration. So the phrase Where n = '1' should fall into the first
> bullet case, i.e.
>
>    * When two expressions are compared, if expression A has INTEGER or
>      REAL or NUMERIC affinity and expression B does not, then NUMERIC
>      affinity is applied to the value of expression B before the
>      comparison takes place.
>
> (Reading "conversion is applied" for "affinity is applied".)
> -R.
>
> --
> Regards, Rod Dav4is / P.O. Box 118 / Hyde Park, NY 12538 / USA
> Genealogy, et Cetera: http://freepages.rootsweb.ancestry.com/~dav4is/
> 538 ancestral & collateral families, mostly 17°-19° century
> New England & European roots. Total population: 136,000+
> Annex: http://www.gencircles.com/users/dav4is/
> email: dav...@yahoo.com
> A Democrat, a Republican and a giraffe walk into a bar. The
> bartender looks up from his want ads and says, "What is this, a joke?"
> -unknown
>
>
> ___
> 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] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread Rod Dav4is

Pavel Ivanov wrote:
>> Perhaps the fact that my column definitions declared no
>> typing has an effect here?
>> 
>
> Yes, that means that your columns have no affinity, all data stored in
> it as you give and no conversions done during insertions and
> comparisons:
>
> sqlite> create table t (n, t);
> sqlite> insert into t values (1, '3');
> sqlite> select * from t where n = 1;
> 1|3
> sqlite> select * from t where n = '1';
> sqlite>
>
> Everything is well described at http://www.sqlite.org/datatype3.html
> and link there goes even from http://www.sqlite.org/version3.html
> which I presume you've already seen.
>
>
> Pavel
>
>   
Yes, I know how it works. But that seems to contradict the 
documentation. The first field of the record inserted should have a type 
of numeric, as types are associated with the data not with the column 
declaration. So the phrase Where n = '1' should fall into the first 
bullet case, i.e.

* When two expressions are compared, if expression A has INTEGER or
  REAL or NUMERIC affinity and expression B does not, then NUMERIC
  affinity is applied to the value of expression B before the
  comparison takes place.

(Reading "conversion is applied" for "affinity is applied".)
-R.

-- 
Regards, Rod Dav4is / P.O. Box 118 / Hyde Park, NY 12538 / USA
Genealogy, et Cetera: http://freepages.rootsweb.ancestry.com/~dav4is/
538 ancestral & collateral families, mostly 17°-19° century 
New England & European roots. Total population: 136,000+
Annex: http://www.gencircles.com/users/dav4is/
email: dav...@yahoo.com
A Democrat, a Republican and a giraffe walk into a bar. The 
bartender looks up from his want ads and says, "What is this, a joke?"
-unknown


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


Re: [sqlite] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread Rod Dav4is
Pavel Ivanov wrote:
>>   2. *re integer vs string:* Version 3 differs from version 2 here.
>>  Version 2 was declared to be typeless and "Select Where column =
>>  1"  behaved identically with "Select Where column = '1'". Version
>>  3 behavior is different in that the two previous examples produce
>>  different results, a compatibility issue.
>> 
>
> Version 3 also differs from version 2 in that all functions are named
> starting with 'sqlite3_' instead of 'sqlite_'. Doesn't this make
> another compatibility issue to complain about? Why didn't you mention
> it at all?
> AFAIK, SQLite 3 never tried to say that it is fully
> backward-compatible with SQLite 2.
>
>   
I only reported problems that I had actually encountered in migrating to 
version 3. I never had occasion to use the function names you mentioned.
*re backward compatibility:* OTOH, it doesn't say that it is NOT 
backward compatible w/r/t the syntax and semantics of the language. As a 
user contemplating an upgrade, I would expect such differences to be 
prominently discussed.
>>  The v3 document (in discussing conversions) uses the expression
>>  "affinity is applied" without defining what that means. Does it
>>  mean "conversion to"?
>> 
>
> Read about affinities and how are they applied here:
> http://www.sqlite.org/datatype3.html.
>   
Yes, that is where I looked to find what "applied affinity" meant, but 
never found a crisp definition. If it means "converted to", it should 
say that.
>
> Pavel
>
> On Thu, Sep 3, 2009 at 6:31 AM, Rod Dav4is wrote:
>   
>>   1.   *re OID vs ROWID:* I don't understand your statement that the
>>  "name" of a result column is undefined. The documentation clearly
>>  states "A column name can be any of the names defined in the
>>  CREATE TABLE statement or one of the following special
>>  identifiers: "*ROWID*", "*OID*", or "*_ROWID_*"." If I use a
>>  column name (as defined by my Create Table) in a select statement,
>>  Rexx variables are set (using RexxSQL here) in the form
>>  x.columnname.n -- except if the column name used is OID, in which
>>  case the Rexx variable set is x.ROWID.n instead of the expected
>>  x.OID.n  No mention is made in the documentation of this "quirk",
>>  which behavior is different from that of SQLite version 2.
>>   2. *re integer vs string:* Version 3 differs from version 2 here.
>>  Version 2 was declared to be typeless and "Select Where column =
>>  1"  behaved identically with "Select Where column = '1'". Version
>>  3 behavior is different in that the two previous examples produce
>>  different results, a compatibility issue. Version 3 documentation
>>  states that "SQLite may attempt to convert values between the
>>  numeric storage classes (INTEGER and REAL) and TEXT before
>>  performing a comparison." Apparently this is not done in the case
>>  of "Select Where column = '1'" and a particular row has been set
>>  with a value of unquoted 1. (Columns were defined with no type.)
>>  The v3 document (in discussing conversions) uses the expression
>>  "affinity is applied" without defining what that means. Does it
>>  mean "conversion to"?
>>
>> -R.
>>
>> D. Richard Hipp wrote:
>> 
>>> On Sep 1, 2009, at 4:38 PM, Rod Dav4is wrote:
>>>
>>>
>>>   
 Aren't these problems considered worth fixing ?

 
>>> I do not consider them to be problems.
>>>
>>>
>>>   
 Rod Dav4is wrote:

 
>   1.   *OID vs ROWID*: Specification of the OID field name (in
> SELECT)
>  did not set Rexx variables X.OID.n, but instead set variables
>  x.ROWID.n
>
>   
>>> The "name" of a result column is undefined unless you use the "AS"
>>> clause.  We try to be reasonably consistent, but there are no
>>> promises.  There are especially no promises when moving form 2.8 to 3.6
>>>
>>>
>>>
>>>   
>   2. *Quotes in SELECT*: Specification of Field='3' failed to find
>  hits; Field=3 (i.e. without quotes) was required.
>
>   
>>> This is a feature, not a bug.  SQLite 3.x distinguishes between
>>> integers and strings and does not consider them equal to one another.
>>> You might have some rows where Field='3' and different rows where
>>> Field=3 and SQLite will distinguish between them.
>>>
>>> D. Richard Hipp
>>> d...@hwaci.com
>>>
>>>
>>>
>>> ___
>>> sqlite-users mailing list
>>> sqlite-users@sqlite.org
>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>>>
>>>
>>>   
>> --
>> Regards, Rod Dav4is / P.O. Box 118 / Hyde Park, NY 12538 / USA
>> Genealogy, et Cetera: http://freepages.rootsweb.ancestry.com/~dav4is/
>> 538 ancestral & collateral families, mostly 17°-19° century
>> New England & European roots. Total population: 136,000+
>> Annex: http://www.gencircles.com/users/dav4is/
>> 

Re: [sqlite] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread Pavel Ivanov
> Perhaps the fact that my column definitions declared no
> typing has an effect here?

Yes, that means that your columns have no affinity, all data stored in
it as you give and no conversions done during insertions and
comparisons:

sqlite> create table t (n, t);
sqlite> insert into t values (1, '3');
sqlite> select * from t where n = 1;
1|3
sqlite> select * from t where n = '1';
sqlite>

Everything is well described at http://www.sqlite.org/datatype3.html
and link there goes even from http://www.sqlite.org/version3.html
which I presume you've already seen.


Pavel

On Thu, Sep 3, 2009 at 8:44 AM, Rod Dav4is wrote:
> Pavel Ivanov wrote:
>   2. *Quotes in SELECT*: Specification of Field='3' failed to find
>      hits; Field=3 (i.e. without quotes) was required.
>
>>> This is a feature, not a bug.  SQLite 3.x distinguishes between
>>> integers and strings and does not consider them equal to one another.
>>> You might have some rows where Field='3' and different rows where
>>> Field=3 and SQLite will distinguish between them.
>>>
>>
>> BTW, I've re-read documentation about this, felt that something wrong
>> here, tried it out and saw that your (Rod) complaint is wrong in this
>> particular case:
>>
>> sqlite> create table t (n integer, t text);
>> sqlite> insert into t values (1, '3');
>> sqlite> select * from t;
>> 1|3
>> sqlite> select * from t where n = 1;
>> 1|3
>> sqlite> select * from t where n = '1';
>> 1|3
>> sqlite> select * from t where t = '3';
>> 1|3
>> sqlite> select * from t where t = 3;
>> 1|3
>> sqlite> select * from t where +n = '1';
>> sqlite>
>>
>>
>> Pavel
>>
> I know what I saw: I had to change some of my selects, removing single
> quotes from literals, in order for selects to have the same result as on
> version 2. Perhaps the fact that my column definitions declared no
> typing has an effect here?
>
> -R.
>
> --
> Regards, Rod Dav4is / P.O. Box 118 / Hyde Park, NY 12538 / USA
> Genealogy, et Cetera: http://freepages.rootsweb.ancestry.com/~dav4is/
> 538 ancestral & collateral families, mostly 17°-19° century
> New England & European roots. Total population: 136,000+
> Annex: http://www.gencircles.com/users/dav4is/
> email: dav...@yahoo.com
> A Democrat, a Republican and a giraffe walk into a bar. The
> bartender looks up from his want ads and says, "What is this, a joke?"
> -unknown
>
>
> ___
> 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] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread Rod Dav4is
Pavel Ivanov wrote:
   2. *Quotes in SELECT*: Specification of Field='3' failed to find
  hits; Field=3 (i.e. without quotes) was required.
 
>> This is a feature, not a bug.  SQLite 3.x distinguishes between
>> integers and strings and does not consider them equal to one another.
>> You might have some rows where Field='3' and different rows where
>> Field=3 and SQLite will distinguish between them.
>> 
>
> BTW, I've re-read documentation about this, felt that something wrong
> here, tried it out and saw that your (Rod) complaint is wrong in this
> particular case:
>
> sqlite> create table t (n integer, t text);
> sqlite> insert into t values (1, '3');
> sqlite> select * from t;
> 1|3
> sqlite> select * from t where n = 1;
> 1|3
> sqlite> select * from t where n = '1';
> 1|3
> sqlite> select * from t where t = '3';
> 1|3
> sqlite> select * from t where t = 3;
> 1|3
> sqlite> select * from t where +n = '1';
> sqlite>
>
>
> Pavel
>   
I know what I saw: I had to change some of my selects, removing single 
quotes from literals, in order for selects to have the same result as on 
version 2. Perhaps the fact that my column definitions declared no 
typing has an effect here?

-R.

-- 
Regards, Rod Dav4is / P.O. Box 118 / Hyde Park, NY 12538 / USA
Genealogy, et Cetera: http://freepages.rootsweb.ancestry.com/~dav4is/
538 ancestral & collateral families, mostly 17°-19° century 
New England & European roots. Total population: 136,000+
Annex: http://www.gencircles.com/users/dav4is/
email: dav...@yahoo.com
A Democrat, a Republican and a giraffe walk into a bar. The 
bartender looks up from his want ads and says, "What is this, a joke?"
-unknown


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


Re: [sqlite] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread Pavel Ivanov
>>>   2. *Quotes in SELECT*: Specification of Field='3' failed to find
>>>  hits; Field=3 (i.e. without quotes) was required.
>
> This is a feature, not a bug.  SQLite 3.x distinguishes between
> integers and strings and does not consider them equal to one another.
> You might have some rows where Field='3' and different rows where
> Field=3 and SQLite will distinguish between them.

BTW, I've re-read documentation about this, felt that something wrong
here, tried it out and saw that your (Rod) complaint is wrong in this
particular case:

sqlite> create table t (n integer, t text);
sqlite> insert into t values (1, '3');
sqlite> select * from t;
1|3
sqlite> select * from t where n = 1;
1|3
sqlite> select * from t where n = '1';
1|3
sqlite> select * from t where t = '3';
1|3
sqlite> select * from t where t = 3;
1|3
sqlite> select * from t where +n = '1';
sqlite>


Pavel

On Tue, Sep 1, 2009 at 4:48 PM, D. Richard Hipp wrote:
>
> On Sep 1, 2009, at 4:38 PM, Rod Dav4is wrote:
>
>> Aren't these problems considered worth fixing ?
>
> I do not consider them to be problems.
>
>>
>> Rod Dav4is wrote:
>>>   1.   *OID vs ROWID*: Specification of the OID field name (in
>>> SELECT)
>>>      did not set Rexx variables X.OID.n, but instead set variables
>>>      x.ROWID.n
>
> The "name" of a result column is undefined unless you use the "AS"
> clause.  We try to be reasonably consistent, but there are no
> promises.  There are especially no promises when moving form 2.8 to 3.6
>
>
>>>   2. *Quotes in SELECT*: Specification of Field='3' failed to find
>>>      hits; Field=3 (i.e. without quotes) was required.
>
> This is a feature, not a bug.  SQLite 3.x distinguishes between
> integers and strings and does not consider them equal to one another.
> You might have some rows where Field='3' and different rows where
> Field=3 and SQLite will distinguish between them.
>
> D. Richard Hipp
> d...@hwaci.com
>
>
>
> ___
> 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] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread Pavel Ivanov
>   2. *re integer vs string:* Version 3 differs from version 2 here.
>  Version 2 was declared to be typeless and "Select Where column =
>  1"  behaved identically with "Select Where column = '1'". Version
>  3 behavior is different in that the two previous examples produce
>  different results, a compatibility issue.

Version 3 also differs from version 2 in that all functions are named
starting with 'sqlite3_' instead of 'sqlite_'. Doesn't this make
another compatibility issue to complain about? Why didn't you mention
it at all?
AFAIK, SQLite 3 never tried to say that it is fully
backward-compatible with SQLite 2.

>  The v3 document (in discussing conversions) uses the expression
>  "affinity is applied" without defining what that means. Does it
>  mean "conversion to"?

Read about affinities and how are they applied here:
http://www.sqlite.org/datatype3.html.


Pavel

On Thu, Sep 3, 2009 at 6:31 AM, Rod Dav4is wrote:
>   1.   *re OID vs ROWID:* I don't understand your statement that the
>      "name" of a result column is undefined. The documentation clearly
>      states "A column name can be any of the names defined in the
>      CREATE TABLE statement or one of the following special
>      identifiers: "*ROWID*", "*OID*", or "*_ROWID_*"." If I use a
>      column name (as defined by my Create Table) in a select statement,
>      Rexx variables are set (using RexxSQL here) in the form
>      x.columnname.n -- except if the column name used is OID, in which
>      case the Rexx variable set is x.ROWID.n instead of the expected
>      x.OID.n  No mention is made in the documentation of this "quirk",
>      which behavior is different from that of SQLite version 2.
>   2. *re integer vs string:* Version 3 differs from version 2 here.
>      Version 2 was declared to be typeless and "Select Where column =
>      1"  behaved identically with "Select Where column = '1'". Version
>      3 behavior is different in that the two previous examples produce
>      different results, a compatibility issue. Version 3 documentation
>      states that "SQLite may attempt to convert values between the
>      numeric storage classes (INTEGER and REAL) and TEXT before
>      performing a comparison." Apparently this is not done in the case
>      of "Select Where column = '1'" and a particular row has been set
>      with a value of unquoted 1. (Columns were defined with no type.)
>      The v3 document (in discussing conversions) uses the expression
>      "affinity is applied" without defining what that means. Does it
>      mean "conversion to"?
>
> -R.
>
> D. Richard Hipp wrote:
>> On Sep 1, 2009, at 4:38 PM, Rod Dav4is wrote:
>>
>>
>>> Aren't these problems considered worth fixing ?
>>>
>>
>> I do not consider them to be problems.
>>
>>
>>> Rod Dav4is wrote:
>>>
   1.   *OID vs ROWID*: Specification of the OID field name (in
 SELECT)
      did not set Rexx variables X.OID.n, but instead set variables
      x.ROWID.n

>>
>> The "name" of a result column is undefined unless you use the "AS"
>> clause.  We try to be reasonably consistent, but there are no
>> promises.  There are especially no promises when moving form 2.8 to 3.6
>>
>>
>>
   2. *Quotes in SELECT*: Specification of Field='3' failed to find
      hits; Field=3 (i.e. without quotes) was required.

>>
>> This is a feature, not a bug.  SQLite 3.x distinguishes between
>> integers and strings and does not consider them equal to one another.
>> You might have some rows where Field='3' and different rows where
>> Field=3 and SQLite will distinguish between them.
>>
>> D. Richard Hipp
>> d...@hwaci.com
>>
>>
>>
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>>
>
> --
> Regards, Rod Dav4is / P.O. Box 118 / Hyde Park, NY 12538 / USA
> Genealogy, et Cetera: http://freepages.rootsweb.ancestry.com/~dav4is/
> 538 ancestral & collateral families, mostly 17°-19° century
> New England & European roots. Total population: 136,000+
> Annex: http://www.gencircles.com/users/dav4is/
> email: dav...@yahoo.com
> A Democrat, a Republican and a giraffe walk into a bar. The
> bartender looks up from his want ads and says, "What is this, a joke?"
> -unknown
>
>
> ___
> 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] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread Rod Dav4is
   1.   *re OID vs ROWID:* I don't understand your statement that the
  "name" of a result column is undefined. The documentation clearly
  states "A column name can be any of the names defined in the
  CREATE TABLE statement or one of the following special
  identifiers: "*ROWID*", "*OID*", or "*_ROWID_*"." If I use a
  column name (as defined by my Create Table) in a select statement,
  Rexx variables are set (using RexxSQL here) in the form
  x.columnname.n -- except if the column name used is OID, in which
  case the Rexx variable set is x.ROWID.n instead of the expected
  x.OID.n  No mention is made in the documentation of this "quirk",
  which behavior is different from that of SQLite version 2.
   2. *re integer vs string:* Version 3 differs from version 2 here.
  Version 2 was declared to be typeless and "Select Where column =
  1"  behaved identically with "Select Where column = '1'". Version
  3 behavior is different in that the two previous examples produce
  different results, a compatibility issue. Version 3 documentation
  states that "SQLite may attempt to convert values between the
  numeric storage classes (INTEGER and REAL) and TEXT before
  performing a comparison." Apparently this is not done in the case
  of "Select Where column = '1'" and a particular row has been set
  with a value of unquoted 1. (Columns were defined with no type.)
  The v3 document (in discussing conversions) uses the expression
  "affinity is applied" without defining what that means. Does it
  mean "conversion to"?

-R.

D. Richard Hipp wrote:
> On Sep 1, 2009, at 4:38 PM, Rod Dav4is wrote:
>
>   
>> Aren't these problems considered worth fixing ?
>> 
>
> I do not consider them to be problems.
>
>   
>> Rod Dav4is wrote:
>> 
>>>   1.   *OID vs ROWID*: Specification of the OID field name (in  
>>> SELECT)
>>>  did not set Rexx variables X.OID.n, but instead set variables
>>>  x.ROWID.n
>>>   
>
> The "name" of a result column is undefined unless you use the "AS"  
> clause.  We try to be reasonably consistent, but there are no  
> promises.  There are especially no promises when moving form 2.8 to 3.6
>
>
>   
>>>   2. *Quotes in SELECT*: Specification of Field='3' failed to find
>>>  hits; Field=3 (i.e. without quotes) was required.
>>>   
>
> This is a feature, not a bug.  SQLite 3.x distinguishes between  
> integers and strings and does not consider them equal to one another.   
> You might have some rows where Field='3' and different rows where  
> Field=3 and SQLite will distinguish between them.
>
> D. Richard Hipp
> d...@hwaci.com
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>   

-- 
Regards, Rod Dav4is / P.O. Box 118 / Hyde Park, NY 12538 / USA
Genealogy, et Cetera: http://freepages.rootsweb.ancestry.com/~dav4is/
538 ancestral & collateral families, mostly 17°-19° century 
New England & European roots. Total population: 136,000+
Annex: http://www.gencircles.com/users/dav4is/
email: dav...@yahoo.com
A Democrat, a Republican and a giraffe walk into a bar. The 
bartender looks up from his want ads and says, "What is this, a joke?"
-unknown


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


Re: [sqlite] Problems encountered on upgrade from SQLite2 to -3

2009-09-02 Thread Gerry Snyder
Rod Dav4is wrote:
> Thanks for reminding me: A thing's value is generally proportional to 
> its cost. And the attitude of its support team figures in there, too.
> -R.

There is only one person with attitude I see here, and it is not Dr. 
Hipp and it is not P. Kishor.

I have never seen a program, free or commercial, with better support.


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


  1   2   3   4   >