Re: [sqlite] When is column type valid?

2013-04-09 Thread Igor Tandetnik

On 4/9/2013 9:15 PM, Simon Slavin wrote:

Wow.  I have never seen that before.  Or the VARIANT type used in SQLite.  
Thanks.


VARIANT doesn't have any special meaning to SQLite. You can just as well 
write "CREATE TABLE t1(c1 foo bar);", and sqlite3_column_decltype would 
cheerfully return the string "foo bar". The only way the type is used is 
to determine column affinity, as documented at 
http://www.sqlite.org/datatype3.html . Both VARIANT and "foo bar" would 
result in NUMERIC affinity.

--
Igor Tandetnik

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


Re: [sqlite] When is column type valid?

2013-04-09 Thread Igor Tandetnik

On 4/9/2013 9:09 PM, Simon Slavin wrote:


On 10 Apr 2013, at 1:19am, ven...@intouchmi.com wrote:


Yes, I called sqlite3_column_type before and after each sqlite3_step in order 
to determine when it might work and it always came back as SQLITE_NULL (5).


Does that column correspond to an actual column in a table ?  Or is it instead 
the result of a calculation ?  The documentation



says "The value returned by sqlite3_column_type() is only meaningful if no type 
conversions have occurred as described below. After a type conversion, the value returned 
by sqlite3_column_type() is undefined."


"Type conversion" in that article has nothing to do with whether a 
column is the result of a calculation, and everything to do with 
retrieving the value by means of sqlite3_column_T call where T doesn't 
match the actual type of the value (e.g. using sqlite_column_text on an 
integer value to retrieve the textual representation of the integer).

--
Igor Tandetnik

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


Re: [sqlite] When is column type valid?

2013-04-09 Thread Simon Slavin

On 10 Apr 2013, at 2:10am, Igor Tandetnik  wrote:

> On 4/9/2013 9:04 PM, Simon Slavin wrote:
>>> I'l try sqlite3_column_dectype tomorrow.
>> 
>> Erm ... no such function.  Unless you're getting it from somewhere I'm not 
>> looking.  Can you show a URL ?
> 
> I'm pretty sure the OP means http://www.sqlite.org/c3ref/column_decltype.html

Wow.  I have never seen that before.  Or the VARIANT type used in SQLite.  
Thanks.

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


Re: [sqlite] When is column type valid?

2013-04-09 Thread Igor Tandetnik

On 4/9/2013 9:04 PM, Simon Slavin wrote:

I'l try sqlite3_column_dectype tomorrow.


Erm ... no such function.  Unless you're getting it from somewhere I'm not 
looking.  Can you show a URL ?


I'm pretty sure the OP means 
http://www.sqlite.org/c3ref/column_decltype.html

--
Igor Tandetnik

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


Re: [sqlite] When is column type valid?

2013-04-09 Thread Simon Slavin

On 10 Apr 2013, at 1:19am, ven...@intouchmi.com wrote:

> Yes, I called sqlite3_column_type before and after each sqlite3_step in order 
> to determine when it might work and it always came back as SQLITE_NULL (5).

Does that column correspond to an actual column in a table ?  Or is it instead 
the result of a calculation ?  The documentation



says "The value returned by sqlite3_column_type() is only meaningful if no type 
conversions have occurred as described below. After a type conversion, the 
value returned by sqlite3_column_type() is undefined."

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


Re: [sqlite] When is column type valid?

2013-04-09 Thread Simon Slavin

On 10 Apr 2013, at 1:01am, ven...@intouchmi.com wrote:

> I am using sqlite3_column_type.

Okay.  Note that that returns the type of a particular value:



"information about a single column of the current result row of a query"

In other words, as I wrote earlier it is information about one row.  It does 
not necessarily apply to any other rows returned by the same query.  And you 
can't just execute it on SELECT statement, you have to actually get a row of 
results and execute it on that row.

> I'l try sqlite3_column_dectype tomorrow.

Erm ... no such function.  Unless you're getting it from somewhere I'm not 
looking.  Can you show a URL ?

> I'm hoping that the column type follows the intermediate result set from 
> joins and views.  It looks like I have to be sure 
> SQLITE_ENABLE_COLUMN_METADATA is set.

The result of calling 'sqlite3_column_type' should be the type of whatever 
value is stored or calculated.  If the software putting values into the tables 
is consistent then the types you get out are consistent, but it's perfectly 
valid to do this:

INSERT INTO myTable VALUES (NULL);
INSERT INTO myTable VALUES (1);
INSERT INTO myTable VALUES ('A');

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


Re: [sqlite] When is column type valid?

2013-04-09 Thread veneff
Igor,

Yes, I called sqlite3_column_type before and after each sqlite3_step in order 
to determine when it might work and it always came back as SQLITE_NULL (5).

Incidentally, the SQLite version is "3.7.16.1".

Vance

on Apr 09, 2013, Igor Tandetnik  wrote:
>
>On 4/9/2013 8:01 PM, ven...@intouchmi.com wrote:
>> I am using sqlite3_column_type.
>
>Have you called sqlite3_step before calling sqlite3_column_type? 
>sqlite3_column_type doesn't report the type of the column (which is a 
>concept that doesn't really exist in SQLite), but the type of the value 
>in the given column and the *current row*. For it to work, the statement 
>has to actually be positioned over some row.
>-- 
>Igor Tandetnik
>
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] When is column type valid?

2013-04-09 Thread Igor Tandetnik

On 4/9/2013 8:01 PM, ven...@intouchmi.com wrote:

I am using sqlite3_column_type.


Have you called sqlite3_step before calling sqlite3_column_type? 
sqlite3_column_type doesn't report the type of the column (which is a 
concept that doesn't really exist in SQLite), but the type of the value 
in the given column and the *current row*. For it to work, the statement 
has to actually be positioned over some row.

--
Igor Tandetnik

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


Re: [sqlite] When is column type valid?

2013-04-09 Thread veneff
I am using sqlite3_column_type.

I'l try sqlite3_column_dectype tomorrow.  I'm hoping that the column type 
follows the intermediate result set from joins and views.  It looks like I have 
to be sure SQLITE_ENABLE_COLUMN_METADATA is set.

Vance


on Apr 09, 2013, Simon Slavin  wrote:
>
>
>On 8 Apr 2013, at 4:16pm, ven...@intouchmi.com wrote:
>
>> I've done a query via a view.
>> The column names that I retrieve are good.  But, the column types are not.  
>> They
>are always set to SQLITE_NULL (5)
>
>How are you trying to retrieve the column type ?  What function call are you 
>using
>?
>
>> whereas the values are either integers, or strings and no null values.
>> Is there a way to obtain data type?
>
>SQLite does not have column types.  Instead it has affinities.  Each row of 
>each column
>may have a value of a different type.  So you can get the type of a particular 
>value,
>but not the type of every value of a column.  For more detail see here:
>
>
>
>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] 64bit compatibility warnings

2013-04-09 Thread Nico Williams
On Tue, Apr 9, 2013 at 6:28 PM, David Empson  wrote:
>> No, this is a compiler bug.
>
> It is not a compiler bug. It is a failure of the compiler to deduce that the 
> warning is unnecessary.
>
> [...]
>
> C's usual arithmetic conversions specify that if either operand of a binary 
> operator is an integer type larger than int then the other operand is first 
> converted to the larger type. Therefore p->nBuffer is converted from int to 
> i64 before doing the modulo operation.
>
> We now have i64 % i64, producing a result of type i64.
>
> The statement then stores that i64 result into an int. i64 conversion to int 
> without a cast produces the warning in MSVC (if int is 32-bit).

OK, that's fair.

> The only reason I can see not to have an explicit cast is that it risks 
> hiding a future bug if the types of the variables are changed.

Yes.  Casts to shut up a compiler/lint should be a last resort most often.

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


Re: [sqlite] 64bit compatibility warnings

2013-04-09 Thread Igor Tandetnik

On 4/9/2013 7:06 PM, Nico Williams wrote:

On Mon, Apr 8, 2013 at 8:52 AM, Alexandr Němec  wrote:

The first warning is harmless and results from a prior datatype change.
Dan has already fixed that one.  The other four appear to be due to an
MSVC
compiler bug, since every (i64%int) operation will always yield a value
that can fit in an int, no?


Ok, thank for this comment. Of course, you are right, although I wouldn't
call it a compiler bug. The (i64%int) operation, gives an int result, but
allocated into an i64 value, so this is why the compiler reports the
warning. But thanks, it is obvious now, that these warnings can be ignored.


The compiler is complaining about an int64->int conversion, not the reverse.

Why on Earth would going from an int (64-bit or smaller) to an int64
cause a problem?


Without looking at the code, I imagine the result is ultimately assigned 
to an int variable. That's what triggers the warning. Something like this:


int64 A = ...;
int B = ...;
int C = A % B;

Formally, the type of the expression (A % B) is int64, thanks to 
integral promotion (chapter and verse from the C++ standard is available 
upon request). That result is then assigned to an int variable, formally 
necessitating a narrowing conversion, which triggers the warning.


However, the nature of modulo operator is such that the value of A % B 
is less than B, and since B is an int, the value of (A % B) is 
guaranteed to fit into an int without loss. A smarter compiler could 
have realized that, and suppressed the warning.


This is not technically a bug (defined as non-conformance with the 
standard), but a quality-of-implementation issue.

--
Igor Tandetnik

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


Re: [sqlite] 64bit compatibility warnings

2013-04-09 Thread David Empson

On 10/04/2013, at 11:06 AM, Nico Williams  wrote:

> On Mon, Apr 8, 2013 at 8:52 AM, Alexandr Němec  wrote:
>>> The first warning is harmless and results from a prior datatype change.
>>> Dan has already fixed that one.  The other four appear to be due to an
>>> MSVC compiler bug, since every (i64%int) operation will always yield a value
>>> that can fit in an int, no?
>> 
>> Ok, thank for this comment. Of course, you are right, although I wouldn't
>> call it a compiler bug. The (i64%int) operation, gives an int result, but
>> allocated into an i64 value, so this is why the compiler reports the
>> warning. But thanks, it is obvious now, that these warnings can be ignored.
> 
> The compiler is complaining about an int64->int conversion, not the reverse.
> 
> Why on Earth would going from an int (64-bit or smaller) to an int64
> cause a problem?
> 
> No, this is a compiler bug.

It is not a compiler bug. It is a failure of the compiler to deduce that the 
warning is unnecessary.

One of the lines in question is:

Line 71133 iBuf = p->iReadOff % p->nBuffer;

iBuf is an int.

p->iReadOff is an i64.

p->nBuffer is an int.

C's usual arithmetic conversions specify that if either operand of a binary 
operator is an integer type larger than int then the other operand is first 
converted to the larger type. Therefore p->nBuffer is converted from int to i64 
before doing the modulo operation.

We now have i64 % i64, producing a result of type i64.

The statement then stores that i64 result into an int. i64 conversion to int 
without a cast produces the warning in MSVC (if int is 32-bit).

If the compiler was smarter, it would pay attention to the fact that the 
modulus cannot exceed the range of an int, therefore the warning is not 
necessary.

The only reason I can see not to have an explicit cast is that it risks hiding 
a future bug if the types of the variables are changed.

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


Re: [sqlite] 64bit compatibility warnings

2013-04-09 Thread Richard Hipp
On Tue, Apr 9, 2013 at 7:10 PM, Nico Williams  wrote:

>
> > And if IBuf is an int do you really want that to be a 64-bit int on a
> 64-bit compiler?
>
> That's a different story.  SQLite3 and just about everything should be
> using specific int sizes precisely because they could vary.  In
> practice though, the only architectures of any relevance where you're
> likely to find sizeof(int) != sizeof(int32_t) are Crays and 16-bit
> CPUs, and if SQLite3 doesn't claim to run on those then that's kinda
> good enough.
>

There are assert() statements to verify that variable size assumptions are
correct:

 http://www.sqlite.org/src/artifact/5f2c4fe72f6?ln=1860-1869




-- 
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] 64bit compatibility warnings

2013-04-09 Thread Nico Williams
On Mon, Apr 8, 2013 at 9:10 AM, Michael Black  wrote:
> Which is why...IMHOto avoid all the repeats of this question in the 
> future (and from the past)one should simply to do the cast to int and put 
> a comment on the line that says " % int always fits in an int".

Explicit casts shut up the compiler.  If that's all you want, well,
sure.  But explicit casts often hide bugs.  This one is a compiler
bug.

> Too bad one can't cast to the type of a variable though in C.

Well, one can, with GCC, but, yeah.

> And if IBuf is an int do you really want that to be a 64-bit int on a 64-bit 
> compiler?

That's a different story.  SQLite3 and just about everything should be
using specific int sizes precisely because they could vary.  In
practice though, the only architectures of any relevance where you're
likely to find sizeof(int) != sizeof(int32_t) are Crays and 16-bit
CPUs, and if SQLite3 doesn't claim to run on those then that's kinda
good enough.

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


Re: [sqlite] 64bit compatibility warnings

2013-04-09 Thread Nico Williams
On Mon, Apr 8, 2013 at 8:52 AM, Alexandr Němec  wrote:
>> The first warning is harmless and results from a prior datatype change.
>> Dan has already fixed that one.  The other four appear to be due to an
>> MSVC
>> compiler bug, since every (i64%int) operation will always yield a value
>> that can fit in an int, no?
>
> Ok, thank for this comment. Of course, you are right, although I wouldn't
> call it a compiler bug. The (i64%int) operation, gives an int result, but
> allocated into an i64 value, so this is why the compiler reports the
> warning. But thanks, it is obvious now, that these warnings can be ignored.

The compiler is complaining about an int64->int conversion, not the reverse.

Why on Earth would going from an int (64-bit or smaller) to an int64
cause a problem?

No, this is a compiler bug.

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


Re: [sqlite] 64bit compatibility warnings

2013-04-09 Thread Igor Tandetnik

On 4/8/2013 9:51 AM, Jay A. Kreibich wrote:

On Mon, Apr 08, 2013 at 07:41:20AM -0400, Richard Hipp scratched on the wall:


The other four appear to be due to an MSVC
compiler bug, since every (i64%int) operation will always yield a value
that can fit in an int, no?


   Only on systems where "int" is 32 bits or larger.


By definition, A % B < B. Thus, if B fits into an int (be it 32-bit or 
16-bit or otherwise), then A % B would too.

--
Igor Tandetnik

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


Re: [sqlite] 64bit compatibility warnings

2013-04-09 Thread Simon Slavin

On 8 Apr 2013, at 3:10pm, Michael Black  wrote:

> Which is why...IMHOto avoid all the repeats of this question in the 
> future (and from the past)one should simply to do the cast to int and put 
> a comment on the line that says " % int always fits in an int".
> 
> Too bad one can't cast to the type of a variable though in C.
> 
> And if IBuf is an int do you really want that to be a 64-bit int on a 64-bit 
> compiler?
> Would IBuf ever get that big or need be that big?  Yes...I know I sound like 
> IBM now...:-)

You need consistency.  For any particular value either use int throughout or 
int64 throughout.  If you do need to convert cast the value explicitly.

The problem in SQLite is that it has to work with many different compilers and 
on many different platforms.  It is extremely difficult to make that happen and 
not get warnings from any of the compilers you're using.

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


Re: [sqlite] When is column type valid?

2013-04-09 Thread Simon Slavin

On 8 Apr 2013, at 4:16pm, ven...@intouchmi.com wrote:

> I've done a query via a view.
> The column names that I retrieve are good.  But, the column types are not.  
> They are always set to SQLITE_NULL (5)

How are you trying to retrieve the column type ?  What function call are you 
using ?

> whereas the values are either integers, or strings and no null values.
> Is there a way to obtain data type?

SQLite does not have column types.  Instead it has affinities.  Each row of 
each column may have a value of a different type.  So you can get the type of a 
particular value, but not the type of every value of a column.  For more detail 
see here:



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


Re: [sqlite] LSM Database Engine in SQlite4

2013-04-09 Thread Simon Slavin

On 8 Apr 2013, at 5:20pm, Peter Hilton  wrote:

> 1. How ready for prime-time is the lsm DB library?

SQLite4 is not at all ready for prime-time.  If you are writing your code for 
anything other than amusement use SQLite3.

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


Re: [sqlite] A sqlite database changing the contents when I change the database name or user rights

2013-04-09 Thread Simon Slavin

On 8 Apr 2013, at 2:16pm, Bernardino Flores/Jeanologia 
 wrote:

> I use both "sqliteadmin" and "sqlitebrowser_200_b1_win" editors to check the 
> contents, and with both I observe the same problem. The problem is that 
> sometimes I see 7 tables in the database and sometimes 11 tables. After some 
> hours of looking for the problem I have realized that, if I open the database 
> with the editor started as administrator I see 11 tables, if not only 7 (and 
> those 7 tables have not the same contents as the 11 tables db, it seems a 
> different database, an old one). It happens when I  rename the database, too.

Are you certain you're not looking at two files with the same name in different 
directories ?

Try renaming the database.  THen try opening it under the original name under 
both users.

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


Re: [sqlite] A sqlite database changing the contents when I change the database name or user rights

2013-04-09 Thread Andreas Kupries
Are you possibly running into

http://en.wikipedia.org/wiki/Shadow_Copy
http://windows.microsoft.com/en-ca/windows-vista/previous-versions-of-files-frequently-asked-questions

?

(I guess that when you say 'administrator' you are talking about Windows Admin.

On Mon, Apr 8, 2013 at 6:16 AM, Bernardino Flores/Jeanologia
 wrote:
> Hi,
>
> I have found a problem with a sqlite database which I cannot find any 
> reasonable explanation for it.
> I use both "sqliteadmin" and "sqlitebrowser_200_b1_win" editors to check the 
> contents, and with both I observe the same problem. The problem is that 
> sometimes I see 7 tables in the database and sometimes 11 tables. After some 
> hours of looking for the problem I have realized that, if I open the database 
> with the editor started as administrator I see 11 tables, if not only 7 (and 
> those 7 tables have not the same contents as the 11 tables db, it seems a 
> different database, an old one). It happens when I  rename the database, too.
> Have any found a problem like this? Could it be a windows 7 operative system 
> error, when indexing files?
>
> Regards,
>
> Berna
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



-- 
Andreas Kupries
Senior Tcl Developer
Code to Cloud: Smarter, Safer, Faster™
F: 778.786.1133
andre...@activestate.com
http://www.activestate.com
Learn about Stackato for Private PaaS: http://www.activestate.com/stackato

Tcl'2013, Sep 23-27, New Orleans, LA, USA @ http://www.tcl.tk/community/tcl2013/
EuroTcl'2013, July 6-7, Munich, GER
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] 2nd Call For Papers, 20th Annual Tcl/Tk Conference 2013

2013-04-09 Thread Andreas Kupries
[[ Notes:

   Karl Lehenbauer of FlightAware is confirmed as our Keynote speaker.
   http://www.flightaware.com

]]

20'th Annual Tcl/Tk Conference (Tcl'2013)
http://www.tcl.tk/community/tcl2013/

September 23 - 27, 2013
Bourbon Orleans Hotel
New Orleans, Louisiana, USA
http://www.bourbonorleans.com/

Important Dates:

Abstracts and proposals due   June  22, 2013
Notification to authors   August 5, 2013
Author materials due  September  2, 2013
Tutorials Start   September 23, 2013
Conference starts September 25, 2013

Email Contact:tclconfere...@googlegroups.com

Submission of Summaries

Tcl/Tk 2013 will be held in New Orleans, Louisiana, USA from September
23 - 27, 2013. The program committee is asking for papers and
presentation proposals from anyone using or developing with Tcl/Tk
(and extensions). Past conferences have seen submissions covering a
wide variety of topics including:

* Scientific and engineering applications
* Industrial controls
* Distributed applications and Network Managment
* Object oriented extensions to Tcl/Tk
* New widgets for Tk
* Simulation and application steering with Tcl/Tk
* Tcl/Tk-centric operating environments
* Tcl/Tk on small and embedded devices
* Medical applications and visualization
* Use of different programming paradigms in Tcl/Tk and proposals for new
  directions.
* New areas of exploration for the Tcl/Tk language

Submissions should consist of an abstract of about 100 words and a
summary of not more than two pages, and should be sent as plain text
to  no later than August 5,
2013. Authors of accepted abstracts will have until September 2, 2013
to submit their final paper for the inclusion in the conference
proceedings. The proceedings will be made available on digital media,
so extra materials such as presentation slides, code examples, code
for extensions etc. are encouraged.

Printed proceedings will be produced as an on-demand book at lulu.com

The authors will have 25 minutes to present their paper at the
conference.

The program committee will review and evaluate papers according to the
following criteria:

* Quantity and quality of novel content
* Relevance and interest to the Tcl/Tk community
* Suitability of content for presentation at the conference

Proposals may report on commercial or non-commercial systems, but
those with only blatant marketing content will not be accepted.

Application and experience papers need to strike a balance between
background on the application domain and the relevance of Tcl/Tk to
the application. Application and experience papers should clearly
explain how the application or experience illustrates a novel use of
Tcl/Tk, and what lessons the Tcl/Tk community can derive from the
application or experience to apply to their own development efforts.

Papers accompanied by non-disclosure agreements will be returned to
the author(s) unread. All submissions are held in the highest
confidentiality prior to publication in the Proceedings, both as a
matter of policy and in accord with the U. S. Copyright Act of 1976.

The primary author for each accepted paper will receive registration
to the Technical Sessions portion of the conference at a reduced rate.

Other Forms of Participation

The program committee also welcomes proposals for panel discussions of
up to 90 minutes. Proposals should include a list of confirmed
panelists, a title and format, and a panel description with position
statements from each panelist. Panels should have no more than four
speakers, including the panel moderator, and should allow time for
substantial interaction with attendees. Panels are not presentations
of related research papers.

Slots for Works-in-Progress (WIP) presentations and Birds-of-a-Feather
sessions (BOFs) are available on a first-come, first-served basis
starting in August 5, 2013. Specific instructions for reserving WIP
and BOF time slots will be provided in the registration information
available in June 3, 2013. Some WIP and BOF time slots will be held open
for on-site reservation. All attendees with an interesting work in
progress should consider reserving a WIP slot.

Registration Information

More information on the conference is available the conference Web
site (http://www.tcl.tk/community/tcl2013/) and will be published on
various Tcl/Tk-related information channels.

To keep in touch with news regarding the conference and Tcl events in
general, subscribe to the tcl-announce list. See:
http://code.activestate.com/lists/tcl-announce to subscribe to the
tcl-announce mailing list.


Conference Committee

Clif Flynt  Noumena CorpGeneral Chair, Website 
Admin
Andreas Kupries ActiveState Software Inc.   Program Chair
Gerald Lester   KnG Consulting, LLC Site/Facilities Chair
Arjen MarkusDeltares
Brian Griffin   Mentor Graphics
Cyndy Lilagan   Nat. Museum of Health & Medicine, Chicago
Donal 

Re: [sqlite] SQLite 3.7.17 preview - 2x faster?

2013-04-09 Thread Igor Tandetnik

On 4/7/2013 4:00 PM, Max Vlasov wrote:

On Sun, Apr 7, 2013 at 3:55 PM, Chris Smith  wrote:


Possibly related:
http://en.wikipedia.org/wiki/Thrashing_(computer_science)



That's an interesting direction. Surprisingly if one query
... site:microsoft.com "Thrashing" "memory-mapped"...
on google, he or she would find a forum topic "Memory mapped file
performance" where the first contributor to answers is Igor Tandetnik and
we knows that Igor gave very valuable answers also on this list, so he
(having good knowledge about both win32 and sqlite) could also give his
expert opinion on this topic .


I don't have any significant first-hand experience, either positive or 
negative, with memory-mapped files.

--
Igor Tandetnik

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


Re: [sqlite] SQLite 3.7.17 preview - 2x faster?

2013-04-09 Thread Igor Tandetnik

On 4/7/2013 4:00 PM, Max Vlasov wrote:

On Sun, Apr 7, 2013 at 3:55 PM, Chris Smith  wrote:


Possibly related:
http://en.wikipedia.org/wiki/Thrashing_(computer_science)



That's an interesting direction. Surprisingly if one query
... site:microsoft.com "Thrashing" "memory-mapped"...
on google, he or she would find a forum topic "Memory mapped file
performance" where the first contributor to answers is Igor Tandetnik and
we knows that Igor gave very valuable answers also on this list, so he
(having good knowledge about both win32 and sqlite) could also give his
expert opinion on this topic .


I don't have any significant first-hand experience, either positive or 
negative, with memory-mapped files.

--
Igor Tandetnik

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


[sqlite] LSM Database Engine in SQlite4

2013-04-09 Thread Peter Hilton
Hey,
   I am writing code to support a new database .. very very simple DB using the 
LSM library from sqlite4. 

The runtime environment uses multiple threads to access/update the database.
I have compiled the library with -pthreads and DSQLITE4_THREADSAFE=1.

I have observed that, using the same DB handle (lsm_db *), reads always return 
the same pointer.  This is true even though I use differing lsm_cursors.

I am also seeing occasional random "memory fault"s.  I ran the lsmtest from the 
sqlite4 source tree over the w/e and got a "memory fault" running oom2_lsm_1.

SO ... questions:-

1. How ready for prime-time is the lsm DB library?
2. Has the memory fault been seen by others?
3. Is the lsm DB library really thread-safe?
4. Is there a mailing list/forum/wiki devoted to sqlite4?

Cheers(for now!!)

Pete

Pete Hilton
phil...@overlandstorage.com

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


[sqlite] When is column type valid?

2013-04-09 Thread veneff
Hello,

I've done a query via a view.
The column names that I retrieve are good.  But, the column types are not.  
They are always set to SQLITE_NULL (5) whereas the values are either integers, 
or strings and no null values.
Is there a way to obtain data type?

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


Re: [sqlite] 64bit compatibility warnings

2013-04-09 Thread Michael Black
Which is why...IMHOto avoid all the repeats of this question in the future 
(and from the past)one should simply to do the cast to int and put a 
comment on the line that says " % int always fits in an int".

Too bad one can't cast to the type of a variable though in C.

And if IBuf is an int do you really want that to be a 64-bit int on a 64-bit 
compiler?
Would IBuf ever get that big or need be that big?  Yes...I know I sound like 
IBM now...:-)



-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Richard Hipp
Sent: Monday, April 08, 2013 6:41 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] 64bit compatibility warnings

On Sun, Apr 7, 2013 at 1:06 PM, Alexandr Němec  wrote:

>
> Line 6766   u.bc.r.flags = (u16)(UNPACKED_INCRKEY * (1 & (u.bc.oc -
> OP_SeekLt)));  WARNING: conversion from 'u16' to 'u8', possible
> loss of data
> Line 71133 iBuf = p->iReadOff % p->nBuffer;
> WARNING: conversion from 'i64' to 'int', possible loss of data
> Line 71209 iBuf = p->iReadOff % p->nBuffer;
>  WARNING: conversion from 'i64' to 'int', possible loss of data
> Line 71286 iBuf = iStart % nBuf;
> WARNING: conversion from 'i64' to 'int', possible loss of data
> Line 71574 p->iBufEnd = p->iBufStart = (iStart % nBuf); WARNING:
> conversion from 'i64' to 'int', possible loss of data
>

The first warning is harmless and results from a prior datatype change.
Dan has already fixed that one.  The other four appear to be due to an MSVC
compiler bug, since every (i64%int) operation will always yield a value
that can fit in an int, no?
-- 
D. Richard Hipp
d...@sqlite.org
___
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] Unhandled Exception: on System.TypeInitializationException

2013-04-09 Thread j . merrill


If the project uses .Net and was built with "Any CPU" setting, the .Net parts 
will end up being 64-bit when run on a 64-bit OS.  When .Net code calls into 
non-.Net DLLs the "bitness" has to match, and the SQLite DLL is almost 
certainly 32-bit.
 
At least some people at MS have decided that making AnyCPU the default was 
wrong; I agree.  I always change my projects to be x86 -- and that's 
appropriate until you write something that you think requires access to more 
than about 2gb of RAM.
 
If you can re-build the app as "x86" (on the original PC that you used for 
development) that probably will solve the problem.
 
J. Merrill
 
-Original Message-
Date: Fri, 5 Apr 2013 15:19:50 -0500From: Don V Nielsen 
<[https://apps.rackspace.com/versions/webmail/8.15.18-RC/popup.php?wsid=8777ef068db87b15a20a9e46b13314f4c1a2db7c]
 donvniel...@gmail.com>To: General Discussion of SQLite Database 
<[https://apps.rackspace.com/versions/webmail/8.15.18-RC/popup.php?wsid=8777ef068db87b15a20a9e46b13314f4c1a2db7c]
 sqlite-users@sqlite.org>Subject: [sqlite] Unhandled Exception: 
System.TypeInitializationExceptionMessage-ID: 
<[https://apps.rackspace.com/versions/webmail/8.15.18-RC/popup.php?wsid=8777ef068db87b15a20a9e46b13314f4c1a2db7c]
 
cakigfiiq7-m8+bhjpq1lrsgs-5cq1aqta9sgt8fvpejd8hy...@mail.gmail.com>Content-Type:
 text/plain; charset=ISO-8859-1Thanks for reading.  I am getting the following 
error moving a 32 bitapplication from Windows Server 2003 to WS2008.  This is a 
straight copyfrom one computer to another.  It runs fine on WS2003 and not so 
good onWS2008.  The application was compiled with VS2005.  I do not have 
adevelopment environment on the WS200
 8.  I have not cleared licensing forthat, yet.I'm not a developer savant.  I 
can code in C#, assemble, and run things.I've been googling this issue, but do 
not really understand what I amreading.  All of you rank pretty high on my 
rankings, so I thought I wouldask you all for help.Thanks for your time and 
consideration,dvnUnhandled Exception: System.TypeInitializationException: The 
typeinitializer for 'CDG.AddAName.AAN' threw an exception. 
--->System.BadImageFormatException: Could not load file or 
assembly'System.Data.SQLite, Version=1.0.82.0, 
Culture=neutral,PublicKeyToken=db937bc2d44ff139' or one of its dependencies. An 
attempt wasmade to load a program with an incorrect format.File name: 
'System.Data.SQLite, Version=1.0.82.0, 
Culture=neutral,PublicKeyToken=db937bc2d44ff139' at 
CDG.AddAName.AAN..cctor()WRN: Assembly binding logging is turned OFF.To enable 
assembly bind failure logging, set the registry 
value[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is som
 e performance penalty associated with assembly bindfailure logging.To turn 
this feature off, remove the registry 
value[HKLM\Software\Microsoft\Fusion!EnableLog]. --- End of inner exception 
stack trace ---
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64bit compatibility warnings

2013-04-09 Thread Alexandr Němec



The first warning is harmless and results from a prior datatype change.
Dan has already fixed that one.  The other four appear to be due to an MSVC
compiler bug, since every (i64%int) operation will always yield a value
that can fit in an int, no?

 
Ok, thank for this comment. Of course, you are right, although I wouldn't call 
it a compiler bug. The (i64%int) operation, gives an int result, but allocated 
into an i64 value, so this is why the compiler reports the warning. But thanks, 
it is obvious now, that these warnings can be ignored.
 
Alex
 

 
___
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] 64bit compatibility warnings

2013-04-09 Thread Jay A. Kreibich
On Mon, Apr 08, 2013 at 07:41:20AM -0400, Richard Hipp scratched on the wall:

> The other four appear to be due to an MSVC
> compiler bug, since every (i64%int) operation will always yield a value
> that can fit in an int, no?

  Only on systems where "int" is 32 bits or larger.  
  
  OK, yes... that is nearly everything these days (and likely
  *everything* that supports an i64 type, even if running in 32-bit
  mode), but is not actually fixed by the language.


  Yeah, I don't buy it either.

   -j

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

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64bit compatibility warnings

2013-04-09 Thread Roland Hughes
The short answer would be no.  It has been some time since I looked at the MS 
compiler, but, int and int64 are two entirely different data types...unless you 
use a compiler switch to FORCE 64-bit data types int is 32-bit and int64 is 
64-bit. 

http://software.intel.com/en-us/articles/size-of-long-integer-type-on-different-architecture-and-os


From: sqlite-users-boun...@sqlite.org on behalf of Richard Hipp
Sent: Monday, April 08, 2013 7:41 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] 64bit compatibility warnings

On Sun, Apr 7, 2013 at 1:06 PM, Alexandr Němec  wrote:

>
> Line 6766   u.bc.r.flags = (u16)(UNPACKED_INCRKEY * (1 & (u.bc.oc -
> OP_SeekLt)));  WARNING: conversion from 'u16' to 'u8', possible
> loss of data
> Line 71133 iBuf = p->iReadOff % p->nBuffer;
> WARNING: conversion from 'i64' to 'int', possible loss of data
> Line 71209 iBuf = p->iReadOff % p->nBuffer;
>  WARNING: conversion from 'i64' to 'int', possible loss of data
> Line 71286 iBuf = iStart % nBuf;
> WARNING: conversion from 'i64' to 'int', possible loss of data
> Line 71574 p->iBufEnd = p->iBufStart = (iStart % nBuf); WARNING:
> conversion from 'i64' to 'int', possible loss of data
>

The first warning is harmless and results from a prior datatype change.
Dan has already fixed that one.  The other four appear to be due to an MSVC
compiler bug, since every (i64%int) operation will always yield a value
that can fit in an int, no?
--
D. Richard Hipp
d...@sqlite.org
___
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] SQLite 3.7.17 preview - 2x faster?

2013-04-09 Thread Max Vlasov
Thanks, Richard, it worked. For cases when I want to get benefits of faster
file-mapping I did some adjustment.

Btw, this was also for a small tool I use. It's similar to how
defragmenters show sectors while doing the job. In this case the sectors
are pages of sqlite file. If a sector was read I draw a pixel and this
works as animation while a query is being executed. So for my query that
worked 27 seconds with 3.7.16.1 and 9 seconds for 3.7.17.draft, the reading
pattern a exactly the same, virtually random filling half of the area of a
32MB file. Looks like file caching is very conservative in guessing what
can be used around in the future, while file-mapping routines assumes wider
ranges around. Sure, after both queries if I don't reset the cache, the
repeated query is almost instant.

Max



On Mon, Apr 8, 2013 at 4:31 PM, Richard Hipp  wrote:

> On Mon, Apr 8, 2013 at 8:20 AM, Max Vlasov  wrote:
>
> > Richard,
> >
> > It makes sense, but I see here some possibility of future confusion.
> > Correct me if I'm wrong. Currently if I have a vfs that requires special
> > preparations (for example, decompression), I have two choices, either
> > provide V2 interface or emulate memory-mapping by allocating my own
> blocks
> > of memory in xFetch and deallocating in xUnfetch. If future V4 IO
> routines
> >
>
> You an implement xFetch to always return NULL:
>
> int xFetch(sqlie3_file *pNotUsed1, i64 notUsed2, int notUsed3, void
> **pp){
>   *pp = 0;
>   return SQLITE_OK;
> }
>
> Then SQLite will always fallback to doing plain old xRead and xWrite.
>
>
>
> > introduce something new, one will not have the first option. So anyone in
> > the future should be aware that there are two points where data can be
> > needed and since one expects filling previously allocated block and
> another
> > expects pointer to the data, the complexity of understanding will grow.
> Or
> > is there a simple way to disable xFetch/xUnfetch on the VFS level?
> >
> > Max
> >
> >
> >
> >
> >
> > On Mon, Apr 8, 2013 at 3:33 PM, Richard Hipp  wrote:
> >
> > > On Mon, Apr 8, 2013 at 6:12 AM, Max Vlasov 
> wrote:
> > >
> > > > But I also noticed that if I provide
> > > > version 2 of vfs, I won't get benefits of file-mapping
> > > >
> > >
> > > That's how we implement backwards compatibility to legacy VFSes.
> > >
> > > --
> > > D. Richard Hipp
> > > d...@sqlite.org
> > > ___
> > > 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
> >
>
>
>
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> 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] A sqlite database changing the contents when I change the database name or user rights

2013-04-09 Thread Bernardino Flores/Jeanologia
Hi,

I have found a problem with a sqlite database which I cannot find any 
reasonable explanation for it.
I use both "sqliteadmin" and "sqlitebrowser_200_b1_win" editors to check the 
contents, and with both I observe the same problem. The problem is that 
sometimes I see 7 tables in the database and sometimes 11 tables. After some 
hours of looking for the problem I have realized that, if I open the database 
with the editor started as administrator I see 11 tables, if not only 7 (and 
those 7 tables have not the same contents as the 11 tables db, it seems a 
different database, an old one). It happens when I  rename the database, too.
Have any found a problem like this? Could it be a windows 7 operative system 
error, when indexing files?

Regards,

Berna



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