issues: 695319258

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association pull_request body repo type active_lock_reason performed_via_github_app
695319258 MDU6SXNzdWU2OTUzMTkyNTg= 149 FTS table with 7 rows has _fts_docsize table with 9,141 rows 9599 closed 0     10 2020-09-07T18:06:16Z 2020-09-07T21:16:34Z 2020-09-07T21:16:34Z OWNER  

I'm seeing a weird issue with some of the SQLite databases that I am using with the FTS5 module.

I have a database with a licenses table that contains 7 rows: https://github-to-sqlite.dogsheep.net/github/licenses

The FTS table also has 7 rows: https://github-to-sqlite.dogsheep.net/github/licenses_fts

Somehow the accompanying licenses_fts_docsize shadow table now has 9,141 rows in it! https://github-to-sqlite.dogsheep.net/github/licenses_fts_docsize

And licenses_fts_data has 41 rows - should I expect that to have 7 rows? https://github-to-sqlite.dogsheep.net/github/licenses_fts_data

I have a hunch that it might be a problem with the triggers. These are the triggers that are updating that FTS table: https://github-to-sqlite.dogsheep.net/github?sql=select+*+from+sqlite_master+where+type+%3D+%27trigger%27+and+tbl_name+%3D+%27licenses%27

<table> <thead> <tr> <th>type</th> <th>name</th> <th>tbl_name</th> <th>rootpage</th> <th>sql</th> </tr> </thead> <tbody> <tr> <td>trigger</td> <td>licenses_ai</td> <td>licenses</td> <td>0</td> <td>CREATE TRIGGER [licenses_ai] AFTER INSERT ON [licenses] BEGIN INSERT INTO [licenses_fts] (rowid, [name]) VALUES (new.rowid, new.[name]); END</td> </tr> <tr> <td>trigger</td> <td>licenses_ad</td> <td>licenses</td> <td>0</td> <td>CREATE TRIGGER [licenses_ad] AFTER DELETE ON [licenses] BEGIN INSERT INTO [licenses_fts] ([licenses_fts], rowid, [name]) VALUES('delete', old.rowid, old.[name]); END</td> </tr> <tr> <td>trigger</td> <td>licenses_au</td> <td>licenses</td> <td>0</td> <td>CREATE TRIGGER [licenses_au] AFTER UPDATE ON [licenses] BEGIN INSERT INTO [licenses_fts] ([licenses_fts], rowid, [name]) VALUES('delete', old.rowid, old.[name]); INSERT INTO [licenses_fts] (rowid, [name]) VALUES (new.rowid, new.[name]); END</td> </tr> </tbody> </table>
140912432 issue    

Links from other tables

Powered by Datasette · Query took 1.079ms · About: github-to-sqlite