Commit d7df63e
committed
MDEV-19487: JSON_TYPE doesnt detect the type of String Values
(returns NULL) and for Date/DateTime returns "INTEGER" Analysis: When the first character of json is scanned it is number. Based on that integer is returned. Fix: Scan rest of the json before returning the final result to ensure json is valid in the first place in order to have a valid type.1 parent c6e3fe2 commit d7df63e
File tree
4 files changed
+36
-5
lines changed- mysql-test
- main
- suite/json/r
- sql
4 files changed
+36
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1697 | 1697 | | |
1698 | 1698 | | |
1699 | 1699 | | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
1700 | 1708 | | |
1701 | 1709 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1125 | 1125 | | |
1126 | 1126 | | |
1127 | 1127 | | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
1128 | 1135 | | |
1129 | 1136 | | |
1130 | 1137 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1002 | 1002 | | |
1003 | 1003 | | |
1004 | 1004 | | |
1005 | | - | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
1006 | 1008 | | |
1007 | 1009 | | |
1008 | 1010 | | |
1009 | 1011 | | |
1010 | 1012 | | |
1011 | | - | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
1012 | 1016 | | |
1013 | 1017 | | |
1014 | | - | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
1015 | 1021 | | |
1016 | 1022 | | |
1017 | | - | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
1018 | 1026 | | |
1019 | 1027 | | |
1020 | 1028 | | |
| |||
1064 | 1072 | | |
1065 | 1073 | | |
1066 | 1074 | | |
1067 | | - | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
1068 | 1078 | | |
1069 | 1079 | | |
1070 | 1080 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2971 | 2971 | | |
2972 | 2972 | | |
2973 | 2973 | | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
2974 | 2980 | | |
2975 | 2981 | | |
2976 | 2982 | | |
| |||
0 commit comments