Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with CSV vtable. #90

Open
pydemo opened this issue Jun 15, 2020 · 2 comments
Open

Does not work with CSV vtable. #90

pydemo opened this issue Jun 15, 2020 · 2 comments

Comments

@pydemo
Copy link

pydemo commented Jun 15, 2020

./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

@amjith
Copy link
Member

amjith commented Jun 18, 2020

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.

@pydemo
Copy link
Author

pydemo commented Jun 18, 2020

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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants