From 1625c39b214c82e943e27b4c5569c1074a7626b9 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Wed, 6 May 2026 16:06:40 +1000 Subject: [PATCH] MDEV-39276: Assertion `0` failed in json_find_path This was resolved with MDEV-35548, however we add two additional test cases. --- mysql-test/main/func_json.result | 6 ++++++ mysql-test/main/func_json.test | 2 ++ 2 files changed, 8 insertions(+) diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result index e718e78b472f7..2b892c2545255 100644 --- a/mysql-test/main/func_json.result +++ b/mysql-test/main/func_json.result @@ -1788,6 +1788,12 @@ JSON_EXTRACT('0E+0','$') SELECT JSON_EXISTS(CONCAT('[', REPEAT('[', 4000), 'Y', REPEAT(']', 4000), ', 1]'), '$[100]') as je; je NULL +SELECT JSON_EXISTS('[[[[[Y[[[[n[[[[[[[[[[[n[[[Vn]]]]]]]]]]]]]],]]:]]]](', '$[0 to rrrrrRR-1]') as je; +je +NULL +SELECT JSON_EXISTS('[[[[[Y[[[[[[[[[[[[[[[[[[Vn]]]]]]]]]]]]]],]]:]]]](', '$[0 to rrrrRR-1]') as je; +je +NULL # # End of 10.6 tests # diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test index 2761d52c53737..ca2361eb92457 100644 --- a/mysql-test/main/func_json.test +++ b/mysql-test/main/func_json.test @@ -1247,6 +1247,8 @@ SELECT JSON_EXTRACT('{a:true}','$.a')=TRUE; SELECT JSON_EXTRACT('0E+0','$'); SELECT JSON_EXISTS(CONCAT('[', REPEAT('[', 4000), 'Y', REPEAT(']', 4000), ', 1]'), '$[100]') as je; +SELECT JSON_EXISTS('[[[[[Y[[[[n[[[[[[[[[[[n[[[Vn]]]]]]]]]]]]]],]]:]]]](', '$[0 to rrrrrRR-1]') as je; +SELECT JSON_EXISTS('[[[[[Y[[[[[[[[[[[[[[[[[[Vn]]]]]]]]]]]]]],]]:]]]](', '$[0 to rrrrRR-1]') as je; --echo # --echo # End of 10.6 tests