Re: [sqlite] Violating Primary key Constraint

2008-11-24 Thread Ian Walters
I copied and pasted the lines from your email into SQLite and got a
different response from SQLite than you claim you got.

sqlite3
SQLite version 3.3.8
Enter ".help" for instructions
sqlite> create table secondtable (recid INT PRIMARY KEY NOT NULL, label
   ...> text);
sqlite> insert into secondtable (label) VALUES ('foo');
SQL error: secondtable.recid may not be NULL
sqlite>

Check you used INT, not INTEGER.  Check you used NOT NULL.  Check your
version of SQLite.

If your output below really did come from SQLite and you are using a
recent version, then I doubt I can help.

--
Ian

Satish wrote:
> Hi!
> You Said me to create the field as "INT PRIMARY KEY NOT NULL" instead of
> "INTEGER PRIMARY KEY NOT NULL".Even we spell differently they are working
> same.it is also auto incrementing.
> 
> sqlite> create table dummytable (recid integer PRIMARY KEY NOT NULL,
> label text);
> sqlite> insert into dummytable (label) VALUES ('foo');
> sqlite> select * from dummytable;
> 1|foo
> sqlite> create table secondtable (recid INT PRIMARY KEY NOT NULL, label
> text);
> sqlite> insert into secondtable (label) VALUES ('foo');
> 1|foo
> I am not getting any constraint failed error
> 
> Regards,
> Satish.G
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Ian Walters
> Sent: Tuesday, November 25, 2008 11:17 AM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Violating Primary key Constraint
> 
> Hi Satish,
> 
> I just re-read your original email and Igor's response seemed
> appropriate.  The original email read as if you were reporting a problem
> rather than asking a question.
> 
> As for you question:
> 
> sqlite> create table dummytable (recid integer PRIMARY KEY NOT NULL,
> label text);
> sqlite> insert into dummytable (label) VALUES ('foo');
> sqlite> select * from dummytable;
> 1|foo
> sqlite> create table secondtable (recid INT PRIMARY KEY NOT NULL, label
> text);
> sqlite> insert into secondtable (label) VALUES ('foo');
> SQL error: secondtable.recid may not be NULL
> 
> --
> Ian
> 
> 
> 
> Satish wrote:
>> Hi Igor!
>>
>> Thanks for the reply.The thing I need is I don't want the field to be
>> auto incremented it should show me the error that constraint violated even
>> if I give NULL or empty value.how can I do this.Don't send me links which
>> doesn't have matter at all.First try to understand the problem and then
> give
>> me reply.
>>
>> Regards,
>> Satish.G
>>
>> -Original Message-
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Igor Tandetnik
>> Sent: Tuesday, November 25, 2008 10:59 AM
>> To: sqlite-users@sqlite.org
>> Subject: Re: [sqlite] Violating Primary key Constraint
>>
>> "Satish" <[EMAIL PROTECTED]> wrote in
>> message news:[EMAIL PROTECTED]
>>>  I have created a table in sqlite.Upto my knowledge a column which is
>>> declared as primary key will not accept null and even if I don't give
>>> any value to that field an error occurs that violating the constraint
>>>
>>> For Example
>>>
>>> Create table emp(empno integer PRIMARY KEY,...,...)
>>>
>>> . Even if I give u a NULL as a value to the field that is
>>> declared as primary key .it is accepting
>> http://sqlite.org/autoinc.html
> 
> ___
> 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] Violating Primary key Constraint

2008-11-24 Thread Satish
Hi!
You Said me to create the field as "INT PRIMARY KEY NOT NULL" instead of
"INTEGER PRIMARY KEY NOT NULL".Even we spell differently they are working
same.it is also auto incrementing.

sqlite> create table dummytable (recid integer PRIMARY KEY NOT NULL,
label text);
sqlite> insert into dummytable (label) VALUES ('foo');
sqlite> select * from dummytable;
1|foo
sqlite> create table secondtable (recid INT PRIMARY KEY NOT NULL, label
text);
sqlite> insert into secondtable (label) VALUES ('foo');
1|foo
I am not getting any constraint failed error

Regards,
Satish.G

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Walters
Sent: Tuesday, November 25, 2008 11:17 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Violating Primary key Constraint

Hi Satish,

I just re-read your original email and Igor's response seemed
appropriate.  The original email read as if you were reporting a problem
rather than asking a question.

As for you question:

sqlite> create table dummytable (recid integer PRIMARY KEY NOT NULL,
label text);
sqlite> insert into dummytable (label) VALUES ('foo');
sqlite> select * from dummytable;
1|foo
sqlite> create table secondtable (recid INT PRIMARY KEY NOT NULL, label
text);
sqlite> insert into secondtable (label) VALUES ('foo');
SQL error: secondtable.recid may not be NULL

--
Ian



Satish wrote:
> Hi Igor!
> 
> Thanks for the reply.The thing I need is I don't want the field to be
> auto incremented it should show me the error that constraint violated even
> if I give NULL or empty value.how can I do this.Don't send me links which
> doesn't have matter at all.First try to understand the problem and then
give
> me reply.
> 
> Regards,
> Satish.G
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Igor Tandetnik
> Sent: Tuesday, November 25, 2008 10:59 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Violating Primary key Constraint
> 
> "Satish" <[EMAIL PROTECTED]> wrote in
> message news:[EMAIL PROTECTED]
>>  I have created a table in sqlite.Upto my knowledge a column which is
>> declared as primary key will not accept null and even if I don't give
>> any value to that field an error occurs that violating the constraint
>>
>> For Example
>>
>> Create table emp(empno integer PRIMARY KEY,...,...)
>>
>> . Even if I give u a NULL as a value to the field that is
>> declared as primary key .it is accepting
> 
> http://sqlite.org/autoinc.html

___
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] Violating Primary key Constraint

2008-11-24 Thread Satish
Hi Igor!
  
 You Said me to create the field as "INT PRIMARY KEY" instead of
"INTEGER PRIMARY KEY".Even we spell differently they are working same.it is
also auto incrementing.

Regards,
Satish.G

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Tandetnik
Sent: Tuesday, November 25, 2008 11:13 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Violating Primary key Constraint

"Satish" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
>Thanks for the reply.The thing I need is I don't want the field to
> be
> auto incremented

Spell the field in some way other than precisely "INTEGER PRIMARY KEY". 
E.g. "INT PRIMARY KEY" would work as you expect.

Igor Tandetnik



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

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


[sqlite] Foreign Key

2008-11-24 Thread Satish
Hi All!

 

  I have a small question that Foreign key Constraint is now supported
by SQLite or not.I had this question because in an SQLite table for a
Foreign key "ON DELETE  CASCADE or ON UPDATE CASCADE " are not working.Is
there any problem with my database or with SQLite.

 

Regards,

Satish.G

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


Re: [sqlite] Violating Primary key Constraint

2008-11-24 Thread Ian Walters
Hi Satish,

I just re-read your original email and Igor's response seemed
appropriate.  The original email read as if you were reporting a problem
rather than asking a question.

As for you question:

sqlite> create table dummytable (recid integer PRIMARY KEY NOT NULL,
label text);
sqlite> insert into dummytable (label) VALUES ('foo');
sqlite> select * from dummytable;
1|foo
sqlite> create table secondtable (recid INT PRIMARY KEY NOT NULL, label
text);
sqlite> insert into secondtable (label) VALUES ('foo');
SQL error: secondtable.recid may not be NULL

--
Ian



Satish wrote:
> Hi Igor!
> 
> Thanks for the reply.The thing I need is I don't want the field to be
> auto incremented it should show me the error that constraint violated even
> if I give NULL or empty value.how can I do this.Don't send me links which
> doesn't have matter at all.First try to understand the problem and then give
> me reply.
> 
> Regards,
> Satish.G
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Igor Tandetnik
> Sent: Tuesday, November 25, 2008 10:59 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Violating Primary key Constraint
> 
> "Satish" <[EMAIL PROTECTED]> wrote in
> message news:[EMAIL PROTECTED]
>>  I have created a table in sqlite.Upto my knowledge a column which is
>> declared as primary key will not accept null and even if I don't give
>> any value to that field an error occurs that violating the constraint
>>
>> For Example
>>
>> Create table emp(empno integer PRIMARY KEY,...,...)
>>
>> . Even if I give u a NULL as a value to the field that is
>> declared as primary key .it is accepting
> 
> http://sqlite.org/autoinc.html

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


Re: [sqlite] Violating Primary key Constraint

2008-11-24 Thread Igor Tandetnik
"Satish" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
>Thanks for the reply.The thing I need is I don't want the field to
> be
> auto incremented

Spell the field in some way other than precisely "INTEGER PRIMARY KEY". 
E.g. "INT PRIMARY KEY" would work as you expect.

Igor Tandetnik



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


Re: [sqlite] Violating Primary key Constraint

2008-11-24 Thread Satish
Hi Igor!

Thanks for the reply.The thing I need is I don't want the field to be
auto incremented it should show me the error that constraint violated even
if I give NULL or empty value.how can I do this.Don't send me links which
doesn't have matter at all.First try to understand the problem and then give
me reply.

Regards,
Satish.G

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Tandetnik
Sent: Tuesday, November 25, 2008 10:59 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Violating Primary key Constraint

"Satish" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
>  I have created a table in sqlite.Upto my knowledge a column which is
> declared as primary key will not accept null and even if I don't give
> any value to that field an error occurs that violating the constraint
>
> For Example
>
> Create table emp(empno integer PRIMARY KEY,...,...)
>
> . Even if I give u a NULL as a value to the field that is
> declared as primary key .it is accepting

http://sqlite.org/autoinc.html
-- 
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925 



___
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] Violating Primary key Constraint

2008-11-24 Thread P Kishor
On 11/24/08, Satish <[EMAIL PROTECTED]> wrote:
> Hi All!
>
>
>
>   I have created a table in sqlite.Upto my knowledge a column which is
>  declared as primary key will not accept null and even if I don't give any
>  value to that field an error occurs that violating the constraint
>
>  For Example
>
>  Create table emp(empno integer PRIMARY KEY,...,...)
>
>  . Even if I give u a NULL as a value to the field that is declared
>  as primary key .it is accepting
>
>  . Even if I Don't give any value to the field that is declared as
>  primary key it is auto incrementing. Instead of showing the error constraint
>  violated it is  auto increment that field value(I did not specify the column
>  to auto increment).
>
>
>

from the docs 

"According to the SQL standard, PRIMARY KEY should imply NOT NULL.
Unfortunately, due to a long-standing coding oversight, this is not
the case in SQLite. SQLite allows NULL values in a PRIMARY KEY column.
We could change SQLite to conform to the standard (and we might do so
in the future), but by the time the oversight was discovered, SQLite
was in such wide use that we feared breaking legacy code if we fixed
the problem. So for now we have chosen to continue allowing NULLs in
PRIMARY KEY columns. Developers should be aware, however, that we may
change SQLite to conform to the SQL standard in future and should
design new programs accordingly."


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


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Violating Primary key Constraint

2008-11-24 Thread Igor Tandetnik
"Satish" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
>  I have created a table in sqlite.Upto my knowledge a column which is
> declared as primary key will not accept null and even if I don't give
> any value to that field an error occurs that violating the constraint
>
> For Example
>
> Create table emp(empno integer PRIMARY KEY,...,...)
>
> . Even if I give u a NULL as a value to the field that is
> declared as primary key .it is accepting

http://sqlite.org/autoinc.html
-- 
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925 



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


[sqlite] Violating Primary key Constraint

2008-11-24 Thread Satish
Hi All!

 

  I have created a table in sqlite.Upto my knowledge a column which is
declared as primary key will not accept null and even if I don't give any
value to that field an error occurs that violating the constraint 

For Example

Create table emp(empno integer PRIMARY KEY,...,...)

. Even if I give u a NULL as a value to the field that is declared
as primary key .it is accepting

. Even if I Don't give any value to the field that is declared as
primary key it is auto incrementing. Instead of showing the error constraint
violated it is  auto increment that field value(I did not specify the column
to auto increment).

 

 

Regards,

Satish.G

 

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


Re: [sqlite] self test for sqlite-amalgamation-3.6.5

2008-11-24 Thread goldy
Hi Shane,

I am using linux and i have used these options:
gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I./src -DNDEBUG -I/devel/usr/include
-DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1  -DTCLSH=1
-DSQLITE_NO_SYNC=1\
-DSQLITE_CRASH_TEST=1 -DSQLITE_TEST=1\
-DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
-DSQLITE_TEMP_STORE=1
 -o testfixture ./src/test1.c ./src/test2.c ./src/test3.c ./src/test4.c
./src/test5.c ./src/test6.c ./src/test7.c ./src/test8.c ./src/test9.c
./src/test_autoext.c ./src/test_async.c ./src/test_btree.c
./src/test_config.c ./src/test_devsym.c ./src/test_func.c ./src/test_hexio.c
./src/test_malloc.c ./src/test_md5.c ./src/test_mutex.c ./src/test_onefile.c
./src/test_osinst.c ./src/test_schema.c ./src/test_server.c
./src/test_tclvar.c ./src/test_thread.c sqlite3.c -L/devel/usr/lib -ltcl8.4
-ldl  -lieee -lm -lpthread


I have copied src/test*.c from source repository and appended tclsqlite.c to
sqlite3.c.

I also tried to give -DSQLITE_AMALGAMATION flag but then during compilation
i am getting errors.

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


[sqlite] Wondering about SQLite and Java

2008-11-24 Thread Ribeiro, Glauber
What is the current wisdom about the best JDBC driver to use for SQLite
in Linux?

Thanks,

glauber

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


Re: [sqlite] Return first row of database

2008-11-24 Thread P Kishor
On 11/24/08, Rick Pritchett <[EMAIL PROTECTED]> wrote:
> I am trying to set my variable to the first row of my database

how do you do that?

> then delete the
>  row.  Does any one have a good example?
>

What is your definition of the "first row" of your database.

First, you obviously mean the "first row" of some "table" in your
database. That said, remember that the database doesn't think of first
or second or last as we humans might think. You have to tell the
database which table and which row you want deleted. For that, you
have track something by which you can tell when the row was inserted.

If you are tracking a time stamp or an increasing primary key, you can
choose the MIN value of that column to identify your first row.


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


[sqlite] Return first row of database

2008-11-24 Thread Rick Pritchett
I am trying to set my variable to the first row of my database then delete the
row.  Does any one have a good example? 




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


[sqlite] Window functions

2008-11-24 Thread Constantine Vassil
OLAP functionality includes the concept of a sliding *window* that moves
down
through the input rows as they are processed. Additional calculations can be

performed on the data in the window as it moves, allowing further analysis
in a
manner that is more efficient than using semantically equivalent self-join
queries, or correlated subqueries.

I am thinking this functionality is possible to implement working directly
with
the B-Tree.

Does anyone has better ideas?

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


Re: [sqlite] self test for sqlite-amalgamation-3.6.5

2008-11-24 Thread Shane Harrelson
Can you provide more details?  What platform (Windows, Linux, etc.)?  What
version of TCL?  What compilation options did you use for the testfixture?

On Mon, Nov 24, 2008 at 1:30 AM, Avinash Mittal <[EMAIL PROTECTED]>wrote:

> Hi,
>
> I tried to execute the test for sqlite-amalgamation-3.6.5 repository but
> there are some test cases which getting hanged like
> lock-4.3...
> Expected: [1 {database is locked} {0 1 2 3 4 5}]
> Got: [1 {database is locked} {}]
> lock-5.1... Ok
> lock-5.2..---> this one is
> hanging.
>  and
> pragma-3.4    > hanging
>
>
> i am not getting understood this behavior as i did execute test for
> sqlite-3.6.4 repository and all ended well
> ___
> 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 crash with "WHERE x in ()" query

2008-11-24 Thread Shane Harrelson
Thanks for the report.  The current test suite has many cases testing
queries of the form you mention.  I added one specifically for the query you
suggested to in4.test.   Everything passes for the current version.   If you
could test with the latest version of SQLite, it might help show where the
problem lies (in SQSLite, the Python bindings, or possibly in your
application code).   Most of the historical versions of SQLite are also
available from the website.  If this was a problem in an older version, but
not with the latest, it might be beneficial for you to try incremental
versions to find where it was fixed.

-Shane



On Fri, Nov 7, 2008 at 6:48 PM, Matt Craighead <
[EMAIL PROTECTED]> wrote:

> Hi all,
>
> I've hit what I believe may be a crash bug in SQLite.  I'm using the
> version
> bundled with Python 2.5.2 on Windows, which is SQLite 3.3.4, it would
> appear.  I know, this isn't the latest version, but this happens to be the
> version bundled with the version of Python my product relies on.  (I
> haven't
> switched to Python 2.6 yet; for one, there are no publicly available
> mod_python Win32 binaries for Apache.)
>
> Originally my query looked something like:
>
> SELECT x FROM table WHERE id IN (SELECT id FROM other_table WHERE y=1)
>
> I assumed this would do the subquery only once, but I found (both from slow
> performance and by using EXPLAIN QUERY PLAN) that in fact it was doing a
> full table scan of "table", and for each element, looking at its id to see
> whether that id could be found in other_table.
>
> On the other hand, if I did two separate queries, and wrote the second
> query
> as follows:
>
> SELECT x FROM table WHERE id IN (1,3,5,7)
>
> ...it would use table's index, which was a lot faster.  Unfortunately if
> the
> list of id's was empty, I'd end up constructing a query with a "WHERE x IN
> ()" clause -- and this would cause a crash deep in the guts of sqlite3.dll.
> Without symbols it wasn't clear where the crash was coming from.
>
> From the grammar diagram at http://www.sqlite.org/lang_expr.html, it would
> appear that using () for an empty list is not legal SQL syntax as
> recognized
> by SQLite.  Is that correct?  Even if so, it still shouldn't crash, right?
> I would think that it should consistently either produce an error, or
> consistently treat () as an empty set.  I don't get an error, and while
> sometimes it appears to be treated as an empty set, sometimes I get a
> crash.
>
> Oddly this crash doesn't happen all the time.  It only seems to happen for
> the following specific query:
>
> SELECT x FROM table
> WHERE id IN ()
> AND x IN (SELECT x FROM table2 WHERE id=)
> Any ideas?  Has this been fixed in a newer version already?  I've already
> worked around this and I no longer issue SQLite any "IN ()" queries, but I
> figured I'd still report the problem.
>
> --
> Matt Craighead
> Founder/CEO, Conifer Systems LLC
> http://www.conifersystems.com
> 512-772-1834
> ___
> 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] Which TCL distrabution for Windows XP for running SQLite tests?

2008-11-24 Thread Arjen Markus
Shane Harrelson wrote:

>
>It wasn't a loss of precision, it was mearly a display issue.   The Windows
>ActiveTCL 8.5
>distribution might display the floating point value as "5.4e-018" while the
>"unix"
>TCL 8.5 version would display "5.4e-18" (or something similar).   There's
>probably
>an option to control this in TCL, but I couldn't find it with a quick check.
>
>  
>
I do not think Tcl offers you such an option: this sort of things is 
hidden in the
depths of the C runtime library. Your best option would be to compare 
numbers
as numbers, not just as text.

Regards,

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


Re: [sqlite] Which TCL distrabution for Windows XP for running SQLite tests?

2008-11-24 Thread Shane Harrelson
On Mon, Nov 24, 2008 at 9:30 AM, Michael Schlenker <[EMAIL PROTECTED]> wrote:

> Shane Harrelson schrieb:
> > Sorry for the late reply.   I use both the ActiveTCL and the Cygwin
> > distributions for testing on Windows.
> > It should be noted that both versions have limitations that will cause
> > "false positives" in the test suite.
> >
> > Be on the look out especially for problems with 64-integers and floating
> > point values.
> > I believe the ActiveTCL distribution uses a 3 digit mantissa to display
> > floating point values
> > which throws off the checking in the test suite.
> That sounds strange.
>
> Might be more an issue with Tcl 8.4 vs. Tcl 8.5. Tcl 8.5 has a totally
> revamped floating point handling, so that there should be no loss of
> precision when converting a floating point through a string rep anymore
> (and
> Tcl got big integer support based on libtommath as a side effect).
>


It wasn't a loss of precision, it was mearly a display issue.   The Windows
ActiveTCL 8.5
distribution might display the floating point value as "5.4e-018" while the
"unix"
TCL 8.5 version would display "5.4e-18" (or something similar).   There's
probably
an option to control this in TCL, but I couldn't find it with a quick check.



>
> Cygwin is not really a supported platform for Tcl anymore and the port is
> old and strange.
>
> So, guess you should use the ActiveTcl 8.5 offering, unless DRH recommends
> something older than Tcl 8.5 (which is the current stable branch while 8.4
> is getting its last update soon).
>


I test with both as to get assurance of greater compatibility with more
versions on
Windows.



>
> Michael
>
> --
> Michael Schlenker
> Software Engineer
>
> CONTACT Software GmbH   Tel.:   +49 (421) 20153-80
> Wiener Straße 1-3   Fax:+49 (421) 20153-41
> 28359 Bremen
> http://www.contact.de/  E-Mail: [EMAIL PROTECTED]
>
> Sitz der Gesellschaft: Bremen
> Geschäftsführer: Karl Heinz Zachries, Ralf Holtgrefe
> Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215
>  ___
> 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] Which TCL distrabution for Windows XP for running SQLite tests?

2008-11-24 Thread Michael Schlenker
Shane Harrelson schrieb:
> Sorry for the late reply.   I use both the ActiveTCL and the Cygwin
> distributions for testing on Windows.
> It should be noted that both versions have limitations that will cause
> "false positives" in the test suite.
> 
> Be on the look out especially for problems with 64-integers and floating
> point values.
> I believe the ActiveTCL distribution uses a 3 digit mantissa to display
> floating point values
> which throws off the checking in the test suite.   
That sounds strange.

Might be more an issue with Tcl 8.4 vs. Tcl 8.5. Tcl 8.5 has a totally
revamped floating point handling, so that there should be no loss of
precision when converting a floating point through a string rep anymore (and
Tcl got big integer support based on libtommath as a side effect).

Cygwin is not really a supported platform for Tcl anymore and the port is
old and strange.

So, guess you should use the ActiveTcl 8.5 offering, unless DRH recommends
something older than Tcl 8.5 (which is the current stable branch while 8.4
is getting its last update soon).

Michael

-- 
Michael Schlenker
Software Engineer

CONTACT Software GmbH   Tel.:   +49 (421) 20153-80
Wiener Straße 1-3   Fax:+49 (421) 20153-41
28359 Bremen
http://www.contact.de/  E-Mail: [EMAIL PROTECTED]

Sitz der Gesellschaft: Bremen
Geschäftsführer: Karl Heinz Zachries, Ralf Holtgrefe
Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Which TCL distrabution for Windows XP for running SQLite tests?

2008-11-24 Thread Shane Harrelson
Sorry for the late reply.   I use both the ActiveTCL and the Cygwin
distributions for testing on Windows.
It should be noted that both versions have limitations that will cause
"false positives" in the test suite.

Be on the look out especially for problems with 64-integers and floating
point values.
I believe the ActiveTCL distribution uses a 3 digit mantissa to display
floating point values
which throws off the checking in the test suite.   The Cygwin distribution
is a little out
dated and doesn't have full 64-bit support yet which also causes problems in
the
test suite.

HTH.
-Shane

On Sat, Nov 15, 2008 at 5:40 PM, Brown, Daniel <[EMAIL PROTECTED]> wrote:

> Good afternoon list,
>
> If I would like to use the TCL based tests on my version of SQLite on
> Windows XP what would be the recommend TCL distribution to use?  Would
> ActiveTCL (http://tinyurl.com/5wl6uv) be compatible with the SQLite TCL
> scripts on Windows XP?
>
> Cheers,
>
> Daniel Brown | Software Engineer
> "The best laid schemes o' mice an' men, gang aft agley"
>
>
>
> ___
> 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] Request to check UNICODE support

2008-11-24 Thread Martin.Engelschalk
Hi,

sqlite supports unicode. Internally, thext is stored in UTF-8 or UTF-16, 
depending on sqlite3_open or sqlite3_open16, respectively.
See http://www.sqlite.org/c3ref/funclist.html,
There functions named sqlite3_xxx16 are described , which take UTF-16 as 
arguments.

Martin

[EMAIL PROTECTED] schrieb:
>  Hi all
>
> This is krishnakumar i am using SQLite as data base in my application as meta 
> data storage i want use it to store CString how can i deal with UNICODE. Is 
> SQLite support UNICODE Character set
>
>
>  
>
>
> Krishna Kumar T M
> 9886454481
>
> 
> Don't let your email address define you - Define yourself at 
> http://www.tunome.com today! 
> ___
> 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] Request to check UNICODE support

2008-11-24 Thread Igor Tandetnik
<[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
> Is SQLite support UNICODE Character set

Yes. All SQLite API functions accept UTF-8 or UTF-16 strings.

Igor Tandetnik 



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


[sqlite] Fwd: test error

2008-11-24 Thread AVINASH MITTAL
  
please discard the previous message.

the error which i got during sqlite-amalgamation test execution is :

incrblob_err-7.8.1...
Error: disk I/O error
./testfixture: disk I/O error
while executing
"$db eval {
  SELECT name, type, sql FROM sqlite_master order by name
  }"
(procedure "cksum" line 2)
invoked from within
"cksum"
(procedure "do_ioerr_test" line 54)
invoked from within
"do_ioerr_test incrblob_err-7 -cksum 1 -sqlprep {
  PRAGMA auto_vacuum = 1;
  CREATE TABLE blobs(k INTEGER PRIMARY KEY, v BLOB);
  INSERT INTO blobs VA..."
(file "test/incrblob_err.test" line 104)
invoked from within
"source $testfile"
("foreach" body line 15)
invoked from within
"foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
  # If this is "veryquick.test", do not run any of the malloc or
  # IO error simulatio..."
(file "test/quick.test" line 108)
invoked from within
"source $testdir/quick.test"
(file "test/veryquick.test" line 15)


regards
Avinash



Note: Forwarded message attached

-- Original Message --

From: "AVINASH MITTAL" <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Subject: test error
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] test error

2008-11-24 Thread Martin.Engelschalk
hi,

attachments do not reach this list, please specify the error.

Martin

AVINASH MITTAL schrieb:
>   
> Hi,
>
> while executing tests for amalgamation for version 3.6.5 i got this error, 
> can somebody help me in this regard
>
> Regards
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>   

-- 

* Codeswift GmbH *
Traunstr. 30
A-5026 Salzburg-Aigen
Tel: +49 (0) 8662 / 494330
Mob: +49 (0) 171 / 4487687
Fax: +49 (0) 12120 / 204645
[EMAIL PROTECTED]
www.codeswift.com / www.swiftcash.at

Codeswift Professional IT Services GmbH
Firmenbuch-Nr. FN 202820s
UID-Nr. ATU 50576309

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


[sqlite] test error

2008-11-24 Thread AVINASH MITTAL
  
Hi,

while executing tests for amalgamation for version 3.6.5 i got this error, can 
somebody help me in this regard

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


[sqlite] Request to check UNICODE support

2008-11-24 Thread krishnakumar . tm

 Hi all

This is krishnakumar i am using SQLite as data base in my application as meta 
data storage i want use it to store CString how can i deal with UNICODE. Is 
SQLite support UNICODE Character set


 


Krishna Kumar T M
9886454481


Don't let your email address define you - Define yourself at 
http://www.tunome.com today! 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] contstraint failed problem

2008-11-24 Thread Christophe Leske
Hello,

i have a rtree table which I dynamically opulate with results.

Sometimes however, I get a "constraint failed" error from SQLite. After 
some poking, I found that it occurs whenever my statement tries to 
insert a record which has an ID that is already in the rtree-table, 
which is ok, as the ID is to be unique.

However, the insert statement is written as followed:

insert or ignore into idlookup select * from (select * from cl2) where (
lomi>2.64 and loma<3.29 and lami>42.48 and lama<42.82);
SQL error: constraint failed

Like i said, the error occurs because one of the records to be added are 
already in the idlookup table.

It would be my understanding however that the "or ignore" statement 
would silently let those inserts fail if they are already in?

What´s wrong here?


-- 
Christophe Leske

www.multimedial.de - [EMAIL PROTECTED]
http://www.linkedin.com/in/multimedial
Lessingstr. 5 - 40227 Duesseldorf - Germany
0211 261 32 12 - 0177 249 70 31


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


Re: [sqlite] optimizing a multiple select statement

2008-11-24 Thread Christophe Leske

> insert or ignore into idlookup
> select * from (
>   select * from cl1
>   UNION ALL select * from cl2
>   UNION ALL select * from cl3
>   UNION ALL select * from cl4
>   UNION ALL select * from cl5
> )
> where (lomi>13.96 and loma<13.96 and lami>53.23 and lama<53.23);
>   
Thanks, but sometimes it says "constraint failed"?

What does this mean?


Christophe Leske

www.multimedial.de - [EMAIL PROTECTED]
http://www.linkedin.com/in/multimedial
Lessingstr. 5 - 40227 Duesseldorf - Germany
0211 261 32 12 - 0177 249 70 31


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