litecli icon indicating copy to clipboard operation
litecli copied to clipboard

Does not work with CSV vtable.

Open pydemo opened this issue 4 years ago • 2 comments

./litecli mycool.db

Version: 1.3.2

.load /home/ubuntu/src/sqlite-csv-vtable/csv
CREATE VIRTUAL TABLE temp.t1 USING csv(filename="sample.csv");' 'SELECT * FROM t1;

Segmentation fault

pydemo avatar Jun 15 '20 23:06 pydemo

I am guessing sqlite-csv-vtable is an sqlite extension that you're loading before trying the create table.

Did this work in the default sqlite3 cli?

The segmentation fault seems to point to the fact that underlying sqlite crashed when the csv() function was executed.

amjith avatar Jun 18 '20 03:06 amjith

I am guessing sqlite-csv-vtable is an sqlite extension that you're loading before trying the create table.

Did this work in the default sqlite3 cli?

The segmentation fault seems to point to the fact that underlying sqlite crashed when the csv() function was executed.

Yes, it's working in cli and only in cli. In Python 3/sqlite3 we have to execute con = sqlite3.connect("my.db") con.enable_load_extension(True) con.load_extension("/home/ubuntu/src/sqlite-csv-vtable/csv")

Python2:

from pysqlite2 import dbapi2 as sqlite3 con = sqlite3.connect("my.db") con.enable_load_extension(True) con.load_extension("/home/ubuntu/src/sqlite-csv-vtable/csv")

pydemo avatar Jun 18 '20 12:06 pydemo