1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-05 16:15:50 +03:00

Merge branch 'stable-23.10' into json_depth-rucha

This commit is contained in:
Rucha Deodhar
2025-06-03 16:29:29 +05:30
committed by GitHub
200 changed files with 2722 additions and 20812 deletions

View File

@@ -141,7 +141,7 @@ string Func_json_search::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& i
json_path_step_t savPath_steps[JSON_DEPTH_LIMIT], p_steps[JSON_DEPTH_LIMIT];
const CHARSET_INFO* cs = getCharset(fp[0]);
#ifdef MYSQL_GE_1009
#if MYSQL_VERSION_ID >= 100900
int arrayCounter[JSON_DEPTH_LIMIT];
bool hasNegPath = 0;
#endif
@@ -167,7 +167,7 @@ string Func_json_search::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& i
JSON_DEPTH_LIMIT, 0, MYF(0));
if (parseJSPath(path, row, fp[i]))
goto error;
#ifdef MYSQL_GE_1009
#if MYSQL_VERSION_ID >= 100900
hasNegPath |= path.p.types_used & JSON_PATH_NEGATIVE_INDEX;
#endif
}
@@ -181,7 +181,7 @@ string Func_json_search::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& i
while (json_get_path_next(&jsEg, &p) == 0)
{
#ifdef MYSQL_GE_1009
#if MYSQL_VERSION_ID >= 100900
if (hasNegPath && jsEg.value_type == JSON_VALUE_ARRAY &&
json_skip_array_and_count(&jsEg, arrayCounter + (((json_path_step_t*)(mem_root_dynamic_array_get_val(&p.steps, p.last_step_idx))) - (json_path_step_t*)p.steps.buffer)))
goto error;
@@ -189,7 +189,7 @@ string Func_json_search::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& i
if (json_value_scalar(&jsEg))
{
#ifdef MYSQL_GE_1009
#if MYSQL_VERSION_ID >= 100900
bool isMatch = matchJSPath(paths, &p, jsEg.value_type, arrayCounter);
#else
bool isMatch = matchJSPath(paths, &p, jsEg.value_type);