Commit graph

181391 commits

Author SHA1 Message Date
Teemu Ollakka
ce28fa5303 Backported wsrep-recover test from 10.4.
Backported wsrep-recover test from 10.4 to test the wsrep recovery
after database shutdown or crash. Renamed the test to wsrep-recover-v25
to avoid conflicts with existing test in 10.4 and to provide coverage
for wsrep-API v25 compatible behavior.

The test case in 10.2 is simpler because out of order prepare
step cannot happen, the commit order critical section is grabbed
before prepare phase.

Test is not recorded since it does not produce expected result.
2019-01-25 16:03:14 +02:00
Marko Mäkelä
fab531a150 Fix the build after MDEV-17803
Use the same data type 'ulong' to avoid type mismatch on Windows
and on 32-bit systems.

FIXME: The correct data type should probably be 64-bit.
2019-01-24 15:59:00 +02:00
Marko Mäkelä
25161e6219 Merge 10.1 into 10.2 2019-01-24 14:43:29 +02:00
Marko Mäkelä
65350042a4 Merge 10.0 into 10.1 2019-01-24 13:24:13 +02:00
Marko Mäkelä
7930ab7e33 Comment out the statement that triggers MDEV-18366 2019-01-24 12:41:07 +02:00
Marko Mäkelä
46f712c73c MDEV-15114: Fix memory leaks
When innobase_allocate_row_for_vcol() returns true (for failure),
it may already have invoked mem_heap_create(). However, some callers
would fail to invoke mem_heap_free().
2019-01-24 12:32:27 +02:00
Andrei Elkin
ba1ce3aeae MDEV-17803 side effect resulted in table id advance. A test result file is updated. 2019-01-24 12:01:43 +02:00
Sergei Golubchik
edeba0c873 MDEV-17868 mysqltest fails to link with system PCRE libraries
pcre needs symbols from pcreposix
(but this is only an issue when linking with system static libraries)
2019-01-24 10:34:05 +01:00
Thirunarayanan Balathandayuthapani
a0f3b9f94f MDEV-17376 Server fails to set ADD_PK_INDEX, DROP_PK_INDEX if unique index nominated as PK
Problem:
========
Server fails to notify the engine by not setting the ADD_PK_INDEX and
DROP_PK_INDEX When there is a
 i) Change in candidate for primary key.
 ii) New candidate for primary key.

Fix:
====
Server sets the ADD_PK_INDEX and DROP_PK_INDEX while doing alter for the
above problematic case.
2019-01-24 13:52:51 +05:30
Marko Mäkelä
b572814baa After-merge fix of a result
I missed this in commit 9a7281a703
2019-01-23 20:57:14 +02:00
Andrei Elkin
b22354680e merge 10.0 -> 10.1 to resolve MDEV-17803 conflicts. 2019-01-23 20:16:21 +02:00
Marko Mäkelä
3dac4e9f0e MDEV-18338 Merge new release of InnoDB 5.7.25 to 10.2 2019-01-23 19:48:19 +02:00
Marko Mäkelä
d283f80eae Update the InnoDB version number 2019-01-23 19:46:35 +02:00
Marko Mäkelä
64678ca506 Bug #22990029: Add a test case 2019-01-23 19:46:35 +02:00
Aditya A
aa8a31dadd Bug #22990029 GCOLS: INCORRECT BEHAVIOR AFTER DATA INSERTED WITH IGNORE KEYWORD
PROBLEM
-------

1. We are inserting a base column entry which causes an invalid value
   by the function provided to generate virtual column,but we go ahead
   and insert this due to ignore keyword.
2. We then delete this record, making this record delete marked in innodb.
   If we try to insert another record with the same pk as the deleted
   record and if the rec is not purged ,then we try to undelete mark this
   record and try to build a update vector with previous and updated value
   and while calculating the value of virtual column we get error from
   server that we cannot calculate this from base column.
   Innodb assumes that innobase_get_computed_value() Should always return
   a valid value for the base column present in the row. The failure of
   this call was not handled ,so we were crashing.

FIX
2019-01-23 19:46:35 +02:00
Marko Mäkelä
e32305e505 Add a test for Bug #28470805 DELETE CASCADE CRASHES ... ON RESTART
Thanks to commit 2614a0ab0f
before MDEV-5800, no version of MariaDB is affected by this bug
that was fixed in MySQL 5.7.25.
2019-01-23 19:45:12 +02:00
Sergei Golubchik
c2a4bfad22 MDEV-18119 upgrading from 10.3 to 10.4 can result in the password for a user to be wiped out
10.1 part: SHOW CREATE USER didn't show the password, if plugin was set,
but authentication_string was not
2019-01-23 17:34:22 +01:00
Sergei Golubchik
d24060b179 MDEV-17421: mtr does not restart the server whose parameters were changed
remove tests that rely on specific execution order
2019-01-23 17:20:41 +01:00
Sergei Golubchik
7886a70ef9 MDEV-17421: mtr does not restart the server whose parameters were changed
remove tests that rely on specific execution order
2019-01-23 17:18:57 +01:00
Jan Lindström
2d098933ee
Merge pull request #880 from tempesta-tech/sysprg/MDEV-17421
MDEV-17421: mtr does not restart the server whose parameters were changed
2019-01-23 18:03:51 +02:00
Andrei Elkin
cce2b45c8f MDEV-17803 Row-based event is not applied when table map id is greater
32 bit int

Row-based slave applier could not parse correctly the table id when
the value exceeded the max of 32 bit unsigned int.
The reason turns out in that the being parsed value placeholder
was sized as 4 bytes.

The type is fixed to ulonglong.

Additionally the patch works around Rows_log_event::m_table_id 4 bytes
size on 32 bits platforms. In case of last_table_id value overflows
the 4 byte max, there won't be the zero value for m_table_id generated
and the first wrapped-around value is one, this is thanks to excluding
UINT_MAX32 + 1 from TABLE_SHARE::table_map_id.
2019-01-23 15:48:06 +02:00
Marko Mäkelä
9a7281a703 Merge 10.1 into 10.2 2019-01-23 15:09:06 +02:00
Marko Mäkelä
d06ebd932d Remove references to removed dict_sys->size 2019-01-23 14:42:21 +02:00
Marko Mäkelä
2565c02ca5 Remove unnecessary type casts 2019-01-23 14:42:21 +02:00
Marko Mäkelä
3b6d2efcb1 Merge 10.0 into 10.1 2019-01-23 14:34:23 +02:00
Vladislav Vaintroub
5c159c9037 MDEV-18356 Renamed backup-encrypted option introduced in 7158edcba3
Rename it because it caused parser warning whenever --backup was used.
2019-01-23 12:09:02 +00:00
Marko Mäkelä
52d13036d8 MDEV-17933 slow server status - dict_sys_get_size()
dict_sys_get_size(): Replace the time-consuming loop with
a crude estimate that can be computed without holding any mutex.

Even before dict_sys->size was removed in MDEV-13325,
not all memory allocations by the InnoDB data dictionary cache
were being accounted for. One example is foreign key constraints.
Another example is virtual column metadata, starting with 10.2.
2019-01-23 13:44:20 +02:00
Sergei Golubchik
2a0f1d6132 Bug#28867993: POSSIBLE ISSUE WITH MYSQL SERVER RESTART
on startup innodb is checking whether files "ib_logfileN"
(for N from 1 to 100) exist, and whether they're readable.
A non-existent file aborted the scan.
A directory instead of a file made InnoDB to fail.

Now it treats "directory exists" as "file doesn't exist".
2019-01-23 12:39:03 +01:00
Marko Mäkelä
31d592ba7d MDEV-18349 InnoDB file size changes are not safe when file system crashes
When InnoDB is invoking posix_fallocate() to extend data files, it
was missing a call to fsync() to update the file system metadata.
If file system recovery is needed, the file size could be incorrect.

When the setting innodb_flush_method=O_DIRECT_NO_FSYNC
that was introduced in MariaDB 10.0.11 (and MySQL 5.6) is enabled,
InnoDB would wrongly skip fsync() after extending files.

Furthermore, the merge commit d8b45b0c00
inadvertently removed XtraDB error checking for posix_fallocate()
which this fix is restoring.

fil_flush(): Add the parameter bool metadata=false to request that
fil_buffering_disabled() be ignored.

fil_extend_space_to_desired_size(): Invoke fil_flush() with the
extra parameter. After successful posix_fallocate(), invoke
os_file_flush(). Note: The bookkeeping for fil_flush() would not be
updated the posix_fallocate() code path, so the "redundant"
fil_flush() should be a no-op.
2019-01-23 12:18:00 +02:00
Sergey Vojtovich
9f4d4f404f MDEV-12747 - main.mysqld_option_err fails in buildbot with timeout
thd_destructor_proxy() may miss abort signal if innobase_end() is running
concurrently, which causes server hang in pthread_join() on shutdown.

The problem was that aborting wasn't protected by mutex:
proxy thr: while (!myvar->abort)
end thr: running->abort = 1;
end thr: mysql_cond_broadcast(...);
proxy thr: mysql_cond_wait(...); // nobody to awake it
end thr: pthread_join(...); // waits for proxy thr

Also made main.mysqld_option_err reentrant.
2019-01-22 18:26:37 +04:00
Sergei Golubchik
6786fb004c MDEV-15925 FRM_MAX_SIZE too low for some use cases
increase to 1M
2019-01-21 17:14:31 +01:00
Jan Lindström
f9cc956065
Merge pull request #1114 from GeoffMontee/10.1-geoff-MDEV-17973
MDEV-17973: Don't overwrite xtrabackup-v2/mariabackup SST logs by def…
2019-01-21 15:06:48 +02:00
Geoff Montee
2084cd5422 MDEV-17973: Don't overwrite xtrabackup-v2/mariabackup SST logs by default 2019-01-21 05:42:00 -05:00
Varun Gupta
2061e00c20 MDEV-14440: Assertion `inited==RND' failed in handler::ha_rnd_end
In the function QUICK_RANGE_SELECT::init_ror_merged_scan we create a seperate handler if the handler in
head->file cannot be reused. The flag free_file tells us if we have a seperate handler or not.
There are cases where you might create a handler and then there might be a failure(running ALTER)
and then we have to revert the handler back to the original one. The code does that
but it does not reset the flag 'free_file' in this case.
Also backported f2c418079d.
2019-01-18 23:36:47 +05:30
Marko Mäkelä
37ffdb44ef Merge 10.1 into 10.2 2019-01-18 06:51:52 +02:00
Marko Mäkelä
1d72db45a8 MDEV-18237 InnoDB: Unable to drop FTS index aux table and further errors (possibly bogus)
row_drop_table_for_mysql(): Fix a regression introduced in MDEV-16515.
Similar to the follow-up fixes MDEV-16647 and MDEV-17470, we must make
the internal tables of FULLTEXT INDEX immune to kills, to avoid noise
and resource leakage on DROP TABLE or ALTER TABLE. (Orphan internal tables
would be dropped at the next InnoDB startup only.)
2019-01-18 06:46:39 +02:00
Vladislav Vaintroub
69221746db MDEV-18289 - Fix a race between thd_destructor_proxy() startup and
server shutdown.

Prior to adding current thd to the global thd list, initialize
thd->mysys_var->current_cond / thd->mysys_var->current_mutex.

Otherwise thd_destructor_proxy can miss the abort condition, which is set
by the shutdown thread.
2019-01-17 23:18:50 +01:00
Marko Mäkelä
8e80fd6bfd Merge 10.1 into 10.2 2019-01-17 11:24:38 +02:00
Marko Mäkelä
c1aae37087 Re-record results for the changed max_value of table_definition_cache 2019-01-17 10:11:02 +02:00
Thirunarayanan Balathandayuthapani
ad376a05fa MDEV-18279 MLOG_FILE_WRITE_CRYPT_DATA fails to set the crypt_data->type for tablespace.
Problem:
========
MLOG_FILE_WRITE_CRYPT_DATA redo log fails to apply type for
the crypt_data present in the space. While processing the double-write
buffer pages, page fails to decrypt. It leads to warning message.

Fix:
====
Set the type while parsing MLOG_FILE_WRITE_CRYPT_DATA redo log.
If type and length is of invalid type then mark it as corrupted.
2019-01-17 13:10:45 +05:30
Marko Mäkelä
a84be48e00 Update ,32bit.rdiff 2019-01-17 09:39:20 +02:00
Marko Mäkelä
71eb762611 Merge 10.0 into 10.1 2019-01-17 06:40:24 +02:00
Daniel Black
19a7656fb1 safemalloc: warn, flush after fprintf
Corrects 94d722b6a4
2019-01-17 01:13:47 +04:00
Thirunarayanan Balathandayuthapani
038785e1f8 MDEV-18183 Server startup fails while dropping garbage encrypted tablespace
- There is no need to wait for crypt thread to stop accessing space while
dropping the garbage encrypted tablespace during recover.
2019-01-16 23:02:39 +05:30
Oleksandr Byelkin
db469b6907 MDEV-17475: Increase maximum possible value for table_definition_cache to match table_open_cache
Allow table definition cache be bigger than open table cache (due to problem with VIEWs and prepared statements).
2019-01-16 15:01:52 +01:00
Anel Husakovic
f3e9d9a6e6 Change information_schema-big to include innodb 2019-01-16 13:34:54 +02:00
Anel Husakovic
802e8d6b89 Backport INFORMATION_SCHEMA.CHECK_CONSTRAINTS
Implement according to standard SQL specification 2008.
The check_constraints table is used for fetching metadata about
the constraints defined for tables in all databases.

There were some result files which failed after running mtr.
These files are updated with newly create record with mtr --record.
2019-01-16 13:34:54 +02:00
Vladislav Vaintroub
2153aaf66e mariabackup : use die() macro for fatal exit with error message. 2019-01-16 08:39:49 +01:00
Vladislav Vaintroub
a8a27e65a8 MDEV-18212 mariabackup: Make output format uniform whenever possible 2019-01-15 14:15:04 +01:00
Marko Mäkelä
12f362c333 MDEV-18233 Moving the hash_node_t to improve locality of reference 2019-01-15 14:53:27 +02:00