Commit graph

11 commits

Author SHA1 Message Date
Oleksandr Byelkin
649e08f8b3 new libfmt 11.0.2 2024-10-15 14:17:24 +02:00
Meng-Hsiu Chiang
21b20712a3 Replace using of internal fmt lib API with public API
The commit cd5808eb introduced a union as a storage for the format
argument passed to the internal API fmt::detail::make_arg. This was done
to solve the issue that the internal API no longer accepted temporary
variables.

However, it's generally better to avoid using internal APIs, as they are
more likely to have breaking changes in the future. Instead, we can use
the public API fmt::dynamic_format_arg_store to dynamically build the
argument list. This API accepts temporary variables, and its behavior is
more stable than the internal API. `libfmt.cmake` is updated to reflect
the change as well.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2024-09-30 16:25:13 +01:00
Oleksandr Byelkin
0f6f1114d4 new libfmt 11.0.1 2024-07-19 15:00:10 +02:00
Daniel Black
579450c2c1 MDEV-34528: bundle fmt version 11.0.0
Numerous fixes included from upstream.

/utf8 needed for Windows, but may as well
enable globally.
2024-07-10 09:56:19 +10:00
Sergei Golubchik
b5c367cd88 MDEV-32815 test main.func_sformat Locale + test failures under Fedora 39 (fmt-10.0.0+)
FMT_STATIC_THOUSANDS_SEPARATOR stopped working in 10.0.0
Let's not use this fmt version for now
2024-02-01 18:35:18 +01:00
Ruoyu Zhong
f4cec369a3 MDEV-31963 cmake: fix libfmt usage
`fmt::detail::make_arg` does not accept temporaries, so the code snippet
checking system libfmt needs to be adjusted.

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2023-08-28 15:50:46 +10:00
Daniel Black
32ab64c390 MDBF-348: libfmt=system, custom include path
With testing the system libfmt, use the
LIBFMT_INCLUDE_DIR in case the system
include path isn't sufficient.
2022-04-01 20:53:22 +11:00
Sergei Golubchik
2897ef099c libfmt fix for cmake <3.0
this is CentOOOOOOS 7
2021-10-25 21:37:16 +02:00
Sergei Golubchik
ba7287df61 disallow old <7.0 fmt
libfmt 6.1 is in Ubuntu focal repositories.
it's easy to compile with 6.1 by doing
#define detail internal

but 6.1 also produces different results in main.func_sformat
and we want MariaDB to behave identically everywhere.
2021-10-12 13:28:10 +02:00
Sergei Golubchik
fe65ca0176 don't build bundled libfmt, we use it in header-only mode anyway 2021-10-12 13:28:10 +02:00
Alan Cueva
e214e60201 MDEV-25015 Custom formatting of strings in MariaDB queries
SFORMAT() SQL function that uses fmtlib (https://fmt.dev/)
for python-like (also Rust, C++20, etc) string formatting

Only fmtlib 7.0.0+ is supported, older fmtlib
produces different results in the test.

No native support for temporal and decimal values,
* TIME_RESULT is handled as STRING_RESULT
* DECIMAL_RESULT as REAL_RESULT
2021-10-12 13:27:36 +02:00