Commit ab9bd62
Varun Gupta
MDEV-22840: JSON_ARRAYAGG gives wrong results with NULL values and ORDER by clause
The problem here is similar to the case with DISTINCT, the tree used for ORDER BY needs to also hold the null bytes of the record. This was not done for GROUP_CONCAT as NULLS are rejected by GROUP_CONCAT. Also introduced a comparator function for the order by tree to handle null values with JSON_ARRAYAGG.1 parent 0f6f0da commit ab9bd62
File tree
4 files changed
+131
-5
lines changed- mysql-test/main
- sql
4 files changed
+131
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
1287 | 1312 | | |
1288 | 1313 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
794 | 794 | | |
795 | 795 | | |
796 | 796 | | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
797 | 815 | | |
798 | 816 | | |
799 | 817 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3667 | 3667 | | |
3668 | 3668 | | |
3669 | 3669 | | |
| 3670 | + | |
| 3671 | + | |
| 3672 | + | |
| 3673 | + | |
| 3674 | + | |
| 3675 | + | |
| 3676 | + | |
| 3677 | + | |
| 3678 | + | |
| 3679 | + | |
| 3680 | + | |
| 3681 | + | |
| 3682 | + | |
| 3683 | + | |
| 3684 | + | |
| 3685 | + | |
| 3686 | + | |
| 3687 | + | |
| 3688 | + | |
| 3689 | + | |
| 3690 | + | |
| 3691 | + | |
| 3692 | + | |
| 3693 | + | |
| 3694 | + | |
| 3695 | + | |
| 3696 | + | |
| 3697 | + | |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
| 3701 | + | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + | |
| 3714 | + | |
| 3715 | + | |
| 3716 | + | |
| 3717 | + | |
| 3718 | + | |
| 3719 | + | |
| 3720 | + | |
| 3721 | + | |
| 3722 | + | |
| 3723 | + | |
| 3724 | + | |
| 3725 | + | |
| 3726 | + | |
| 3727 | + | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + | |
| 3734 | + | |
| 3735 | + | |
3670 | 3736 | | |
3671 | 3737 | | |
3672 | 3738 | | |
| |||
4015 | 4081 | | |
4016 | 4082 | | |
4017 | 4083 | | |
4018 | | - | |
| 4084 | + | |
4019 | 4085 | | |
4020 | 4086 | | |
4021 | 4087 | | |
| |||
4101 | 4167 | | |
4102 | 4168 | | |
4103 | 4169 | | |
4104 | | - | |
4105 | | - | |
| 4170 | + | |
4106 | 4171 | | |
4107 | 4172 | | |
4108 | 4173 | | |
| |||
4306 | 4371 | | |
4307 | 4372 | | |
4308 | 4373 | | |
4309 | | - | |
4310 | | - | |
| 4374 | + | |
| 4375 | + | |
4311 | 4376 | | |
4312 | 4377 | | |
4313 | 4378 | | |
| |||
4384 | 4449 | | |
4385 | 4450 | | |
4386 | 4451 | | |
| 4452 | + | |
| 4453 | + | |
| 4454 | + | |
| 4455 | + | |
| 4456 | + | |
| 4457 | + | |
| 4458 | + | |
| 4459 | + | |
| 4460 | + | |
| 4461 | + | |
| 4462 | + | |
| 4463 | + | |
| 4464 | + | |
4387 | 4465 | | |
4388 | 4466 | | |
4389 | 4467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1853 | 1853 | | |
1854 | 1854 | | |
1855 | 1855 | | |
| 1856 | + | |
| 1857 | + | |
1856 | 1858 | | |
1857 | 1859 | | |
1858 | 1860 | | |
| |||
1920 | 1922 | | |
1921 | 1923 | | |
1922 | 1924 | | |
| 1925 | + | |
| 1926 | + | |
1923 | 1927 | | |
1924 | 1928 | | |
1925 | 1929 | | |
| |||
2010 | 2014 | | |
2011 | 2015 | | |
2012 | 2016 | | |
| 2017 | + | |
2013 | 2018 | | |
2014 | 2019 | | |
2015 | 2020 | | |
| |||
0 commit comments