Quick workaround for BLOB as TEXT problem (#2247) #2248

Open
kashikoibumi wants to merge 3 commits from kashikoibumi/strict-blob into v0.6
kashikoibumi commented 2024-05-30 11:23:22 +02:00 (Migrated from github.com)

Quick workaround for BLOB as TEXT problem (#2247).

This patch fixes each SQL query to be both workable with BLOB-keys and TEXT-keys.
In each query, it tries first BLOB-key by using sqlite3.Binary() function.
When it failed, then it tries next TEXT-key by using CAST(? AS TEXT) syntax.

The modifications are all around the code base where SQL queries exist, but the logic is simple.

Quick workaround for BLOB as TEXT problem (#2247). This patch fixes each SQL query to be both workable with BLOB-keys and TEXT-keys. In each query, it tries first BLOB-key by using sqlite3.Binary() function. When it failed, then it tries next TEXT-key by using CAST(? AS TEXT) syntax. The modifications are all around the code base where SQL queries exist, but the logic is simple.
kashikoibumi commented 2024-05-30 14:28:54 +02:00 (Migrated from github.com)

I have added a script to revert the BLOB-keys into TEXT-keys.

  • revert_blob_to_text.sh

By applying this script, old version of PyBitmessage before this patch can be run again.

I have added a script to revert the BLOB-keys into TEXT-keys. * revert_blob_to_text.sh By applying this script, old version of PyBitmessage before this patch can be run again.
This repo is archived. You cannot comment on pull requests.
No description provided.