Commit graph

180192 commits

Author SHA1 Message Date
Daniel Black
88ac368fea defaults-group-suffix in print_defaults
Also clarify which --{no-,}default* options, must be first.

Sample output:
$  client/mysql --help
client/mysql  Ver 15.1 Distrib 5.5.59-MariaDB, for Linux (x86_64) using readline 5.1
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Usage: client/mysql [OPTIONS] [database]

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
The following groups are read: mysql client client-server client-mariadb
The following options may be given as the first argument:
--print-defaults          Print the program argument list and exit.
--no-defaults             Don't read default options from any option file.
The following specify which files/groups are read (specified before other options):
--defaults-file=#         Only read default options from the given file #.
--defaults-extra-file=#   Read this file after the global files are read.
--defaults-group-suffix=# Additionally read default groups with # appended as a suffix.

tests running from build directory:
TEST: print defaults ignored as not first
$ sql/mysqld  --no-defaults --print-defaults --lc-messages-dir=${PWD}/sql/share

TEST: no startup occurs as --print-defaults specified
$ sql/mysqld  --print-defaults --lc-messages-dir=${PWD}/sql/share
sql/mysqld would have been started with the following arguments:
--lc-messages-dir=/home/dan/repos/build-mariadb-5.5/sql/share

TEST: default args can't be anywhere
$ client/mysql --user=bob  --defaults-file=/etc/my.cnf
client/mysql: unknown variable 'defaults-file=/etc/my.cnf'
$ client/mysql --user=bob  --defaults-group-suffix=.group
client/mysql: unknown variable 'defaults-group-suffix=.group'

/etc/my.cnf:
[client-server.group]
socket=/var/lib/mysql-multi/group/mysqld.sock
user=bob

/etc/my.other.cnf:
socket=/var/lib/mysql-other/mysqld.sock

TEST: defaults file read and suffix also applied
$  client/mysql  --defaults-file=/etc/my.other.cnf  --defaults-group-suffix=.group
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql-other/mysqld.sock' (2)

TEST: defaults extra file
$ client/mysql  --defaults-extra-file=/etc/my.other.cnf  --defaults-group-suffix=.group
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql-other/mysqld.sock' (2)
2018-04-13 14:56:50 +04:00
Jan Lindström
2bf355fa81 MDEV-15672: encryption.innodb_encryption_filekeys - typo in I_S column name: ENCRYPTION_SHCEME
Fixed typo on select that is executed only when something unexpected
happens.
2018-04-13 12:51:42 +03:00
Jan Lindström
f638c37abe MDEV-12632: Source and destination overlap in memcpy, encryption.innodb-discard-import-change fails in buildbot with valgrind
Use block->page.offset for checking page number.
2018-04-13 09:44:28 +03:00
Jan Lindström
3855943fe0 MDEV-12632: Source and destination overlap in memcpy, encryption.innodb-discard-import-change fails in buildbot with valgrind
Use block->page.offset for checking page number.
2018-04-13 09:25:52 +03:00
Jan Lindström
82e968197a MDEV-15580: Assertion `!lex->explain' failed in lex_start(THD*):
Problem was that we did not delete explain information
when Galera must replay a query.

Could not find easily repeatable test case that would not
cause other problems.
2018-04-13 08:20:02 +03:00
Jan Lindström
e341da4711 MDEV-15580: Assertion `!lex->explain' failed in lex_start(THD*):
Problem was that we did not delete explain information
when Galera must replay a query.

Could not find easily repeatable test case that would not
cause other problems.
2018-04-13 07:35:55 +03:00
Sergei Petrunia
d13e3547e4 MDEV-14460: Memory leak with only SELECT statements
Cherry-pick this fix from the upstream:
commit 6ddedd8f1e0ddcbc24e8f9a005636c5463799ab7
Author: Sergei Petrunia <psergey@askmonty.org>
Date:   Tue Apr 10 11:43:01 2018 -0700

    [mysql-5.6][PR] Issue #802: MyRocks: Statement rollback doesnt work correctly for nes…

    Summary:
    …ted statements

    Variant #1: When the statement fails, we should roll back to the latest
    savepoint taken at the top level.
    Closes https://github.com/facebook/mysql-5.6/pull/804

    Differential Revision: D7509380

    Pulled By: hermanlee

    fbshipit-source-id: 9a6f414
2018-04-13 01:56:01 +03:00
Sergei Petrunia
5545753b0b Update test results
In the upstream include/search_pattern_in_file.inc prints nothing
when it has found the searched string (if it hasn't, it produces an error)

In MariaDB, it prints "FOUND n ..."
2018-04-13 00:39:51 +03:00
Jacob Mathew
12e2d03948 MDEV-15692: install_spider.sql can fail with some collations
The error occurs because of how the character set and collation are chosen for
stored procedure parameters that have a character data type.  If the character
set and collation are not explicitly stated in the declaration, the server
chooses the database character set and collation in effect at routine creation
time.

To fix the problem, I added explicit character set and collation attributes
for the stored procedure parameters in the install_spider.sql script.

Author:
  Jacob Mathew.

Reviewer:
  Kentoku Shiba.

Cherry-Picked:
  Commit ff0bf451db on bb-10.3-MDEV-15692
2018-04-12 12:14:12 -07:00
Sergei Petrunia
34e6b5fa6f Undo fix for MDEV-13852: RocksDB now has a proper WinWriteableFile::IsSyncThreadSafe()
Commit being reverted is:
commit 689168be12
Author: Vladislav Vaintroub <wlad@mariadb.com>
Date:   Thu Nov 16 18:57:18 2017 +0000

    MDEV-13852 - redefine WinWriteableFile such as IsSyncThreadSafe()
    is set to true, as it should.

    Copy and modify original io_win.h header file to a different location
    (as we cannot patch anything in submodule). Make sure modified header is
    used.
2018-04-12 20:28:54 +03:00
Vladislav Vaintroub
c2dc72c0c3 MDEV-15779 - mariabackup incremental prepare fails on CIFS mount.
CIFS does not like O_DIRECT flag (it is set successfully, but pread would
fail).

The fix is not to use O_DIRECT, there is not need for it.
posix_fadvise() was used already that should prevent buffer cache
pollution on Linux.

As recommended by documentation of posix_fadvise(), we'll also fsync()
tablespaces after a batch of writes.
2018-04-12 12:09:32 +01:00
Vladislav Vaintroub
15071226a0 MDEV-15780 : Mariabackup with absolute paths in innodb_data_file_path
System tablespace can be specified with absolute path, if innodb_data_home_dir
is empty.

This was not handled well  by mariabackup

1. In backup phase, empty innodb_data_home_dir variable from server was
not recognized. full paths were stored in backup-my.ini, even if
it stored all files locally. thus prepare phase would not find the system
tablespace files.

2. In copy-back phase, copy would not be done to the absolute destination
path, as path would be stripped with trim_dotslash

This patch fixes the above defects.
2018-04-12 11:15:27 +01:00
Jan Lindström
36c0116720 MDEV-12632: Source and destination overlap in memcpy, encryption.innodb-discard-import-change fails in buildbot with valgrind
Problem was that if tablespace was encrypted we try to copy
also page 0 from read buffer to write buffer that are in
that case the same memory area.

fil_iterate
	When tablespace is encrypted or compressed its
        first page (i.e. page 0) is not encrypted or
	compressed and there is no need to copy buffer.
2018-04-12 11:19:27 +03:00
Jan Lindström
0ae13b51d7 MDEV-12632: Source and destination overlap in memcpy, encryption.innodb-discard-import-change fails in buildbot with valgrind
Problem was that if tablespace was encrypted we try to copy
also page 0 from read buffer to write buffer that are in
that case the same memory area.

fil_iterate
	When tablespace is encrypted or compressed its
        first page (i.e. page 0) is not encrypted or
	compressed and there is no need to copy buffer.
2018-04-12 11:00:48 +03:00
Jan Lindström
2f1f160979 MDEV-12903: encryption.innodb_encryption_discard_import fails in buildbot with FOUND vs NOT FOUND
Wait until rotation has ended and shutdown before grep to make sure
that dirty pages are on datafiles.
2018-04-12 08:39:19 +03:00
Jan Lindström
9518ddd1fb MDEV-12903: encryption.innodb_encryption_discard_import fails in buildbot with FOUND vs NOT FOUND
Wait until rotation has ended and shutdown before grep to make sure
that dirty pages are on datafiles.
2018-04-12 08:04:02 +03:00
Vicențiu Ciorbaru
93aded05ea Use same connection convention of specifying IPs
If we use hostnames, it will fail during name resolution on UNIX systems
2018-04-12 03:26:39 +03:00
Vicentiu Ciorbaru
990283b65c Fix perfschema.hostcache_ipv4_max_con
Also fix perfschema.hostcache_ipv6_max_con.
The test case makes use of a debug switch to execute some special code.
The code does hostname replacement. Every hostname sent during connect
phase becomes santa.claus.ipv4.example.com (or ipv6). This causes a
connection from root@localhost to fail, as root is not registered as
santa claus user. The failure is only apparent on Windows as Unix
systems make use of sockets, which bypass the name resolution check
entirely.
2018-04-12 02:39:28 +03:00
Vladislav Vaintroub
4c7a1a1b9e MDEV-15780 : mariabackup does not handle absolute names in for system tablespaces
Fix 10.2-specific bug - copy-back is not prepared to handle system
tablespaces with absolute path.
2018-04-11 23:25:45 +01:00
Sergei Petrunia
5715177a76 - Fix a merge error
- Test result updates
2018-04-11 18:39:06 +03:00
Vladislav Vaintroub
d98514690f Make mroonga respect -DWITHOUT_DYNAMIC_PLUGINS.
Return early if plugin is not built.
2018-04-11 15:45:30 +01:00
Jan Lindström
c6c679e947
Merge pull request #700 from codership/MDEV-15804
MDEV-15804 Fix and re-enable MTR test galera.pxc-421
2018-04-11 16:19:59 +03:00
Jan Lindström
8be2c72bd5
Merge pull request #699 from codership/MDEV-15808
MDEV-15808 Fix and re-enable test galera.galera_gra_log
2018-04-11 15:53:46 +03:00
Daniele Sciascia
4dc60dc3f1 MDEV-15804 Fix and re-enable MTR test galera.pxc-421
This patch makes two changes:

* Remove unnecessary `set SESSION wsrep_sync_wait=0`.
  Disabling `wsrep_sync_wait` caused the test to fail occasionally,
  due to subsequent `SELECT`s observing stale values.

* Remove redundant `--source include/galera_wait_ready.inc`,
  `galera_wait_ready.inc` is already included in the above
  `wait_until_connected_again.inc`
2018-04-11 14:24:39 +02:00
Sergey Vojtovich
226ec99a3e MDEV-15510 - storage/oqgraph: Quench warnings with Boost 1.66
Moved Boost configuration definitions before first inclusion of Boost
headers to avoid re-definition.
2018-04-11 14:22:10 +04:00
Daniele Sciascia
73b3ace8b2 MDEV-15808 Fix and re-enable test galera.galera_gra_log
Test would occasionally fail as follows:

```
mysqltest: At line 20: query 'SELECT COUNT(*) = 0 FROM t1' failed:
1317: Query execution was interrupted

```

This was due to a `CREATE TABLE` applied concurrently that would
occasionally cause the `SELECT` to be BF aborted, due to MDL
conflict.

The `SELECT` is executed while `wsrep_on=OFF`. The change makes sure
it is executed only after wsrep is enabled again.
2018-04-11 09:14:35 +02:00
Igor Babaev
740fc2ae08 Fixed mdev-15765 BETWEEN not working in certain cases
The implementations of the convert_to_basic_const_item() virtual
function for the Item_cache classes should call cache_value() when
value_cached == NULL.
2018-04-10 18:07:29 -07:00
Vicențiu Ciorbaru
45e6d0aebf Merge branch '10.1' into 10.2 2018-04-10 17:43:18 +03:00
Vicențiu Ciorbaru
2e91eb7547 Fix warnings in InnoDB & XtraDB post MDEV-14705
There was a missing argument to service_manager_extend_timeout call
and the signness of arguments did not match.
2018-04-10 17:34:56 +03:00
Alexander Barkov
f5cb66fb97 Test cleanup for MDEV-15833 (uncommenting forgotten tests) 2018-04-10 14:27:18 +04:00
Jan Lindström
1fd07d21a7 MDEV-15823: Test failure on galera.galera_var_slave_threads
Wait drop table to be replicated before continuing.
2018-04-10 13:25:19 +03:00
Alexander Barkov
4d9c5844b8 MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values
The code in Type_handler_blob****::make_conversion_table_field()
erroneously assumed that row format replication uses
MYSQL_TYPE_TINYBLOB, MYSQL_TYPE_BLOB, MYSQL_TYPE_MEDIUMBLOB,
MYSQL_TYPE_LONGBLOB type codes to tranfer BLOB variations.

In fact, all BLOB variations use MYSQL_TYPE_BLOB as the type
code, while the BLOB packlength (1,2,3 or 4) it tranferred
in metadata.

The bug was introduced by  aee068085d
(MDEV-9238 Wrap create_virtual_tmp_table() into a class, split into different steps)
2018-04-10 13:15:57 +04:00
Marko Mäkelä
f932d3f879 MDEV-14705: Extend timeout for waiting for transactions
If innodb_fast_shutdown<2, all transactions of active connections
will be rolled back on shutdown. This can take a long time, and
the systemd shutdown timeout should be extended during the wait.

logs_empty_and_mark_files_at_shutdown(): Extend the timeout when
waiting for other threads to complete.
2018-04-10 08:55:21 +03:00
Marko Mäkelä
8eff803a1b Revert "MDEV-14705: Do not rollback on InnoDB shutdown"
This reverts commit 76ec37f522.

This behaviour change will be done separately in:
MDEV-15832 With innodb_fast_shutdown=3, skip the rollback
of connected transactions
2018-04-10 08:55:20 +03:00
Marko Mäkelä
141592cedb Clean up a test 2018-04-10 02:07:31 +03:00
Vladislav Vaintroub
ecf6675cfc MDEV-15713 mariabackup: throw warning, if --stream is used without --backup 2018-04-09 19:16:50 +01:00
Sergei Petrunia
7e700bd2a8 Fix ha_rocksdb::calc_eq_cond_len() to handle HA_READ_PREFIX_LAST_OR_PREV correctly
This is Variant#2.
- Undo Variant#1
- Instead, swap the range bounds if we are doing a reverse-ordered scan.
2018-04-09 19:12:23 +03:00
Vladislav Vaintroub
37f24806fc MDEV-15825 Mariabackup help mentions Percona and PXC but not MariaDB 2018-04-09 16:22:15 +01:00
Vicențiu Ciorbaru
8ff897265a Update test cases post MDEV-10286
Table_open_cache gets adjusted on server startup to prevent an out of
file descriptor error. However this means that when we reset its value
to default, it does not get re-adjusted. This leads to the mtr
consistency check to fail with different server status at the end of the
test case as opposed to when it started.

To fix the problem, do not make use of the DEFAULT keyword to set the
variable back, instead save the value before any modifications and
restore it from there.
2018-04-09 16:49:41 +03:00
Sergei Petrunia
8628c589f6 Fix ha_rocksdb::calc_eq_cond_len() to handle HA_READ_PREFIX_LAST_OR_PREV correctly 2018-04-09 15:27:35 +03:00
Jan Lindström
803ded5148 MDEV-13549: Galera test failures
Disable occasionally failing test case galera.galera_var_slave_threads.
2018-04-09 14:43:32 +03:00
Jan Lindström
fe61e287e9 MDEV-15810: Test failure on galera.lp1376747 and galera.lp1376747-2
Wait until create table is replicated before continuing.
2018-04-09 07:49:00 +03:00
Jan Lindström
767d6ce38c MDEV-15807: Test failure on galera.galera_lock_table
Wait until create tables are replicated to the slave before trying
lock table.
2018-04-09 07:28:13 +03:00
Sergei Petrunia
e7efc79350 Make rocksdb.information_schema test stable 2018-04-09 01:10:43 +03:00
Vladislav Vaintroub
7b16291c36 MDEV-15707 : deadlock in Innodb IO code, caused by change buffering.
In async IO completion code, after reading a page,Innodb can wait for
completion of other bufferpool reads.
This is for example what happens if change-buffering is active.

Innodb on Windows could deadlock, as it did not have dedicated threads
for processing change buffer asynchronous reads.

The fix for that is to have windows now has the same background threads,
including dedicated thread for ibuf, and log AIOs.

The ibuf/read completions are now dispatched to their threads with
PostQueuedCompletionStatus(), the write and log completions are processed
in thread where they arrive.
2018-04-08 21:32:02 +00:00
Jan Lindström
8bb40f2404 MDEV-13549: Galera test failures
Disable more occasionally failing test cases.
	galera.galera_lock_table
	galera.galera_gra_log
	galera.MW-44
	galera.lp1376747
	galera.lp1376747-2
	galera.galera_pc_ignore_sb
2018-04-08 13:04:38 +03:00
Jan Lindström
1568950a7d MDEV-15806: Test failure on galera.galera_parallel_simple
Make sure DDL's (create tables) are replicated before continuing to
lock table.
2018-04-08 09:03:55 +03:00
Jan Lindström
c4b1a57b13 MDEV-13549: Galera test failures
Disable occasionally failing test cases
	pxc-421
	query_cache
	galera_parallel_simple
2018-04-08 08:24:36 +03:00
Alexey Botchkov
3eb2a265ea MDEV-14185 CREATE TEMPORARY TABLE AS SELECT causes error 1290 with read_only and InnoDB.
condition fixed.
2018-04-08 09:05:00 +04:00
Alexey Botchkov
d6f3a0064b MDEV-14185 CREATE TEMPORARY TABLE AS SELECT causes error 1290 with read_only and InnoDB.
handler::ha_create_handler_files shouldn't call the
mark_trx_read_write() for the temporary table.
2018-04-07 21:51:15 +04:00