mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
mariadb: update to 10.11.6 and addon (1)
ann: - https://mariadb.org/mariadb-11-1-3-11-0-4-10-11-6-10-10-7-10-6-16-10-5-23-10-4-32-now-available/
This commit is contained in:
parent
04d3496195
commit
d50c2952c0
@ -2,9 +2,9 @@
|
|||||||
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
PKG_NAME="mariadb"
|
PKG_NAME="mariadb"
|
||||||
PKG_VERSION="10.11.5"
|
PKG_VERSION="10.11.6"
|
||||||
PKG_REV="0"
|
PKG_REV="1"
|
||||||
PKG_SHA256="4c9484048d4d0c71dd076ab33fc2a9ce8510bdf762886de0d63fe52496f3dbbb"
|
PKG_SHA256="1c0163463e98d71f4780741611a40981eee2bc44d392601ca49bbf948d04dd67"
|
||||||
PKG_LICENSE="GPL2"
|
PKG_LICENSE="GPL2"
|
||||||
PKG_SITE="https://mariadb.org"
|
PKG_SITE="https://mariadb.org"
|
||||||
PKG_URL="https://downloads.mariadb.com/MariaDB/${PKG_NAME}-${PKG_VERSION}/source/${PKG_NAME}-${PKG_VERSION}.tar.gz"
|
PKG_URL="https://downloads.mariadb.com/MariaDB/${PKG_NAME}-${PKG_VERSION}/source/${PKG_NAME}-${PKG_VERSION}.tar.gz"
|
||||||
|
@ -1,134 +0,0 @@
|
|||||||
From c657a1973e274b16db0631dc3862e276ab354564 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ruoyu Zhong <zhongruoyu@outlook.com>
|
|
||||||
Date: Sat, 19 Aug 2023 22:48:16 +0800
|
|
||||||
Subject: [PATCH 1/2] 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>
|
|
||||||
---
|
|
||||||
cmake/libfmt.cmake | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/cmake/libfmt.cmake b/cmake/libfmt.cmake
|
|
||||||
index 7eaa0dfa0128e..70b6a07216f90 100644
|
|
||||||
--- a/cmake/libfmt.cmake
|
|
||||||
+++ b/cmake/libfmt.cmake
|
|
||||||
@@ -33,8 +33,9 @@ MACRO (CHECK_LIBFMT)
|
|
||||||
#include <fmt/format-inl.h>
|
|
||||||
#include <iostream>
|
|
||||||
int main() {
|
|
||||||
+ int answer= 42;
|
|
||||||
fmt::format_args::format_arg arg=
|
|
||||||
- fmt::detail::make_arg<fmt::format_context>(42);
|
|
||||||
+ fmt::detail::make_arg<fmt::format_context>(answer);
|
|
||||||
std::cout << fmt::vformat(\"The answer is {}.\",
|
|
||||||
fmt::format_args(&arg, 1));
|
|
||||||
}" HAVE_SYSTEM_LIBFMT)
|
|
||||||
|
|
||||||
From bf43b3972c5e8f445dd439ecb28068e0e173aa5d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ruoyu Zhong <zhongruoyu@outlook.com>
|
|
||||||
Date: Sun, 20 Aug 2023 19:43:57 +0800
|
|
||||||
Subject: [PATCH 2/2] MDEV-31963 Fix libfmt usage in SFORMAT
|
|
||||||
|
|
||||||
`fmt::detail::make_arg` does not accept temporaries. Make it happy by
|
|
||||||
storing the format arg values in a temporary array first.
|
|
||||||
|
|
||||||
Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
|
|
||||||
---
|
|
||||||
sql/item_strfunc.cc | 43 ++++++++++++++++++++++++++++++++++++-------
|
|
||||||
1 file changed, 36 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
|
|
||||||
index 007e2bbc16f6f..4bbf36ec1cf30 100644
|
|
||||||
--- a/sql/item_strfunc.cc
|
|
||||||
+++ b/sql/item_strfunc.cc
|
|
||||||
@@ -1407,11 +1407,24 @@ namespace fmt {
|
|
||||||
*/
|
|
||||||
String *Item_func_sformat::val_str(String *res)
|
|
||||||
{
|
|
||||||
+ /*
|
|
||||||
+ A union that stores a numeric format arg value.
|
|
||||||
+ fmt::detail::make_arg does not accept temporaries, so all of its numeric
|
|
||||||
+ args are temporarily stored in the fmt_args array.
|
|
||||||
+ See: https://github.com/fmtlib/fmt/issues/3596
|
|
||||||
+ */
|
|
||||||
+ union Format_arg_store {
|
|
||||||
+ longlong val_int;
|
|
||||||
+ float val_float;
|
|
||||||
+ double val_double;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
DBUG_ASSERT(fixed());
|
|
||||||
- using ctx= fmt::format_context;
|
|
||||||
- String *fmt_arg= NULL;
|
|
||||||
- String *parg= NULL;
|
|
||||||
- fmt::format_args::format_arg *vargs= NULL;
|
|
||||||
+ using ctx= fmt::format_context;
|
|
||||||
+ String *fmt_arg= NULL;
|
|
||||||
+ String *parg= NULL;
|
|
||||||
+ fmt::format_args::format_arg *vargs= NULL;
|
|
||||||
+ Format_arg_store *fmt_args= NULL;
|
|
||||||
|
|
||||||
null_value= true;
|
|
||||||
if (!(fmt_arg= args[0]->val_str(res)))
|
|
||||||
@@ -1420,25 +1433,39 @@ String *Item_func_sformat::val_str(String *res)
|
|
||||||
if (!(vargs= new fmt::format_args::format_arg[arg_count - 1]))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
+ if (!(fmt_args= new Format_arg_store[arg_count - 1]))
|
|
||||||
+ {
|
|
||||||
+ delete [] vargs;
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/* Creates the array of arguments for vformat */
|
|
||||||
for (uint carg= 1; carg < arg_count; carg++)
|
|
||||||
{
|
|
||||||
switch (args[carg]->result_type())
|
|
||||||
{
|
|
||||||
case INT_RESULT:
|
|
||||||
- vargs[carg-1]= fmt::detail::make_arg<ctx>(args[carg]->val_int());
|
|
||||||
+ fmt_args[carg-1].val_int= args[carg]->val_int();
|
|
||||||
+ vargs[carg-1]= fmt::detail::make_arg<ctx>(fmt_args[carg-1].val_int);
|
|
||||||
break;
|
|
||||||
case DECIMAL_RESULT: // TODO
|
|
||||||
case REAL_RESULT:
|
|
||||||
if (args[carg]->field_type() == MYSQL_TYPE_FLOAT)
|
|
||||||
- vargs[carg-1]= fmt::detail::make_arg<ctx>((float)args[carg]->val_real());
|
|
||||||
+ {
|
|
||||||
+ fmt_args[carg-1].val_float= (float)args[carg]->val_real();
|
|
||||||
+ vargs[carg-1]= fmt::detail::make_arg<ctx>(fmt_args[carg-1].val_float);
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
- vargs[carg-1]= fmt::detail::make_arg<ctx>(args[carg]->val_real());
|
|
||||||
+ {
|
|
||||||
+ fmt_args[carg-1].val_double= args[carg]->val_real();
|
|
||||||
+ vargs[carg-1]= fmt::detail::make_arg<ctx>(fmt_args[carg-1].val_double);
|
|
||||||
+ }
|
|
||||||
break;
|
|
||||||
case STRING_RESULT:
|
|
||||||
if (!(parg= args[carg]->val_str(&val_arg[carg-1])))
|
|
||||||
{
|
|
||||||
delete [] vargs;
|
|
||||||
+ delete [] fmt_args;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
vargs[carg-1]= fmt::detail::make_arg<ctx>(*parg);
|
|
||||||
@@ -1448,6 +1475,7 @@ String *Item_func_sformat::val_str(String *res)
|
|
||||||
default:
|
|
||||||
DBUG_ASSERT(0);
|
|
||||||
delete [] vargs;
|
|
||||||
+ delete [] fmt_args;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1471,6 +1499,7 @@ String *Item_func_sformat::val_str(String *res)
|
|
||||||
null_value= true;
|
|
||||||
}
|
|
||||||
delete [] vargs;
|
|
||||||
+ delete [] fmt_args;
|
|
||||||
return null_value ? NULL : res;
|
|
||||||
}
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user