Commit graph

176611 commits

Author SHA1 Message Date
Daniele Sciascia
45eca6178e MDEV-13549 Fix and re-enable MTR test galera.MW-284
The following changes are committed:

* `RESET MASTER` at the end of the test. This was necessary to allow the test
  to run on repeated runs.

* `--source include/galera_wait_ready.inc` after setting `gmcast.isolate=0` to
  get back to a primary component.

* Fix for assertion in `Protocol::end_statement()`. The assertion is due to
  the fact that function `do_command()` calls `thd->protocol->end_statement()`,
  without setting an error, when it is detected that galera is not ready yet.
  Following line somehow disappeared in a past merge:
  ```
  my_message(ER_UNKNOWN_COM_ERROR,
             "WSREP has not yet prepared node for application use", MYF(0));
  ```
2018-04-05 14:43:11 +02:00
Jan Lindström
87d763015a MDEV-13549: Galera test failures
Fix test failure on galera_toi_dll_fk_insert. DEFAULT value seems
to be 3 but test expects it to be 1.
2018-04-05 10:31:42 +03:00
Jan Lindström
2ad51c3153
Merge pull request #686 from codership/MDEV-13549-fixes-for-mysql-wsrep#90
MDEV-13549 Fix and re-enable MTR test galera.mysql-wsrep#90
2018-04-05 08:59:28 +03:00
Jan Lindström
4f3d2e60ad
Merge pull request #690 from codership/MDEV-13549-fixes-for-galera_gra_log
MDEV-13549 Fix and re-enable MTR test galera.galera_gra_log
2018-04-04 15:26:05 +03:00
Daniele Sciascia
eeb684221d MDEV-13549 Fix and re-enable MTR test galera.galera_gra_log
Test galera checks that a `GRA_x_x.log` file is created whenever
wsrep applier fails to apply some replication event. The file
contains the corresponding binlog event that failed to apply.
The test creates a new file by concatenating a pre-recorded
file containing the binlog header (see `std-data/binlog-header.log`)
and the `GRA_x_x.log` file. The test then checks that the resulting
file, containing the binlog header and the event that failed to
apply, is correctly read by `mysqlbinlog` program.
The test fails in MariaDB because the GRA_x_x.log file created
by MariaDB already contains the binlog header (see MDEV-7867).
This patch fixes/simplifies test `galera.galera_gra_log` so that
it doesn't concatenate `std-data/binlog-header.log` with the
`GRA_x_x.log` file. File `std-data/binlog-header.log` is deleted
altoghether, because not used by any other test.
2018-04-03 16:30:58 +02:00
Michael Gmelin
ed33296246 Fix LibreSSL X509 (SSL) certificate hostname checking.
(Currently) LibreSSL doesn't calculate the string length of the hostname
that's passed to X509_check_host automatically in case namelen/chklen is 0.
This causes server certificate validation to fail when building MariaDB with
LibreSSL.

The proposed fix makes MariaDB determine the string length passed to
X509_check_host. As there are no ill side-effects (OpenSSL's X509_check_host
also simply calls strlen if namelen == 0, see also X509_check_host(3)), this
wasn't wrapped in any #ifdef like constructs.

Please see here for a proposed patch to modify LibreSSL's behavior:
https://github.com/libressl-portable/openbsd/pull/87
2018-04-03 16:20:04 +02:00
Jan Lindström
7ffa82b03c MDEV-14616: WSREP has not yet prepared node for application use error
MariaDB adjustments.

mysqltest.cc : Allow 12 error codes at --error

wait_until_connected_again.inc: Replace numeric error codes with symbols

mysqltest.test: Add error codes to test that tests too many errorcodes
2018-04-03 08:10:21 +03:00
Daniele Sciascia
992370693f MW-405 Remove wait_until_connected_again.inc from kill_galera.inc
kill_galera.inc can no longer rely on wait_until_connected_again.inc.
This is because wait_until_connected_again now tries to make sure
that the server it is connected eventually transition to ready
state. Whereas some tests may need to kill galera while the server
is in a non-primary view.
2018-04-03 08:10:21 +03:00
Daniele Sciascia
54652161a2 MW-405 Adjust galera_pc_weight to new wait_until_connected_again
Test galera_3nodes.galera_pc_weight started to fail because it
expects to use wait_until_connected_again while remaining in
non-primary view. Hopefully this is the only test which makes
this assumption, and fortunately those wait_until_connected_again
seem unnecessary, so this patch removes them.
2018-04-03 08:10:21 +03:00
Daniele Sciascia
fc26fd1c47 MW-405 Remove redundant conditions
Remove clause on `thd->variables.wsrep_on` in the following code:

if (WSREP(thd))
{
...
        if (thd->variables.wsrep_on &&
            ...

In the above snippet, `WSREP(thd)` already ensures thd->variables.wsrep_on
2018-04-03 08:10:21 +03:00
Daniele Sciascia
d970f805e6 MW-405 Make sure wsrep is ready in wait_until_connected_again.inc
wait_until_connected_again issues 'SHOW STATUS' query repeatedly
until mysqld replies without errors.
However, SHOW STATUS is treated specially by wsrep in that it is
allowed to proceed even if wsrep is not yet in ready state. As a
consequence, after returning from wait_until_connected_again,
wsrep may not be ready yet and subsequent queries may fail with
error "1047 WSREP has not yet prepared node for application use".
To avoid those errors, the patch includes wait_wsrep_ready.inc at
the end of the wait_until_connected_again.
2018-04-03 08:10:21 +03:00
Daniele Sciascia
390e5ab794 MDEV-13549 Fix and re-enable MTR test galera.mysql-wsrep#90
Test was missing DEBUG_SYNC cleanup `SET DEBUG_SYNC ='RESET'`.
2018-03-29 15:50:06 +02:00
Jan Lindström
d21adb53a5
Merge pull request #676 from codership/MDEV-13549-fixes-for-galera_gtid_slave
MDEV-13549 Fix and re-enable MTR test galera.galera_gtid_slave
2018-03-29 08:07:47 +03:00
Jan Lindström
e550063ad9
Merge pull request #674 from codership/MDEV-13549-fixes-for-galera_as_master
MDEV-13549 Fix and re-enable MTR test galera.galera_as_master
2018-03-28 15:44:47 +03:00
Daniele Sciascia
e376122460 MDEV-13549 Fix and re-enable MTR test galera.galera_gtid_slave
This patch makes two changes:

* It replaces `--sleep 1` with appropriate wait_conditions, and
  removes another `--sleep 1` which is no longer necessary, after
  MDEV-14144 has been fixed.

* It moves the `RESET MASTER` from node_1 at the very end, when it
  it sure that the other nodes have applied the the final cleanup
  `DROP TABLE t1,t2.`
  This solves the problem with the `DROP TABLE` not being replicated
  to the asynchronous slaves, which would make the test fail with:
  `Timeout in wait_condition.inc for SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';`
2018-03-28 11:46:23 +02:00
Jan Lindström
11ac2df027
Merge pull request #673 from codership/MDEV-13549-fixes-for-galera_suspend_slave
MDEV-13549 Fix and re-enable test galera.galera_suspend_slave
2018-03-28 08:09:40 +03:00
Daniel Bartholomew
db16ae54f6 bump the VERSION 2018-03-27 12:56:59 -04:00
Daniele Sciascia
58fad0400c MDEV-13549 Fix and re-enable MTR test galera.galera_as_master
Was failing due to missing RESET MASTER
2018-03-27 14:23:45 +02:00
Daniele Sciascia
832025b512 MDEV-13549 Fix and re-enable test galera.galera_suspend_slave
Test galera_suspend_slave checks that after suspending a galera
node, like this:
```
--perl
        my $pid_filename = $ENV{'NODE_2_PIDFILE'};
        my $mysqld_pid = `cat $pid_filename`;
        chomp($mysqld_pid);
        system("kill -SIGSTOP $mysqld_pid");
        exit(0);
EOF
```

the remaining one node cluster is no longer able to successfully
INSERT new rows:
```
--error ER_UNKNOWN_COM_ERROR,ER_LOCK_WAIT_TIMEOUT,ER_LOCK_DEADLOCK,ER_ERROR_DURING_COMMIT
INSERT INTO t1 VALUES (1);
```

On rare occasions when the system is overloaded, it appears that
suspending the process with ```system("kill -SIGSTOP $mysqld_pid")```
takes some time, enough for the subsequent INSERT to succeed. In which
case the test fails because it rightly expects the INSERT to fail.

To fix the problem, the patch makes sure that the cluster has shrinked
to one node, before trying to INSERT the new value.
2018-03-27 12:05:33 +02:00
Monty
2f2e7f8c9d Fixed compiler warnings in sphinx 2018-03-26 17:56:09 +03:00
Monty
8bb51f612e disable some galera tests that fails regurarly 2018-03-26 17:53:17 +03:00
Monty
9aa1ab5a59 Fixed compiler warning 2018-03-26 17:53:17 +03:00
Monty
ca0c96fc89 Adjust table_open_cache to avoid getting error 24 (too many open files)
MDEV--15609 engines/funcs.crash_manytables_number crashes with error 24
           (too many open files)
MDEV-10286  Adjustment of table_open_cache according to system limits
            does not work when open-files-limit option is provided

Fixed by adjusting tc_size downwards if there is not enough file
descriptors to use.

Other changes:
- Ensure that there is 30 (was 10) extra file descriptors for other usage
- Decrease TABLE_OPEN_CACHE_MIN to 200 as it's better to have a smaller
  table cache than getting error 24
- Increase minimum of max_connections and table_open_cache from 1 to 10
  as 1 is not usable for any real application, only for testing.
2018-03-26 17:53:17 +03:00
Elena Stepanova
4d83b01537 Updated list of unstable tests for 10.1.32 release 2018-03-26 17:14:08 +03:00
Sergei Golubchik
15795b9f9a save/restore auto_inc settings in galera_sst_rsync test
and remove redundant have_innodb.inc, it's included in
galera_cluster.inc anyway.
2018-03-24 14:24:20 +01:00
Sergei Golubchik
7454d5f952 save/restore auto_inc settings in galera_sst_mysqldump test
and remove redundant have_innodb.inc, it's included in
galera_cluster.inc anyway.
2018-03-24 14:17:31 +01:00
Sergei Golubchik
5fdbc3f66b compiler warning
extra/mariabackup/ds_buffer.c:145:9: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
2018-03-24 14:17:31 +01:00
Alexey Botchkov
0b74a1fa64 MDEV-14533 Provide information_schema tables using which hardware
information can be obtained.

plugin only enabled for Linux, as it fails building on BSD/MacOSX.
disks.test fixed.
2018-03-24 00:37:38 +04:00
Alexey Botchkov
3b644ac1f7 MDEV-14533 Provide information_schema tables using which hardware
information can be obtained.

disks.test moved to plugin's directory.
2018-03-24 00:30:28 +04:00
Sergei Golubchik
febe1e8503 Merge branch '10.0' into 10.1 2018-03-23 17:40:53 +01:00
Sergei Golubchik
d3681c18f9 followup for 89b0d5cb6e, backport 8c422bf48d 2018-03-23 17:40:09 +01:00
Vladislav Vaintroub
af86422f08 MDEV-13023 mariabackup does not preserve holes for page compressed tables.
Changed "local" datasink logic to detect page compressed Innodb tables.

Whenever such table is detected, holes in the copied files are created by
skipping over binary zeros at the end of each compressed page.
2018-03-23 15:30:01 +00:00
Sergey Vojtovich
ca291015bc MDEV-10269 - Killed queries from I_S stay in 'Killed' state for long
time and don't let server shut down

Queries from I_S in "Filling schema table" state didn't check killed
flag. For large tables this phase may take a while to complete.

Fixed by adding thd->killed flag check for each processed row.
2018-03-23 15:33:53 +04:00
Sergei Golubchik
a2e47f8c41 Merge branch '5.5' into 10.0 2018-03-23 11:44:29 +01:00
Sergei Golubchik
4092f90655 MDEV-15409 make sure every sst script is tested in buildbot
galera SST tests have a debug part, but we don't want to limit them
to fulltest2 builder. So, add support for test files that
have a debug part:

* add maybe_debug.inc and maybe_debug.combinations
* 'debug' combination is run when debug is available
* 'release' combination is run otherwise
* test wraps debug parts in if($with_debug) { ... }
* and creates ,debug.rdiff for debug results
2018-03-23 00:55:20 +01:00
Sergei Golubchik
5ff7ed96d5 MDEV-15409 make sure every sst script is tested in buildbot
create galera.galera_sst_mariabackup
2018-03-23 00:55:20 +01:00
Sergei Golubchik
60d4abc1e5 MDEV-15409 make sure every sst script is tested in buildbot
* make galera.galera_sst_xtrabackup* not big
* auto-select between socat and nc, whatever available
* auto-skip xtrabackup tests if no xtrabackup or neither socat nor nc
2018-03-23 00:55:20 +01:00
Sergei Golubchik
4b1cbff7a8 MDEV-15409 make sure every sst script is tested in buildbot
make galera.galera_sst_rsync not big
2018-03-23 00:55:20 +01:00
Sergei Golubchik
8f1014e9a0 MDEV-15409 make sure every sst script is tested in buildbot
fix galera.galera_sst_mysqldump test to work:
* must connect to 127.0.0.1, where mysqld is listening
* disable wsrep_sync_wait in wsrep_sst_mysqldump, otherwise
  sst can deadlock
* allow 127.0.0.1 for bind_address and wsrep_sst_receive_address.
  (it's useful in tests, or when two nodes are on the same box,
  or when nodes are on different boxes, but the connection is
  tunelled, or whatever. Don't judge user's setup). MDEV-14070
* don't wait for client connections to die when doing
  mysqldump sst. they'll die in a due time, and if needed mysql
  will wait on locks until they do. MDEV-14069

Also don't mark it big, to make sure it's sufficiently tested
2018-03-23 00:55:20 +01:00
Sergei Golubchik
7e300424a3 wsrep_sst_auth: fix a memory leak
wsrep_sst_auth_init() is always invoked with value==wsrep_sst_auth.
Old code was leaking value, because it was never freed.
2018-03-23 00:55:19 +01:00
Sergei Golubchik
ccd5c9c64e mysql: don't prepare strings if they won't be used
in particular, don't call server_version_string() unnecessary,
because it runs 'SELECT @@version_comment' and this might block
under certain galera settings (wsrep_sync_wait).
2018-03-23 00:55:19 +01:00
Sergei Golubchik
a15ab358fc wsrep_sst scripts: support traditional netcat 2018-03-23 00:55:19 +01:00
Sergei Golubchik
89b0d5cb6e MDEV-13968 sst fails with "WSREP_SST_OPT_PORT: readonly variable"
Backport from 10.2: 4c2c057d40 and f7090df712
2018-03-23 00:55:19 +01:00
Sergei Golubchik
de55a7d1f9 Allow table-less selects even when wsrep is not ready
It doesn't make sense to allow selects from I_S but disallow selects
that don't use any tables at all, because any (disallowed) select that
doesn't use tables can be made allowed by adding
"FROM I_S.COLLATIONS LIMIT 1" to the end.

And it break mysql-test rather badly, even check-testcase.test
fails on its first `SELECT '$tmp' = 'No such row'`

This reverts 9a89614857, c5dd2abf4c, and 33028f7c4b:
Refs: MW-245 - changed logic so that in non primary node it is possible to do SET + SHOW + SELECT from information and pfs schema, when dirty reads are not enabled - however, non table selects are not allowed (e.g. SELECT 1)
Refs MW-245 - logic was wrong in detecting if queries are allowed in non primary node. it allowed select with no table list to execute even if dirty reads was not specified
Refs: MW-245 - Adjust tests to account for the new behavior.
2018-03-23 00:55:19 +01:00
Sergei Golubchik
b6e2973ee6 MDEV-14533 Provide information_schema tables using which hardware information can be obtained.
update README, use maria_declare_plugin(), specify the author.
2018-03-23 00:55:19 +01:00
Alexey Botchkov
f5b2761c70 MDEV-10871 Add logging capability to pam_user_map.c.
The 'debug' option implemented for the pam_user_map.so.
2018-03-23 00:18:21 +04:00
Alexander Barkov
0cba2c1ccb MDEV-15633 Memory leak after MDEV-15005 2018-03-22 16:23:37 +04:00
Thirunarayanan Balathandayuthapani
b6d68c6aa3 MDEV-13561 Mariabackup is incompatible with retroactively created innodb_undo_tablespaces
- Mariabackup supports starting undo tablespace id which is greater
than 1.
2018-03-22 14:19:16 +05:30
Varun Gupta
ddc5c65333 MDEV-14779: using left join causes incorrect results with materialization and derived tables
Conversion of a subquery to a semi-join is blocked when we have an
IN subquery predicate in the on_expr of an outer join. Currently this
scenario is handled but the cases when an IN subquery predicate is wrapped
inside a Item_in_optimizer item then this blocking is not done.
2018-03-22 03:01:53 +05:30
Oleksandr Byelkin
f3994b7432 MDEV-15492: Subquery crash similar to MDEV-10050
Detection of first execution of PS fixed.
More debug info.
2018-03-21 19:47:42 +01:00