fr-ser / grafana-sqlite-datasource

Grafana Plugin to enable SQLite as a Datasource
Apache License 2.0
126 stars 17 forks source link

select load_extension() #139

Closed skyisnothelimit closed 2 weeks ago

skyisnothelimit commented 4 months ago

Is there a mechanism to load sqlite extension? Plugin throws below error when run from grafana, but load_extension(...) is successful when I interact with sqlite cli outside of grafana.

rawQueryText:"select load_extension('./pivotvtab.dll');" .... .... error:"SQL logic error: not authorized (1)" .....

Sqlite forum pointed it towards garfana.

https://sqlite.org/forum/forumpost/55b893afd2

fr-ser commented 3 months ago

I must say I am not too familiar with loading extensions in SQLite.

I am not sure yet where the issue is but could you provide some more details?

I.e. when loading the extension via the CLI did you also use the load_extension function?

And how did you enable extension loading before?

According to the documentation it is disabled by default:

For security reasons, extension loading is turned off by default. In order to use either the C-language or SQL extension loading functions, one must first enable extension loading using the sqlite3_db_config(db,SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION,1,NULL) C-language API in your application.

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.