maria:bb-10.3-MDEV-29644

Last commit made on 2022-10-24
Get this branch:
git clone -b bb-10.3-MDEV-29644 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.3-MDEV-29644
Repository:
lp:maria

Recent commits

1e16921... by Nayuta Yanagisawa

MDEV-29644 a potential bug of null pointer dereference in spider_db_mbase::print_warnings()

The function spider_db_mbase::print_warnings() can potentially result
in a null pointer dereference.

Remove the null pointer dereference by cleaning up the function.

68fb05c... by Sergei Golubchik

MDEV-29851 Cached role privileges are not invalidated when needed

GRANT ROLE can update db-level privileges -> must invalidate acl_cache

7a2f995... by Sergei Golubchik

cleanup: rename test file

741c14c... by Sergei Golubchik

remove two acl_cache->clear()

* to "clear hostname cache" one needs to use hostname_cache->clear()
* no need to clear acl_cache for SET DEFAULT ROLE

16d4431... by Sergei Golubchik

CONNECT: compile with libxml2 2.10.x

storage/connect/libdoc.cpp:603:17: error: 'void xmlXPathInit()' is deprecated [-Werror=deprecated-declarations]

0609b34... by Sergei Golubchik

disable LTO in debian builds

3e377fd... by Sergei Golubchik

MDEV-15795 Stack exceeded if pthread_attr_setstacksize(&thr_attr,8196) succeeds

on Linux this pthread_attr_setstacksize() fails with EINVAL
"The stack size is less than PTHREAD_STACK_MIN (16384) bytes".

But on FreeBSD it succeeds and causes a crash later, as 8196 is too little.

Let's keep the stack at its default size in the timer thread.

68391ac... by Sergei Golubchik

fix for x86 and other 32-bit little engian arch

(and for 64-bit big endian)

45755c4... by Haidong Ji <email address hidden>

Use OPENSSL_free instead of free to avoid instance crash

OpenSSL handles memory management using **OPENSSL_xxx** API[^1]. For
allocation, there is `OPENSSL_malloc`. To free it, `OPENSSL_free` should
be called.

We've been lucky that OPENSSL (and wolfSSL)'s implementation allowed the
usage of `free` for memory cleanup. However, other OpenSSL forks, such
as AWS-LC[^2], is not this forgiving. It will cause a server crash.

Test case `openssl_1` provides good coverage for this issue. If a user
is created using:
`grant select on test.* to user1@localhost require SUBJECT "...";`
user1 will crash the instance during connection under AWS-LC.

There have been numerous OpenSSL forks[^3]. Due to FIPS[^4] and other
related regulatory requirements, MariaDB will be built using them. This
fix will increase MariaDB's adaptability by using more compliant and
generally accepted API.

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.

[^1]: https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_malloc.html
[^2]: https://github.com/awslabs/aws-lc
[^3]: https://en.wikipedia.org/wiki/OpenSSL#Forks
[^4]: https://en.wikipedia.org/wiki/FIPS_140-2

e462171... by Daniel Black

MDEV-29678 Valgrind/MSAN uninitialised value errors upon PS with ALTER under ONLY_FULL_GROUP_BY

st_select_lex::init_query is called in the exectuion of EXECUTE
IMMEDIATE 'alter table ...'. so reset the initialization at the
same point we set join= 0.