Commit 5ca64e6
committed
MDEV-32287: JSON_EXTRACT not returning multiple values for same path
Analysis: When scanning json and getting the exact path at each step, if a path is reached, we end up adding the item in the result and immediately get the next item which results in current path changing. Fix: Instead of immediately returning the item, count the occurences of the path in argument and append in the result as needed.1 parent d7df63e commit 5ca64e6
File tree
3 files changed
+31
-8
lines changed- mysql-test/main
- sql
3 files changed
+31
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1690 | 1690 | | |
1691 | 1691 | | |
1692 | 1692 | | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
1693 | 1699 | | |
1694 | 1700 | | |
1695 | 1701 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1115 | 1115 | | |
1116 | 1116 | | |
1117 | 1117 | | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
1118 | 1126 | | |
1119 | 1127 | | |
1120 | 1128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
893 | 893 | | |
894 | 894 | | |
895 | 895 | | |
896 | | - | |
| 896 | + | |
897 | 897 | | |
898 | 898 | | |
| 899 | + | |
899 | 900 | | |
900 | 901 | | |
901 | 902 | | |
902 | | - | |
| 903 | + | |
903 | 904 | | |
904 | | - | |
| 905 | + | |
905 | 906 | | |
906 | 907 | | |
907 | 908 | | |
| |||
925 | 926 | | |
926 | 927 | | |
927 | 928 | | |
928 | | - | |
| 929 | + | |
929 | 930 | | |
930 | 931 | | |
931 | 932 | | |
| |||
972 | 973 | | |
973 | 974 | | |
974 | 975 | | |
975 | | - | |
| 976 | + | |
976 | 977 | | |
977 | 978 | | |
978 | 979 | | |
| |||
1002 | 1003 | | |
1003 | 1004 | | |
1004 | 1005 | | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
1008 | 1012 | | |
1009 | 1013 | | |
1010 | 1014 | | |
| |||
1025 | 1029 | | |
1026 | 1030 | | |
1027 | 1031 | | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
1028 | 1037 | | |
1029 | 1038 | | |
1030 | 1039 | | |
| |||
0 commit comments