[GH-ISSUE #104] shiori delete -> "too many SQL variables" #74

Closed
opened 2026-02-25 23:33:23 +03:00 by kerem · 4 comments
Owner

Originally created by @Dapuva76 on GitHub (Jul 29, 2018).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/104

I've imported my pocket list, and am trying to get rid of entries with a certain tag. So I've used
shiori delete $(shiori search -t tag -i)
but all I get is

too many SQL variables
Bookmark(s) have been deleted

Which deletes nothing. There are about 2000+ entries with that tag, so maybe that is confusing. Also, if I try to update all bookmarks via "shiori update", I get a bunch of "unable to retrieve" and a bunch of processed entries, but nothing changed. (manually updating works)

Originally created by @Dapuva76 on GitHub (Jul 29, 2018). Original GitHub issue: https://github.com/go-shiori/shiori/issues/104 I've imported my pocket list, and am trying to get rid of entries with a certain tag. So I've used ` shiori delete $(shiori search -t tag -i)` but all I get is ``` too many SQL variables Bookmark(s) have been deleted ``` Which deletes nothing. There are about 2000+ entries with that tag, so maybe that is confusing. Also, if I try to update all bookmarks via "shiori update", I get a bunch of "unable to retrieve" and a bunch of processed entries, but nothing changed. (manually updating works)
kerem closed this issue 2026-02-25 23:33:23 +03:00
Author
Owner

@RadhiFadlillah commented on GitHub (Jul 31, 2018):

Hi @Dapuva76 thanks for the report.

... which deletes nothing. There are about 2000+ entries with that tag

The delete command is working by deleting records in database using query like this :

DELETE * FROM bookmark WHERE id IN (?, ?, ?, ?, ..., ?);

Those ? are binding variable that will be filled with the submitted ids. The problem is, SQLite by default only allow maximum 999 binding variable. That's why it's failed when trying to delete 2000+ ids.

It's should be easy enough to fix, however right now I'm a bit busy. I think I could start working on it around next weekend, so please bear with it for now 😅.

Also, if I try to update all bookmarks via "shiori update", I get a bunch of "unable to retrieve" and a bunch of processed entries, but nothing changed.

I will investigate it further. BTW, how many bookmarks are you trying to update ? Are there more than 2000 as well ?

<!-- gh-comment-id:409216053 --> @RadhiFadlillah commented on GitHub (Jul 31, 2018): Hi @Dapuva76 thanks for the report. > ... which deletes nothing. There are about 2000+ entries with that tag The `delete` command is working by deleting records in database using query like this : ```sql DELETE * FROM bookmark WHERE id IN (?, ?, ?, ?, ..., ?); ``` Those `?` are binding variable that will be filled with the submitted ids. The problem is, SQLite by default only allow maximum [999](https://www.sqlite.org/limits.html) binding variable. That's why it's failed when trying to delete 2000+ ids. It's should be easy enough to fix, however right now I'm a bit busy. I think I could start working on it around next weekend, so please bear with it for now :sweat_smile:. > Also, if I try to update all bookmarks via "shiori update", I get a bunch of "unable to retrieve" and a bunch of processed entries, but nothing changed. I will investigate it further. BTW, how many bookmarks are you trying to update ? Are there more than 2000 as well ?
Author
Owner

@Dapuva76 commented on GitHub (Jul 31, 2018):

I will investigate it further. BTW, how many bookmarks are you trying to update ? Are there more than 2000 as well ?

Yeah, I think it's about 4k+ bookmarks. Reason being I've used scripts that scan twitter and reddit for keywords, and automatically add them to pocket. No need to hurry, I love shiori as is! Great app.

<!-- gh-comment-id:409382962 --> @Dapuva76 commented on GitHub (Jul 31, 2018): > I will investigate it further. BTW, how many bookmarks are you trying to update ? Are there more than 2000 as well ? Yeah, I think it's about 4k+ bookmarks. Reason being I've used scripts that scan twitter and reddit for keywords, and automatically add them to pocket. No need to hurry, I love shiori as is! Great app.
Author
Owner

@sascha-andres commented on GitHub (Jan 25, 2019):

@RadhiFadlillah created a PR that should fix this (#123)

<!-- gh-comment-id:457556231 --> @sascha-andres commented on GitHub (Jan 25, 2019): @RadhiFadlillah created a PR that should fix this (#123)
Author
Owner

@RadhiFadlillah commented on GitHub (Aug 27, 2019):

Since the ramadhan branch has been merged, this issue should be fixed now. Therefore, I will close this issue. Feel free to reopen it if the issue still exists.

<!-- gh-comment-id:525280672 --> @RadhiFadlillah commented on GitHub (Aug 27, 2019): Since the ramadhan branch has been merged, this issue should be fixed now. Therefore, I will close this issue. Feel free to reopen it if the issue still exists.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#74
No description provided.