Skip to content

MySQL-on-SQLite lacks geo query function compatibility #455

Description

@chubes4

Bug

The current MySQL-on-SQLite driver cannot execute common MySQL geo expressions combining RADIANS(), COS(), SIN(), and SUBSTRING_INDEX() over a comma-separated coordinate value. WP Codebox calendar PHPUnit cases reach these queries but the compatibility layer reports database errors instead of translating or providing the functions.

Representative expression:

RADIANS(CAST(SUBSTRING_INDEX(meta_value, ',', 1) AS DECIMAL(10,7)))

Runtime

  • WordPress Playground / WP Codebox
  • WordPress 7.0.2
  • PHP 8.3.31
  • SQLite integration path: wp-includes/database/sqlite/class-wp-pdo-mysql-on-sqlite.php

Expected

Provide compatibility for these MySQL scalar functions, or document a compatibility-layer primitive for registering them in test runtimes.

Impact

This blocks geo-filter assertions in Extra-Chill/data-machine-events CalendarAbilitiesTest under the SQLite-backed WP Codebox runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions