Skip to content

Commit aadf8ba

Browse files
committed
Remove PRAGMA case_sensitive_like — unsupported by SQLite drop-in
The SQLite integration drop-in intercepts all $wpdb->query() calls and translates MySQL to SQLite. PRAGMA is not a MySQL statement, so the translator rejects it with "Unknown query type: PRAGMA". Removing this is safe: on SQLite, all columns already use the PHP processing path (due to the REGEXP fallback), and PHP's str_replace handles case-sensitivity correctly regardless of LIKE behavior.
1 parent 7122c44 commit aadf8ba

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/Search_Replace_Command.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,6 @@ class Search_Replace_Command extends WP_CLI_Command {
292292
public function __invoke( $args, $assoc_args ) {
293293
global $wpdb;
294294

295-
// Enable case-sensitive LIKE for SQLite to match MySQL's LIKE BINARY behavior.
296-
if ( 'sqlite' === Utils\get_db_type() ) {
297-
$wpdb->query( 'PRAGMA case_sensitive_like = ON' );
298-
}
299-
300295
// Support --old and --new flags as an alternative to positional arguments.
301296
// This allows users to search/replace strings that start with '--'.
302297
$old_flag = Utils\get_flag_value( $assoc_args, 'old' );

0 commit comments

Comments
 (0)