Re: [sqlite] bug in sqlite3??

2019-05-28 Thread Jens Alfke
> On May 26, 2019, at 7:21 PM, John Brigham wrote: > > The size of the file reflects the number of rows that should be present. And > furthermore, the size of the file nicely reflects the number of days. […] > Trust me when I say that this file is way to big for the number of rows. SQLite

Re: [sqlite] bug in sqlite3??

2019-05-27 Thread Richard Hipp
On 5/26/19, John Brigham wrote: > I have an Arduino/Python experiment that generates lots of simple > numerical data; about 7000 records a day. I run it through Python into an > sqlite3 database.I have been running this for 8 months. I start a new > database about every six weeks so every data

[sqlite] bug in sqlite3??

2019-05-27 Thread John Brigham
I have an Arduino/Python experiment that generates lots of simple numerical data; about 7000 records a day. I run it through Python into an sqlite3 database.I have been running this for 8 months. I start a new database about every six weeks so every database has about 260k rows. I have one

Re: [sqlite] Bug: CTE name leaking through views

2019-05-24 Thread Stephen Hunt
I tried it out in trunk and it works for me as well. Thanks for your help! Steve On Wed, May 22, 2019 at 3:50 PM Richard Hipp wrote: > Thanks for the test case. This problem should now be fixed on trunk. > Please try it out and let us know if you encounter any additional > probglems. > > -- >

Re: [sqlite] Bug: sqlite ARM endian problem

2019-05-23 Thread Sebastian Kemper
On Wed, May 22, 2019 at 03:43:13PM -0400, Richard Hipp wrote: > On 5/22/19, Sebastian Kemper wrote: > > > > Hello Richard, > > > > I have run-tested this with qemu on two targets until now: > > > > arm_arm1176jzf-s_vfp > > armeb_xscale > > > > Both worked fine. Unfortunately I still don't have fee

Re: [sqlite] Bug: CTE name leaking through views

2019-05-22 Thread Stephen Hunt
Hi Richard, I just realized I didn't include the mailing list in my previous response to you, so I'm doing that now with the contents of the SQL file I sent you previously. I've also included a copy of my original email in plaintext as the HTML formatted SQL queries got mangled when it was process

Re: [sqlite] Bug: CTE name leaking through views

2019-05-22 Thread Richard Hipp
Thanks for the test case. This problem should now be fixed on trunk. Please try it out and let us know if you encounter any additional probglems. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http

Re: [sqlite] Bug: sqlite ARM endian problem

2019-05-22 Thread Richard Hipp
On 5/22/19, Sebastian Kemper wrote: > > Hello Richard, > > I have run-tested this with qemu on two targets until now: > > arm_arm1176jzf-s_vfp > armeb_xscale > > Both worked fine. Unfortunately I still don't have feedback from the > user. He didn't receive my mail. I've sent it again and will get

Re: [sqlite] Bug: sqlite ARM endian problem

2019-05-22 Thread Sebastian Kemper
On Mon, May 20, 2019 at 09:10:20PM +0200, Sebastian Kemper wrote: > On Mon, May 20, 2019 at 02:46:47PM -0400, Richard Hipp wrote: > > On 5/20/19, Sebastian Kemper wrote: > > > In OpenWrt's forum a user raised a topic about being unable to use > > > Asterisk on his armeb xscale device. > > > > Plea

Re: [sqlite] Bug: sqlite ARM endian problem

2019-05-20 Thread Sebastian Kemper
On Mon, May 20, 2019 at 02:46:47PM -0400, Richard Hipp wrote: > On 5/20/19, Sebastian Kemper wrote: > > In OpenWrt's forum a user raised a topic about being unable to use > > Asterisk on his armeb xscale device. > > Please download a tarball of the latest trunk version of SQLite > (check-in https:

Re: [sqlite] Bug: sqlite ARM endian problem

2019-05-20 Thread Richard Hipp
On 5/20/19, Sebastian Kemper wrote: > In OpenWrt's forum a user raised a topic about being unable to use > Asterisk on his armeb xscale device. Please download a tarball of the latest trunk version of SQLite (check-in https://www.sqlite.org/src/info/b7aad929619f7043 or later) and verify that it n

[sqlite] Bug: sqlite ARM endian problem

2019-05-20 Thread Sebastian Kemper
Hello list, In OpenWrt's forum a user raised a topic about being unable to use Asterisk on his armeb xscale device. We narrowed it down to sqlite. Asterisk was unable to insert a simple table. Couldn't prepare statement 'CREATE TABLE IF NOT EXISTS astdb(key VARCHAR(256), value VARCHAR(256), PR

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Jose Isaias Cabrera
Jose Isaias Cabrera, on Friday, May 17, 2019 08:28 AM, wrote... >J. King, on Friday, May 17, 2019 07:19 AM, wrote... >>Perhaps I should have been clearer that this is a regression? >> I know, overkill, but here is another look at it, SQLite version 3.28.0 2019-04-16 19:49:53 Enter ".help" for usa

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Clemens Ladisch
Simon Slavin wrote: > On 17 May 2019, at 1:33pm, Clemens Ladisch wrote: >> This keyword behaves magically. ... as far as the SQL standard is concerned. > Mmmm. In that case, to implement this properly you need to store > a default-type flag alongside the default value. The SQLite syntax diagra

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Simon Slavin
On 17 May 2019, at 1:33pm, Clemens Ladisch wrote: > This keyword behaves magically. Mmmm. In that case, to implement this properly you need to store a default-type flag alongside the default value. Proposed values might be 0) No default specified, so use … 1) Fixed default specified, so use

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Clemens Ladisch
Simon Slavin wrote: > If you supply "default CURRENT_TIMESTAMP" I would expect SQLite to > evaluate CURRENT_TIMESTAMP, find a string value like > '2019-05-17 12:10:43', and store that string in the schema. This keyword behaves magically. ANSI SQL-92 says: | The default value inserted in the colum

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Jose Isaias Cabrera
J. King, on Friday, May 17, 2019 07:19 AM, wrote... >Perhaps I should have been clearer that this is a regression? > >SQLite version 3.13.0 2016-05-18 10:57:30 >Enter ".help" for usage hints. >Connected to a transient in-memory database. >Use ".open FILENAME" to reopen on a persistent database. >s

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Nelson, Erik - 2
Please disregard, apologies for the noise. From: "Nelson, Erik - 2" Sent: May 17, 2019 8:17 AM To: sqlite-users@mailinglists.sqlite.org Subject: [External email from sqlite-users-boun...@mailinglists.sqlite.org] Re: [sqlite] Bug in table_info pragma

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Nelson, Erik - 2
We need to get these into the hive database, if that's helpful From: Simon Slavin Sent: May 17, 2019 8:16 AM To: SQLite mailing list Subject: Re: [sqlite] Bug in table_info pragma On 17 May 2019, at 12:06pm, J. King wrote: > Then there wou

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Simon Slavin
On 17 May 2019, at 12:06pm, J. King wrote: > Then there would be no differentiating "default CURRENT_TIMESTAMP" from > "default 'CURRENT_TIMESTAMP'". That interesting. If you supply "default CURRENT_TIMESTAMP" I would expect SQLite to evaluate CURRENT_TIMESTAMP, find a string value like '2019

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread J. King
On 2019-05-17 07:08:27, "Warren Young" wrote: On May 17, 2019, at 4:55 AM, J. King wrote: SQLite version 3.28.0 2019-04-16 19:49:53 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> create table t

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Warren Young
On May 17, 2019, at 4:55 AM, J. King wrote: > > SQLite version 3.28.0 2019-04-16 19:49:53 > Enter ".help" for usage hints. > Connected to a transient in-memory database. > Use ".open FILENAME" to reopen on a persistent database. > sqlite> create table t(a text default '' /* comment */ ); > sqlite

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread J. King
On 2019-05-17 06:59:58, "Simon Slavin" wrote: On 17 May 2019, at 11:55am, J. King wrote: I would expect it to print only the string delimiters. I might expect it to print only the thing inside the delimiters, i.e. nothing. Then there would be no differentiating "default CURRENT_TIMESTAM

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Simon Slavin
On 17 May 2019, at 11:55am, J. King wrote: > I would expect it to print only the string delimiters. I might expect it to print only the thing inside the delimiters, i.e. nothing. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http:/

[sqlite] Bug in table_info pragma

2019-05-17 Thread J. King
SQLite version 3.28.0 2019-04-16 19:49:53 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> create table t(a text default '' /* comment */ ); sqlite> select dflt_value from pragma_table_info('t') where name

Re: [sqlite] Bug report: Segfault in sqlite3_clear_bindings when statement is nullptr

2019-05-03 Thread Christof Arnosti
Hi, Since the last mail I sent was not really readable due to problems with my mail settings I resend the possible bug report below. I want to report a (possible) bug in sqlite3. When sqlite3_clear_bindings is called with a nullptr argument, then a SEGFAULT occurs. From the behavior of the othe

Re: [sqlite] Bug: CTE name leaking through views

2019-05-02 Thread Richard Hipp
This mailing list disallows attachments as a anti-spam measure. You can send attachments directly to me, if you like. On 5/1/19, Stephen Hunt wrote: > Hi, > > We use SQLite extensively here at Zaber and are quite pleased with it. > However, we recently added a view that incorrectly returns incor

[sqlite] Bug: CTE name leaking through views

2019-05-01 Thread Stephen Hunt
Hi, We use SQLite extensively here at Zaber and are quite pleased with it. However, we recently added a view that incorrectly returns incorrect/NULL data. It appears to be cause by CTE names leaking outside of the view and being confused with another CTE with the same name but only if both CTEs pr

[sqlite] Bug report: Segfault in sqlite3_clear_bindings when statement is nullptr

2019-04-26 Thread Christof Arnosti
Hi together, I want to report a (possible) bug in sqlite3. When sqlite3_clear_bindings is called with a nullptr argument, then a SEGFAULT occurs. From the behavior of the other methods which use statement as a parameter I expected the behaviour that sqlite3_clear_bindings with a nullptr argument

[sqlite] sqlite bug report

2019-04-10 Thread richard parkins
Summary Alter table rename to fails if the database contains a view which selects from a nonexistent table. Seen on sqlite 3.27.2. Script to reproduce it: create view view_1 as select * from table_1; create table table_2 (col_1 text, col_2 text); alter table table_2 rename to table_3; The probl

[sqlite] Bug report for rtree.c

2019-04-07 Thread richard parkins
If SQLITE_DEBUG is not defined, rtree.c found at https://www.sqlite.org/src/dir?ci=edb095a9a679c8c7&name=ext/rtree fails to compile. This is because bCorrupt is declared (at line 132) only if SQLITE_DEBUG is defined, but is referenced unconditionally at line 980. Line 980 currently is    assert(

Re: [sqlite] Bug in sqlite3 (CLI, linux/Ubuntu)

2019-03-31 Thread Keith Medcalf
t that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of >softw...@quantentunnel.de >Sent: Saturday, 30 Marc

Re: [sqlite] Bug in sqlite3 (CLI, linux/Ubuntu)

2019-03-31 Thread Software
> Dear colleagues > > I detected an unexpected behaviour in sqlite3 (CLI) that I consider a bug as > it seems not documented. > > When using an init file (even if an empty file), sqlite3 outputs an extra > empty line to stdout. This messes up parsing of the sqlite3 output, as this > line is

Re: [sqlite] Bug in sqlite3 (CLI, linux/Ubuntu)

2019-03-30 Thread Luuk
On 30-3-2019 12:28, softw...@quantentunnel.de wrote: Dear colleagues I detected an unexpected behaviour in sqlite3 (CLI) that I consider a bug as it seems not documented. When using an init file (even if an empty file), sqlite3 outputs an extra empty line to stdout. This messes up parsing of

[sqlite] Bug in sqlite3 (CLI, linux/Ubuntu)

2019-03-30 Thread Software
Dear colleagues I detected an unexpected behaviour in sqlite3 (CLI) that I consider a bug as it seems not documented. When using an init file (even if an empty file), sqlite3 outputs an extra empty line to stdout. This messes up parsing of the sqlite3 output, as this line is not present in the

Re: [sqlite] BUG - LEFT JOIN + IFNULL

2019-03-23 Thread Richard Hipp
On 3/23/19, Marek Šrom wrote: > I'm using 3rd party wrapping library for delphi, it was a bug in it. The > problem was that Sqlite3_ColumnDeclType for last column returns null (don't > > know if it is ok or not?)... > The library was setting column type from the first row value - it was > NULL...

Re: [sqlite] BUG - LEFT JOIN + IFNULL

2019-03-22 Thread Richard Hipp
On 3/22/19, Marek Šrom wrote: > > I found following bug, using SQLite version 3.27.2 on windows... > The following test script seems to work fine for me. create table test (a text); insert into test values(null); insert into test values('test'); create table test2 (b text); .mode quote .echo on

[sqlite] BUG - LEFT JOIN + IFNULL

2019-03-22 Thread Marek Šrom
Hello, I found following bug, using SQLite version 3.27.2 on windows... Using field from left joined table in ifnull when first row contains null value causes in following rows value to be empty string instead of correct value... To reproduce: create table

Re: [sqlite] bug report: UPSERT / INSERT ON CONFLICT PK Autoincrement

2019-03-20 Thread Clemens Ladisch
Stanislav Zabka wrote: > When conflict occurs, no import performs, but PK is incremented nevertheless. says: | Note that "monotonically increasing" does not imply that the ROWID | always increases by exactly one. One is the usual increment. However, | if an in

[sqlite] bug report: UPSERT / INSERT ON CONFLICT PK Autoincrement

2019-03-20 Thread Stanislav Zabka
UPSERT / INSERT ON CONFLICT PK Autoincrement When conflict occurs, no import performs ( as expected ), but PK is incremented nevertheless. example (focus on sqlite_sequence.seq) : run1: initial values - all ok run2: all conflict; no insert (ok) - but sqlite_sequence.seq incremented ( I would exp

[sqlite] Bug: Documentation typo

2019-03-12 Thread Kent Ross
At https://www.sqlite.org/rescode.html#cantopen the text says ..."or on of several"... which should probably be "or one of several". ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo

Re: [sqlite] Bug report: Data race in pcache1.c

2019-02-25 Thread Jan Krčál
Hi Richard, thanks a million for your check-in! It indeed fixed our issues with TSan! Best regards, Jan On Wed, Jan 9, 2019 at 3:55 PM Richard Hipp wrote: > Check-in https://www.sqlite.org/src/info/383437be276719ac will perhaps > silence the harmless false-positives reported by TSAN. Please l

[sqlite] Bug: table-valued functions for PRAGMA ignore database names

2019-02-22 Thread Peter Gunold
Hello, I found a bug in sqlite when using table-values pragma functions with attached databases when using the sqlite3.exe for windows. In my tests I found out, that it is not possible to use table-valued pragma functions on attached databases e.g. to read user_version or schema_version. So the Q

Re: [sqlite] Bug Report

2019-02-20 Thread Richard Hipp
On 2/20/19, William ESCANDE wrote: > Hi everyone ! > > TL;DR: > with sanitizer > in func columnName (l.82210) > calling xFunc(l.82235) trigger a cfi_check (and then ABORT) > > Fix to do : > change prototype of sqlite3_value_text to let him return a `void *` There are millions and millions of appl

[sqlite] Bug Report

2019-02-20 Thread William ESCANDE
Hi everyone ! TL;DR: with sanitizer in func columnName (l.82210) calling xFunc(l.82235) trigger a cfi_check (and then ABORT) Fix to do : change prototype of sqlite3_value_text to let him return a `void *` FULL Description: I am using sqlite3.c in android system (not in NDK). I compile android wi

[sqlite] Bug: SQLite 3.27.1 does not compile with SQLITE_OMIT_WINDOWFUNC

2019-02-10 Thread Victor Costan
In case it helps anyone else, I plan to use the patch below to bypass the compilation error in Chrome. I'd appreciate a sanity check. I would also be very grateful for a check-in that addresses the compilation issue, so we can remove our patch in a future update. Thank you very much! Victor

Re: [sqlite] Bug due to left join strength reduction optimization?

2019-02-06 Thread Richard Hipp
On 2/6/19, Danny wrote: > This has been fixed by revision d840e. Thanks for the quick response, drh! Just to be clear: Dan found the fix. I merely checked it in. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailingli

Re: [sqlite] Bug due to left join strength reduction optimization?

2019-02-06 Thread Danny
This has been fixed by revision d840e. Thanks for the quick response, drh! Danny ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Bug due to left join strength reduction optimization?

2019-02-05 Thread Danny
R Smith writes: > As a matter of interest - what happens when the aliasing is taken out of > the loop and the query changes to: > > CREATE TABLE tab (id INT); > INSERT INTO tab VALUES (1); > SELECT 1 >FROM tab LEFT JOIN tab AS tab2 ON 0 >WHERE (tab2.id IS NOT NULL) = 0 > ; > > I don't have

Re: [sqlite] Bug due to left join strength reduction optimization?

2019-02-05 Thread R Smith
On 2019/02/05 10:13 AM, Dominique Devienne wrote: On Tue, Feb 5, 2019 at 7:47 AM Keith Medcalf wrote: sqlite> select ... from tab left join tab as tab2 on 0 ... Can someone please educate me on this {{ on 0 }} join "condition" ? I'm not following what the intended meaning is... Must have

Re: [sqlite] Bug due to left join strength reduction optimization?

2019-02-05 Thread Dominique Devienne
On Tue, Feb 5, 2019 at 7:47 AM Keith Medcalf wrote: > sqlite> select ... from tab left join tab as tab2 on 0 ... > Can someone please educate me on this {{ on 0 }} join "condition" ? I'm not following what the intended meaning is... Must have one, since OP "expects 1 row with one column contain

Re: [sqlite] Bug due to left join strength reduction optimization?

2019-02-04 Thread Keith Medcalf
rs [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Danny >Sent: Monday, 4 February, 2019 23:24 >To: sqlite-users@mailinglists.sqlite.org >Subject: [sqlite] Bug due to left join strength reduction >optimization? > >The result of the query described below changed (

[sqlite] Bug due to left join strength reduction optimization?

2019-02-04 Thread Danny
The result of the query described below changed (became incorrect, I believe) with the addition of the left join strength reduction optimization in revision dd568, and remains that way in trunk (2c876, at the time of writing). Consider the following statements: ``` CREATE TABLE tab (id INT); INSE

Re: [sqlite] Bug report: Data race in pcache1.c

2019-01-09 Thread Richard Hipp
Check-in https://www.sqlite.org/src/info/383437be276719ac will perhaps silence the harmless false-positives reported by TSAN. Please let us know if it does not solve the problem for you. On 1/7/19, Jan Krčál wrote: > Hi, > > as a Chrome developer, I've run into a data race flagged by ThreadSanit

[sqlite] Bug report: Data race in pcache1.c

2019-01-09 Thread Jan Krčál
Hi, as a Chrome developer, I've run into a data race flagged by ThreadSanitizer in pcache1.c: When two threads write to in-memory sqlite DBs (each to its own separate DB), each thread has its own PCache1 with bPurgeable being false. Thus, in both threads, pCache->pnPurgeable points to the static

Re: [sqlite] Bug in 3.25.2 (RECURSIVE CTE + window function)

2018-12-31 Thread Dan Kennedy
On 12/30/2018 02:41 PM, Nicolas Roy-Renaud wrote: I've been dealing with occasional segfaults on one of my applications when running a similar query, except even on SQLite 3.26, the safeguard wouldn't trigger. Running the SQL query specified in the bug report description from the tracker (https:

Re: [sqlite] Bug in 3.25.2 (RECURSIVE CTE + window function)

2018-12-30 Thread Nicolas Roy-Renaud
I've been dealing with occasional segfaults on one of my applications when running a similar query, except even on SQLite 3.26, the safeguard wouldn't trigger. Running the SQL query specified in the bug report description from the tracker (https://www.sqlite.org/src/tktview?name=e8275b415a) no

[sqlite] Bug report: Wrong column type retrieved from metainfo for statements with zero rows

2018-12-13 Thread Машков Дмитрий Владимирович
Hi there, I have db with table as CREATE TABLE GasStats10s(GasStats10s_MaxValue REAL,GasStats10s_IntervalDuration INTEGER,GasStats10s_DataCount INTEGER,GasStats10s_MinValue REAL,GasStats10s_Value REAL,GasStats10s_DateTime INTEGER,GasStats10s_Source UID,GasStats10s_Sum REAL,Class UID,DeleteLog

Re: [sqlite] Bug?: unexpected behaviour - alter parent table in a deferred foreign key relationship

2018-11-29 Thread Dan Kennedy
On 11/29/2018 07:10 PM, szmate1618 wrote: I'm afraid I still didn't make any progress on this. It looks to me that PRAGMA foreign_key_check; and the deferred foreign key mechanism sometimes contradict each other, consequently at least one of these features must have a bug, but I don't know for s

Re: [sqlite] Bug?: unexpected behaviour - alter parent table in a deferred foreign key relationship

2018-11-29 Thread szmate1618
I'm afraid I still didn't make any progress on this. It looks to me that PRAGMA foreign_key_check; and the deferred foreign key mechanism sometimes contradict each other, consequently at least one of these features must have a bug, but I don't know for sure which one, so I can't risk using any of

Re: [sqlite] Bug? Confused data entry with column name

2018-11-28 Thread Keith Medcalf
sqlite.org] On Behalf Of Dale Mellor >Sent: Tuesday, 27 November, 2018 22:42 >To: sqlite-users@mailinglists.sqlite.org >Subject: [sqlite] Bug? Confused data entry with column name > >>>>>>>>> THIS VERSION >SQLite 3.25.3 2018-11-05 20:37:38 >89e099fbe5e

Re: [sqlite] Bug? Confused data entry with column name

2018-11-28 Thread Shawn Wagner
Use single quotes, not double. Double quotes are used for identifiers, not strings, so that matches rows where id and description have the same value. On Wed, Nov 28, 2018, 1:19 AM Dale Mellor THIS VERSION > SQLite 3.25.3 2018-11-05 20:37:38 > 89e099fbe5e13c33e683bef07361231ca525b88f790

[sqlite] Bug? Confused data entry with column name

2018-11-28 Thread Dale Mellor
THIS VERSION SQLite 3.25.3 2018-11-05 20:37:38 89e099fbe5e13c33e683bef07361231ca525b88f7907be7092058007b750alt1 zlib version 1.2.8 gcc-8.2.0 > THIS SCRIPT create table test (id varchar, description varchar); insert into test (id, description) values ("Description", "Duh"); ins

[sqlite] bug: error in code for geopoly_ccw function

2018-11-23 Thread Graham Hardman
hi, In my posting on 20th November I supplied output from the cli buit from the snapshot that includes the new geopoly function geopoly_ccw. That output showed incorrect results being returned from an attempt to reverse the direction of a polygon in CW mode after a mirror transform of a CCW pol

Re: [sqlite] Bug?: unexpected behaviour - alter parent table in a deferred foreign key relationship

2018-11-23 Thread szmate1618
>"PRAGMA foreign_keys = ?" is a property of the connection only, not the >database file. So what advantage would there be in including the PRAGMA >statements in the body of a transaction? Not much, if I do everything right, I guess. But what if I break the foreign key integrity? If it's inside a t

Re: [sqlite] Bug?: unexpected behaviour - alter parent table in a deferred foreign key relationship

2018-11-23 Thread Dan Kennedy
2018, 16:30:12 Subject: [sqlite] Bug?: unexpected behaviour - alter parent table in a deferred foreign key relationship On 11/23/2018 09:54 PM, szmate1618 wrote: Dear list members, I have the following problem, with which I'd like to request your aid: Currently, at version 3.25.

Re: [sqlite] Bug?: unexpected behaviour - alter parent table in a deferred foreign key relationship

2018-11-23 Thread Thomas Kurz
Dan Kennedy To: sqlite-users@mailinglists.sqlite.org Sent: Friday, November 23, 2018, 16:30:12 Subject: [sqlite] Bug?: unexpected behaviour - alter parent table in a deferred foreign key relationship On 11/23/2018 09:54 PM, szmate1618 wrote: > Dear list members, > I have the following problem

Re: [sqlite] Bug?: unexpected behaviour - alter parent table in a deferred foreign key relationship

2018-11-23 Thread Dan Kennedy
On 11/23/2018 09:54 PM, szmate1618 wrote: Dear list members, I have the following problem, with which I'd like to request your aid: Currently, at version 3.25.2, SQLite only has a limited support for alter table. E.g. you cannot change the datatype (type affinity) of a column, or drop a column.

[sqlite] Bug?: unexpected behaviour - alter parent table in a deferred foreign key relationship

2018-11-23 Thread szmate1618
Dear list members, I have the following problem, with which I'd like to request your aid: Currently, at version 3.25.2, SQLite only has a limited support for alter table. E.g. you cannot change the datatype (type affinity) of a column, or drop a column. The usual workaround is to create a new ta

Re: [sqlite] Bug: SQLite shell does not build on Windows with SQLITE_OMIT_COMPLETE

2018-11-16 Thread Victor Costan
Thank you very much, Dan! I was about to come back to report that my fix is incorrect. Your fix does the trick. Thank you! Victor On Fri, Nov 16, 2018 at 6:38 AM Dan Kennedy wrote: > On 11/16/2018 08:41 PM, Victor Costan wrote: > > The amalgamation build ships two definitions of sqlite3_c

Re: [sqlite] Bug: SQLite shell does not build on Windows with SQLITE_OMIT_COMPLETE

2018-11-16 Thread Dan Kennedy
On 11/16/2018 08:41 PM, Victor Costan wrote: The amalgamation build ships two definitions of sqlite3_complete(). Most builds use the one in sqlite3.c. If SQLITE_OMIT_COMPLETE is defined, shell.c supplies a stub definition -- thank you very much for adding that! Unfortunately, the stub definition

[sqlite] Bug: SQLite shell does not build on Windows with SQLITE_OMIT_COMPLETE

2018-11-16 Thread Victor Costan
The amalgamation build ships two definitions of sqlite3_complete(). Most builds use the one in sqlite3.c. If SQLITE_OMIT_COMPLETE is defined, shell.c supplies a stub definition -- thank you very much for adding that! Unfortunately, the stub definition in shell.c does not have the SQLITE_API prefix

Re: [sqlite] Bug: Incorrect fsdir result

2018-11-16 Thread Richard Hipp
On 11/15/18, Jake Thaw wrote: > The following returns an erroneous fsdir error. Tested on macOS 10.13.6. > > SQLite version 3.25.3 2018-11-05 20:37:38 > Enter ".help" for usage hints. > Connected to a transient in-memory database. > Use ".open FILENAME" to reopen on a persistent database. > sqlite

[sqlite] Bug: Incorrect fsdir result

2018-11-15 Thread Jake Thaw
The following returns an erroneous fsdir error. Tested on macOS 10.13.6. SQLite version 3.25.3 2018-11-05 20:37:38 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> CREATE TABLE d AS SELECT '.' d; sqlite> CR

Re: [sqlite] Bug: float granularity breaking unique contraint?

2018-11-02 Thread Dennis Clarke
INSERT INTO TestReal values (9223372036854775807);INSERT INTO TestReal values (9223372036854775807 - 1);INSERT INTO TestReal values (9223372036854775807 - 2);INSERT INTO TestReal values (9223372036854775807 - 3);sqlite>...>...>...>...> I recognize that number on sight and it

Re: [sqlite] Bug: float granularity breaking unique contraint?

2018-11-02 Thread David Raymond
PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] Bug: float granularity breaking unique contraint? INSERT INTO TestReal values (9223372036854775807);INSERT INTO TestReal values (9223372036854775807 - 1);INSERT INTO TestReal values (9223372036854775807 - 2);INSERT INTO TestReal values (922

Re: [sqlite] Bug: float granularity breaking unique contraint?

2018-11-01 Thread David Empson
> On 2/11/2018, at 8:23 AM, James K. Lowden wrote: > > On Wed, 31 Oct 2018 23:05:19 -0300 > Bernardo Sulzbach wrote: > >> So if you are inserting integers >> into a real column, you are going to store integers. However, when you >> select from it they are presented as reals and mix up (looking

Re: [sqlite] Bug: float granularity breaking unique contraint?

2018-11-01 Thread Bernardo Sulzbach
> > I don't think that explanation holds water. > I don't have proof that I am correct, but you can try to test my hypothesis the following way: Let there be 4 databases: -- f1.db create table t(a real unique); insert into t values(9223372036854775807.0); -- f2.db create table t(a real unique);

Re: [sqlite] Bug: float granularity breaking unique contraint?

2018-11-01 Thread James K. Lowden
On Thu, 1 Nov 2018 01:18:26 +0100 szmate1618 wrote: > But there seems to be an unintended > workaround > > DROP TABLE IF EXISTS TestReal;CREATE TABLE TestReal(A REAL > UNIQUE);INSERT INTO TestReal values (9223372036854775807);INSERT INTO > TestReal values (9223372036854775807 - 1);INSERT INTO Te

Re: [sqlite] Bug: float granularity breaking unique contraint?

2018-10-31 Thread Bernardo Sulzbach
It is not a bug AFAIK. SQLite uses what the documentation calls dynamic typing for its actual values. So if you are inserting integers into a real column, you are going to store integers. However, when you select from it they are presented as reals and mix up (looking as if there were duplicates, e

[sqlite] Bug: float granularity breaking unique contraint?

2018-10-31 Thread szmate1618
Dear SQLite people, Please bless me with your infinite wisdom. I'm using SQLite 3.25.2 on Windows, downloaded the latest precompiled binaries from the official page https://sqlite.org/download.htmlExecuting the following code DROP TABLE IF EXISTS TestReal;CREATE TABLE TestReal(A REAL UNIQUE);INSER

[sqlite] Bug: "#if SQLITE_INT64_TYPE" should be "#ifdef SQLITE_INT64_TYPE"

2018-10-29 Thread Taylor Brown
As of Sqlite 3.2.0, the following code was added (by tool/mkctime.tcl?) #if SQLITE_INT64_TYPE "INT64_TYPE", #endif This compiles fine for SQLite, but when we are running this through the Emscripten compiler (a C compiler that compiles to LLVM), we get the following error: -

Re: [sqlite] Bug report: bug in datetime conversion function

2018-10-18 Thread David Raymond
o lands on March 1st. -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Fábio Pfeifer Sent: Thursday, October 18, 2018 9:28 AM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] Bug report: bug in datetime conversion function He

Re: [sqlite] Bug report: bug in datetime conversion function

2018-10-18 Thread Simon Slavin
On 18 Oct 2018, at 2:28pm, Fábio Pfeifer wrote: > When working with Apple iOS databases, I found something strange when dealing > with dates. I suspect you are you are referring to a library routine which is used by lots of iOS software, but can you give us a specific App which exhibits this b

[sqlite] Bug report: bug in datetime conversion function

2018-10-18 Thread Fábio Pfeifer
Hello, When working with Apple iOS databases, I found something strange when dealing with dates. Apple iOS databases store dates as seconds from 2001-01-01 (31 years after unix epoch). But from 2015-03-02 to 2016-02-29 there is a offset of one day if '31 years' modifier is used. To reproduce, exec

Re: [sqlite] Bug Report: corrupted double-linked list

2018-10-10 Thread Dominique Pellé
Daniel Espinosa wrote: > Thanks for the response. > > Until now I just used GDB, cause is easy on Meson. I will try with > Valgrind, but I will be slow until I find a way to reproduce the problem. > > Just take the desition to report this bug, because just the issue trace the > fault deeply in t

Re: [sqlite] Bug Report: corrupted double-linked list

2018-10-10 Thread Daniel Espinosa
Thanks for the response. Until now I just used GDB, cause is easy on Meson. I will try with Valgrind, but I will be slow until I find a way to reproduce the problem. Just take the desition to report this bug, because just the issue trace the fault deeply in the SQLite secuence of destruction, bu

Re: [sqlite] Bug Report: corrupted double-linked list

2018-10-10 Thread Richard Hipp
On 10/9/18, Daniel Espinosa wrote: > I'm current maintainer of GDA[1], I've updated embbeded version of SQLite > to 3.25.2, but I found an issue with a segfault due to a "corrupted > double-linked list". Heap corruption like this is most often the result of bugs in the application and SQLite just

[sqlite] Bug Report: corrupted double-linked list

2018-10-10 Thread Daniel Espinosa
I'm current maintainer of GDA[1], I've updated embbeded version of SQLite to 3.25.2, but I found an issue with a segfault due to a "corrupted double-linked list". In order to reproduce it: a) Checkout libgda from its respository[1] b) compile using its meson: $ meson _build $ cd _build $ ninja $

[sqlite] Bug: ALTER TABLE RENAME (still) calls authorizer functions

2018-10-05 Thread Victor Costan
The description for https://www3.sqlite.org/src/info/eac2aa7dce577f19 includes "Do not invoke the authorizer callback when parsing schema items as part of ALTER TABLE commands." In SQLite 3.25.2, the authorizer is called for the internal functions sqlite_rename_columns, sqlite_rename_table and sql

Re: [sqlite] SQLite bug: Malformed UTF16 leads to a 2-byte buffer overread

2018-09-29 Thread Richard Hipp
On 9/29/18, Kelvin Jiang wrote: > Hi there, > > I'm using SQlite 3.12.1 on Android device and we found this bug on most > Android devices. Maybe this is a bug in Android or in the SQLite interface that are built into Android. But SQLite itself seems to be working correct. Or, at least, I am unab

[sqlite] SQLite bug: Malformed UTF16 leads to a 2-byte buffer overread

2018-09-29 Thread Kelvin Jiang
Hi there, I'm using SQlite 3.12.1 on Android device and we found this bug on most Android devices. The problem can be reproduced by following procedures: 1. Prepare a malformed Java String, like "123😂", then cut it right from the middle of the surrogates, like "123😂".substring(0, 4), and append

Re: [sqlite] Bug in 3.25.2 (RECURSIVE CTE + window function)

2018-09-27 Thread Richard Hipp
Thanks for the report and test case. Now fixed on trunk and on branch-3.25. On 9/25/18, Щекин Ярослав wrote: > Hello. > > Here's the self-contained test case: > > WITH t(id, parent) AS ( > SELECT CAST(1 AS INT), CAST(NULL AS INT) > UNION ALL > SELECT 2, NULL > UNION ALL > SELECT 3, 1 > UNION ALL

[sqlite] Bug in 3.25.2 (RECURSIVE CTE + window function)

2018-09-27 Thread Щекин Ярослав
Hello. Here's the self-contained test case: WITH t(id, parent) AS ( SELECT CAST(1 AS INT), CAST(NULL AS INT) UNION ALL SELECT 2, NULL UNION ALL SELECT 3, 1 UNION ALL SELECT 4, 1 UNION ALL SELECT 5, 2 UNION ALL SELECT 6, 2 ), q AS ( SELECT t.*, ROW_NUMBER() OVER (ORDER BY t.id) AS rn FROM t WHE

Re: [sqlite] Bug report: Window functions in VIEWs broken in 3.25.1

2018-09-24 Thread Clemens Ladisch
Bjoern Hoehrmann wrote: > Using the sqlite-tools-linux-x86-3250100 Linux binaries I find that > Window functions in VIEWS behave differently from PostgreSQL 9.6 and > from what I expect. > > DROP TABLE IF EXISTS example; > CREATE TABLE example(t INT, total INT); > INSERT INTO example VALUES

[sqlite] Bug report: Window functions in VIEWs broken in 3.25.1

2018-09-23 Thread Bjoern Hoehrmann
Hi, Using the sqlite-tools-linux-x86-3250100 Linux binaries I find that Window functions in VIEWS behave differently from PostgreSQL 9.6 and from what I expect. DROP TABLE IF EXISTS example; CREATE TABLE example(t INT, total INT); INSERT INTO example VALUES(0,2); INSERT INTO example VA

[sqlite] Bug Report: "Is Null" where term propagated to a virtual table causes wrong query results

2018-09-07 Thread Josef Kučera
Hello, I have found an obscure bug in the virtual table processing. The schema looks like this: CREATE TABLE t1 (id int, value text); INSERT INTO t1 VALUES(1,'try'); CREATE TABLE t2 (ctx int, id int, value text); INSERT INTO t2 VALUES(1,1,'good'); INSERT INTO t2 VALUES(2,2,'evil'); The following

Re: [sqlite] bug: compare number with empty string get different resut

2018-08-19 Thread Keith Medcalf
ge- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of ?? >Sent: Sunday, 19 August, 2018 00:58 >To: sqlite-users >Subject: [sqlite] bug: compare number with empty string get different >resut > >create table t1(c int); >insert

Re: [sqlite] bug: compare number with empty string get different resut

2018-08-19 Thread Norman Dunbar
Ok, thanks everyone, it's perfectly clear now. Cheers, Norm. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listin

Re: [sqlite] bug: compare number with empty string get different resut

2018-08-19 Thread Simon Slavin
On 19 Aug 2018, at 7:56pm, Warren Young wrote: > On Aug 19, 2018, at 10:03 AM, Norman Dunbar wrote: > >> Duck Typing? Never heard that before. > > It’s a pretty common term of art in the software development world: > > https://en.wikipedia.org/wiki/Duck_typing That article was written 20 y

<    1   2   3   4   5   6   7   8   9   10   >