Commit graph

189082 commits

Author SHA1 Message Date
Thirunarayanan Balathandayuthapani
6bbc0eedc6 MDEV-22193 Avoid un-necessary page initialization during recovery
- 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.
2020-04-09 21:25:31 +05:30
Varun Gupta
ff66d38cf2 MDEV-21946: Server crash in store_length upon GROUP BY WITH ROLLUP with geometry field
overflow happening when we add suffix length to sortlength.
Make sure that sortlength is at max UINT_MAX32
2020-04-09 13:51:47 +05:30
Jan Lindström
c7ab676192 MDEV-22075 : Server crashes in wsrep_should_replicate_ddl_iterate upon CREATE VIEW
Fixed incorrect pointer reference when table is not available.
2020-04-08 18:09:28 +03:00
Sergey Vojtovich
6cf8f05fd9 Fixed centos 6 build failure 2020-04-08 15:31:57 +04:00
Daniel Black
97506bf7c3 mysql-test: add large_pages test
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.
2020-04-08 14:51:14 +04:00
Daniel Black
5f5bb63b2e Add Daniel Black to authors 2020-04-08 14:51:14 +04:00
Daniel Black
a0d5894015 my_pagepages: perror -> my_error 2020-04-08 14:51:14 +04:00
Daniel Black
a535d4d1a6 my_largepage: fprintf -> my_{printf_,}error 2020-04-08 14:51:14 +04:00
Daniel Black
11aaf5c8d2 add EE_BADMEMORY_RELEASE 2020-04-08 14:51:14 +04:00
Daniel Black
5e86b2eec8 my_large_malloc: style fix 2020-04-08 14:51:14 +04:00
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