With these in place Lintian will pass without errors (only warnings) and
the CI systems will at least be able to stop anybody from introducing
new Lintian errors.
Manages the security risk in way that also fixes Lintian warning:
W: mariadb-server-10.5: setuid-binary
usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool 4755 root/root
Applied downstream in
9605a48a99
There are still some differences in due to systemd and service triggers,
but these differences make sense and are likely to be synced the other
way later so that downstream Debian official packaging adopts them.
The synced changes include among others:
- 9f49e4b494
- 6440c0d6e7
- 6e5ee72d64
- e62e67ae4b
- df2415a53d
- 643558da74
These changes are in line with what has been changes in downstream Debian
and they fix the following errors:
$ check_for_missing_breaks_replaces.py -o ${WORKING_DIR}/missing_breaks.xml --changes-file ${WORKING_DIR}/*.changes
[ERROR] mariadb-client-10.5 conflicts with mytop files: {'/usr/bin/mytop'}
[ERROR] mariadb-client-10.5 conflicts with mariadb-client-core-10.3 files: {'/usr/bin/mysqlcheck'}
[ERROR] mariadb-server-10.5 conflicts with mariadb-server-core-10.3 files: {'/usr/share/man/man1/resolveip.1.gz', '/usr/bin/resolveip', '/usr/share/mysql/mysql_test_data_timezone.sql'}
[ERROR] mariadb-client-10.5 conflicts with mysql-client-core-5.7 files: {'/usr/bin/mysqlcheck'} [ERROR] mariadb-server-10.5 conflicts with mariadb-server-core-10.3 files: {'/usr/share/man/man1/resolveip.1.gz', '/usr/bin/resolveip', '/usr/share/mysql/mysql_test_data_timezone.sql'}
[ERROR] mariadb-server-10.5 conflicts with mysql-client-5.7 files: {'/usr/bin/myisam_ftdump', '/usr/share/man/man1/myisam_ftdump.1.gz'}
[ERROR] mariadb-server-core-10.5 conflicts with mysql-server-5.7 files: {'/usr/share/mysql/mysql_test_data_timezone.sql', '/usr/bin/resolveip', '/usr/share/man/man1/resolveip.1.gz'}
[ERROR] mariadb-test conflicts with mysql-server-5.7 files: {'/usr/lib/mysql/plugin/adt_null.so', '/usr/lib/mysql/plugin/mypluglib.so'}
- Ensure cmake builds also apply CPPFLAGS flags for hardening to fully work
fc4f33cf40
- Install Ubuntu Apport files in the same way with same filename.
- MDEV-21705: Build flags to keep WolfSSL from crashing
- Clean away sql-bench from packaging immediately after build step.
- Delete private files from libraries so they don't get shipped in the -dev
packages.
- Make full contents, also header files, explicit in -dev packages
fb77df0c75
- Don't ship private header files at all.
- Ship both libmariadb.pc and maridb.pc.
- Ship mysql_config only as a symlink.
- Keep 'mariadbcheck' as symlink as somebody could have used it already
d0466f74d5
- The mariadb.pc is the server pkg-config, ship in libmariadbd-dev.
- The client pkg-config is called libmariadb.pc. Ship only it in the client
library packages.
Use versioned breaks/replaces for mysql* packages we also provide and fix:
[ERROR] libmariadb-dev conflicts with libmysqlclient-dev files:
{'/usr/share/man/man1/mysql_config.1.gz', '/usr/share/aclocal/mysql.m4'}
[ERROR] libmariadb-dev conflicts with libmysqld-dev files:
{'/usr/lib/x86_64-linux-gnu/libmysqlservices.a'}
- Remove versioned depends that are far outdated and not relevant anymore
in 2020.
- Link with libedit instead of unmaintained readline5
d8796a0e3b
- Add [linux-any] for Linux specific depends and other smaller control
file tweaks.
- Update .travis-ci.yml to match.
- Also fixes the Debian autopkgtest detected error:
ERROR 1231 (42000) at line 1: Variable 'innodb_compression_algorithm'
can't be set to the value of 'lz4'
Drop Aliases from the service file directive. Aliases in the service
file only take effect when the service is enabled. This is the case
because Aliases in service files do not have to be unique across various
services.
Shipping symlinks guarantees that one can always enable mariadb service
using `systemctl enable mysql` or `systemctl enable mysqld` and makes
the commands indempotent.
When executing a query like "select id, 0 as const, val from ...", there are 3 columns(items) in Query->select at handlerton->create_group_by(). After that, MariaDB makes a temporary table with 2 columns. The skipped items are const item, so fixing Spider to skip const items for items at Query->select.
- On Windows, do not handle lack of SeLockMemory privilege as fatal error.
Just like on any other platform, there is a fallback to ordinary pages.
It is better than server that does not start, silently.
- On Windows, remove incorrect irritating "fallback to conventional pages failed"
from the warning, when allocating large pages fails.
The test innodb.innodb_wl6326 that had been disabled in 10.4 due to
MDEV-21535 is failing on 10.5 due to a different reason: the removal
of the MLOG_COMP_END_COPY_CREATED operations in MDEV-12353
commit 276f996af9 caused PAGE_LAST_INSERT
to be set to something nonzero by the function page_copy_rec_list_end().
This in turn would cause btr_page_get_split_rec_to_right() to behave
differently: we would not attempt to split the page at all, but simply
insert the new record into the new, empty, right leaf page.
Even though the change reduced the sizes of some tables, it is better
to aim for balanced trees.
page_copy_rec_list_end(), PageBulk::finishPage():
Preserve PAGE_LAST_INSERT, PAGE_N_DIRECTION, PAGE_DIRECTION.
PageBulk::finish(): Move some common code from PageBulk::finishPage().
Without this, the mtr will fail to load client plugins and the following
tests would fail:
- main.plugin_auth_qa_2
- main.plugin_auth_qa_3
- main.plugin_auth
- plugins.multiauth
- plugins.auth_ed25519
When testing installed packages, the client (mariadb or mysql) can have
plugins stored in a separate location compared to server. This change
ensures that the correct paths are used for the plugin-dir directive in
the my.cnf generated by mysql-test-run.
The directives in my.cnf will be replaced like so:
[client]
plugin-dir=$client_plugindir
[mysqld]
plugin-dir=$plugindir
where $<variable-name> corresponds to the variable name in mtr.
As this was missing, the libmariadb/install.cmake section for Debian
builds was not triggered at all, and existing fixes to make the
Debian paths correct did not apply.
Update libmariadb3 paths in Debian packaging after MariaDB Connector C
3.1.8 upgrade
Also now include caching_sha2_password.so which was previously omitted.
Keep old libmariadbclient.a as symbolic link for backwards compatibility.
Closes: CONC-304
Related: CONC-456, MDEV-22150
`inited == NONE` at the initialization time does not always mean
that it'll be `NONE` later, at the execution time. Use a more complex
caller-specific logic to decide whether to create a cloned lookup handler.
Besides LOAD (as in the original bug report) make sure that all
prepare_for_insert() invocations are covered by tests. Add tests for
CREATE ... SELECT, multi-UPDATE, and multi-DELETE.
Don't enable write cache with long uniques.
CMake parameter
This includes compiler-specific dependencies
- tiny part of CRT, mostly memcpy/memset in msvcr140.dll
- exception handling in msvc140_1.dll
- C++ standard library in msvcp140
not much else
CMake is smart enough to copy the dependencies into the bin directory
itself.
Stop linking plugins to the server executable on Windows.
Instead, extract whole server functionality into a large DLL, called
server.dll. Link both plugins, and small server "stub" exe to it.
This eliminates plugin dependency on the name of the server executable.
It also reduces the size of the packages (since tiny mysqld.exe
and mariadbd.exe are now both linked to one big DLL)
Also, simplify the functionality of exporing all symbols from selected
static libraries. Rely on WINDOWS_EXPORT_ALL_SYMBOLS, rather than old
self-backed solution.
fix compile error
replace GetProcAddress(GetModuleHandle(NULL), "variable_name")
for server exported data with actual variable names.
Runtime loading was never required,was error prone
, since symbols could be missing at runtime, and now it actually failed,
because we do not export symbols from executable anymore, but from a shared
library
This did require a MYSQL_PLUGIN_IMPORT decoration for the plugin,
but made the code more straightforward, and avoids missing symbols at
runtime (as mentioned before).
The audit plugin is still doing some dynamic loading, as it aims to work
cross-version. Now it won't work cross-version on Windows, as it already
uses some symbols that are *not* dynamically loaded, e.g fn_format
and those symbols now exported from server.dll , when earlier they were
exported by mysqld.exe
Windows, fixes for storage engine plugin loading
after various rebranding stuff
Create server.dll containing functionality of the whole server
make mariadbd.exe/mysqld.exe a stub that is only calling mysqld_main()
fix build
- InnoDB is doing un-necessary redo log page initialisation during
recovery and unnecessary traversal of redo log during last phase.
This patch does the optimization of removing unnecessary redo log page
initialisation and detects the memory exhaust earlier.
On by default, suppress "fallback to conventional memory"
warnings as we're never sure what the test has available.
Leave off Windows test for now. Running without SeLockMemoryPrivilege
is fatal if --large-pages is specified.
Both Windows and MMAP capable implementations fell back to a
non-MEM_LARGE_PAGES/HugeTLB allocation with the large page implementaion
failed. These can can be freed by the corresponding function.
Prior to this, if we fell back to a conventional memory, than will
results in deallocation using munmap/VirtualFree on a memory allocated
using my_malloc_lock. At worst this could succeed and the
my_malloc_lock looses its memory without knowing about it.
Changed wording in error messages from MySQL to MariaDB. In
cases where the word server could be used instead it was done.
Tests that have these errors recorded were updated.
In a multi-batch recovery, we must ensure that INIT_PAGE and
especially the MDEV-15528 FREE_PAGE records will be taken
properly into account.
Writing a FREE_PAGE record gives the server permission to omit
a page write. If recovery insists on applying log to a page
whose page flush has been omitted, then the consistency checks
in the application of high-level redo log records (appending
an undo log record, inserting or deleting an index record)
will likely fail.
mlog_init_t::add(): Return whether the state was changed.
mlog_init_t::will_avoid_read(): Determine whether a page read
will be avoided and whether older log records can be safely
skipped.
recv_sys_t::parse(): Even if store==STORE_NO, process the records
INIT_PAGE and FREE_PAGE. While processing them, we can delete older
redo log records for the page. If store!=STORE_NO, we can directly
skip redo log recods of other types if mlog_init indicates that the
page will be freed or initialized by at a later LSN.
This fix was developed in cooperation with
Thirunarayanan Balathandayuthapani.
There is a 4 MB hard limit on Travis-CI and build output needs to be less
than that. Silencing the 'make install' step gets rid of a lot of
"Installing.." and "Missing.." and removing all mysql-test files will
make the dh_missing warnings much shorter.