Commit graph

182098 commits

Author SHA1 Message Date
Sergei Golubchik
7dcf1b5049 dead code in versioning/common.inc 2018-04-10 13:12:36 +02:00
Sergei Golubchik
35678c9572 dead code - related to vtmd
(will be added back when it'll be used)
2018-04-10 13:12:36 +02:00
Sergei Golubchik
09e6280147 remove unused THD::query_start_used 2018-04-10 13:12:35 +02:00
Sergei Golubchik
85194bd6ba fix detection of "-Wa,-nH" compiler flags on SunOS/i386 2018-04-10 13:12:35 +02: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ä
e7cbb2afa1
Merge pull request #696 from tempesta-tech/tt-10.3-kevgs
remove dead code
2018-04-10 10:41:20 +03: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
Otto Kekäläinen
7980364804 Deb: Fix commit c0f5addecb - also rename .install file 2018-04-09 23:09:03 +03:00
Vladislav Vaintroub
ecf6675cfc MDEV-15713 mariabackup: throw warning, if --stream is used without --backup 2018-04-09 19:16:50 +01:00
Vladislav Vaintroub
37f24806fc MDEV-15825 Mariabackup help mentions Percona and PXC but not MariaDB 2018-04-09 16:22:15 +01:00
Eugene Kosov
1513630d30 remove dead code 2018-04-09 17:21:21 +03: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
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
Marko Mäkelä
0c8d6fd66c MDEV-15364 FOREIGN CASCADE operations in system versioned referenced tables
Merge pull request #667
2018-04-09 11:02:24 +03:00
Marko Mäkelä
5a9e7bc6fe MDEV-13603 innodb_fast_shutdown=0 may fail to purge all history
srv_purge_should_exit(): Remove the parameter n_purged.
If we happened to have n_purged==0 while some transaction was still
active, and then that transaction was added to the history list,
we were prematurely stopping the purge. It is more appropriate to
first check for trx_sys.any_active_transactions() == 0
(this count can only decrease during shutdown) and then for
trx_sys.history_size() == 0 (that count typically decreases, but
can increase when any remaining active transactions are committed
or rolled back).

innodb.dml_purge: Remove a server restart, and explicitly wait for
purge, and use FLUSH TABLE FOR EXPORT to read the file contents.
This will make the test run faster, easier to debug, and also
allow it to run with --embedded. This might also help repeat
MDEV-11802 better. The issue MDEV-13603 remains will remain tested
by innodb.table_flags.
2018-04-09 10:47:46 +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
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
Marko Mäkelä
df44e75b42 Minor clean-up of purge code
purge_sys_t::n_submitted: Document that it is only accessed by
srv_purge_coordinator_thread.

purge_sys_t::n_completed: Exclusively use my_atomic access.

srv_task_execute(): Simplify the code.

srv_purge_coordinator_thread(): Test the cheaper condition first.

trx_purge(): Atomically access purge_sys.n_completed.
Remove some code duplication.

trx_purge_wait_for_workers_to_complete(): Atomically access
purge_sys.n_completed. Remove an unnecessary local variable.

trx_purge_stop(): Remove a redundant assignment.
2018-04-08 18:11:49 +03:00
Marko Mäkelä
0f6186c550 Make my_atomic_*lint type-safe 2018-04-08 18:05:01 +03:00
Marko Mäkelä
8beeeddd83 MDEV-12266 fixup: Fix bug in row_ins_sec_index_entry()
row_ins_sec_index_entry(): Compare a pointer to fil_system.sys_space,
not to a numeric constant. This code was recently changed in MDEV-13637,
and the condition was essentially disabled, potentially causing the
change buffer to grow uncontrollably when something is inserted into
a table that has secondary indexes and resides in the system tablespace.

Thanks to Daniel Black for pointing out that clang 7 flagged a warning
for the comparison of a pointer to an integer.

row_import_for_mysql(): Fix a possible compiler warning.
2018-04-08 18:04:24 +03: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
Marko Mäkelä
d9c85ee45a MDEV-15752 Possible race between DDL and accessing I_S.INNODB_TABLESPACES_ENCRYPTION
fil_crypt_read_crypt_data(): Do not attempt to read the tablespace
if the file is unaccessible due to a pending DDL operation, such as
renaming the file or DROP TABLE or TRUNCATE TABLE. This is only
reducing the probability of the race condition, not completely
preventing it.
2018-04-07 19:52:35 +03:00
Vicențiu Ciorbaru
4c89cff558 Merge branch '10.0' into 10.1 2018-04-07 17:11:22 +03:00
Otto Kekäläinen
c0f5addecb Deb: Remove versioning of MariaDB Backup and depend on client
There is no need for MariaDB Backup to be versioned. Other packages are
very unlikely to need to depend on a certain generation of this package.

Also for MariaDB Backup to run, it does not need the server, but client,
and from client only core parts.
2018-04-07 15:36:18 +03:00
Sergei Petrunia
b4c2ceb214 MDEV-15769: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed
Adjust the fix for MDEV-15472:
In close_cached_tables(), locked_tables_list.reopen_tables(...) call
might be made when a previous call to some function has already returned
error.
In this scenario, the function should return 0, even if reopen_tables(...)
call has succeeded.
2018-04-07 15:03:15 +03:00
Sergei Petrunia
1cb2e0333d MDEV-12466 : Assertion `thd->transaction.stmt.is_empty() || thd->in_sub_stmt || ...
When "FLUSH TABLE ... FOR EXPORT" fails, the SQL layer should rollback
the statement. Otherwise we hit an assert when we try to close the
tables while having a non-empty list of statement transaction participants.
2018-04-07 14:05:28 +03:00
Jan Lindström
4ede2fec4c Disable galera_var_auto_inc_control_on test. 2018-04-07 08:52:24 +03:00
Jan Lindström
3756e27aa7
Merge pull request #694 from codership/MDEV-13549-fixes-for-galera_wsrep_desync_wsrep_on
MDEV-13549 Fix test galera.galera_wsrep_desync_wsrep_on
2018-04-07 08:51:33 +03:00
Marko Mäkelä
1730ac5c4a MDEV-15348 Failure to load CREATE SEQUENCE...ROW_FORMAT=REDUNDANT
dict_sys_tables_type_valid(): Do not reject NO_ROLLBACK (sequence)
in ROW_FORMAT=REDUNDANT.

dict_load_table_low(): When flagging an error, assign *table = NULL.
Failure to do so could cause a crash if an error was flagged when
accessing INFORMATION_SCHEMA.INNODB_SYS_TABLES.
2018-04-07 04:22:44 +03:00
Eugene Kosov
7477b97e91 rename "where" to "row_end_data" 2018-04-06 17:38:14 +03:00
Eugene Kosov
e41ae769c1 use dedicated heap for upd_node_t::historical_row and corresponding stuff to
make its lifetime as short as possible

for historical row ROW_COPY_DATA -> ROW_COPY_POINTER for lower memory
consumption and better performance
2018-04-06 17:20:45 +03:00
Jan Lindström
c0b781d25e Disable test galera_var_auto_inc_control_on as it fails. 2018-04-06 16:33:41 +03:00
Daniele Sciascia
7925cdff6b MDEV-13549 Fix test galera.galera_wsrep_desync_wsrep_on
The test tends to fail if many parallel instances of it are executed:

```
mysqltest: At line 23: query 'ALTER TABLE t1 ADD PRIMARY KEY (f1)' failed:
1317: Query execution was interrupted
```

The `ALTER` fails because it is BF aborted due to an earlier `INSERT SELECT`
that is being applied:

```
INSERT INTO t1 (f1) SELECT ...

--connection node_2
SET GLOBAL wsrep_desync = TRUE;
SET SESSION wsrep_on = FALSE;

ALTER TABLE t1 ADD PRIMARY KEY (f1);

SET SESSION wsrep_on = TRUE;
SET GLOBAL wsrep_desync = FALSE;
```

And because the `ALTER` is executed with `wsrep_on = OFF`, it does not
run in total order isolation.
To avoid the problem it must be ensured that the `ALTER` only after the
large `INSERT SELECT` is done. To do so it is sufficient to issue
`SELECT COUNT(*) FROM t1;` from `node_2` before turning off wsrep.
The `SELECT` will trigger `wsrep_sync_wait` and proceed only after the
`INSERT SELECT` from node_1 is done.
2018-04-06 15:15:44 +02:00
Michael Widenius
8692973031 Fixed wrong argument to my_snprintf() 2018-04-06 13:15:40 +03:00
Marko Mäkelä
8325d71f6c Fix a compilation error 2018-04-06 13:10:01 +03:00
Jan Lindström
81075d45c6 MDEV-15566: System tablespace does not easily key rotate to unencrypted
Problem was that key rotation from encrypted to unecrypted was skipped
when encryption is disabled (i.e. set global innodb-encrypt-tables=OFF).

fil_crypt_needs_rotation
        If encryption is disabled (i.e. innodb-encrypt-tables=off)
	and there is tablespaces using default encryption (e.g.
	system tablespace) that are still encrypted state we need
	to rotate them from encrypted state to unencrypted state.
2018-04-06 12:59:43 +03:00
Jan Lindström
3be6cef593 MDEV-13549: Galera test failures
Fix test case galera_toi_ddl_nonconflicting as we need to wait
until both alter tables are finished on that Galera node.
2018-04-06 12:37:05 +03:00
Sergey Vojtovich
400a8eb60f MDEV-15291 - OQGraph fails to build on FreeBSD
Boost includes sys/param.h on FreeBSD, which in turn defines setbit()
macro. This macro is conflicting with open_query::judy_bitset::setbit().

Reordered includes such that oqgraph_judy.h never sees this macro.
Also removed duplicate includes of graphcore-config.h, which is included
by graphcore-graph.h/oqgraph_shim.h/oqgraph_thunk.h.
2018-04-06 13:33:08 +04:00
Michael Widenius
e27bfeca6a Added test case for MDEV-15742 to prove that it works
MDEV-15742 Assertion `table_share->tmp_table != NO_TMP_TABLE ||
m_lock_type == 1' failed in handler::ha_write_row
2018-04-06 12:31:13 +03:00
Marko Mäkelä
3498a656c9 MDEV-14705: Follow-up fixes
buf_flush_remove(): Disable the output for now, because we
certainly do not want this after every page flush on shutdown.
It must be rate-limited somehow. There already is a timeout
extension for waiting the page cleaner to exit in
logs_empty_and_mark_files_at_shutdown().

log_write_up_to(): Use correct format.

srv_purge_should_exit(): Move the timeout extension to the
appropriate place, from one of the callers.
2018-04-06 12:29:25 +03:00
Jan Lindström
d61ed5dd8a MDEV-13549: Galera test failures
Fix test case galera.pxc-421 to reset auto_increment_offset
correctly.
2018-04-06 12:28:48 +03:00