Commit graph

189072 commits

Author SHA1 Message Date
Daniel Black
2c00502014 my_largepage: reduce includes already in my_global.h 2020-04-08 14:51:14 +04:00
Daniel Black
96d4b228ea my_large_pages: simplify solaris constants 2020-04-08 14:51:14 +04:00
Daniel Black
7b7a9161e2 my_large_pages: remove conventional memory(my_malloc_lock) fallback
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.
2020-04-08 14:51:14 +04:00
Marko Mäkelä
ccc06931c3 Merge 10.4 into 10.5 2020-04-08 10:36:41 +03:00
Marko Mäkelä
476966b3fb MDEV-21535 Unnecessarily large ha_innobase::records_in_range() scans
The bug was already fixed in
commit 1242eb3d32
but the test innodb.innodb_wl6326 had not been enabled.
2020-04-08 09:59:00 +03:00
Rasmus Johansson
9075973dbf MDEV-17812 Use MariaDB in error messages instead of MySQL
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.
2020-04-08 06:09:42 +00:00
Marko Mäkelä
0eab87cef2 MDEV-22010: Allow mariadbd in mtr suppressions 2020-04-07 17:20:38 +03:00
Marko Mäkelä
1738c0f1be MDEV-22169 Recovery fails after failing to insert into mlog_init
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.
2020-04-07 17:18:05 +03:00
Daniel Black
d848fcad69 MDEV-22010: mtr, "mariadbd" exists in mysys error messages
Also executable can change for jemalloc.
2020-04-07 23:39:10 +10:00
Daniel Black
dcc2eaebbd MDEV-22010: mtr search for mariadbd first 2020-04-06 18:23:35 +02:00
Elena Stepanova
778a174e5e Postfix for f46917238: use colon instead of comma
Comma is reported not to work on older systems/ASAN versions
2020-04-06 10:47:11 +03:00
Otto Kekäläinen
b6eabce139 Travis-CI: Shorten deb build log to keep it under 4 MB
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.
2020-04-06 09:07:02 +03:00
Otto Kekäläinen
28604c349b Travis-CI: Add missing build dependency dh-exec
Backported from 30b44aaec7.
2020-04-06 09:06:51 +03:00
Aleksey Midenkov
139117528a MDEV-22153 ALTER add default history partitions makes table inaccessible
ADD default history partitions generates wrong partition name,
f.ex. p2 instead of p1. Gap in sequence of partition names leads to
ha_partition::open_read_partitions() fail on inexistent name.

Manual fixing such broken table requires:

1. create empty table by any name (t_empty) with correct number
of partitions;
2. stop the server;
3. rename data files (.myd, .myi or .ibd) of broken table to t_empty
fixing the partition sequence (#p2 to #p1, #p3 to #p2);
4. start the server;
5. drop the broken table;
6. rename t_empty to correct table name.
2020-04-06 06:26:46 +03:00
Sergey Vojtovich
22811a1c60 Fixed build failure 2020-04-05 17:32:06 +04:00
Daniel Black
113e227e26 my_largepage.c: cleanup
Order to avoid prototypes:

my_get_large_page_sizes
my_next_large_page
my_init_large_pages
my_large_malloc
my_large_free
2020-04-05 17:20:50 +04:00
Daniel Black
abb2332420 travis: xcode11.3 2020-04-05 17:20:50 +04:00
Daniel Black
9bf3a3a47a HAVE_LARGE_PAGES no longer global 2020-04-05 17:20:50 +04:00
Daniel Black
71337a4452 my_large_malloc/free fall back to my_{malloc|free}_lock
For platforms != Windows and without MMAP.
2020-04-05 17:20:50 +04:00
Daniel Black
2a18e783ca my_large_page: more verbose errors on allocation fallback/failure 2020-04-05 17:20:50 +04:00
Daniel Black
d5568e7591 my_large_malloc_int consolidated into my_large_malloc
Consolidated single page size implementations by populating
my_large_page_sizes with a single page size.
2020-04-05 17:20:50 +04:00
Daniel Black
472d2d0492 my_large_free_int merge into my_large_free 2020-04-05 17:20:50 +04:00
Otto Kekäläinen
4ac7693678 Add author "Otto Kekäläinen" to SHOW AUTHORS 2020-04-05 00:24:24 +03:00
Otto Kekäläinen
b541defea0 Deb: Build depend on libcurl4-openssl-dev as primary option
The package libcurl4-dev is a virtual package, and no package with that
name actually exists. Depend on libcurl4-openssl-dev as the primary
option in case no libcurl4-dev providing package has been installed, and
if some of them (libcurl4-gnutls-dev, libcurl4-nss-dev,
libcurl4-openssl-dev ) are installed, they also satisfy the dependency
via the virtual package.

The Travis-CI still runs on libcurl3-dev as Travis-CI also runs Ubuntu
Xenial which does not yet have libcurl4 available.

This complements commit 2e0a40bdf0.
2020-04-05 00:24:24 +03:00
Otto Kekäläinen
6959c0922a MDEV-20298 Make mariadb-client-10.5 perl dep backwards compatible
The package libdbd-mariadb-perl has been available in Debian September
2018, so it is already included since Debian Buster and Ubuntu Disco.

Use it as the primary Recommends for MariaDB client binaries, but keep
the MySQL variant as a fall-back in case this package gets backported to
older releases that did not yet have it.

This change was done in downstream Debian packaging in
bb4ad78bc1
2020-04-05 00:24:24 +03:00
Otto Kekäläinen
333e1d82fc Deb: Update control file Depends to include only variables that are set
Don't include variables that are empty and unused.
2020-04-05 00:24:24 +03:00
Otto Kekäläinen
2cedf3eca4 MDEV-21303: Fix man page packaging for new mariadb-* named binaries
This fixes Lintian errors and warnings:

E: mariadb-client-10.5: manpage-not-compressed usr/share/man/man1/mariadb-analyze.1
E: mariadb-client-10.5: manpage-not-compressed usr/share/man/man1/mariadb-optimize.1
E: mariadb-client-10.5: manpage-not-compressed usr/share/man/man1/mariadb-repair.1
E: mariadb-client-10.5: manpage-not-compressed usr/share/man/man1/mysqlanalyze.1
E: mariadb-client-10.5: manpage-not-compressed usr/share/man/man1/mysqloptimize.1
E: mariadb-client-10.5: manpage-not-compressed usr/share/man/man1/mysqlrepair.1
W: mariadb-client-10.5: binary-without-manpage usr/bin/mariadb-conv
W: libmariadb-dev: binary-without-manpage usr/bin/mariadb_config

If the binary name is mariadb_config, the manpage needs to be mariadb_config.1.

Also run 'wrap-and-sort -a -v' to get lists in correct order.

In addition, sort .gitignore and remove duplicate lines.
2020-04-05 00:24:24 +03:00
Otto Kekäläinen
80abfa0eda Don't force to use all processors in autobake-deb.sh
The dpkg-buildpackage has by default sensible values for --jobs and
--try-jobs, and it also inherits whatever 'parallel' is set in
DEB_BUILD_OPTIONS. Overriding it here should not be needed and removing
it is better, since it allows build systems to control the level or
parallel builds via DEB_BUILD_OPTIONS if they want, which they often do
(e.g. to avoid CPU congestion or overheating laptops).
2020-04-04 20:42:00 +03:00
Otto Kekäläinen
1589cf1cb3 Deb: Remove TokuDB from Debian packages while keeping it easy to revert
Related:
- https://jira.mariadb.org/browse/MDEV-19780
- https://jira.mariadb.org/browse/MDEV-21944
2020-04-04 20:42:00 +03:00
Otto Kekäläinen
91994b6be4 Deb: Extend control dependencies for MySQL 8.0 and clean up
Make package have sensible control file relations to mysql-8.0.

Also some cleanup:
- Remove obsolete versioned control relationships. When the package
  name already has a version older than current package, the extra
  version is obsolete.
- Remove obsolete postinst script that was empty
- Remove priority "extra" which is deprecated, use "optional" that
  applies for the whole source package instead.
2020-04-04 20:42:00 +03:00
Otto Kekäläinen
400d7709ce Deb: Clean away deprecated autobake modifications
The current debian/control file and other packaging of 10.5 targets the
latest Debian unstable. In autobake-deb.sh there are automatic build
adaptations for older Debian/Ubuntu releases.

Some adaptations were for Debian versions prior to Jessie and Ubuntu
versions prior to Trusty. Those distro releases are no longer supported
anyway, so these should be cleaned away now in the 10.5 release cycle.

Summary:
- Debian Jessie has libcrack2 release 2.9.2-1, no need to have adaptations
  for any older environments
- Debian Jessie has libpcre3-dev release 2:8.35-3.3, no need to consider
  older versions
- Systemd has been available since Debian Jessie, no need to consider
  that a Debian/Ubuntu environment would not have it available
  adaptations for environments for anything older
2020-04-04 20:42:00 +03:00
Elena Stepanova
f469172380 Do not print LSAN suppression statistics in the output 2020-04-04 17:38:44 +03:00
Sergey Vojtovich
40c2cf335d MDEV-22146 - Server crashes in mysql_ha_flush_tables upon ALTER SERVER
Regression after bfdd30d. Initialize addition TABLE_LIST members which
are used by subsequent close_cached_tables() call.
2020-04-04 15:52:31 +04:00
Sergey Vojtovich
2e2138baa5 Simplified away my_get_large_page_size() 2020-04-04 14:55:51 +04:00
Sergey Vojtovich
30379b487f HAVE_LARGE_PAGE_OPTION to HAVE_LARGE_PAGES
It isn't an "option" anymore.
2020-04-04 14:55:51 +04:00
Sergey Vojtovich
4338bb8a75 Coding style fixes 2020-04-04 14:55:51 +04:00
Sergey Vojtovich
e4a960780f my_next_large_page_size() cleanup
Make it static, coding style cleanup, declare consistently with all
callers (same ifdefs).
2020-04-04 14:55:51 +04:00
Sergey Vojtovich
fc6e8b4b1b Cleanup HAVE_MMAP_ALIGNED: one cmake check less 2020-04-04 14:55:51 +04:00
Aleksey Midenkov
40f4d8c671 MDEV-21941 assertion cleanups 2020-04-04 01:07:24 +03:00
Aleksey Midenkov
105b879d0f MDEV-21941 RENAME doesn't work for system time or period fields
- Ignore system-invisible fields (as well as for setting default value);
- Handle rename of system time and period fields.
2020-04-04 00:53:37 +03:00
Aleksey Midenkov
431a740815 MDEV-21889 IF EXISTS clause does not work for RENAME COLUMN and RENAME INDEX 2020-04-04 00:53:36 +03:00
Aleksey Midenkov
6fb3e83d74 MDEV-21889 Typo fix: ER_KEY_DOES_NOT_EXISTS
libmariadb revision updated.
2020-04-04 00:52:54 +03:00
Aleksey Midenkov
aa7f2578fc MDEV-21471 ER_CRASHED_ON_USAGE upon UPDATE FOR PORTION on Aria table
Turn read cache off for periodic update.

Like 498a96a4 says:

Aria with row_format=fixed uses IO_CACHE of type READ_CACHE for
sequential read in update loop. When history row is inserted inside
this loop the cache misses it and fails with error.

This applicable to any additional row inserts on UPDATE. In this case
it was initiated by UPDATE FOR PORTION.

Related to MDEV-20441.
2020-04-03 23:55:48 +03:00
Aleksey Midenkov
198af54bb9 MDEV-20494 Fix wrongly ignored error status 2020-04-03 23:55:48 +03:00
Aleksey Midenkov
76063c2a13 MDEV-20494 ER_NOT_FORM_FILE or assertion upon adding partition to period table
- Fixed mysql_prepare_create_table() constraint duplicate checking;
- Refactored period constraint handling in mysql_prepare_alter_table():
  * No need to allocate new objects;
  * Keep old constraint name but exclude it from dup checking by automatic_name;
- Some minor memory leaks fixed;
- Some conceptual TODOs.
2020-04-03 23:55:48 +03:00
Sergey Vojtovich
d2c366c6fb Fix CentOS 6 and quantal build failures 2020-04-03 22:02:07 +04:00
Marko Mäkelä
1078a630f7 MDEV-22139 fseg_free_page_low() fails to write FREE_PAGE record, breaking recovery
This bug was introduced by MDEV-15528
commit a35b4ae898.

In the case that I analyzed, we failed to apply
an EXTENDED,INSERT_REUSE_REDUNDANT redo log record whose
preceding record points to unallocated area after PAGE_HEAP_TOP.

Had we properly written the FREE_PAGE record for the page,
recovery would have processed it, because during the checkpoint,
the log had been completely written past the LSN of the missed write.

fseg_free_page_low(): Always invoke mtr_t::free().
The other call is in fsp_free_page().
2020-04-03 17:47:56 +03:00
Daniel Black
abb0a31ec8 output_core_info - freebsd rlimits in different proc entry 2020-04-03 15:11:43 +02:00
Sergey Vojtovich
4197014ba0 Yet less TDC hash lookups
Let auto repair table and truncate table routines flush TABLE_SHARE
directly.

Part of MDEV-17882 - Cleanup refresh version
2020-04-03 13:01:21 +04:00
Sergey Vojtovich
7a947614fb Split tdc_remove_table()
TDC_RT_REMOVE_ALL -> tdc_remove_table(). Some occurrences replaced with
TDC_element::flush() (whenver TABLE_SHARE is available).

TDC_RT_REMOVE_NOT_OWN[_KEEP_SHARE] -> TDC_element::flush(). These modes
assume that current thread owns TABLE_SHARE reference, which means we can
avoid hash lookup and flush unused TABLE instances directly.

TDC_RT_REMOVE_UNUSED -> TDC_element::flush_unused(). Only [ab]used by
mysql_admin_table() currently. Should be removed eventually.

Part of MDEV-17882 - Cleanup refresh version
2020-04-03 13:01:21 +04:00