sqlite-database-integration icon indicating copy to clipboard operation
sqlite-database-integration copied to clipboard

Support a = BINARY b

Open adamziel opened this issue 2 years ago • 2 comments

MySQL supports syntax like a = BINARY b that SQLite don't. I think it's the same as a = CAST(b as BINARY) – so a byte-by-byte comparison, or, effectively, a case-sensitive comparison – but that needs to be confirmed. Let's support it.

adamziel avatar Apr 12 '23 10:04 adamziel

This seems to be the cause of an error thrown by wp-cli using search-replace which creates queries like

SELECT `meta_id` FROM `wp_commentmeta`  WHERE `meta_value` LIKE BINARY '%search%' ORDER BY `meta_id` ASC LIMIT 1000 OFFSET 0

mdbraber avatar May 31 '23 17:05 mdbraber

Another alternative might be SQLite GLOB, as referenced in the duplicate issue above.

batonac avatar Jul 18 '23 20:07 batonac