Commit graph

179732 commits

Author SHA1 Message Date
Daniele Sciascia
f1de725fda MDEV-14144 Re-enable MTR test galera.galera_as_slave 2018-03-12 13:41:47 +01:00
Marko Mäkelä
3a93ec53c1 Merge 10.1 into 10.2 2018-03-12 14:27:17 +02:00
Marko Mäkelä
0be18c4038 Merge 10.0 into 10.1 2018-03-12 13:22:13 +02:00
Marko Mäkelä
4a35e76f64 MDEV-14773 DROP TABLE hangs for InnoDB table with FULLTEXT index
fts_sync(): If the dict_table_t::to_be_dropped flag is set,
do not "goto begin_sync".

Also, clean up the way how dict_index_t::index_fts_syncing
is cleared.

It looks like this regression was introduced by merging
Oracle Bug #24938374 MYSQL CRASHED AFTER LONG WAIT ON DICT OPERATION LOCK
WHILE SYNCING FTS INDEX
068f8261d4
from MySQL 5.6.38 into MariaDB 10.0.33, 10.1.29, 10.2.10.
The same hang is present in MySQL 5.7.20.
2018-03-12 13:06:21 +02:00
Philip Stoev
05261f97c8 Galera MTR Tests: Modify mysqltest so that if a --let = SELECT ... query is interrupted, the test does not fail but the error is communicated to caller 2018-03-12 11:44:49 +01:00
Alexey Botchkov
cd109592ca MDEV-15217 Assertion `thd->transaction.xid_state.xid.is_null()' failed
in trans_xa_start.

        THD.transaction.xid_state.xid.rm_error should be cleaned
        as the thread ends.
2018-03-12 08:30:08 +04:00
Olivier Bertrand
f9cf2df077 - Fix MDEV-15429 CONNECT engine JDBC handling Postgresql UUID type
Also handle Postgresql sending type VARCHAR for TEXT column and
  setting length to b x7FFFFFF when the length is unknown.
  modified:   storage/connect/Client.java
  modified:   storage/connect/JavaWrappers.jar
  modified:   storage/connect/JdbcInterface.java
  modified:   storage/connect/PostgresqlInterface.java
  modified:   storage/connect/global.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jdbconn.h
  modified:   storage/connect/mysql-test/connect/r/jdbc_postgresql.result
  modified:   storage/connect/mysql-test/connect/t/jdbc_postgresql.test
  modified:   storage/connect/mysql-test/connect/t/jdbconn.inc
  modified:   storage/connect/plgdbsem.h
  modified:   storage/connect/tabjdbc.cpp
  modified:   storage/connect/tabjdbc.h
2018-03-11 23:46:33 +01:00
Sergei Petrunia
28777046b4 MDEV-15245: Assertion `false' failed in myrocks::ha_rocksdb::position
Don't call handler->position() if the last call to read a row did
not succeed.
2018-03-11 16:43:36 +00:00
sjaakola
c439fdc953 MDEV-15540
The error log redirection for wsrep_recover run does not work in old version.
For the wsrep_recovery run, error logging is supposed to go into:
mysql-test/suite/galera/include/galera_wsrep_recover.inc
In old version, this works only partially, 4 first lines of error messages after mysql startup
do go into the galera_wsrep_recover.log, but after that the default error log file is enforced
and remaining error logging goes into the default error log file.

In this patch this problem is fixed by passing --log-error option in mysql startup

This fix was tested with galera_gcache_recover test, which is currently in disabled state.
Note that the test does not pass even after this fix, as there are further more issues
in later test phases.
2018-03-11 16:50:37 +02:00
Varun Gupta
926edd48e1 MDEV-15235: Assertion `length > 0' failed in create_ref_for_key
The issue is that we are creating a materialised table with key of length 0 which is incorrect, we should
disable materialisation for such a case.
2018-03-11 16:17:14 +05:30
Marko Mäkelä
112df06996 MDEV-15529 IMPORT TABLESPACE unnecessarily uses the doublewrite buffer
fil_space_t::atomic_write_supported: Always set this flag for
TEMPORARY TABLESPACE and during IMPORT TABLESPACE. The page
writes during these operations are by definition not crash-safe
because they are not written to the redo log.

fil_space_t::use_doublewrite(): Determine if doublewrite should
be used.

buf_dblwr_update(): Add assertions, and let the caller check whether
doublewrite buffering is desired.

buf_flush_write_block_low(): Disable the doublewrite buffer for
the temporary tablespace and for IMPORT TABLESPACE.

fil_space_set_imported(), fil_node_open_file(), fil_space_create():
Initialize or revise the space->atomic_write_supported flag.

buf_page_io_complete(), buf_flush_write_complete(): Add the parameter
dblwr, to indicate whether doublewrite was used for writes.

buf_dblwr_sync_datafiles(): Remove an unnecessary flush of
persistent tablespaces when flushing temporary tablespaces.
(Move the call to buf_dblwr_flush_buffered_writes().)
2018-03-10 11:54:34 +02:00
Marko Mäkelä
54765aaa4d MDEV-15524 Do not disable page checksums for temporary tables
buf_flush_init_for_writing(): Remove the parameter skip_checksum.
2018-03-10 11:54:34 +02:00
Marko Mäkelä
4fa18d52b5 MDEV-15524 Do not write garbage for temporary tables
fsp_init_file_page_low(): Always initialize the page.
2018-03-10 11:54:34 +02:00
Marko Mäkelä
1e4cb8403c buf_page_io_complete(): Minor code cleanup 2018-03-10 11:54:34 +02:00
Jacob Mathew
90247658e0 MDEV-14019: Spider + binlog_format = ROW => CRASH
The crash occurs when inserting into, updating or deleting from Spider system
tables.  These operations do not go through the normal insert, update or
delete logic, so binary logging of the row is not properly set up and leads
to the crash.

The fix for this problem uses the same strategy as is used for the servers
system table that contains entries for the servers created with CREATE SERVER.
Binary logging is now temporarily disabled on insert, update and delete
operations on Spider system tables.

Author:
  Jacob Mathew.

Reviewer:
  Kentoku Shiba.
2018-03-09 19:14:20 -08:00
Marko Mäkelä
10f06b07bc Merge 10.0 into 10.1 2018-03-09 22:43:54 +02:00
Marko Mäkelä
4a5c237c76 MDEV-14648 Restore fix for MySQL BUG#39053 - UNINSTALL PLUGIN does not allow the storage engine to cleanup open connections
ha_close_connection(): Do invoke the method also for plugins
for which UNINSTALL PLUGIN was deferred due to open connections.
2018-03-09 22:43:05 +02:00
Daniele Sciascia
a3ba3aab5a MDEV-13549 Wrong usage of mutex 'LOCK_wsrep_thd' and 'LOCK_thd_kill' test galera.MW-286
Test MW-286 occasionally failed with error the following message:

```
safe_mutex: Found wrong usage of mutex 'LOCK_wsrep_thd' and 'LOCK_thd_kill'
Mutex currently locked (in reverse order):
LOCK_thd_kill                     mariadb-server/sql/sql_class.h  line 3535
LOCK_wsrep_thd                    mariadb-server/sql/wsrep_thd.cc  line 88
```

The fix consists in calling thd->reset_killed() in wsrep_mysql_parse() after
LOCK_wsrep_thd is unlocked. Which avoids the taking locks LOCK_wsrep_thd and
LOCK_thd_kill in reverse order.
2018-03-08 15:02:43 +01:00
Jan Lindström
aec4734f61 MDEV-13935: INSERT INTO stuck at state "Unlocking tables"
There were some differences on MariaDB compared with MySQL.
Fix these differences.
2018-03-08 12:25:01 +02:00
Daniele Sciascia
0f0776b2ad MDEV-13549 Fix and re-enable test galera.MW-286
This test failed to work properly because the fixes it came
with were not merged from upstream.
The test would fail with a spurious ER_LOCK_DEADLOCK error
for a conflict that happened earlier in the test execution,
while wsrep is disabled.
The original fix was to set THD::wsrep_conflict_state only
if wsrep is enabled (see wsrep_thd_set_conflict_state() in
sql/wsrep_mysqld.cc)
2018-03-08 10:55:52 +01:00
Marko Mäkelä
8ef727b3d0 MDEV-14904 Backport innodb_default_row_format
InnoDB in Debian uses utf8mb4 as default character set since
version 10.0.20-2. This leads to major pain due to keys longer
than 767 bytes.

MariaDB 10.2 (and MySQL 5.7) introduced the setting
innodb_default_row_format that is DYNAMIC by default. These
versions also changed the default values of the parameters
innodb_large_prefix=ON and innodb_file_format=Barracuda.
This would allow longer column index prefixes to be created.
The original purpose of these parameters was to allow InnoDB
to be downgraded to MySQL 5.1, which is long out of support.

Every InnoDB version since MySQL 5.5 does support operation
with the relaxed limits.

We backport the parameter innodb_default_row_format to
MariaDB 10.1, but we will keep its default value at COMPACT.
This allows MariaDB 10.1 to be configured so that CREATE TABLE
is less likely to encounter a problem with the limitation:

	loose_innodb_large_prefix=ON
	loose_innodb_default_row_format=DYNAMIC

(Note that the setting innodb_large_prefix was deprecated in
MariaDB 10.2 and removed in MariaDB 10.3.)

The only observable difference in the behaviour with the default
settings should be that ROW_FORMAT=DYNAMIC tables can be created
both in the system tablespace and in .ibd files, no matter what
innodb_file_format has been assigned to. Unlike MariaDB 10.2,
we are not changing the default value of innodb_file_format,
so ROW_FORMAT=COMPRESSED tables cannot be created without
changing the parameter.
2018-03-07 17:49:42 +02:00
Ian Gilfillan
a050189773 MDEV-15474 Update server.cnf section to mariadb-10.2 2018-03-07 17:13:03 +04:00
Sergei Golubchik
176d603cc7 MDEV-15462 TokuDB does not build on openSUSE
fix 50359719f0
don't rely on any specific engine checking order
2018-03-04 18:59:29 +01:00
Elena Stepanova
8f98835bb8 MDEV-15448 Remove "innodb_additional_mem_pool_size" setting from my-innodb-heavy-4G.cnf file 2018-03-03 01:59:52 +02:00
Daniel Black
26e4a48bda MDEV-8743: ib_logfile0 Use O_CLOEXEC so galera SST scripts don't get fd 2018-03-02 11:09:51 +11:00
Alexander Barkov
d0cc7a5225 MDEV-15420 Wrong result for CAST from TIME or DATETIME with zero integer part and non-zero microseconds to DECIMAL(X,Y)
The loop in ull2dec() does not iterate if "from" is zero,
so to->intg got erroneously set to 0 instead of 1.
Because if this, my_decimal2seconds() wrote the fractional
part into a wrong buf[x].

Catching the special case with zero "from" and properly initialize "to"
using decimal_make_zero().
2018-02-25 23:59:01 +04:00
Teemu Ollakka
7bd95307f2 Bump wsrep patch version to 25.23 2018-02-25 21:24:12 +02:00
Olivier Bertrand
175ce0e7f5 - Remove warning on not used tabtyp variable in connect_assisted_discovery
modified:   storage/connect/ha_connect.cc

- Fix a bug causing CONNECT to loop when expanding a JSON column
  when the expanded column value is null or void array.
- Adding the FullArray option to JSON tables.
- Skipping expanded JSON lines when the expanded column value is null.
  modified:   storage/connect/connect.cc
  modified:   storage/connect/tabdos.h
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h

- Fix MDEV-13353 No file privilege for ODBC, JDBC, MONGO, MAC, WMI file types.
  modified:   storage/connect/ha_connect.cc

- Make some Json UDFs  to accept a non JSON item as 1st parameter.
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h

- Update Json UDF tests to cope with above changes.
  modified:   storage/connect/mysql-test/connect/r/json_udf.result
  modified:   storage/connect/mysql-test/connect/r/json_udf_bin.result
  modified:   storage/connect/mysql-test/connect/r/vcol.result
  modified:   storage/connect/mysql-test/connect/t/json_udf.test
  modified:   storage/connect/mysql-test/connect/t/vcol.test

- Fix some compiler warning treated as error
  PlugSubAlloc no more exported because it does throw.
  modified:   storage/connect/global.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h

- Other files modified (?) when going back to wrong merge
  modified:   storage/connect/CMakeLists.txt
  modified:   storage/connect/array.cpp
  modified:   storage/connect/colblk.cpp
  modified:   storage/connect/connect.cc
  modified:   storage/connect/csort.cpp
  modified:   storage/connect/domdoc.cpp
  modified:   storage/connect/filamap.cpp
  modified:   storage/connect/filamgz.cpp
  modified:   storage/connect/filamtxt.cpp
  modified:   storage/connect/filamzip.cpp
  modified:   storage/connect/filter.cpp
  modified:   storage/connect/fmdlex.c
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/macutil.cpp
  modified:   storage/connect/myconn.cpp
  modified:   storage/connect/odbconn.cpp
  modified:   storage/connect/plgdbutl.cpp
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/preparse.h
  modified:   storage/connect/rcmsg.c
  modified:   storage/connect/rcmsg.h
  modified:   storage/connect/reldef.cpp
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabfmt.cpp
  modified:   storage/connect/tabmac.cpp
  modified:   storage/connect/tabmul.cpp
  modified:   storage/connect/tabmysql.cpp
  modified:   storage/connect/tabmysql.h
  modified:   storage/connect/tabodbc.cpp
  modified:   storage/connect/tabtbl.cpp
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/value.cpp
  modified:   storage/connect/xobject.cpp
2018-02-25 14:31:28 +01:00
Jan Lindström
e826d1e64d MDEV-14814: encryption.innodb_encryption-page-compression failed in buildbot with timeout on wait condition
Fix wrong wait condition.
2018-02-24 22:39:21 +02:00
Daniel Black
ac3fd5acac debian: VCS is on github 2018-02-25 00:19:42 +04:00
Sergei Golubchik
e49c1d1cef mtr: force-flush stderr and stdout
prevents buffering in cases like

  ./mtr | tee log
2018-02-24 09:39:57 +01:00
Sergei Golubchik
e92cc09765 MDEV-15345 Compilation fails to build my_addr_resolve.c
fix the compilation error.
no support for plugins yet.
2018-02-22 16:46:11 +01:00
Sergei Golubchik
e4a73acc63 Merge branch '10.1' into 10.2 2018-02-22 16:46:02 +01:00
Sergei Golubchik
a04e4f531a Merge branch '10.0' into 10.1 2018-02-22 14:12:02 +01:00
Jan Lindström
504beb1325 Add supressions for possible warning. 2018-02-22 14:22:44 +02:00
Sergei Golubchik
b728641e86 Merge branch '5.5' into 10.0 2018-02-22 09:22:03 +01:00
Sergei Golubchik
e119799a92 fix compilation wih -DPLUGIN_PARTITION=NO
rocksdb and spider
2018-02-22 08:40:54 +01:00
Sergei Golubchik
2daa005800 Merge branch '10.1' into 10.2 2018-02-22 08:39:24 +01:00
Sergei Golubchik
5d8ac1ece1 log all mtr output in vardir/log/stdout.log
despite the name, it logs both stdout and stderr
2018-02-21 17:48:25 +01:00
Sergei Golubchik
50359719f0 fix compilation -DWITH_PERFSCHEMA=NO
tokudb apparently requires perfschema now
2018-02-21 17:48:25 +01:00
Sergei Golubchik
18455ec3f1 fix compilation wih -DPLUGIN_PARTITION=NO 2018-02-21 17:48:25 +01:00
Sergei Petrunia
db0484f355 Change MyRocks Maturity Level from Beta to Gamma (RC) 2018-02-21 17:27:46 +03:00
Daniel Black
4e6dab94d0 MDEV-10.1.31 does not join an existing cluster with SST xtrabackup-v2
Analysis:- The problem  is the change in the implementation of wait_for_listen
in wsrep_sst_xtrabackup-v2.sh. The new script uses lsof which will always
exit with an error code if it can't find all the items, and because the
script has the -e option set in the hashbang line (#!/bin/bash -ue), the
script will abort right after running lsof if lsof can't find even a single
item among all the items listed in its arguments. This will happen even if
socat is running and listening, because it can't find nc. The loop in
wait_for_listen will therefore always quit after one iteration without
writing the "ready" line to signal the parent.

Solution:- We will or the lsof with true.

Patch Credit :Daniel Black and David Wang
2018-02-21 19:48:18 +05:30
Sergei Petrunia
00a556c0c2 MDEV-15372: Parallel slave speedup very limited when log_slave_updates=OFF
Part #2: some transactions have m_rocksdb_tx==NULL (and most functions of
Rdb_transction_impl handle this case. Do like they do)
2018-02-21 17:00:03 +03:00
Sergei Golubchik
88d1c1c551 MDEV-15288 Configure errors when building without INNOBASE 2018-02-21 14:42:56 +01:00
Sergei Petrunia
01e89d6a86 MDEV-15372: Parallel slave speedup very limited when log_slave_updates=OFF
Make MyRocks' non-XA commit path to first do the commit without syncing
and then sync.
2018-02-21 15:42:34 +03:00
Vladislav Vaintroub
56d6776524 Windows : remove freopen(), "to keep fd = 0 busy".
a) We do not need this on Windows, and it is not clear what it does,inside
service.

b) It hinders debugging.
mysql-test-run.pl --debugger=vsjitdebugger more often than , would stop here
throwing "invalid handle" exception.
2018-02-20 20:03:23 +00:00
Jan Lindström
c3a3b77f9a Disable failing Galera tests:
* galera_gtid_slave
* galera_unicode_identifiers
2018-02-20 09:27:31 +02:00
Jan Lindström
3a7126cbb7 Disable galera_gtid until 1047: WSREP has not yet prepared node for application use is fixed. 2018-02-20 09:18:33 +02:00
Galina Shalygina
a128fe4346 MDEV-14297: Lost name of a explicitly named CTE column used in
the non-recursive CTE via prepared statement

The problem appears as the column names of the CTE were allocated on the
wrong MEMROOT and after the preparation of the statement they disappear.

To fix it in the procedure With_element::rename_columns_of_derived_unit
the CTE column names are now allocated in the permanent MEMROOT for the
prepared statements and stored procedures.
2018-02-20 01:16:50 +02:00