Re: [sqlite] REMOVE ME

2020-03-14 Thread Jose Isaias Cabrera
Click at the link at the bottom of the email... From: sqlite-users on behalf of Edmondo Borasio Sent: Saturday, March 14, 2020 03:34 AM To: SQLite mailing list Subject: [sqlite] REMOVE ME ___ sqlite-users mailing

Re: [sqlite] New SQLite Forum established - this mailing list is deprecated

2020-03-13 Thread Jose Isaias Cabrera
x, on Friday, March 13, 2020 09:01 AM, wrote... > > * I truly hope Keith you'll continue making your tremendous contributions > to > the SQLite community. > I would say to the SQL world. josé ___ sqlite-users mailing list

Re: [sqlite] COALESCE() does not short-circuit sometimes

2020-03-11 Thread Jose Isaias Cabrera
Justin Ng, on Wednesday, March 11, 2020 07:03 AM, wrote... > > This happens in SQLite 3.28 and 3.31. > > Consider the following queries, > > -- Query 1 > SELECT > COALESCE( > NULL, > (SELECT SUM(9223372036854775807) FROM (SELECT NULL UNION ALL SELECT > NULL)) > ); On 3.24.0, this worked

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Jose Isaias Cabrera
Simon Slavin, on Tuesday, March 10, 2020 09:23 AM, wrote... > > On 10 Mar 2020, at 12:40pm, Jose Isaias Cabrera > wrote: > > > Simon Slavin, on Tuesday, March 10, 2020 03:25 AM, wrote... > > > >> That's going in my list of annoying questions. Thank you. &g

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Jose Isaias Cabrera
Keith Medcalf, on Tuesday, March 10, 2020 03:57 AM, wrote... > > > On Tuesday, 10 March, 2020 01:22, Octopus ZHANG > wrote: > > >I try to run a simple math expression, but SQLite gives no feedback : > > >sqlite> select 99-(55/(30/57)); > > >Should I expect it to return nothing? > > It is

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Jose Isaias Cabrera
Simon Slavin, on Tuesday, March 10, 2020 03:25 AM, wrote... > > On 10 Mar 2020, at 7:21am, Octopus ZHANG wrote: > > > sqlite> select 99-(55/(30/57)); > > > > Should I expect it to return nothing? > > That's going in my list of annoying questions. Thank you. Simon, with all due respect, and

Re: [sqlite] sqlite3: .width counts bytes, not characters

2020-03-09 Thread Jose Isaias Cabrera
softw...@quantentunnel.de, on Monday, March 9, 2020 04:02 PM, wrote... > > Hi > > I use sqlite3 (sqlite3 --version = "3.11.0 2016-02-15 17:29:24 > 3d862f207e3adc00f78066799ac5a8c282430a5f" on Ubuntu 16.04.6 LTS) for > formatted output. '.width' does not behave as I expected when non-ASCII >

Re: [sqlite] Getting all changes within a begin; end; transaction

2020-03-04 Thread Jose Isaias Cabrera
Simon Slavin, on Wednesday, March 4, 2020 10:47 AM, wrote... > > On 4 Mar 2020, at 3:28pm, Jose Isaias Cabrera wrote: > > > The reason why I know is that if I have 238 INSERTS, but I have a > constraint , there should be 238 INSERTs the first time I run a set of SQL, > but

Re: [sqlite] Getting all changes within a begin; end; transaction

2020-03-04 Thread Jose Isaias Cabrera
Simon Slavin, on Wednesday, March 4, 2020 09:42 AM, wrote... > > On 4 Mar 2020, at 2:37pm, Jose Isaias Cabrera wrote: > > > Is there a way to know all the changes that may have happened within > the full BEGIN and END? Thanks. > > Use this function >

[sqlite] Getting all changes within a begin; end; transaction

2020-03-04 Thread Jose Isaias Cabrera
Greetings. Imagine this SQL, BEGIN TRANSACTION; ... changes to records ... END; When I execute "int result = sqlite3_changes(database);" after that SQL execution, I always get 1. I think that it is because it is only providing the result of the last statement that was successful within the

Re: [sqlite] Report bug found in SQLite version 3.31.1

2020-03-02 Thread Jose Isaias Cabrera
, This bug is found in 3.31.1 but you are running it in 3.30.1. Best, Xinyue Chen On Mon, Mar 2, 2020 at 3:36 PM Jose Isaias Cabrera wrote: > Xinyue Chen, on Monday, March 2, 2020 06:21 PM, wrote... > > > > Hi, > > > > I found a bug in the most recent SQLite release version

Re: [sqlite] Report bug found in SQLite version 3.31.1

2020-03-02 Thread Jose Isaias Cabrera
Xinyue Chen, on Monday, March 2, 2020 06:21 PM, wrote... > > Hi, > > I found a bug in the most recent SQLite release version 3.31.1 2020-01-27. > My initial test environment is macOS 10.14.6 (18G87) and I have tested in > https://sqliteonline.com/. > > CREATE TABLE t ( > textid TEXT > ); >

Re: [sqlite] Fwd: inserting new data only

2020-02-26 Thread Jose Isaias Cabrera
James K. Lowden, on Wednesday, February 26, 2020 11:55 AM, wrote... > > On Tue, 25 Feb 2020 12:02:24 -0500 > Przemek Klosowski wrote: > > > and I want to avoid storing repetitive data, so that the database > > should contain > > 10:32 12 > > 10:35 15 > > 10:39 13 > > 10:46 18 > > where only

Re: [sqlite] Trigger name missing

2020-02-26 Thread Jose Isaias Cabrera
SQLite is even better than I thought... From: sqlite-users on behalf of Richard Hipp Sent: Wednesday, February 26, 2020 11:44 AM To: SQLite mailing list Subject: Re: [sqlite] Trigger name missing On 2/26/20, Simon Slavin wrote: > > Backward compatibility ?

Re: [sqlite] [EXTERNAL] rtrim and round functions unexpected result

2020-02-20 Thread Jose Isaias Cabrera
This is no suprise -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Jose Isaias Cabrera Gesendet: Donnerstag, 20. Februar 2020 17:03 An: SQLite mailing list Betreff: [EXTERNAL] [sqlite] rtrim and round functions unexpected result

[sqlite] rtrim and round functions unexpected result

2020-02-20 Thread Jose Isaias Cabrera
Greetings. Please take a look at the following: sqlite> select rtrim(round(1235.6)); 1236.0 This is expected. sqlite> select rtrim(round(1235.6),'.0'); 1236 Also expected. sqlite> select rtrim(round(1299.6),'.0'); 13 is not expected. I was hoping for 1300. Also, just rtrim, sqlite> select

Re: [sqlite] Why do I only get one record?

2020-02-19 Thread Jose Isaias Cabrera
Igor Korot, on Wednesday, February 19, 2020 04:30 PM, wrote... > > Hi, > > On Wed, Feb 19, 2020 at 2:12 PM Jose Isaias Cabrera > wrote: > > > > > > Thanks, Keith. Darn it! GROUP BY and ORDER BY! Got it, it's working > now. Thanks. > > > > >

Re: [sqlite] Why do I only get one record?

2020-02-19 Thread Jose Isaias Cabrera
you need to specify by what you want the results grouped in the GROUP BY clause. -- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users On >Behalf Of Jose Isaias Cabr

[sqlite] Why do I only get one record?

2020-02-19 Thread Jose Isaias Cabrera
Greetings! Newbie here again... ;-) Please take a look at this query, sqlite> SELECT ...> a.ProjID, a.Start_date, a.Finish_Date, a.Target_Go_Live_Date, ...> a.BL_Start, a.BL_Finish, sum(b.AnnualDossier) as Dossier, ...> sum(b.Actuals) as ABTActual, sum(b.EAC) as ABTEAC ...> FROM

Re: [sqlite] DRH interview on why/how SQLite succeeded

2020-02-19 Thread Jose Isaias Cabrera
Don V Nielsen, on Wednesday, February 19, 2020 01:43 PM, wrote... > > DRH sounds so much more human in the podcast than the DRH I have > assembled > in my head from reading this mailing list. :) > He is human like us, just smarter than most of us. :-) josé

Re: [sqlite] Can I search all tables and columns of SQLite database for a specific text string?

2020-02-13 Thread Jose Isaias Cabrera
Scott, on Thursday, February 13, 2020 09:01 AM, wrote... > > Can I search all tables and columns of SQLite database for a specific > text string? I'm sure this question has been asked many times, but I'm > having trouble finding a solid answer. > My problem: My clients SQLite database has 11

[sqlite] .timer explanation anywhere

2020-02-13 Thread Jose Isaias Cabrera
Greetings. I was searching on sqlite.org for [sqlite command line tool .timer explanation] and found nothing. I also searched on the internet and found an old thread[1] of when .timer had just two entries: CPU Time: user 880.710398 sys 353.260288 And, although, there is some good information

Re: [sqlite] bug report (INSTR() ignores NOCASE on columns)

2020-02-04 Thread Jose Isaias Cabrera
Stephan Senzel, on Sunday, February 2, 2020 08:12 AM, wrote... > > INSTR() ignores NOCASE on columns > > --- > > example: > > SELECT * FROM table WHERE INSTR(column, ' castle ') > 0 > > returns datasets with 'castle' only, without 'Castle', even if the > column is set to

Re: [sqlite] New word to replace "serverless"

2020-01-28 Thread Jose Isaias Cabrera
Warren Young, on Tuesday, January 28, 2020 02:27 PM, wrote... > > On Jan 28, 2020, at 9:25 AM, Richard Hipp wrote: > > > > On 1/28/20, Jan Danielsson wrote: > >> On 2020-01-28 00:19, Richard Hipp wrote: > >>> daemon-less? > >> > >> This is my favorite, the only problem is that it is culturally

Re: [sqlite] New word to replace "serverless"

2020-01-28 Thread Jose Isaias Cabrera
R Smith, on Tuesday, January 28, 2020 06:39 AM, wrote... > > I do not have a great suggestion to add, but to observe that the best > suggestions I think are: NOT changing, (or if we have to) "Server-Free" > or "Localized". I agree with these, but localize is another buzz word for translation.

Re: [sqlite] New word to replace "serverless"

2020-01-28 Thread Jose Isaias Cabrera
Warren Young, on Monday, January 27, 2020 07:36 PM, wrote... > > On Jan 27, 2020, at 3:18 PM, Richard Hipp wrote: > > > > "serverless" has become a popular buzz-word that > > means "managed by my hosting provider rather than by me.” > > “Serverless” it a screwy buzzword anyway, because of course

Re: [sqlite] New word to replace "serverless"

2020-01-27 Thread Jose Isaias Cabrera
Richard Hipp, on Monday, January 27, 2020 05:18 PM, wrote... > > For many years I have described SQLite as being "serverless", as a way > to distinguish it from the more traditional client/server design of > RDBMSes. "Serverless" seemed like the natural term to use, as it > seems to mean

Re: [sqlite] SQL CASE WHEN THEN ELSE END

2020-01-27 Thread Jose Isaias Cabrera
David Raymond, on Monday, January 27, 2020 10:32 AM, wrote... [clip] > (c.WYear = 2020) is a perfectly valid expression... that's returning a > boolean (well, int) > So you're comparing c.WYear (from the subquery) against a boolean. Yep, this little bit I knew. :-) > (Others have replied with

Re: [sqlite] SQL CASE WHEN THEN ELSE END

2020-01-27 Thread Jose Isaias Cabrera
Jose Isaias Cabrera, on Monday, January 27, 2020 08:42 AM, wrote... > > > Keith Medcalf, on Monday, January 27, 2020 04:02 AM, wrote... This is actually what I need: SELECT a.a, a.c, a.e, b.g, b.h, b.i, coalesce((

Re: [sqlite] SQL CASE WHEN THEN ELSE END

2020-01-27 Thread Jose Isaias Cabrera
Keith Medcalf, on Monday, January 27, 2020 04:02 AM, wrote... > > > This version generates the most efficient query plan in 3.31.0 when you > have indexes on the necessary columns: > > CREATE INDEX t0_1 on t0 (a, idate, c); -- c does not have to be in the > index > CREATE INDEX t1_1 on t1 (f,

Re: [sqlite] SQL CASE WHEN THEN ELSE END

2020-01-27 Thread Jose Isaias Cabrera
Keith Medcalf, on Monday, January 27, 2020 02:28 AM, wrote... > > > Do you perhaps mean: > > SELECT a.a, > a.c, > a.e, > b.g, > b.h, > b.i, > coalesce(( >SELECT 'YES' > FROM t2 >

Re: [sqlite] SQL CASE WHEN THEN ELSE END

2020-01-27 Thread Jose Isaias Cabrera
says a lot about anticipated traffic volume. > > >-Original Message- > >From: sqlite-users On > >Behalf Of Jose Isaias Cabrera > >Sent: Sunday, 26 January, 2020 19:44 > >To: SQLite mailing list > >Subject: [sqlite] SQL CASE WHEN THEN ELSE E

Re: [sqlite] SQL CASE WHEN THEN ELSE END

2020-01-27 Thread Jose Isaias Cabrera
Simon Slavin, on Sunday, January 26, 2020 09:59 PM, wrote... > > On 27 Jan 2020, at 2:44am, Jose Isaias Cabrera > wrote: > > > CASE > >( > > SELECT WYear FROM t2 WHERE pid = a.a > >) > >WHEN c.WYear = 2020 THEN “YES” > &g

Re: [sqlite] SQL CASE WHEN THEN ELSE END

2020-01-26 Thread Jose Isaias Cabrera
Igor Tandetnik, on Sunday, January 26, 2020 09:57 PM, wrote... > > On 1/26/2020 9:44 PM, Jose Isaias Cabrera wrote: > > CASE > > ( > >SELECT WYear FROM t2 WHERE pid = a.a > > ) > > WHEN c.WYear = 2020 THEN “YES” >

[sqlite] SQL CASE WHEN THEN ELSE END

2020-01-26 Thread Jose Isaias Cabrera
Greetings! I am getting the wrong output, and I don't know how to get it to work. Please take a look at the following (Pardon the lengthy data): create table t0 (n INTEGER PRIMARY KEY, a, b, c, d, e, idate); insert into t0 (a, b, c, d, e, idate) values ('p001', 1, 2019, 'n', 4, '2019-02-11');

Re: [sqlite] To edit in sqlite3 CLI multiline SQL statements?

2020-01-19 Thread Jose Isaias Cabrera
Simon Slavin, on Saturday, January 18, 2020 04:58 PM, wrote... > > On 18 Jan 2020, at 9:30pm, Csanyi Pal, on > > > can one edit a multiline SQL statement in the sqlite3 CLI? > > No. > > But if you make a multiline SQL statement in a text file you can paste it > into the CLI all in one operation.

Re: [sqlite] SQLite 3.31.0 enters pre-release testing

2020-01-17 Thread Jose Isaias Cabrera
Richard Hipp, on Friday, January 17, 2020 07:56 AM, wrote... > A terse summary of changes can be seen at > https://www.sqlite.org/draft/releaselog/current.html No gain in speed? :-) I love it when I see, "2% faster..." Thanks. josé ___ sqlite-users

Re: [sqlite] Capturing the changes in columns in a table

2020-01-14 Thread Jose Isaias Cabrera
Keith Medcalf, on Tuesday, January 14, 2020 11:49 AM, wrote... > > > On Tuesday, 14 January, 2020 09:03, Jose Isaias Cabrera > wrote: > > >That is an idea I have not thought about, Neal. Thanks. The boss comes > >up with lots of requests, and these have to be don

Re: [sqlite] Capturing the changes in columns in a table

2020-01-14 Thread Jose Isaias Cabrera
sub sk79, on Tuesday, January 14, 2020 10:54 AM, wrote... > > > Yes, a dumb of a system is provided daily > > > There are some great solutions already here for offline processing as > stated in your question. However, something you might also want to > consider > (if you have requisite access to

Re: [sqlite] Capturing the changes in columns in a table

2020-01-14 Thread Jose Isaias Cabrera
Keith Medcalf, on Tuesday, January 14, 2020 09:04 AM, wrote... > > > Assuming (a, idate) is indexed and unique, then give the following a > whirl on your larger data. It does the same thing but does not use window > functions to find the prior value -- it does a correlated subquery instead. > I

Re: [sqlite] Capturing the changes in columns in a table

2020-01-14 Thread Jose Isaias Cabrera
Jean-Luc Hainaut, on Tuesday, January 14, 2020 07:25 AM, wrote... > > > Another version that doesn't use CTE nor window functions: > > select t1.a as Proj, t2.idate as "On", 'b' as Var, t1.b as oldVal, t2.b > as newVal > from t t1,t t2 > where t1.a = t2.a > andt2.idate = date(t1.idate,'+1

Re: [sqlite] Capturing the changes in columns in a table

2020-01-14 Thread Jose Isaias Cabrera
Keith Medcalf, on Monday, January 13, 2020 08:03 PM, wrote... > > > And this version is several times faster since only the changes are > union'd which minimizes the total number of records processed. > The index should be "create index i on t (a, idate);" Because of the way > indexes work,

Re: [sqlite] Capturing the changes in columns in a table

2020-01-14 Thread Jose Isaias Cabrera
R Smith, on Monday, January 13, 2020 06:49 PM, wrote... > > > On 2020/01/14 1:11 AM, Jose Isaias Cabrera wrote: > > R Smith, on Monday, January 13, 2020 05:25 PM, wrote...​ > >> > > ​ > > Wow! Thanks for this. I had not thought about your questions

Re: [sqlite] Capturing the changes in columns in a table

2020-01-13 Thread Jose Isaias Cabrera
R Smith, on Monday, January 13, 2020 05:25 PM, wrote...​ > On 2020/01/13 9:42 PM, Jose Isaias Cabrera wrote:​ > > Greetings!​ > >​ > > Please observe the following,​ > >​ > >​ > > create table t (n INTEGER PRIMARY KEY, a, b, c, d, e, idate);​ > >​ &g

[sqlite] Capturing the changes in columns in a table

2020-01-13 Thread Jose Isaias Cabrera
Greetings! Please observe the following, create table t (n INTEGER PRIMARY KEY, a, b, c, d, e, idate); insert into t (a, b, c, d, e, idate) values ('p001', 1, 2, 'n', 4, '2019-02-11'); insert into t (a, b, c, d, e, idate) values ('p002', 2, 2, 'n', 4, '2019-02-11'); insert into t (a, b,

Re: [sqlite] A hang in Sqlite

2020-01-06 Thread Jose Isaias Cabrera
Dominique Devienne, on Monday, January 6, 2020 09:14 AM, wrote... > > On Mon, Jan 6, 2020 at 2:36 PM Jose Isaias Cabrera > wrote: > > > Dominique Devienne, on Monday, January 6, 2020 07:51 AM, wrote... > > [...] it's "polluting" a bit this ML. > > >

Re: [sqlite] A hang in Sqlite

2020-01-06 Thread Jose Isaias Cabrera
Dominique Devienne, on Monday, January 6, 2020 07:51 AM, wrote... > > On Mon, Jan 6, 2020 at 8:30 AM Dan Kennedy wrote: > > > On 6/1/63 13:44, Yongheng Chen wrote: > > > We found a test case that hangs Sqlite: > > > > Thanks for all the work you've been doing on SQLite! > > > > Indeed. But... >

Re: [sqlite] A hang in Sqlite

2020-01-06 Thread Jose Isaias Cabrera
Yongheng Chen, on Monday, January 6, 2020 01:44 AM, wrote... > > Hi, > > We found a test case that hangs Sqlite: > — > CREATE TEMPORARY TABLE v0 ( v1 INT UNIQUE ) ; > WITH RECURSIVE v0 ( v1 ) AS ( SELECT -128 UNION SELECT v1 + 33 FROM v0 ) > SELECT 'x' from v0; > — > > This seems triggering a

[sqlite] Happy New 2020 to everyone on the list...

2020-01-02 Thread Jose Isaias Cabrera
Dr. Hipp, and the SQLite team, the sqlite-users group, happy new year! I wish the best for everyone here, but better yet, that you find TRUE not be FALSE. josé ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Causal profiling

2020-01-02 Thread Jose Isaias Cabrera
D Burgess, on Wednesday, January 1, 2020 08:19 PM, wrote... > > > I’ve spent too much time lately trying to figure out or debug > hellacious C spaghetti code > > And I’ve spent too much time lately trying to figure out or debug > hellacious C++ spaghetti code > > Someone who writes bad C, will

Re: [sqlite] sqlite3VdbeMemAboutToChange(Vdbe *, Mem *): Assertion `(mFlags_Str)==0 || (pMem->n==pX->n && pMem->z==pX->z)' failed.

2019-12-31 Thread Jose Isaias Cabrera
Richard Hipp, on Tuesday, December 31, 2019 08:33 AM, wrote... > > On 12/31/19, Jose Isaias Cabrera wrote: > > > > I don't know what "This bug affects debug builds...", > > This is yet another fault not in SQLite itself, but in the auxiliary > VM regis

Re: [sqlite] 18 minutes 41 seconds

2019-12-31 Thread Jose Isaias Cabrera
Indeed! Thanks Dr. Hipp and the rest of the team for such a wonderful, and easy, and light, and robust, and... product. josé From: sqlite-users on behalf of Manuel Rigger Sent: Tuesday, December 31, 2019 05:15 AM To: SQLite mailing list Subject: Re:

Re: [sqlite] sqlite3VdbeMemAboutToChange(Vdbe *, Mem *): Assertion `(mFlags_Str)==0 || (pMem->n==pX->n && pMem->z==pX->z)' failed.

2019-12-31 Thread Jose Isaias Cabrera
Yongheng Chen, on Tuesday, December 31, 2019 03:21 AM, wrote... > > Hi, > > We found a debug assertion bug in sqlite. Here’s the PoC: > — > CREATE TABLE v0 ( v1 , v2 FLOAT ) ; > CREATE TRIGGER x AFTER INSERT ON v0 > BEGIN > INSERT INTO v0 SELECT DISTINCT v2 / 10 , v2 / 1 FROM v0 ; > END; >

Re: [sqlite] SQL help

2019-12-31 Thread Jose Isaias Cabrera
: sqlite-users on behalf of Jose Isaias Cabrera Sent: Monday, December 30, 2019 9:50:22 PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] SQL help x, on Saturday, December 28, 2019 10:46 AM, wrote... > Apologies if that’s not worded correctly. Scottish education could be >

Re: [sqlite] SQL help

2019-12-30 Thread Jose Isaias Cabrera
x, on Saturday, December 28, 2019 10:46 AM, wrote... > Apologies if that’s not worded correctly. Scottish education could be > done gooder  Wrong English! You should have said, "Scottish education could have been done gooder." Com'on! This is not even my first language! :-) josé

Re: [sqlite] Bug Report

2019-12-30 Thread Jose Isaias Cabrera
Bigthing Do, on Friday, December 27, 2019 01:56 PM, wrote... > > Dear sqlite developers: > > We met an accidental crash in sqlite with the following sample: > > CREATE VIEW table1 ( col1 , col2 ) AS WITH aaa AS ( SELECT * FROM table1 > ) SELECT col2 FROM table1 ORDER BY 1 ; > WITH aaa AS ( SELECT

Re: [sqlite] Sanitising user input for FTS5 MATCH parameter

2019-12-20 Thread Jose Isaias Cabrera
test user, on Friday, December 20, 2019 10:03 AM, wrote... > > Hello, > > I have a search box on a website that uses FTS5/MATCH. > > MATCH seems to take its own custom language for matching. > > 1. Is it safe to just pass the users query to MATCH ? via the SQLite bind > FFI? > > - This would give

Re: [sqlite] Crash Bug in Sqlite

2019-12-19 Thread Jose Isaias Cabrera
Yongheng Chen, on Thursday, December 19, 2019 04:29 PM, wrote... > > Hi, > > We found another crash in Sqlite. Here’s the POC: > — > CREATE TABLE v0 ( v1 , v2 ) ; > SELECT 10 , 1 UNION SELECT v2 , dense_rank () OVER( ORDER BY - 10 ) FROM > v0 ; > — > > This bug exists in both the latest

Re: [sqlite] Crash bug in Sqlite

2019-12-19 Thread Jose Isaias Cabrera
Yongheng Chen, on Thursday, December 19, 2019 01:21 PM, wrote... > > Hi, > > We found another crash in Sqlite. Here’s the POC: > — > CREATE TABLE v0 ( v1 INTEGER PRIMARY KEY ) ; > CREATE VIEW v2 ( v3 ) AS SELECT DISTINCT ( SELECT DISTINCT v1 , v1 , v1 , > v3 , v1 , v3 , v1 , 10.10 ) ; >

Re: [sqlite] Crash bug in Sqlite

2019-12-19 Thread Jose Isaias Cabrera
Yongheng Chen, on Thursday, December 19, 2019 09:54 AM, wrote... > > Hi, > > We found another crash in Sqlite. Here’s the POC: > — > CREATE TABLE v0 ( v7 FLOAT , v3 DOUBLE , v6 TEXT , v1 INTEGER UNIQUE , v5 > DOUBLE , v2 VARCHAR(20) UNIQUE , v4 ) ; > REPLACE INTO v0 ( v6 , v3 , v2 ) VALUES ( 10 ,

Re: [sqlite] Crash bug in Sqlite

2019-12-18 Thread Jose Isaias Cabrera
Yongheng Chen, on Wednesday, December 18, 2019 10:45 AM, wrote... > > Hi, > > We found another crash in Sqlite. Here’s the POC: > > — > CREATE TABLE v0 ( v2 INTEGER UNIQUE ON CONFLICT IGNORE , v1 TEXT PRIMARY > KEY ) ; > CREATE VIEW v3 ( v4 ) AS SELECT v2 IN ( 9223372036854775808 , ( printf () >

Re: [sqlite] Crash Bug in Sqlite

2019-12-17 Thread Jose Isaias Cabrera
Yongheng Chen, on Tuesday, December 17, 2019 04:21 PM, wrote... > > Hi, > > We found a bug that crashes Sqlite. Here’s the test case: > > —— > CREATE TABLE v0 ( v1 UNIQUE , v2 VARCHAR(80) NULL PRIMARY KEY ) ; > CREATE VIEW v3 ( v4 ) AS SELECT max ( ( SELECT count ( v1 ) OVER( ORDER > BY 10 ASC )

Re: [sqlite] Performance vs. memory trade-off question

2019-12-16 Thread Jose Isaias Cabrera
Give me speed anytime and twice on Sundays... From: sqlite-users on behalf of Eric Grange Sent: Saturday, December 14, 2019 04:11 PM To: SQLite mailing list Subject: Re: [sqlite] Performance vs. memory trade-off question While I am using SQLIite mostly in

Re: [sqlite] Difference between hex notation and string notation

2019-12-13 Thread Jose Isaias Cabrera
ke() C-language interface. Since I just pasted it there's typo in there. "caused it to misbehavior" should be "caused it to misbehave" -Original Message- From: sqlite-users On Behalf Of Jose Isaias Cabrera Sent: Friday, December 13, 2019 2:58 PM To: sqlite-users@maili

Re: [sqlite] Difference between hex notation and string notation

2019-12-13 Thread Jose Isaias Cabrera
Sascha Ziemann, on Friday, December 13, 2019 04:16 AM, wrote... > > I have a problem to find rows in a database when I write in hex notation: > > CREATE TABLE LOG (MSG VARCHAR(6291456) NOT NULL); > INSERT INTO LOG VALUES > >

Re: [sqlite] A crash bug in sqlite

2019-12-09 Thread Jose Isaias Cabrera
s typing, is wise." > > On Dec 9, 2019, at 10:56 AM, Jose Isaias Cabrera, on > > > > > > Since no one explains... ;-) > > > > Richard Hipp, on Monday, December 9, 2019 10:53 AM, wrote... > >> > >> On 12/9/19, Jose Isaias Cabrera, on

Re: [sqlite] A crash bug in sqlite

2019-12-09 Thread Jose Isaias Cabrera
Since no one explains... ;-) Richard Hipp, on Monday, December 9, 2019 10:53 AM, wrote... > > On 12/9/19, Jose Isaias Cabrera, on > > Error: near "AS": syntax error > > > > So, I can't replicate your problem. thanks. > > You have to run off of the l

Re: [sqlite] A crash bug in sqlite

2019-12-09 Thread Jose Isaias Cabrera
Yongheng Chen, on Monday, December 9, 2019 10:16 AM, wrote... > > Hi, > > We found a crash bug in sqlite of master branch. Here’s the POC > — > CREATE TABLE v0 ( v2 DOUBLE CHECK( ( v2 IN ( v2 , v1) ) ) , v1 UNIQUE AS( v2 > > v2 ) ) ; > INSERT INTO v0 VALUES ( 10 ); > SELECT v0 . v1 , v0 . v1

Re: [sqlite] Crash Bug Report

2019-12-08 Thread Jose Isaias Cabrera
Yongheng Chen, on Sunday, December 8, 2019 02:51 PM, wrote... > > Hi, > > We found one crash bug in sqlite, which causes a dead loop and then OOM. > > CREATE TABLE v0 ( v1 ) ; > CREATE TABLE v2 ( v3 ) ; > CREATE VIEW v4 AS WITH x AS ( SELECT x () OVER( ) FROM v4 ) SELECT v3 AS x > FROM v2 ;

Re: [sqlite] .expert disables loaded extensions

2019-12-06 Thread Jose Isaias Cabrera
Thanks, Keith. From: Keith Medcalf Sent: Friday, December 6, 2019 05:34 PM To: SQLite mailing list Cc: Jose Isaias Cabrera Subject: RE: .expert disables loaded extensions On Friday, 6 December, 2019 07:49. Jose Isaias Cabrera wrote: >please obse

[sqlite] .expert disables loaded extensions

2019-12-06 Thread Jose Isaias Cabrera
Greetings. please observe the following: 9:45:49.39>sqlite3 SQLite version 3.30.0 2019-10-04 15:03:17 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> .load c:\\PMOProjects\\libsqlite3decimal

Re: [sqlite] SLOW execution: Simple Query Uses More than 1 min

2019-12-06 Thread Jose Isaias Cabrera
Octopus ZHANG, on Friday, December 6, 2019 06:18 AM, wrote... > > Hi all, > > I'm trying to fuzz sqlite, and I found the following query was executed for > more than one minute. (./sqlite3, on > > >> SELECT > printf('%*.*c',9||00600&66,1003)""WHERE""/""; > > I also

Re: [sqlite] Enable Or Disable Extension Loading

2019-12-05 Thread Jose Isaias Cabrera
Keith Medcalf, on Thursday, December 5, 2019 02:24 PM, wrote... > On Thursday, 5 December, 2019 11:39, Jose Isaias Cabrera, on > >Just to be sure... > > > >The function, > > > >int sqlite3_enable_load_extension(sqlite3 *db, int onoff); > > > >enable

[sqlite] Enable Or Disable Extension Loading

2019-12-05 Thread Jose Isaias Cabrera
Greetings! Just to be sure... The function, int sqlite3_enable_load_extension(sqlite3 *db, int onoff); enables or disables a database to allow or disallow the loading of extensions[1]. Once it's set, will it stay on? Or does one need to be turn it on every time one connects to the

Re: [sqlite] PRAGMA for .load

2019-12-04 Thread Jose Isaias Cabrera
David Raymond, on Tuesday, December 3, 2019 03:43 PM, wrote... > > I _think_ the load_extension() function is what you'll be looking for, though > I > could be wrong. > > https://www.sqlite.org/lang_corefunc.html#load_extension [clip] > I was looking into the pragmas page, and I don't see one

[sqlite] PRAGMA for .load

2019-12-03 Thread Jose Isaias Cabrera
Greetings. Quick question... I was looking into the pragmas page, and I don't see one that would do the function to load other libraries, such as the .load function of the CLI. Is there one? Thanks. josé ___ sqlite-users mailing list

Re: [sqlite] Passing a path to sqlite3.exe to load a dll

2019-11-26 Thread Jose Isaias Cabrera
Ah-hah! Keith Medcalf, on Tuesday, November 26, 2019 03:58 PM, wrote... > > > Ah, you have missing dependancies. You need to make sure that the > dependencies can be loaded. When Windows attempts to load the module > all the dependencies must be loaded as well, otherwise the loader > cannot

Re: [sqlite] Passing a path to sqlite3.exe to load a dll

2019-11-26 Thread Jose Isaias Cabrera
Jose Isaias Cabrera, on Tuesday, November 26, 2019 03:44 PM, wrote... > Keith Medcalf, on Tuesday, November 26, 2019 03:38 PM, wrote... > > What is the canonical name of the file you are trying to load? > > c:\PMOProjects\libsqlite3decimal.dll > > As shown by the dir command

Re: [sqlite] Passing a path to sqlite3.exe to load a dll

2019-11-26 Thread Jose Isaias Cabrera
> > Keith Medcalf, on Tuesday, November 26, 2019 03:38 PM, wrote... > > > What is the canonical name of the file you are trying to load? c:\PMOProjects\libsqlite3decimal.dll As shown by the dir command, 15:40:36.57>dir c:\PMOProjects\libsqlite3decimal.dll Volume in drive C is Windows Volume

Re: [sqlite] Passing a path to sqlite3.exe to load a dll

2019-11-26 Thread Jose Isaias Cabrera
Keith Medcalf, on Tuesday, November 26, 2019 02:57 PM, wrote... > > > Escape the reverse solstice with a duplicate reverse solstice (\ -> \\) or > replace them > with normal solstice (\ -> /) since Windows recognizes either as the path > separator. > The CLI, like most things, parses escape

[sqlite] Passing a path to sqlite3.exe to load a dll

2019-11-26 Thread Jose Isaias Cabrera
Greetings! I am trying to load a DLL to the DOS tool, but it's failing. I am trying, sqlite> .load c:\PMOProjects\sqlite3libIN sqlite3_decimal_init Error: The specified module could not be found. Any help would be greatly appreciated. Also, if I would like to use the call, int

Re: [sqlite] wrong timestamp using strftime('%s')

2019-11-25 Thread Jose Isaias Cabrera
Dominik Ohnezeit, on Sunday, November 24, 2019 03:21 PM, wrote... > strftime('%s', '1970-01-01 00:00:00.000') [clip] > the date I get back is not 1970-01-01 00:00:00.000 but 1969-12-31 > 22:29:11.000 > > Does anyone know why? Here are some samples run... sqlite> select strftime('%s',

Re: [sqlite] Bug report

2019-11-21 Thread Jose Isaias Cabrera
Kees Nuyt, on Thursday, November 21, 2019 03:48 PM, wrote... > > > Thanks, Jose. > > I see no CVE entered by the OP, but maybe I missed something. Yes, you are right. After pasting it, I went through the top 5 and none of these aren't/weren't the one. Apologies. I thought that by searching on

Re: [sqlite] Bug report

2019-11-21 Thread Jose Isaias Cabrera
NameDescription CVE-2019-9937 In SQLite 3.27.2, interleaving reads and writes in a single transaction with an fts5 virtual table will lead to a NULL Pointer Dereference in fts5ChunkIterate in sqlite3.c. This is related to

Re: [sqlite] What is the C language standard to which sqlite conforms ?

2019-11-19 Thread Jose Isaias Cabrera
Jens Alfke, on Tuesday, November 19, 2019 03:11 PM, wrote... > > > > > On Nov 19, 2019, at 5:29 AM, Dennis Clarke, on > > > > Yes I have tried gcc 9.2.0 and the whole process fails in the tests > > and no it will not compile as C90 code. > > Have you tried just not forcing strict compliance?

Re: [sqlite] Question about: Adding a record to a table with select failure

2019-11-19 Thread Jose Isaias Cabrera
date) on the first select, I don't know, but, if I take it out, it does not. Thanks. > Doug > > -----Original Message- > > From: sqlite-users, on Jose Isaias Cabrera > > Sent: Monday, November 18, 2019 12:11 PM > > > Subject: Re: [sqlite] Question about: Adding

Re: [sqlite] Question about: Adding a record to a table with select failure

2019-11-19 Thread Jose Isaias Cabrera
Peter da Silva, on Monday, November 18, 2019 08:07 PM, wrote... > > Assuming I'm understanding what the original message was about. > > Isn't this what BEGIN; INSERT OR IGNORE; UPDATE; COMMIT is the right tool for? The original message was about adding a new record using old values from an

Re: [sqlite] Question about: Adding a record to a table with select failure

2019-11-19 Thread Jose Isaias Cabrera
Thanks, Keith. Keith Medcalf, on Monday, November 18, 2019 07:25 PM, wrote... > > > On Monday, 18 November, 2019 15:01, Jose Isaias Cabrera, on > > >Keith Medcalf, on Monday, November 18, 2019 04:27 PM, wrote... > >> > >> This relies on two implementation

Re: [sqlite] Question about: Adding a record to a table with select failure

2019-11-19 Thread Jose Isaias Cabrera
Simon Slavin, on Monday, November 18, 2019 05:14 PM, wrote... > Being completely serious, whenever I see "undocumented" or "implementation > dependent" or > "optimization side-effect", or a SQL statement I can't parse in my head, I > usually decide > to do it in my programming language

Re: [sqlite] Question about: Adding a record to a table with select failure

2019-11-18 Thread Jose Isaias Cabrera
't the where clause that cannot be satisfied in both cases guarantee > >that no rows will be selected, when there are no records in the database? > >Doug > > > >> -Original Message- > >> From: sqlite-users, on Jose Isaias Cabrera > >> Sent: Monday, November 18,

Re: [sqlite] Question about: Adding a record to a table with select failure

2019-11-18 Thread Jose Isaias Cabrera
Doug, on Monday, November 18, 2019 02:48 PM, wrote... > > I'm really confused now. I don't understand the semantics of: > SELECT IfNull('p006', Max(idate)), >IfNull(b, 1), >IfNull(c, 2), >'y', >IfNull(e, 4), >'2019-20-12' > FROM t > WHERE a = 'p006'; >

Re: [sqlite] Question about: Adding a record to a table with select failure

2019-11-18 Thread Jose Isaias Cabrera
Doug, on Monday, November 18, 2019 12:31 PM, wrote... Jose Isaias Cabrera [clip] > > > > > > INSERT INTO t (a, b, c, d, e, idate)​ > > > SELECT IfNull('p006', Max(idate)),​ > > >IfNull(b, 1),​ > > >IfNull(c, 2),​ > > >'

Re: [sqlite] Relax "DISTINCT aggregates" error

2019-11-18 Thread Jose Isaias Cabrera
Dominique Devienne, on Monday, November 18, 2019 04:33 AM, wrote... > > On Fri, Nov 15, 2019 at 4:22 PM Jose Isaias Cabrera, on > wrote: > > > Dominique Devienne, on Friday, November 15, 2019 09:02 AM, wrote... > > > > Have you tried this, > > sqlite> select

Re: [sqlite] Question about: Adding a record to a table with select failure

2019-11-16 Thread Jose Isaias Cabrera
'​ > FROM t​ > WHERE a = 'p006';​ ​ Thanks, Jake. I like this last one. I appreciate it. Thanks.​ ​ josé​ ​ > On Sat, Nov 16, 2019 at 8:04 AM Jose Isaias Cabrera, on ​ > >​ > >​ > > Doug, on Friday, November 15, 2019 11:42 AM, wrote...​ > > >​ > > > WR

Re: [sqlite] Can SQLite import Latin1 data?

2019-11-15 Thread Jose Isaias Cabrera
Shawn Wagner, on Friday, November 15, 2019 04:01 PM, wrote... > > If you're on Windows, which cp1252 suggests, just make sure that you don't > end up with a BOM at the start of the file when you convert it. Windows > tools that output utf-8 are sometimes prone to add one even though it's >

Re: [sqlite] Adding a record to a table with one value change

2019-11-15 Thread Jose Isaias Cabrera
Keith Medcalf, on Friday, November 15, 2019 03:50 PM, wrote... > > > How you would use bound parameters depends on what you are using to interface > with the sqlite3 database. > > https://www.sqlite.org/c3ref/bind_blob.html for the C interfaces. > > In something like python you would pass the

Re: [sqlite] Question about: Adding a record to a table with select failure

2019-11-15 Thread Jose Isaias Cabrera
Doug, on Friday, November 15, 2019 11:42 AM, wrote... > > WRT Jose's original context, and just for my enlightment, what happens with > the following: > > insert into t (a, b, c, d, e, idate) > SELECT a, b, c, 'y', e, '2019-02-12' FROM t WHERE a = 'p999'; > > where p999 does not define a record?

Re: [sqlite] Can SQLite import Latin1 data?

2019-11-15 Thread Jose Isaias Cabrera
Winfried, on Friday, November 15, 2019 03:13 PM, wrote... > > Hello, > > I have a big CSV file that's encoded in Latin1 (cp1252), while SQLite stores > strings as Unicode. > > Neither Google nor ".help" helped to find if SQLite offers a switch to > convert Latin1 to UTF-8 on the fly before

Re: [sqlite] Question about: Adding a record to a table with select failure

2019-11-15 Thread Jose Isaias Cabrera
Simon Slavin, on Friday, November 15, 2019 11:58 AM, wrote... > > On 15 Nov 2019, at 4:48pm, Jose Isaias Cabrera, on > > > It does not get inserted. > > The SELECT returns zero lines. Therefore zero lines get inserted. You might > like to try > one where the SELECT

Re: [sqlite] Question about: Adding a record to a table with select failure

2019-11-15 Thread Jose Isaias Cabrera
Doug, on Friday, November 15, 2019 11:42 AM, wrote... > > WRT Jose's original context, and just for my enlightment, what happens with > the following: > > insert into t (a, b, c, d, e, idate) > SELECT a, b, c, 'y', e, '2019-02-12' FROM t WHERE a = 'p999'; > > where p999 does not define a record?

  1   2   3   4   5   6   7   >