Commit graph

186316 commits

Author SHA1 Message Date
Kentoku SHIBA
4a739d7650
MDEV-16248 Row based replication to spider with float column fails on delete/update () 2019-07-06 22:38:43 +09:00
Eugene Kosov
fb3998c351 fix build 2019-07-05 18:27:44 +03:00
Sergei Golubchik
c6dff51276 Workaround for https://github.com/systemd/systemd/issues/1221
Put all capabilities in one CapabilityBoundingSet line,
otherwise buggy systemd sets CapabilityBoundingSet=0
2019-07-05 17:12:46 +02:00
Eugene Kosov
c9aa495fb6 MDEV-19955 make argument of handler::ha_write_row() const
MDEV-19486 and one more similar bug appeared because handler::write_row() interface
welcomes to modify buffer by storage engine. But callers are not ready for that
thus bugs are possible in future.

handler::write_row():
handler::ha_write_row(): make argument const
2019-07-05 13:14:19 +03:00
Eugene Kosov
23c12ed5cb MDEV-19951 use override keyword across the InnoDB
Use on every virtual function override.

ha_innobase: mark a final

ha_innobase::bas_ext(): remove as unused

ha_innobase::get_cascade_foreign_key_table_list: remove as unused

ha_innobase::end_stmt(): merge into ha_innobase::reset()
2019-07-04 16:28:27 +03:00
Robert Bindar
e8392e58b2 MDEV-19696 - Cleanup gcc sync builtins
Since 10.4 requires C++11 capable compiler, gcc sync builtins became
dead code. Remove relevant cmake checks and cleanup include files.
2019-07-03 12:11:22 +03:00
Sergei Golubchik
3acf741051 fix suite.pm to not garble $_ 2019-07-02 21:27:12 +02:00
Marko Mäkelä
7a3d34d645 Merge 10.3 into 10.4 2019-07-02 21:44:58 +03:00
Marko Mäkelä
1d45b3b055 Merge 10.2 into 10.3 2019-07-02 21:41:40 +03:00
Marko Mäkelä
c1cb5c17be MDEV-19869: Correct the logic, and avoid type mismatch 2019-07-02 21:40:34 +03:00
Marko Mäkelä
0c6514eece MDEV-19781: Skip the test for embedded server 2019-07-02 21:33:54 +03:00
Sergei Golubchik
faeaf978b8 fix suite.pm for windows 2019-07-02 20:17:01 +02:00
Marko Mäkelä
e82fe21e3a Merge 10.2 into 10.3 2019-07-02 17:46:22 +03:00
Marko Mäkelä
709f0510e3 MDEV-19845: Adjust for Skylake based on benchmarks
Even though the PAUSE instruction latency was increased from
about 10 to 140 clock cycles in the Intel Skylake microarchitecture,
it seems to be optimal to reduce the amount of subsequently executed
PAUSE instructions not to 1/14, but to 1/2.
2019-07-02 17:44:05 +03:00
LingBin
6842a1538a Fix github urls of submodules
Uniformly use the `.git` suffix format
2019-07-02 17:25:36 +04:00
Sergei Golubchik
4fef644303 cleanup: mtr and plugins
* in --parallel mode don't copy/symlinks plugins individually
  in each forked child's vardir, use the common parent vardir with
  all plugins
* move pam plugin specific code from mysql-test-run.pl to
  suite/plugins/suite.pm
2019-07-02 14:27:32 +02:00
Sergei Golubchik
d84792b689 Skip pam tests unless $USER owns auth_pam_tool_dir
(meaning, if MariaDB is installed system-wide, pam tests
require mtr to be run as mysql user)
2019-07-02 14:27:32 +02:00
Sergei Golubchik
4f87ad1975 MDEV-19879 server can send empty error message to client with pam_use_cleartext_plugin
fixed in MDEV-19878, here just adding tests
2019-07-02 14:27:31 +02:00
Sergei Golubchik
3914a792d8 MDEV-19880 pam v1: pam password authentication doesn't work at all in MariaDB 10.4
* fix incorrect parentheses
* if there was no password on the command line or in .cnf file,
  pkt will be "", and we need to request the user to enter the password
2019-07-02 14:27:31 +02:00
Sergei Golubchik
dd93028dae MDEV-19878 pam v2: pam password authentication doesn't work at all
* wait() for the child process to die, let it rest in peace
* fix incorrect parentheses
* if there was no password on the command line or in .cnf file,
  pkt will be "", and we need to request the user to enter the password
* make sure that auth->salt is always allocated on a permanent memroot.
  when called from set_user_salt_if_needed(), user_copy and its auth_str
  are on the thd memroot, but auth_copy->salt is then copied to auth->salt
* adjust service files so that systemd wouldn't interfere with our
  setuid executables

also
* print the pam error message in debug mode
2019-07-02 14:27:31 +02:00
Sergei Golubchik
ec494cb1fa MDEV-19876 pam v2: auth_pam_tool_dir and auth_pam_tool permissions are wrong in RPMs
in fact, permissions were fine in RPM, but mysql_install_db
was resetting them.

Also fix Debian, while we're at it
2019-07-02 14:27:31 +02:00
Sergei Golubchik
a07c10f53f build pam test module as a part of the build
and install in mysql-test/suite/plugins/pam
so that it could be manually copied into /etc if needed
2019-07-02 14:27:31 +02:00
Sergei Golubchik
9c74cc4df7 Alter pam test to ask for a password first
this matches the common behavior with pam_unix and helps to
catch password related errors

also, use abort() instead of sigsegv to avoid polluting
/var/log/messages with intentional crashes
2019-07-02 14:27:31 +02:00
Sergei Golubchik
e46b87aaed enable TLSv1.0 in WolfSSL 2019-07-02 14:27:31 +02:00
Sergei Golubchik
e79b9005f1 don't run tls_version test if TLSv1.1 is disabled
in /etc/ssl/openssl.cnf

as it happens to be on the buster builder
2019-07-02 14:27:31 +02:00
Sergei Golubchik
4bfb19d407 cleanup: mtr suite.pm ssl checks 2019-07-02 14:27:31 +02:00
Marko Mäkelä
7f1e1309bb MDEV-12626: Import innodb_buffer_pool_dump_pct adjusted for MDEV-11454 2019-07-02 15:24:23 +03:00
Marko Mäkelä
6bb922e58e MDEV-13626: Import and adjust innodb.blob-crash 2019-07-02 15:18:12 +03:00
Sujatha
4bad6aa9ae MDEV-19716: ASAN use-after-poison in Query_log_event::Query_log_event / THD::log_events_and_free_tmp_shares
Analysis:
========
When a given client session ends on a master, the server logs a DROP TEMPORARY
TABLE IF EXISTS statement for each temporary table that still exists in the
current session. It ensures a proper temporary table cleanup on the slave. In
order to write the DROP TEMPORARY TABLE query in binary log a 'Query_log_event'
object is created. Within the 'Query_log_event' constructor
'thd->lex->sql_command' is read to identify what type of cache needs to be
used to write the query. When the code reaches here as part of THD::cleanup
the 'thd->lex->sql_command' will be in an invalid state. The 'thd->lex' could
have been cleared or it could be pointing to a statement which was in the
middle of execution when the session ended. In such cases ASAN reports
use-after-poison error.

Fix:
===
The 'THD::Cleanup' code invokes 'THD::log_events_and_free_tmp_shares' to look
for temporary tables and write appropriate DROP TABLE stmts for them. This
cleanup code provides a special flag named 'direct=TRUE' to the
Query_log_event constructor. Having 'direct=TRUE' means that this query
doesn't require any caching. Hence in this scenario the 'Query_log_event'
constructor should respect the 'direct' flag and simply skip the logic of
deciding the type of cache to be used for the statement. Hence the code will
not access the stale lex object.
2019-07-02 12:25:08 +05:30
Thirunarayanan Balathandayuthapani
41f6e68878 MDEV-19781 Add page id matching check in innochecksum tool
- Changed the assert to ignore SRV_LOG_SPACE_FIRST_ID. Post push
fix to address the previous commit failure.
2019-07-01 21:58:20 +05:30
Marko Mäkelä
9c16460e63 Merge 10.3 into 10.4 2019-07-01 18:37:15 +03:00
Marko Mäkelä
0e1ba364a1 MDEV-19916 Corruption after instant ADD/DROP and shrinking the tree
btr_lift_page_up(): Correct the incorrect condition.

page_validate(): Validate the page type.
2019-07-01 18:24:54 +03:00
Marko Mäkelä
92bbf4f53d MDEV-19916: Improve page_validate()
page_validate(): Validate also the page type, and try to list all
errors that were encountered for the page, with a little more detail.
2019-07-01 18:24:35 +03:00
Marko Mäkelä
685b527f0c MDEV-16060: Speed up the test by 1 second 2019-07-01 18:17:29 +03:00
Thirunarayanan Balathandayuthapani
40c1f4bd4c MDEV-19781 Add page id matching check in innochecksum tool
Changed the debug insert inside fil_io() to check whether it writes
the page to wrong offset only for user tablespace.
2019-07-01 20:21:26 +05:30
Thirunarayanan Balathandayuthapani
dca9792a24 MDEV-17228 Encrypted temporary tables are not encrypted
- log_crypt_init() should be called from create_log_files(). Because
it should re-create the new random nonce compared to the old ones.
2019-07-01 18:50:44 +05:30
Daniel Black
747dccfe23 systemd multiinstance - doc fix - version number 2019-07-01 14:01:13 +03:00
Marko Mäkelä
5a136d84f3 MDEV-19766: Disable page dump output in debug builds
The test innodb.leaf_page_corrupted_during_recovery
fails on buildbot with

Warning	1406	Data too long for column 'line' at row 10
line
 len 16384; hex ...

because of a page dumps that InnoDB is generating for a corrupted page

Since this test is using debug instrumentation, we will solve the
issue by disabling page dumps in debug builds altogether. Users of
debug builds will likely know how to extract page dumps in other means.

Page dump output could sometimes be useful when diagnosing problems
that users are facing. Hence we will keep the page dump output in
non-debug (release) builds.
2019-07-01 13:27:12 +03:00
Thirunarayanan Balathandayuthapani
85d0a1955f MDEV-19914 Server startup fails while dropping garbage encrypted tablespace if innodb_encryption_threads > 0
- Avoiding accessing encryption thread mutex before initiating
the encryption threads
2019-07-01 15:21:17 +05:30
Thirunarayanan Balathandayuthapani
ed6da51f3e MDEV-19869 Port innodb_fts.fulltext2 from mysql to mariadb.
- Ported mysql Bug#20597981 test case to mariadb-10.2
- InnoDB never used fts_doc_id_in_read_set. Basically it tells
innodb to read the fts_doc_id from the index record itself.
2019-07-01 13:46:56 +05:30
Ian Gilfillan
c5c515130c MDEV-19847: Update mysqladmin man page 2019-07-01 12:09:40 +04:00
Kentoku SHIBA
223c550d92
MDEV-17402 slave_transaction_retry_errors="12701" won't be enabled ()
fix test result of sys_vars.slave_transaction_retry_errors
2019-06-30 18:52:45 +09:00
Kentoku SHIBA
76200870ea
MDEV-17204 Mariadb 10.3.9 Spider DB SQL Alias no execute () 2019-06-29 03:42:35 +09:00
Kentoku SHIBA
d4bdf1c0b6
MDEV-16508 spider: sql_mode not maintained between spider node and data nodes ()
Add the following parameter.

- spider_sync_sql_mode
  Local sql_mode synchronous existence to remote server.
   0 : It doesn't synchronize.
   1 : It synchronizes.
  The default value is 1
2019-06-29 03:35:48 +09:00
Marko Mäkelä
5e929ee8a0 MDEV-19845: Define my_timer_cycles() inline
On clang, use __builtin_readcyclecounter() when available.
Hinted by Sergey Vojtovich. (This may lead to runtime failure
on ARM systems. The hardware should be available on ARMv8 (AArch64),
but access to it may require special privileges.)

We remove support for the proprietary Sun Microsystems compiler,
and rely on clang or the __GNUC__ assembler syntax instead.

For now, we retain support for IA-64 (Itanium) and 32-bit SPARC,
even though those platforms are likely no longer widely used.

We remove support for clock_gettime(CLOCK_SGI_CYCLE),
because Silicon Graphics ceased supporting IRIX in December 2013.
This was the only cycle timer interface available for MIPS.

On PowerPC, we rely on the GCC 4.8 __builtin_ppc_get_timebase()
(or clang __builtin_readcyclecounter()), which should be equivalent
to the old assembler code on both 64-bit and 32-bit targets.
2019-06-28 19:19:31 +03:00
Kentoku SHIBA
1635ea9474
MDEV-17402 slave_transaction_retry_errors="12701" won't be enabled ()
error code 12701 is already included in default value, but other plugin specific error codes are ignored because of checking with ER_ERROR_LAST. ER_ERROR_LAST does not include plugin specific error codes. So I just removed it for fixing this issue.
2019-06-29 00:05:34 +09:00
Thirunarayanan Balathandayuthapani
723a4b1d78 MDEV-17228 Encrypted temporary tables are not encrypted
- Introduce a new variable called innodb_encrypt_temporary_tables which is
a boolean variable. It decides whether to encrypt the temporary tablespace.
- Encrypts the temporary tablespace based on full checksum format.
- Introduced a new counter to track encrypted and decrypted temporary
tablespace pages.
- Warnings issued if temporary table creation has conflict value with
innodb_encrypt_temporary_tables
- Added a new test case which reads and writes the pages from/to temporary
tablespace.
2019-06-28 19:07:59 +05:30
Thirunarayanan Balathandayuthapani
e4a0dbfb4a MDEV-19781 Add page id matching check in innochecksum tool
Added the condition in innochecksum tool to check page id mismatch.
This could catch the write corruption caused by InnoDB.

Added the debug insert inside fil_io() to check whether it writes
the page to wrong offset.
2019-06-28 18:58:52 +05:30
Monty
f7a4a8719b MDEV-14996 kill during FLUSH TABLES FOR EXPORT causes assert 2019-06-27 20:57:25 +03:00
Monty
9053047f3d MDEV-17551 assert or crashed table when using blobs
The bug was that when long item-strings was converted to VARCHAR,
type_handler::string_type_handler() didn't take into account max
VARCHAR length.  The resulting Aria temporary table was created with
a VARCHAR field of length 1 when it should have been 65537. This caused
MariaDB to send impossible records to ma_write() and Aria reported
eventually the table as crashed.

Fixed by updating Type_handler::string_type_handler() to not create too long
VARCHAR fields. To make things extra safe, I also added checks in when
writing dynamic Aria records to ensure we find the wrong record during write
instead of during read.
2019-06-27 19:01:51 +03:00