Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#11558·dolt

Dolt ignores default backslash escaping for wildcard characters in a window child

Author: Yibo-DongCreated Aug 18, 2026Updated Sep 29, 2026
Labelsbugsqlgood reprocustomer issuecorrectness

What happened

Dolt treats the default backslash escape in LIKE as an ordinary character when the LIKE expression is evaluated below FIRST_VALUE, while an explicit ESCAPE clause still works.

Environment

Dolt main commit c3b5ce3c67f8677ca08a0a58d8c03cdc95bff8b7, dolt version 2.3.0; MySQL 8.0.43 is the oracle.

How to reproduce

Run this SQL in a fresh Dolt repository.

sql
SELECT FIRST_VALUE('a_%' LIKE 'a\_\%') OVER () AS default_x1,
       FIRST_VALUE('aX%' LIKE 'a\_\%') OVER () AS default_x2,
       FIRST_VALUE('a_%' LIKE 'a!_!%' ESCAPE '!') OVER () AS explicit_x1,
       FIRST_VALUE('aX%' LIKE 'a!_!%' ESCAPE '!') OVER () AS explicit_x2
FROM (SELECT 1 AS z) q;

Expected result

MySQL 8.0.43 returns:

default_x1  default_x2  explicit_x1  explicit_x2
1           0           1            0

Actual result

Dolt returns:

default_x1  default_x2  explicit_x1  explicit_x2
true        true        true         false

Source: dolthub/dolt

View original on GitHubView discussion on GitHub