Re: [sqlite] mysql -> sqlite problem

2019-12-19 Thread Jens Alfke


> On Dec 19, 2019, at 4:49 PM, Mike Bentley  wrote:
> 
> Is it true that "Each index name must be unique in the database"?

Yes. You're right that the docs don't seem to spell this out, but since the 
syntax to delete an index is "DROP INDEX ", you couldn't have 
multiple indexes with the same name because it wouldn't know which one to 
delete.

You can pretty easily get a unique index name by prefixing the name of the 
table.

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


[sqlite] mysql -> sqlite problem

2019-12-19 Thread Mike Bentley
I used two different mysql to sqlite conversion tools to do test 
conversions. One tool is written in python and is called 
mysql-to-sqlite, and the other in awk called mysql2sqlite, both 
available via github.


The one in python ran into an error and stopped very early in the 
process. The one in awk ran into a couple problems but completed. If I 
use a sqlite database inspector, the tables look like I expect.


The error message generated by the python converter:


100%|██| 1/1 [00:00<00:00, 724.15it/s]
2019-12-19 10:26:55 ERRORSQLite failed creating table adm_table:
index id_column already exists
index id_column already exists


The column name "id_column" turns out to be used alot as a unique key in 
many tables in the mysql db.


The author of the tool points out:

https://stackoverflow.com/questions/27238178/duplicate-index-on-sqlite-not-on-mysql

where we encounter a phrase similar to "Each index name must be unique 
in the database".


I've searched the internet for the above and variants; it shows up on 
techonthenet.com in sqlite tutorials and a couple other places.


It does not appear to show up on sqlite.org, tho.

Is it true that "Each index name must be unique in the database"?

I was able to use the output of the qwk script to create an inspectable 
sqlite database without the process generating complaints about named 
indexes already existing.


Thanks!

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


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 development code and the release code.

Indeed, sqlite v3.30.0 for Windows crashes with this set of instructions...

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


[sqlite] Crash Bug in Sqlite

2019-12-19 Thread Yongheng Chen
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 development code and the release code. 

Yongheng & Rui
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


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 ) ;
> CREATE TABLE v4 ( v5 INTEGER PRIMARY KEY , v6 INT );
> DELETE FROM v0 WHERE NULL BETWEEN ( SELECT v1 FROM v0 AS x GROUP BY v1
> ORDER BY 10 + sum ( v1 ) OVER( ORDER BY - 10 ) DESC ) AND 10 ;

Entering each of those lines above, one at a time, when I hit enter after the 
last line above,
sqlite3 crashes right after.  So, I don't even need the line below.  This is 
using sqlite3
v3.30.0 in Windows.  Just an FYI.

> SELECT * FROM v4 , v2 WHERE v3 = v3 AND v3 = 10;
> —
>
> This bug exists in both the latest development code and the release code.
> (And thanks josé for the confirmation every time we report a bug).

You're welcome.  I have SQlite3 tool opened, so it's a "nice copy and paste" 
and see your
replication text/steps go to work. ;-)

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


[sqlite] Crash bug in Sqlite

2019-12-19 Thread Yongheng Chen
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 ) ;
CREATE TABLE v4 ( v5 INTEGER PRIMARY KEY , v6 INT );
DELETE FROM v0 WHERE NULL BETWEEN ( SELECT v1 FROM v0 AS x GROUP BY v1 ORDER BY 
10 + sum ( v1 ) OVER( ORDER BY - 10 ) DESC ) AND 10 ;
SELECT * FROM v4 , v2 WHERE v3 = v3 AND v3 = 10;
—

This bug exists in both the latest development code and the release code. (And 
thanks josé for the confirmation every time we report a bug).

Yongheng & Rui
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Query regarding Sqlite 3.30.1

2019-12-19 Thread Richard Hipp
On 12/19/19, Uthra Ganesan  wrote:
> Hi
>
> We are currently using SQLite 3.28.0. Can you please lt us know when can we
> expect 3.30.1 in Maven central repository.
>

Please ask whomever controls the "Maven central repository".  They
will make that determination, not us.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Query regarding Sqlite 3.30.1

2019-12-19 Thread Uthra Ganesan
Hi

We are currently using SQLite 3.28.0. Can you please lt us know when can we 
expect 3.30.1 in Maven central repository.

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


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 , 10 , 10 );
> CREATE VIRTUAL TABLE v8 USING zipfile ( v9 DOUBLE ) ;
> REPLACE INTO v8 SELECT * FROM v0;
> —
>
> This bug exists in both the latest development code and the release code.

Crash confirmed in Windows Sqlite3 v3.30.0. Just fyi...

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


[sqlite] Crash bug in Sqlite

2019-12-19 Thread Yongheng Chen
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 , 10 , 10 );
CREATE VIRTUAL TABLE v8 USING zipfile ( v9 DOUBLE ) ;
REPLACE INTO v8 SELECT * FROM v0;
—

This bug exists in both the latest development code and the release code.

Yongheng & Rui
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users