@@ -549,7 +549,7 @@ bool Item_func_json_exists::fix_length_and_dec()
549549bool Item_func_json_exists::val_bool ()
550550{
551551 json_engine_t je;
552- uint array_counters[JSON_DEPTH_LIMIT];
552+ uint array_counters[JSON_DEPTH_LIMIT]= { 0 } ;
553553
554554 String *js= args[0 ]->val_json (&tmp_js);
555555
@@ -614,7 +614,7 @@ bool Json_path_extractor::extract(String *str, Item *item_js, Item *item_jp,
614614{
615615 String *js= item_js->val_json (&tmp_js);
616616 int error= 0 ;
617- uint array_counters[JSON_DEPTH_LIMIT];
617+ uint array_counters[JSON_DEPTH_LIMIT]= { 0 } ;
618618
619619 if (!parsed)
620620 {
@@ -1368,7 +1368,7 @@ bool Item_func_json_contains::val_bool()
13681368
13691369 if (arg_count>2 ) /* Path specified. */
13701370 {
1371- uint array_counters[JSON_DEPTH_LIMIT];
1371+ uint array_counters[JSON_DEPTH_LIMIT]= { 0 } ;
13721372 if (!path.parsed )
13731373 {
13741374 String *s_p= args[2 ]->val_str (&tmp_path);
@@ -1505,7 +1505,7 @@ longlong Item_func_json_contains_path::val_int()
15051505 result= !mode_one;
15061506 for (n_arg=2 ; n_arg < arg_count; n_arg++)
15071507 {
1508- uint array_counters[JSON_DEPTH_LIMIT];
1508+ uint array_counters[JSON_DEPTH_LIMIT]= { 0 } ;
15091509 json_path_with_flags *c_path= paths + n_arg - 2 ;
15101510 if (!c_path->parsed )
15111511 {
@@ -1895,7 +1895,7 @@ String *Item_func_json_array_append::val_str(String *str)
18951895
18961896 for (n_arg=1 , n_path=0 ; n_arg < arg_count; n_arg+=2 , n_path++)
18971897 {
1898- uint array_counters[JSON_DEPTH_LIMIT];
1898+ uint array_counters[JSON_DEPTH_LIMIT]= { 0 } ;
18991899 json_path_with_flags *c_path= paths + n_path;
19001900 if (!c_path->parsed )
19011901 {
@@ -2025,7 +2025,7 @@ String *Item_func_json_array_insert::val_str(String *str)
20252025
20262026 for (n_arg=1 , n_path=0 ; n_arg < arg_count; n_arg+=2 , n_path++)
20272027 {
2028- uint array_counters[JSON_DEPTH_LIMIT];
2028+ uint array_counters[JSON_DEPTH_LIMIT]= { 0 } ;
20292029 json_path_with_flags *c_path= paths + n_path;
20302030 const char *item_pos;
20312031 uint n_item;
@@ -2821,7 +2821,7 @@ longlong Item_func_json_length::val_int()
28212821 String *js= args[0 ]->val_json (&tmp_js);
28222822 json_engine_t je;
28232823 uint length= 0 ;
2824- uint array_counters[JSON_DEPTH_LIMIT];
2824+ uint array_counters[JSON_DEPTH_LIMIT]= { 0 } ;
28252825 int err;
28262826
28272827 if ((null_value= args[0 ]->null_value ))
@@ -3060,7 +3060,7 @@ String *Item_func_json_insert::val_str(String *str)
30603060
30613061 for (n_arg=1 , n_path=0 ; n_arg < arg_count; n_arg+=2 , n_path++)
30623062 {
3063- uint array_counters[JSON_DEPTH_LIMIT];
3063+ uint array_counters[JSON_DEPTH_LIMIT]= { 0 } ;
30643064 json_path_with_flags *c_path= paths + n_path;
30653065 const char *v_to;
30663066 const json_path_step_t *lp;
@@ -3314,7 +3314,7 @@ String *Item_func_json_remove::val_str(String *str)
33143314
33153315 for (n_arg=1 , n_path=0 ; n_arg < arg_count; n_arg++, n_path++)
33163316 {
3317- uint array_counters[JSON_DEPTH_LIMIT];
3317+ uint array_counters[JSON_DEPTH_LIMIT]= { 0 } ;
33183318 json_path_with_flags *c_path= paths + n_path;
33193319 const char *rem_start= 0 , *rem_end;
33203320 const json_path_step_t *lp;
@@ -3526,7 +3526,7 @@ String *Item_func_json_keys::val_str(String *str)
35263526 json_engine_t je;
35273527 String *js= args[0 ]->val_json (&tmp_js);
35283528 uint n_keys= 0 ;
3529- uint array_counters[JSON_DEPTH_LIMIT];
3529+ uint array_counters[JSON_DEPTH_LIMIT]= { 0 } ;
35303530
35313531 if ((args[0 ]->null_value ))
35323532 goto null_return;
0 commit comments