Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-09 Thread Joe Mistachkin

Caleb A. Austin wrote:
> 
> I am using SQLITE_OS_WINCE as defined:
> 
> #if defined(_WIN32_WCE)
> # define SQLITE_OS_WINCE 1
> #else
> # define SQLITE_OS_WINCE 0
> #endif
> 

Is a special SDK being used for Windows Embedded Compact 7?

What other defines are you using?  Are you using the Makefile.msc in the
source
tree to build or some other mechanism?

--
Joe Mistachkin

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


Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-09 Thread Caleb A. Austin
I am using SQLITE_OS_WINCE as defined:

 #if defined(_WIN32_WCE)
# define SQLITE_OS_WINCE 1
#else
# define SQLITE_OS_WINCE 0
#endif

I have also forced #define SQLITE_OS_WINCE 1 at the top of the .c file. 

Would there be a basic set of define's that would build a Windows CE
SQLite?

I hope this is going back to the right place... As I have not replied to
a list like this before.

Caleb Austin
##
CONFIDENTIALITY NOTICE: This email and any files transmitted with it are 
confidential and intended
solely for the use of the individual or entity to whom they are addressed. It 
may contain confidential,
privileged, and/or proprietary information. Any review, dissemination, 
distribution, copying, printing,
or other use of this email by persons or entities other than the addressee and 
his/her authorized agent
is prohibited. 

If you have received this email in error please notify the originator of the 
message and delete the
material from your computer.
##
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT:0x8007007E)

2012-10-09 Thread Robert Calco
Problem Solved!

The issue was that the solution that was failing had different test
settings. Not sure how the settings got changed but somehow the unit test
project was configured to run as if an ASP.NET application. Changing the
solution test settings file to the default Local test settings caused
SQLite to look in the right place, running as a normal host instead of an
ASP.NET proxy host.

So the moral of the story is if you're seeing this in your unit tests, make
sure you're not accidentally running somehow as an ASP.NET host.

At last, all is well.

- Bob

On Tue, Oct 9, 2012 at 3:52 PM, Robert Calco  wrote:

> Hi Joe,
>
> On Tue, Oct 9, 2012 at 10:56 AM, Joe Mistachkin wrote:
>
>>
>> Robert Calco wrote:
>> >
>> > Dependency Walker is complaining that SQLite.Interop.dll needs but
>> cannot
>> > find IEShims.dll. This DLL is present on my system twice, in the program
>> > files directory of both x86 and x64 versions of Internet Explorer,
>> > respectively.
>> >
>>
>> That appears to be a delay-load issue.  Those are normally harmless.
>>
>
> It is when I open the x64 SQLite.Interop.dll in Dependency Walker. Just
> the two warnings.
>
> But when I open the x32 SQLite.Interop.dll in Dependency Walker, it gives
> me an error:
>
> "Errors were detected when processing "\x86\SQLITE.INTEROP.DLL". See
> the log window for details."
>
> ANd the two errors are:
>
> Error: At least one module has an unresolved import due to a missing
> export function in an implicitly dependent module.
> Error: Modules with different CPU types were found.
>
> That last one is what has me scratching my head. All the system DLLs are
> 64-bit (and show red x64 in the CPU column). And still that IEShims.DLL
> cannot be found.
>
> The kicker though: this doesn't seem to pose a problem in one solution,
> but it does in another, when they are referencing the same binaries, and
> they have the same problem when I load them in Dependency Walker!
>
> No, putting the SQLite.Interop.dll in the bin directory doesn't help,
> either.
>
> -- Bob
>
>
>> >
>> > I have used NuGet to install SQLite into all three. I'm going to remove
>> it
>> > from the projects in the WPF and WCF solutions, leaving it only in the
>> > Shared solution, and resolving all references to the SQLite binaries in
>> the
>> > shared solution, for starters.
>> >
>>
>> I've never tried to add the same NuGet package to multiple projects in a
>> single solution before.  I'm not sure what happens in that case.
>>
>> Something that could give us some clues here are the trace diagnostics
>> emitted
>> by the native library pre-loading feature.  Is it possible for you to
>> modify
>> your project and add a trace listener prior to using any of the
>> System.Data.SQLite
>> classes?  If so, you should see output similar to:
>>
>> Trying to load native SQLite library \"{0}\"...
>> Failed to load native SQLite library \"{0}\" (getLastError = {1}):
>> {2}
>>
>> Also, if your application is part of a web application or is being
>> deployed
>> to a
>> location where the "SQLite.Interop.dll" files will not be present in the
>> appropriate
>> processor architecture sub-directories, you can use the
>> "PreLoadSQLite_BaseDirectory"
>> environment variable to indicate where the native library pre-loading
>> feature should
>> look.  See the following docs for more information:
>>
>>
>> http://system.data.sqlite.org/index.html/artifact?ci=trunk=Doc/Extr
>> a/environment.html
>>
>> --
>> Joe Mistachkin
>>
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>
>
>
> --
> *Bob Calco*
>
>
>


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


Re: [sqlite] Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT:0x8007007E)

2012-10-09 Thread Robert Calco
Hi Joe,

On Tue, Oct 9, 2012 at 10:56 AM, Joe Mistachkin wrote:

>
> Robert Calco wrote:
> >
> > Dependency Walker is complaining that SQLite.Interop.dll needs but cannot
> > find IEShims.dll. This DLL is present on my system twice, in the program
> > files directory of both x86 and x64 versions of Internet Explorer,
> > respectively.
> >
>
> That appears to be a delay-load issue.  Those are normally harmless.
>

It is when I open the x64 SQLite.Interop.dll in Dependency Walker. Just the
two warnings.

But when I open the x32 SQLite.Interop.dll in Dependency Walker, it gives
me an error:

"Errors were detected when processing "\x86\SQLITE.INTEROP.DLL". See
the log window for details."

ANd the two errors are:

Error: At least one module has an unresolved import due to a missing export
function in an implicitly dependent module.
Error: Modules with different CPU types were found.

That last one is what has me scratching my head. All the system DLLs are
64-bit (and show red x64 in the CPU column). And still that IEShims.DLL
cannot be found.

The kicker though: this doesn't seem to pose a problem in one solution, but
it does in another, when they are referencing the same binaries, and they
have the same problem when I load them in Dependency Walker!

No, putting the SQLite.Interop.dll in the bin directory doesn't help,
either.

-- Bob


> >
> > I have used NuGet to install SQLite into all three. I'm going to remove
> it
> > from the projects in the WPF and WCF solutions, leaving it only in the
> > Shared solution, and resolving all references to the SQLite binaries in
> the
> > shared solution, for starters.
> >
>
> I've never tried to add the same NuGet package to multiple projects in a
> single solution before.  I'm not sure what happens in that case.
>
> Something that could give us some clues here are the trace diagnostics
> emitted
> by the native library pre-loading feature.  Is it possible for you to
> modify
> your project and add a trace listener prior to using any of the
> System.Data.SQLite
> classes?  If so, you should see output similar to:
>
> Trying to load native SQLite library \"{0}\"...
> Failed to load native SQLite library \"{0}\" (getLastError = {1}):
> {2}
>
> Also, if your application is part of a web application or is being deployed
> to a
> location where the "SQLite.Interop.dll" files will not be present in the
> appropriate
> processor architecture sub-directories, you can use the
> "PreLoadSQLite_BaseDirectory"
> environment variable to indicate where the native library pre-loading
> feature should
> look.  See the following docs for more information:
>
>
> http://system.data.sqlite.org/index.html/artifact?ci=trunk=Doc/Extr
> a/environment.html
>
> --
> Joe Mistachkin
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
*Bob Calco*
25325 Geddy Rd.
Land O'Lakes, FL 34639

bobca...@gmail.com
813-406-5019 (landline)
813-520-2891 (mobile)
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-09 Thread Joe Mistachkin

Caleb A. Austin wrote:
> 
> Warning   2  warning C4013: 'localtime_s'
> undefined; assuming extern returning int
> 

What defines are you using to compile the sqlite3.c file?

Are you using the defines SQLITE_OS_WIN and SQLITE_OS_WINCE?

--
Joe Mistachkin

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


Re: [sqlite] Why can't SQLite drop columns?

2012-10-09 Thread Simon Slavin

On 9 Oct 2012, at 6:54pm, Adam DeVita  wrote:

> The why seems to be something about the necessity of rewriting the
> table, which is 'slow'.  I expect that users accept that Alter table
> can be expensive.Is there more to it? Some sort of ACID breakdown?

There are problems with ALTER TABLE, but most of them involve very thorough 
checks that the column you're dropping isn't mentioned anywhere: indices, 
foreign keys, constraints, and probably a bunch of things I've forgotten.  The 
way SQLite works means that trying to spot all the places that a column is 
mentioned is very difficult and involves a lot of parsing.  I'm betting that 
it's that which makes it so difficult.  Once you're sure the column isn't 
mentioned, actually dropping it is probably fairly simple: marking pages in the 
data file as unused, rewriting the CREATE TABLE command, and updating the 
schema version number.

It would be nice to be able to drop columns in SQLite4.  Don't bet on it 
appearing before then, or even then.

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


[sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-09 Thread Caleb A. Austin
Hi All,

 

I am working on  building SQLite and I am using(from header file): 

 

#define SQLITE_VERSION"3.7.14"

#define SQLITE_VERSION_NUMBER 3007014

#define SQLITE_SOURCE_ID  "2012-09-03 15:42:36
c0d89d4a9752922f9e367362366efde4f1b06f2a"

I am getting the following warning and then link error:

 

Warning   2  warning C4013: 'localtime_s'
undefined; assuming extern returning int
{log="C:\WINCE700\OSDesigns\Climet_test1\Climet_test1\sqlite_test\bldsys
log(32)"}
c:\wince700\osdesigns\climet_test1\climet_test1\sqlite_test\sqlite3.c
14129

 

Error  4  sqlite3.obj : error LNK2019: unresolved
external symbol localtime_s referenced in function osLocaltime
C:\WINCE700\OSDesigns\Climet_test1\Climet_test1\sqlite_test\bldsys.log
48

 

I have looked over Google and found a few examples of how this was
handled by others, but found this:

 

http://www.sqlite.org/cvstrac/tktview?tn=2945

 

This implies that the error regarding "localtime_s" is fixed in the main
trunk of SQLite and should compile... but I don't have something right. 

 

I am using  VS2008 and have a working CE build and hello world program
working.  When I add SQLite into the project I get the above
error/warning.

 

I would like some advice on how to build SQLite for WEC7. 

 

 

Caleb Austin

 


##
CONFIDENTIALITY NOTICE: This email and any files transmitted with it are 
confidential and intended
solely for the use of the individual or entity to whom they are addressed. It 
may contain confidential,
privileged, and/or proprietary information. Any review, dissemination, 
distribution, copying, printing,
or other use of this email by persons or entities other than the addressee and 
his/her authorized agent
is prohibited. 

If you have received this email in error please notify the originator of the 
message and delete the
material from your computer.
##
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Why can't SQLite drop columns?

2012-10-09 Thread Adam DeVita
There are some applications where using a 3rd party utility is
inherently awkward and time consuming, but using your application that
uses the sqlite api is not.  (For example, you can change your code
via an automatic update mechanism, but perhaps can't execute a 3rd
party tool that likely isn't on the user's system anyway.)

"Use some 3rd party utility" isn't really an answer to "Why can't I
use this command?".   The OP didn't ask how can they alter the table,
they know how.

The lack of ALTER TABLE means that your application would have to do
it  This is simple enough to do, but means you have to write your own
implementation of alter table, to some degree of complication or
duplication, and of course with more lines of code comes an increased
risk of writing a new bug.

The why seems to be something about the necessity of rewriting the
table, which is 'slow'.  I expect that users accept that Alter table
can be expensive.Is there more to it? Some sort of ACID breakdown?

regards,
Adam DeVita


On Tue, Oct 9, 2012 at 12:45 PM, Peter Haworth  wrote:
> Pete
> lcSQL Software 
> You're probably already aware of this but there are third party tools
> available that will do this for you, plus many other schema maintenance
> functions that aren't provided in sqlite.
>
> One such is my SQLiteAdmin program, available at www.lcsql.com.
>
>
> On Tue, Oct 9, 2012 at 9:00 AM,  wrote:
>
>> Message: 11
>> Date: Mon, 08 Oct 2012 21:57:21 +0200
>> From: Yves Goergen 
>> To: General Discussion of SQLite Database 
>> Subject: [sqlite] Why can't SQLite drop columns?
>> Message-ID: <50733021.8020...@unclassified.de>
>> Content-Type: text/plain; charset=UTF-8
>>
>> Hello,
>>
>> I know that SQLite doesn't support ALTER TABLE DROP COLUMN, unlike
>> probably every other SQL database system. But every time I come across
>> this, I feel the pain of having to write huge amounts of code to
>> automatically remove single columns in a table. When doing that in code,
>> it's usually working non-interactively on some generic table schema and
>> cannot use hard-coded column names. So I really have to collect all
>> relevant data including foreign keys and all column attributes and then
>> generate the right SQL code to copy everything right except the dropped
>> column.
>>
>> I very much believe that it would save a lot of developers' resources if
>> SQLite supported that directly. After all, the DBMS has all the data it
>> needs in its readily readable data structures. It would possibly be less
>> work for SQLite than for anybody using it.
>>
>> So I am asking: Why does SQLite still not support dropping columns
>> through SQL after all these years? Do the SQLite developers have strong
>> arguments against it, and which? Are there technical limitations (I
>> can't believe that)? Is there some kind of religion behind it?
>>
>> --
>> Yves Goergen - nospam.l...@unclassified.de - http://unclassified.de
>>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



-- 
VerifEye Technologies Inc.
905-948-0015x245
151 Whitehall Dr, Unit 2
Markham ON, L3R 9T1
Canada
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Please test the latest SQLite enhancements

2012-10-09 Thread Richard Hipp
On Tue, Oct 9, 2012 at 1:32 PM, Klaus Keppler <k...@keppler-it.de> wrote:

> Hi Richard,
>
> first of all - thanks for your great work!
>
>
>  If you have a complex application that uses SQLite, please test your
>> application with the SQLite amalgamation found at
>> http://www.sqlite.org/sqlite3-**20121009.zip<http://www.sqlite.org/sqlite3-20121009.zip>and
>>  report to me (via private
>> email) whether or not you encounter any problems.
>>
>
> I'd love to do some tests here (we have some really complex queries), but
> we need the SQLite source with SQLITE_ENABLE_UPDATE_DELETE_**LIMIT
> feature (AFAIK this is not contained in the amalgamation).
> So if you can drop a complete source ZIP anywhere, please let me know.
>

To get the latest trunk sources, visit

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

Then click on either the "ZIP Archive" or "Tarball" link beside
"Downloads:".  This will pull the canonical source code directly from the
CM system.


>
> Best regards,
>
>-Klaus
>
>
> --
> __**__**__
> Keppler IT GmbH - Die Hostingexperten.
>
> Dipl.-Inf. Klaus KepplerTel. (09131) 691-480
> Geschäftsführer Fax: (09131) 691-489
>
> Am Weichselgarten 7 UStID.-Nr. DE259788698
> 91058 Erlangen  Amtsgericht Fürth, HRB 11477
> www.keppler-it.de   Sitz d. Gesellschaft: Erlangen
> __**__**__
> __**_
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<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] Please test the latest SQLite enhancements

2012-10-09 Thread Klaus Keppler

Hi Richard,

first of all - thanks for your great work!


If you have a complex application that uses SQLite, please test your
application with the SQLite amalgamation found at
http://www.sqlite.org/sqlite3-20121009.zip and report to me (via private
email) whether or not you encounter any problems.


I'd love to do some tests here (we have some really complex queries), 
but we need the SQLite source with SQLITE_ENABLE_UPDATE_DELETE_LIMIT 
feature (AFAIK this is not contained in the amalgamation).

So if you can drop a complete source ZIP anywhere, please let me know.

Best regards,

   -Klaus


--
__
Keppler IT GmbH - Die Hostingexperten.

Dipl.-Inf. Klaus KepplerTel. (09131) 691-480
Geschäftsführer Fax: (09131) 691-489

Am Weichselgarten 7 UStID.-Nr. DE259788698
91058 Erlangen  Amtsgericht Fürth, HRB 11477
www.keppler-it.de   Sitz d. Gesellschaft: Erlangen
__
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Please test the latest SQLite enhancements

2012-10-09 Thread Richard Hipp
SUMMARY:

If you have a complex application that uses SQLite, please test your
application with the SQLite amalgamation found at
http://www.sqlite.org/sqlite3-20121009.zip and report to me (via private
email) whether or not you encounter any problems.

DETAILS:

We have recently made a number of significant enhancements to the query
optimizer in SQLite.  In particular, the latest code does a much better job
of recognizing when ORDER BY clauses can be satisfied by careful selection
of indices and scan orders and without having to do any sorting.  This
optimization can result in significant performance improves for queries
with large result sets.

The current implementation has already been well tested:

(1) All legacy tests pass
(2) 100% branch test coverage
(3) The Fossil server that hosts the SQLite source code is using the latest
SQLite
(4) This email is being composed on an instance of Firefox Nightly that is
running the latest SQLite code

However, with such extensive changes to the query optimizer there is a
heightened risk of missing obscure corner cases in which SQLite omits
sorting for an ORDER BY clause when the sort is actually needed, resulting
in output appearing in the wrong order.  You can help reduce this risk, and
help us to ensure that the forthcoming SQLite version 3.7.15 is
trouble-free, by compiling the SQLite amalgamation snapshot found at
http://www.sqlite.org/sqlite3-20121009.zip into your application and then
testing your application to verify that it is still working correctly.  If
you find any problems, please let me know.  If your application continues
to work normally (though perhaps a little faster) I would appreciate
hearing from you then too.

I are especially interested in hearing from people whose applications
contain large schemas, descending indices, and complex joins containing
ORDER BY clauses with multiple terms and a mixture of ASC and DESC.

Thank you for your help.

-- 
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] Why can't SQLite drop columns?

2012-10-09 Thread Peter Haworth
Pete
lcSQL Software 
You're probably already aware of this but there are third party tools
available that will do this for you, plus many other schema maintenance
functions that aren't provided in sqlite.

One such is my SQLiteAdmin program, available at www.lcsql.com.


On Tue, Oct 9, 2012 at 9:00 AM,  wrote:

> Message: 11
> Date: Mon, 08 Oct 2012 21:57:21 +0200
> From: Yves Goergen 
> To: General Discussion of SQLite Database 
> Subject: [sqlite] Why can't SQLite drop columns?
> Message-ID: <50733021.8020...@unclassified.de>
> Content-Type: text/plain; charset=UTF-8
>
> Hello,
>
> I know that SQLite doesn't support ALTER TABLE DROP COLUMN, unlike
> probably every other SQL database system. But every time I come across
> this, I feel the pain of having to write huge amounts of code to
> automatically remove single columns in a table. When doing that in code,
> it's usually working non-interactively on some generic table schema and
> cannot use hard-coded column names. So I really have to collect all
> relevant data including foreign keys and all column attributes and then
> generate the right SQL code to copy everything right except the dropped
> column.
>
> I very much believe that it would save a lot of developers' resources if
> SQLite supported that directly. After all, the DBMS has all the data it
> needs in its readily readable data structures. It would possibly be less
> work for SQLite than for anybody using it.
>
> So I am asking: Why does SQLite still not support dropping columns
> through SQL after all these years? Do the SQLite developers have strong
> arguments against it, and which? Are there technical limitations (I
> can't believe that)? Is there some kind of religion behind it?
>
> --
> Yves Goergen - nospam.l...@unclassified.de - http://unclassified.de
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT:0x8007007E)

2012-10-09 Thread Joe Mistachkin

Robert Calco wrote:
> 
> Dependency Walker is complaining that SQLite.Interop.dll needs but cannot
> find IEShims.dll. This DLL is present on my system twice, in the program
> files directory of both x86 and x64 versions of Internet Explorer,
> respectively.
> 

That appears to be a delay-load issue.  Those are normally harmless.

> 
> I have used NuGet to install SQLite into all three. I'm going to remove it
> from the projects in the WPF and WCF solutions, leaving it only in the
> Shared solution, and resolving all references to the SQLite binaries in
the
> shared solution, for starters.
> 

I've never tried to add the same NuGet package to multiple projects in a
single solution before.  I'm not sure what happens in that case.

Something that could give us some clues here are the trace diagnostics
emitted
by the native library pre-loading feature.  Is it possible for you to modify
your project and add a trace listener prior to using any of the
System.Data.SQLite
classes?  If so, you should see output similar to:

Trying to load native SQLite library \"{0}\"...
Failed to load native SQLite library \"{0}\" (getLastError = {1}):
{2}

Also, if your application is part of a web application or is being deployed
to a
location where the "SQLite.Interop.dll" files will not be present in the
appropriate
processor architecture sub-directories, you can use the
"PreLoadSQLite_BaseDirectory"
environment variable to indicate where the native library pre-loading
feature should
look.  See the following docs for more information:

http://system.data.sqlite.org/index.html/artifact?ci=trunk=Doc/Extr
a/environment.html

--
Joe Mistachkin

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


Re: [sqlite] tokenize unicode61

2012-10-09 Thread Clemens Ladisch
Hertwig van Zwietering wrote:
> I just compiled the SQLite 3.7.14.1 version because I want to try the
> unicode61 tokenizer in FTS4. From how I read the documentation, the
> unicode61 tokenizer should be available by default.

Does it actually say "by default"?

> However, as soon as I try to create a FTS table with the
> tokenize=unicode61, I get the error that this tokenizer is not
> available.
>
> SQLITE_DISABLE_FTS3_UNICODE is not added.

Add SQLITE_ENABLE_FTS4_UNICODE61.


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


[sqlite] tokenize unicode61

2012-10-09 Thread Hertwig van Zwietering
I just compiled the SQLite 3.7.14.1 version because I want to try the
unicode61 tokenizer in FTS4. From how I read the documentation, the
unicode61 tokenizer should be available by default. However, as soon
as I try to create a FTS table with the tokenize=unicode61, I get the
error that this tokenizer is not available.

SQLITE_DISABLE_FTS3_UNICODE is not added.

What am I overlooking here?

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


Re: [sqlite] Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT:0x8007007E)

2012-10-09 Thread Robert Calco
Hi Joe,

Dependency Walker is complaining that SQLite.Interop.dll needs but cannot
find IEShims.dll. This DLL is present on my system twice, in the program
files directory of both x86 and x64 versions of Internet Explorer,
respectively.

In the case of x86 it indicates this problem with missing IEShims.dll with
the following additional information:

Error: At least one module has an unresolved import due to a missing export
function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing
export function in a delay-load dependent module.

In the case of x64 it indicates the same with the following additional
information:

Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing
export function in a delay-load dependent module.

This still does not begin explain why it works for one of my solutions and
not for the other, all other things being equal.

There are actually three projects -- a Shared project, whence the shared
projects come, the solution that works, and the one that doesn't. The one
that does is a WPF app with the shared projects and some projects specific
to its needs, and the other is a WCF app with the shared projects and some
of its own.

I have used NuGet to install SQLite into all three. I'm going to remove it
from the projects in the WPF and WCF solutions, leaving it only in the
Shared solution, and resolving all references to the SQLite binaries in the
shared solution, for starters.

- Bob

On Mon, Oct 8, 2012 at 8:16 PM, Joe Mistachkin wrote:

>
> Robert Calco wrote:
> >
> > They are all running .NET 4.5, C# 2012, Debug, AnyCPU mode, and the unit
> > tests look identically configured, both on the hard drive and logically
> in
> > their respective solution trees. I used NuGet to install SQLite in both
> > solutions, so they each have their own copy in their respective /packages
> > directory.
> >
>
> Are these running on the same machine?  Is the operating system 32-bit or
> 64-bit?  One thing to note is that AnyCPU is basically the same as Win32
> (x86) in the System.Data.SQLite solution files.  I'm not sure how your
> solution files are configured.
>
> >
> > So, to the naked eye, they seem identical. However, one solutions' unit
> > tests run absolutely fine, and the other one throws the error in the
> > subject of this email. Both are pulling in the common data layer project
> > which is the one that depends on SQLite. both have the following in the
> > Debug\bin directory:
> >
> > x64\ (folder with 64 bit version of SQLite.Interop.dll in it)
> > x86\ (folder with 32 bit version of SQLite.Interop.dll in it)
> >
> > ... rest of the binaries required
> >
>
> Ok, the native library pre-loading feature should be in use then.
>
> >
> > I tried configuring all projects in the problem solution to Debug, x86,
> > and I even tried dropping the 32-bit version of the SQLite.Interop.dll
> > into the bin directory of the unit tests... and STILL I get this error.
> >
>
> Is the operating system 32-bit?  If not, you might want to try building
> everything for x64.
>
> >
> > I saw on post, a couple of google searches ago, that indicated perhaps
> the
> > version of the MS runtime DLLs might be the issue. Is it possible that
> one
> > of my projects has a "newer" version of System.Data.SQLite that was
> > compiled against a "newer" version of the MS C++ runtime dlls, even
> though
> > they have the same version (1.0.82.0)? (I have not upgraded to the latest
> > MS C++ runtime DLLs in my 2012 project, for all kinds of reasons that
> have
> > to do with some of our own C/C++ dependencies in native sub-projects.)
> >
>
> If you are using the official NuGet package, the contained DLLs are all
> compiled with the latest version of the corresponding Microsoft Visual C++
> runtime libraries for the appropriate processor architecture.
>
> >
> > How should I troubleshoot this?
> >
>
> 1. Verify if the operating system is 32-bit or 64-bit.
>
> 2. Verify if the application EXE is marked as 32-bit or 64-bit in the
> header
> using CorFlags and/or ILDasm.
>
> 3. Run the "depends.exe" tool on the SQLite.Interop.dll and make sure it
> does
> not find any errors related to missing Visual C++ Runtime DLLs.
>
> >
> > And in general how does SQLite work in "AnyCPU" mode if it needs
> > SQLite.Interop.dll to run, and there are precisely two mutually exclusive
> > versions of it -- 32 and 64 bit?
> >
>
> The "AnyCPU" build platform really only applies to managed projects.  For
> native projects in the System.Data.SQLite solution files, it simply maps to
> Win32 (x86).
>
> --
> Joe Mistachkin
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> 

Re: [sqlite] Seemingly random Access violation errors (resent)

2012-10-09 Thread Joe Mistachkin

Matthew Dumbleton wrote:
> 
> Yes.  Motorola ES400.  Do have any advice/experience with these? (Apart
from 
> 'don't use them' :)  )
> 

I've added threading tests to the Windows CE test project.  Could you try
running
it on your device and see how it behaves?

--
Joe Mistachkin

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


Re: [sqlite] CREATE INDEX on huge DB fails with SQLITE_NOMEM

2012-10-09 Thread Marcus Grimm


On 09.10.2012 12:46, Clemens Ladisch wrote:

Marcus Grimm wrote:

I can see that the application increases memory up to appx. 600 MB
while the database is populated - That is the cache_size=50,
I assume.


cache_size=50 corresponds to:
  255 MB (page size 512 bytes)
  488 MB (page size 1 KB)
  977 MB (page size 2 KB)
  1.9 GB (page size 4 KB)

What does "PRAGMA page_size;" say in your database?


I think it the default value (1 KB).



And are you running in a 32-bit or 64-bit process?


It is a 32 bit process on a 64 bit Win7 machine.

During the process of inserting the test data the
memory usage increases constantly to around 650 MB and
remains there - no problem with that. Sqlite just fills the cache
that I specified.

It is interesting though, that create index appears to require
memory above the specified page cache. No problem actually
but one need to be aware about it.

Anyway, everything works now and I can proceed.

Marcus




Regards,
Clemens
___
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] CREATE INDEX on huge DB fails with SQLITE_NOMEM

2012-10-09 Thread Marcus Grimm

On 09.10.2012 11:00, Marcus Grimm wrote:

On 09.10.2012 10:44, Dan Kennedy wrote:

On 10/09/2012 03:30 PM, Marcus Grimm wrote:

Hello,

I'm currently investigating how far I can go with my
favorite DB engine. For that purpose I'm testing
my application with an artificial database that is
appx. 50 times bigger that the maximum I have
seen in the field so far.
The test creates a database from the scratch and just fills
the tables with random data. To speed up this operation
(which takes 3 hours) I drop all irrelevant indices
prior running the inserting.
Afterwards I need to create these indices because they are
necessary for the regular database operations.
Now, this (CREATE INDEX) fails after a few minutes with an error code
of 7 (malloc failed). I'm using the native C-Api...
I also specify: "PRAGMA cache_size=50;" if that matters.


Try changing that to 2000 or something before executing the
CREATE INDEX statement.

Assuming you don't have SQLite configured to stored temp files
in memory, a CREATE INDEX statement starts by sorting the data
using a merge-sort before building the b-tree structure to
represent the index. This is much faster than just inserting keys
into the new b-tree in arbitrary order. But, the merge-sort code
assumes that it can plausibly allocate up to (cache-size * page-size)
bytes of memory using malloc() (not as a single chunk - in total).
And if a malloc() fails, you get this SQLITE_NOMEM error. In this
case, with "PRAGMA cache_size=50", that might end up being too
much.


Hi Dan,

thanks for the quick reply. Of course I'm not using temp-memory files... :-)

I'll give it a try - However, I can see that the application increases
memory up to appx. 600 MB while the database is populated - That
is the cache_size=50, I assume. So sqlite was able to allocate
that memory - Does the create index allocate that amount in
addition ?

Anyway, I now re-run the test as suggested and will report how it goes...



Bravo... It finished! :-)

Cool...

I don't quite understand why sqlite didn't run out of memory
during the heavy insert operations but later on when
creating the indices.
Also it is interesting that the application reaches about
650 MB memory usage during the insertion, after that loop I reduce
the page cache to "PRAGMA cache_size=5;" and the memory usage
increases slightly to 750 MB and remains there while the various create index
command take place. I would expect that the memory usage drops down
after issuing the reduced cache size pragma.

Anyway, thanks again Dan! -  now I can proceed with by tests..

Marcus



Marcus




Dan.
___
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] CREATE INDEX on huge DB fails with SQLITE_NOMEM

2012-10-09 Thread Clemens Ladisch
Marcus Grimm wrote:
> I can see that the application increases memory up to appx. 600 MB
> while the database is populated - That is the cache_size=50,
> I assume.

cache_size=50 corresponds to:
 255 MB (page size 512 bytes)
 488 MB (page size 1 KB)
 977 MB (page size 2 KB)
 1.9 GB (page size 4 KB)

What does "PRAGMA page_size;" say in your database?

And are you running in a 32-bit or 64-bit process?


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


Re: [sqlite] CREATE INDEX on huge DB fails with SQLITE_NOMEM

2012-10-09 Thread Marcus Grimm

On 09.10.2012 10:44, Dan Kennedy wrote:

On 10/09/2012 03:30 PM, Marcus Grimm wrote:

Hello,

I'm currently investigating how far I can go with my
favorite DB engine. For that purpose I'm testing
my application with an artificial database that is
appx. 50 times bigger that the maximum I have
seen in the field so far.
The test creates a database from the scratch and just fills
the tables with random data. To speed up this operation
(which takes 3 hours) I drop all irrelevant indices
prior running the inserting.
Afterwards I need to create these indices because they are
necessary for the regular database operations.
Now, this (CREATE INDEX) fails after a few minutes with an error code
of 7 (malloc failed). I'm using the native C-Api...
I also specify: "PRAGMA cache_size=50;" if that matters.


Try changing that to 2000 or something before executing the
CREATE INDEX statement.

Assuming you don't have SQLite configured to stored temp files
in memory, a CREATE INDEX statement starts by sorting the data
using a merge-sort before building the b-tree structure to
represent the index. This is much faster than just inserting keys
into the new b-tree in arbitrary order. But, the merge-sort code
assumes that it can plausibly allocate up to (cache-size * page-size)
bytes of memory using malloc() (not as a single chunk - in total).
And if a malloc() fails, you get this SQLITE_NOMEM error. In this
case, with "PRAGMA cache_size=50", that might end up being too
much.


Hi Dan,

thanks for the quick reply. Of course I'm not using temp-memory files... :-)

I'll give it a try - However, I can see that the application increases
memory up to appx. 600 MB while the database is populated - That
is the cache_size=50, I assume. So sqlite was able to allocate
that memory - Does the create index allocate that amount in
addition ?

Anyway, I now re-run the test as suggested and will report how it goes...

Marcus




Dan.
___
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] CREATE INDEX on huge DB fails with SQLITE_NOMEM

2012-10-09 Thread Dan Kennedy

On 10/09/2012 03:30 PM, Marcus Grimm wrote:

Hello,

I'm currently investigating how far I can go with my
favorite DB engine. For that purpose I'm testing
my application with an artificial database that is
appx. 50 times bigger that the maximum I have
seen in the field so far.
The test creates a database from the scratch and just fills
the tables with random data. To speed up this operation
(which takes 3 hours) I drop all irrelevant indices
prior running the inserting.
Afterwards I need to create these indices because they are
necessary for the regular database operations.
Now, this (CREATE INDEX) fails after a few minutes with an error code
of 7 (malloc failed). I'm using the native C-Api...
I also specify: "PRAGMA cache_size=50;" if that matters.


Try changing that to 2000 or something before executing the
CREATE INDEX statement.

Assuming you don't have SQLite configured to stored temp files
in memory, a CREATE INDEX statement starts by sorting the data
using a merge-sort before building the b-tree structure to
represent the index. This is much faster than just inserting keys
into the new b-tree in arbitrary order. But, the merge-sort code
assumes that it can plausibly allocate up to (cache-size * page-size)
bytes of memory using malloc() (not as a single chunk - in total).
And if a malloc() fails, you get this SQLITE_NOMEM error. In this
case, with "PRAGMA cache_size=50", that might end up being too
much.

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


[sqlite] CREATE INDEX on huge DB fails with SQLITE_NOMEM

2012-10-09 Thread Marcus Grimm

Hello,

I'm currently investigating how far I can go with my
favorite DB engine. For that purpose I'm testing
my application with an artificial database that is
appx. 50 times bigger that the maximum I have
seen in the field so far.
The test creates a database from the scratch and just fills
the tables with random data. To speed up this operation
(which takes 3 hours) I drop all irrelevant indices
prior running the inserting.
Afterwards I need to create these indices because they are
necessary for the regular database operations.
Now, this (CREATE INDEX) fails after a few minutes with an error code
of 7 (malloc failed). I'm using the native C-Api...
I also specify: "PRAGMA cache_size=50;" if that matters.

The table/index in question has appx. 300 million rows...

Is there a workaround, other than having the indices defined
from the beginning ? Haven't tried yet... though.

It could be that I'll need to add indices in future versions
of the application and I'm concerned that sqlite will not be able
to do so if the database exceeds a certain size.

Please note that sqlite can (I think) very well handle that DB size,
it's just the CREATE INDEX that is, so far, a bit disappointing.

Any comment on this ?

I tried with sqlite 3.7.14.1 and 3.7.8 - no difference.


Kind regards

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