{"html_url": "https://github.com/simonw/datasette/issues/1647#issuecomment-1059823119", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1647", "id": 1059823119, "node_id": "IC_kwDOBm6k_c4_K54P", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-05T19:56:27Z", "updated_at": "2022-03-05T19:56:27Z", "author_association": "OWNER", "body": "Updated this TIL with extra patterns I figured out: https://til.simonwillison.net/sqlite/ld-preload", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1160407071, "label": "Test failures with SQLite 3.37.0+ due to column affinity case"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1647#issuecomment-1059821674", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1647", "id": 1059821674, "node_id": "IC_kwDOBm6k_c4_K5hq", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-05T19:44:32Z", "updated_at": "2022-03-05T19:44:32Z", "author_association": "OWNER", "body": "I thought I'd need to introduce https://dirty-equals.helpmanual.io/types/string/ to help write tests for this, but I think I've found a good alternative that doesn't need a new dependency.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1160407071, "label": "Test failures with SQLite 3.37.0+ due to column affinity case"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1647#issuecomment-1059819628", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1647", "id": 1059819628, "node_id": "IC_kwDOBm6k_c4_K5Bs", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-05T19:28:54Z", "updated_at": "2022-03-05T19:28:54Z", "author_association": "OWNER", "body": "OK, using that trick worked for testing this:\r\n\r\n docker run -it -p 8001:8001 ubuntu\r\n\r\nThen inside that container:\r\n\r\n apt-get install -y python3 build-essential tcl wget python3-pip git python3.8-venv\r\n\r\nFor each version of SQLite I wanted to test I needed to figure out the tarball URL - for example, for `3.38.0` I navigated to https://www.sqlite.org/src/timeline?t=version-3.38.0 and clicked the \"checkin\" link and copied the tarball link:\r\nhttps://www.sqlite.org/src/tarball/40fa792d/SQLite-40fa792d.tar.gz\r\n\r\nThen to build it (the `CPPFLAGS` took some trial and error):\r\n```\r\ncd /tmp\r\nwget https://www.sqlite.org/src/tarball/40fa792d/SQLite-40fa792d.tar.gz\r\ntar -xzvf SQLite-40fa792d.tar.gz\r\ncd SQLite-40fa792d\r\nCPPFLAGS=\"-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_RTREE=1\" ./configure\r\nmake\r\n```\r\nThen to test with Datasette:\r\n```\r\ncd /tmp\r\ngit clone https://github.com/simonw/datasette\r\ncd datasette\r\npython3 -m venv venv\r\nsource venv/bin/activate\r\npip install wheel # So bdist_wheel works in next step\r\npip install -e '.[test]'\r\nLD_PRELOAD=/tmp/SQLite-40fa792d/.libs/libsqlite3.so pytest\r\n```\r\n\r\nAfter some trial and error I proved that those tests passed with 3.36.0:\r\n```\r\ncd /tmp\r\nwget https://www.sqlite.org/src/tarball/5c9a6c06/SQLite-5c9a6c06.tar.gz\r\ntar -xzvf SQLite-5c9a6c06.tar.gz\r\ncd SQLite-5c9a6c06\r\nCPPFLAGS=\"-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_RTREE=1\" ./configure\r\nmake\r\ncd /tmp/datasette\r\nLD_PRELOAD=/tmp/SQLite-5c9a6c06/.libs/libsqlite3.so pytest tests/test_internals_database.py\r\n```\r\nBUT failed with 3.37.0:\r\n```\r\n# 3.37.0\r\ncd /tmp\r\nwget https://www.sqlite.org/src/tarball/bd41822c/SQLite-bd41822c.tar.gz\r\ntar -xzvf SQLite-bd41822c.tar.gz\r\ncd SQLite-bd41822c\r\nCPPFLAGS=\"-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_RTREE=1\" ./configure\r\nmake\r\ncd /tmp/datasette\r\nLD_PRELOAD=/tmp/SQLite-bd41822c/.libs/libsqlite3.so pytest tests/test_internals_database.py\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1160407071, "label": "Test failures with SQLite 3.37.0+ due to column affinity case"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1647#issuecomment-1059807598", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1647", "id": 1059807598, "node_id": "IC_kwDOBm6k_c4_K2Fu", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-05T18:06:56Z", "updated_at": "2022-03-05T18:08:00Z", "author_association": "OWNER", "body": "Had a look through the commits in https://github.com/sqlite/sqlite/compare/version-3.37.2...version-3.38.0 but couldn't see anything obvious that might have caused this.\r\n\r\nReally wish I had a good mechanism for running the test suite against different SQLite versions!\r\n\r\nMay have to revisit this old trick: https://til.simonwillison.net/sqlite/ld-preload", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1160407071, "label": "Test failures with SQLite 3.37.0+ due to column affinity case"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1647#issuecomment-1059804577", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1647", "id": 1059804577, "node_id": "IC_kwDOBm6k_c4_K1Wh", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-05T17:49:46Z", "updated_at": "2022-03-05T17:49:46Z", "author_association": "OWNER", "body": "My best guess is that this is an undocumented change in SQLite 3.38 - I get that test failure with that SQLite version.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1160407071, "label": "Test failures with SQLite 3.37.0+ due to column affinity case"}, "performed_via_github_app": null}