issue_comments
11 rows where "created_at" is on date 2020-09-15, issue = 702069429 and user = 9599 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- Writable canned queries with magic parameters fail if POST body is empty · 11 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
692951144 | https://github.com/simonw/datasette/issues/967#issuecomment-692951144 | https://api.github.com/repos/simonw/datasette/issues/967 | MDEyOklzc3VlQ29tbWVudDY5Mjk1MTE0NA== | simonw 9599 | 2020-09-15T20:08:12Z | 2020-09-15T20:08:12Z | OWNER | I think the easiest fix is for me to ensure that calls to |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries with magic parameters fail if POST body is empty 702069429 | |
692946616 | https://github.com/simonw/datasette/issues/967#issuecomment-692946616 | https://api.github.com/repos/simonw/datasette/issues/967 | MDEyOklzc3VlQ29tbWVudDY5Mjk0NjYxNg== | simonw 9599 | 2020-09-15T19:59:21Z | 2020-09-15T19:59:21Z | OWNER | I wish I could call https://www.sqlite.org/c3ref/bind_parameter_count.html and https://www.sqlite.org/c3ref/bind_parameter_name.html from Python. Might be possible to do that using
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries with magic parameters fail if POST body is empty 702069429 | |
692945504 | https://github.com/simonw/datasette/issues/967#issuecomment-692945504 | https://api.github.com/repos/simonw/datasette/issues/967 | MDEyOklzc3VlQ29tbWVudDY5Mjk0NTUwNA== | simonw 9599 | 2020-09-15T19:57:10Z | 2020-09-15T19:57:10Z | OWNER | So the problem actually occurs when the Relevant code: And: I'm passing a special magic parameters dictionary for the Python I tracked down the relevant C code: ```c Py_BEGIN_ALLOW_THREADS num_params_needed = sqlite3_bind_parameter_count(self->st); Py_END_ALLOW_THREADS
``` It looks to me like this should fail if the number of keys known to be in the dictionary differs from the number of named parameters in the query. But if those numbers fail to match it still works as far as I can tell - it's only dictionary length of 0 that is causing the problems. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries with magic parameters fail if POST body is empty 702069429 | |
692940375 | https://github.com/simonw/datasette/issues/967#issuecomment-692940375 | https://api.github.com/repos/simonw/datasette/issues/967 | MDEyOklzc3VlQ29tbWVudDY5Mjk0MDM3NQ== | simonw 9599 | 2020-09-15T19:47:09Z | 2020-09-15T19:47:09Z | OWNER | Yes! The tests all pass if I update the test function to do this:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries with magic parameters fail if POST body is empty 702069429 | |
692938935 | https://github.com/simonw/datasette/issues/967#issuecomment-692938935 | https://api.github.com/repos/simonw/datasette/issues/967 | MDEyOklzc3VlQ29tbWVudDY5MjkzODkzNQ== | simonw 9599 | 2020-09-15T19:44:21Z | 2020-09-15T19:44:41Z | OWNER | While I'm running the above test, in the rounds that work the In the rounds that fails it returns So it looks like the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries with magic parameters fail if POST body is empty 702069429 | |
692937150 | https://github.com/simonw/datasette/issues/967#issuecomment-692937150 | https://api.github.com/repos/simonw/datasette/issues/967 | MDEyOklzc3VlQ29tbWVudDY5MjkzNzE1MA== | simonw 9599 | 2020-09-15T19:42:57Z | 2020-09-15T19:42:57Z | OWNER | New (failing) test:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries with magic parameters fail if POST body is empty 702069429 | |
692927867 | https://github.com/simonw/datasette/issues/967#issuecomment-692927867 | https://api.github.com/repos/simonw/datasette/issues/967 | MDEyOklzc3VlQ29tbWVudDY5MjkyNzg2Nw== | simonw 9599 | 2020-09-15T19:25:23Z | 2020-09-15T19:25:23Z | OWNER | Hunch: I think the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries with magic parameters fail if POST body is empty 702069429 | |
692835066 | https://github.com/simonw/datasette/issues/967#issuecomment-692835066 | https://api.github.com/repos/simonw/datasette/issues/967 | MDEyOklzc3VlQ29tbWVudDY5MjgzNTA2Ng== | simonw 9599 | 2020-09-15T16:40:12Z | 2020-09-15T16:40:12Z | OWNER | Is the bug here that magic parameters are incompatible with CSRF-exempt requests (e.g. request with no cookies)? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries with magic parameters fail if POST body is empty 702069429 | |
692834670 | https://github.com/simonw/datasette/issues/967#issuecomment-692834670 | https://api.github.com/repos/simonw/datasette/issues/967 | MDEyOklzc3VlQ29tbWVudDY5MjgzNDY3MA== | simonw 9599 | 2020-09-15T16:39:29Z | 2020-09-15T16:39:29Z | OWNER | Relevant code: https://github.com/simonw/datasette/blob/853c5fc37011a7bc09ca3a1af287102f00827c82/datasette/views/database.py#L222-L236 This issue may not be about |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries with magic parameters fail if POST body is empty 702069429 | |
692834064 | https://github.com/simonw/datasette/issues/967#issuecomment-692834064 | https://api.github.com/repos/simonw/datasette/issues/967 | MDEyOklzc3VlQ29tbWVudDY5MjgzNDA2NA== | simonw 9599 | 2020-09-15T16:38:21Z | 2020-09-15T16:38:21Z | OWNER | So the mystery here is why does omitting |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries with magic parameters fail if POST body is empty 702069429 | |
692832113 | https://github.com/simonw/datasette/issues/967#issuecomment-692832113 | https://api.github.com/repos/simonw/datasette/issues/967 | MDEyOklzc3VlQ29tbWVudDY5MjgzMjExMw== | simonw 9599 | 2020-09-15T16:34:53Z | 2020-09-15T16:37:43Z | OWNER | This is so weird. In the test I wrote for this the following passed:
But without the
Here's the test I wrote:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries with magic parameters fail if POST body is empty 702069429 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [issue] INTEGER REFERENCES [issues]([id]) , [performed_via_github_app] TEXT); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user 1