github
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/datasette/issues/216#issuecomment-381788051 | https://api.github.com/repos/simonw/datasette/issues/216 | 381788051 | MDEyOklzc3VlQ29tbWVudDM4MTc4ODA1MQ== | 9599 | 2018-04-17T00:07:48Z | 2018-04-17T00:07:48Z | OWNER | Still failing. This is very odd. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
314665147 | |
https://github.com/simonw/datasette/issues/216#issuecomment-381794744 | https://api.github.com/repos/simonw/datasette/issues/216 | 381794744 | MDEyOklzc3VlQ29tbWVudDM4MTc5NDc0NA== | 9599 | 2018-04-17T00:51:41Z | 2018-04-17T00:51:41Z | OWNER | I'm reverting this out of master until I can figure out why the tests are failing. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
314665147 | |
https://github.com/simonw/datasette/issues/216#issuecomment-381798786 | https://api.github.com/repos/simonw/datasette/issues/216 | 381798786 | MDEyOklzc3VlQ29tbWVudDM4MTc5ODc4Ng== | 9599 | 2018-04-17T01:18:25Z | 2018-04-17T01:18:25Z | OWNER | Here's the test that's failing: https://github.com/simonw/datasette/blob/59a3aa859c0e782aeda9a515b1b52c358e8458a2/tests/test_api.py#L437-L470 I got Travis to spit out the `fetched` and `expected` variables. `expected` has 201 items in it and is identical to what I get on my local laptop. `fetched` has 250 items in it, so it's clearly different from my local environment. I've managed to replicate the bug in production! I created a test database like this: python tests/fixtures.py sortable.db Then deployed that database like so: datasette publish now sortable.db \ --extra-options="--page_size=50" --branch=debug-travis-issue-216 And... if you click "next" on this page https://datasette-issue-216-pagination.now.sh/sortable-5679797/sortable?_sort_desc=sortable_with_nulls five times you get back 250 results, when you should only get back 201. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
314665147 | |
https://github.com/simonw/datasette/issues/216#issuecomment-381799267 | https://api.github.com/repos/simonw/datasette/issues/216 | 381799267 | MDEyOklzc3VlQ29tbWVudDM4MTc5OTI2Nw== | 9599 | 2018-04-17T01:21:35Z | 2018-04-17T01:21:35Z | OWNER | The version that I deployed which exhibits the bug is running SQLite `3.8.7.1` - https://datasette-issue-216-pagination.now.sh/sortable-5679797?sql=select+sqlite_version%28%29 The version that I have running locally which does NOT exhibit the bug is running SQLite `3.23.0` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
314665147 | |
https://github.com/simonw/datasette/issues/216#issuecomment-381799408 | https://api.github.com/repos/simonw/datasette/issues/216 | 381799408 | MDEyOklzc3VlQ29tbWVudDM4MTc5OTQwOA== | 9599 | 2018-04-17T01:22:30Z | 2018-04-17T01:22:30Z | OWNER | ... which is VERY surprising, because `3.23.0` only came out on 2nd April this year: https://www.sqlite.org/changes.html - I have no idea how I came to be running that version on my laptop. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
314665147 | |
https://github.com/simonw/datasette/issues/216#issuecomment-381801302 | https://api.github.com/repos/simonw/datasette/issues/216 | 381801302 | MDEyOklzc3VlQ29tbWVudDM4MTgwMTMwMg== | 9599 | 2018-04-17T01:33:43Z | 2018-04-17T01:33:43Z | OWNER | This is the SQL that returns differing results in production and on my laptop: https://datasette-issue-216-pagination.now.sh/sortable-5679797?sql=select+%2A+from+sortable+where+%28sortable_with_nulls+is+null+and+%28%28pk1+%3E+%3Ap0%29%0A++or%0A%28pk1+%3D+%3Ap0+and+pk2+%3E+%3Ap1%29%29%29+order+by+sortable_with_nulls+desc+limit+51&p0=b&p1=t ``` select * from sortable where (sortable_with_nulls is null and ((pk1 > :p0) or (pk1 = :p0 and pk2 > :p1))) order by sortable_with_nulls desc limit 51 ``` I think that `order by sortable_with_nulls desc` bit is at fault - the primary keys should be included in that order by as well. Sure enough, changing the query to this one returns the same results across both environments: ``` select * from sortable where (sortable_with_nulls is null and ((pk1 > :p0) or (pk1 = :p0 and pk2 > :p1))) order by sortable_with_nulls desc, pk1, pk2 limit 51 ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
314665147 | |
https://github.com/simonw/datasette/issues/216#issuecomment-381803157 | https://api.github.com/repos/simonw/datasette/issues/216 | 381803157 | MDEyOklzc3VlQ29tbWVudDM4MTgwMzE1Nw== | 9599 | 2018-04-17T01:45:24Z | 2018-04-17T01:45:24Z | OWNER | Fixed! | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
314665147 |