1
0
mirror of https://github.com/MariaDB/server.git synced 2025-04-18 21:44:20 +03:00

4 Commits

Author SHA1 Message Date
Marko Mäkelä
5e8714b7b2 Merge 11.7 into main 2025-01-09 13:46:06 +02:00
Eric Herman
7734c85c31 unittest output improvement for json_normalize-t
The ok() function outputs the TAP context string in both the success
and failure cases. The strings were worded to make sense in the
failure case, yet were confusing in the success case. This changes
the strings to be appropriate, and even more informative in either
the success or failure cases.  In the cases where input, expected,
and result values are included in the context string, they have been
adjusted such that expected and actual result values are aligned for
easy visual comparison.

Signed-off-by: Eric Herman <eric@freesa.org>
2024-12-18 10:12:34 +11:00
Dave Gosselin
9428647be3 MDEV-35585 unit.json_normalize crashes on mac
Like MDEV-35583, initialize THR_KEY_mysys explicitly by calling MY_INIT
and my_end.
2024-12-09 11:42:45 +02:00
Eric Herman
105e4148bf Add json_normalize function to json_lib
This patch implements a library for normalizing json documents.
The algorithm is:
* Recursively sort json keys according to utf8mb4_bin collation.
* Normalize numbers to be of the form [-]<digit>.<frac>E<exponent>
* All unneeded whitespace and line endings are removed.
* Arrays are not sorted.

Co-authored-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
2021-07-21 16:32:11 +03:00