Commit graph

184960 commits

Author SHA1 Message Date
Daniel Bartholomew
c0bc9480e7 bump the VERSION 2019-05-14 10:07:57 -04:00
Oleksandr Byelkin
518cb2bb97 Merge branch 'bb-10.3-release' into 10.3 2019-05-14 14:23:35 +02:00
Elena Stepanova
07aef9f7eb Updated list of unstable tests for 10.3.15 release 2019-05-13 20:53:34 +03:00
Vladislav Vaintroub
06b50da770 Fix typo THRASH_FREED_MEMORY->TRASH_FREED_MEMORY 2019-05-13 14:54:35 +00:00
Vladislav Vaintroub
374dae3ecc MDEV-19452 - fix incorrect push_warning_printf
String is not guaranteed to be null-terminated, thus push_warning_printf
also needs to specify the length.
2019-05-13 14:31:15 +00:00
Vladislav Vaintroub
0c188d5efc Make TRASH_FREED_MEMORY a cmake option, similar to SAFEMALLOC 2019-05-13 10:08:42 +00:00
Marko Mäkelä
5c93509aad After-merge fix: Correct a copyright statement
In the merge c51f85f882
the files row0trunc.cc and read0read.cc were not supposed
to be changed in MariaDB 10.3.

The row0trunc.cc code that was changed in MariaDB 10.2
commit 3db94d2403 does not exist,
because it was removed earlier in 10.3
commit 5a1868b58d.

When it comes to read0read.cc, as explained in the 10.2
commit e0271a7b43
the code had been moved to trx0sys.h in 10.3. In
10.3 commit 380069c235
appproriate mutex protection was added to checking the
transaction system state. The assertion expression was
properly updated in the earlier merge
commit acf6f92aa9.
2019-05-13 08:35:55 +03:00
Oleksandr Byelkin
c51f85f882 Merge branch '10.2' into 10.3 2019-05-12 17:20:23 +02:00
Monty
a89f199c64 Fixed compiler warning in pcregrep.c 2019-05-10 15:48:33 +03:00
Marko Mäkelä
8ce702aa90 MDEV-17540 Server crashes in row_purge after TRUNCATE TABLE
row_purge_upd_exist_or_extern_func(): Check for node->vcol_op_failed()
after row_purge_remove_sec_if_poss(), like row_purge_del_mark() did.
This avoids us dereferencing the node->table=NULL pointer.

The test case, submitted by Elena Stepanova, is not deterministic and
does not repeat the bug on 10.2. With the added loop, for me, it reliably
crashes 10.3 without the fix. I was unable to create a deterministic
test case for either 10.2 or 10.3.

Reviewed by Thirunarayanan Balathandayuthapani
2019-05-10 10:50:35 +03:00
Marko Mäkelä
b2f3755c8e Merge 10.1 into 10.2 2019-05-10 08:02:21 +03:00
Thirunarayanan Balathandayuthapani
3e8cab51cb MDEV-13893 encryption.innodb-redo-badkey failed in buildbot with page cannot be decrypted
buf_dblwr_process(): Remove the useless warning that a copy of a page
in the doublewrite buffer is corrupted. We already report an error if a
corrupted page cannot be recovered from the doublewrite buffer.

Note: In MariaDB 10.1, the original bug reported in MDEV-13893 could
still be easily repeatable. In MariaDB 10.2.24, MDEV-12699 should
have reduced the probability considerably.
2019-05-10 07:57:01 +03:00
Marko Mäkelä
542f32649b MDEV-18220: race condition in fts_get_table_name()
fts_get_table_name(): Add the parameter bool dict_locked=false.
2019-05-10 07:57:01 +03:00
Marko Mäkelä
f3718a112a MDEV-18220: Backport some code from MariaDB 10.2
fts_get_table_name(): Output to a caller-allocated buffer.

fts_get_table_name_prefix(): Use the lower-overhead allocation
ut_malloc() instead of mem_alloc().

This is based on mysql/mysql-server@d1584b9f38
in MySQL 5.7.4.
2019-05-10 07:57:01 +03:00
Marko Mäkelä
f92749ed36 MDEV-18220: heap-use-after-free in fts_get_table_name_prefix()
fts_table_t::parent: Remove the redundant field. Refer to
table->name.m_name instead.

fts_update_sync_doc_id(), fts_update_next_doc_id(): Remove
the redundant parameter table_name.

fts_get_table_name_prefix(): Access the dict_table_t::name.
FIXME: Ensure that this access is always covered by
dict_sys->mutex.
2019-05-10 07:57:01 +03:00
Marko Mäkelä
5b3f7c0c33 MDEV-18220: Remove some redundant data structures
fts_state_t, fts_slot_t::state: Remove. Replaced by fts_slot_t::running
and fts_slot_t::table_id as follows.

FTS_STATE_SUSPENDED: Removed (unused).

FTS_STATE_EMPTY: Removed. table_id=0 will denote empty slots.

FTS_STATE_RUNNING: Equivalent to running=true.

FTS_STATE_LOADED, FTS_STATE_DONE: Equivalent to running=false.

fts_slot_t::table: Remove. Tables will be identified by table_id.
After opening a table, we will check fil_table_accessible() before
accessing the data.

fts_optimize_new_table(), fts_optimize_del_table(),
fts_optimize_how_many(), fts_is_sync_needed():
Remove the parameter tables, and use the static variable fts_slots
(which was introduced in MariaDB 10.2) instead.
2019-05-10 07:56:55 +03:00
Eugene Kosov
06442e3e9f MDEV-19399 do not call slow my_timer_init() several times
No functional change.

Call my_timer_init() only once and then reuse it from InnoDB and
perfschema storage engines.

This patch speeds up empty test for me like this:
./mtr -mem innodb.kevg,xtradb  1.21s user 0.84s system 34% cpu 5.999 total
./mtr -mem innodb.kevg,xtradb  1.12s user 0.60s system 31% cpu 5.385 total
2019-05-10 07:56:55 +03:00
Daniel Bartholomew
136a27d9f1 bump the VERSION 2019-05-09 11:55:54 -04:00
Vladislav Vaintroub
d0ee3b5500 MDEV-19427 mysql_upgrade_service throws exception upgrading from 10.0 to 10.3
The crash happens when writing into log file.
The reason is likely that the call to WriteFile() was missing a valid
parameter for lpNumberOfBytesWritten. This seems only to happen on ancient
version of Windows.

Since the fix to MDEV-16430 in 141bc58ac9, null pointer was passed
instead of valid pointer.

The fix is to provide a valid lpNumberOfBytesWritten parameter.
2019-05-09 17:41:37 +02:00
Marko Mäkelä
0c405b064d MDEV-18009: Clean up the test case
Avoid accessing the table cache while the ALTER TABLE statement
is blocked by DEBUG_SYNC. Use explicit COMMIT for forcing the
redo log flush (whose main purpose is to ensure that the
incomplete state of the blocked ALTER TABLE statement is persisted).
2019-05-09 12:33:45 +03:00
Marko Mäkelä
646a3bd72d MDEV-18009 Missing redo log flush in innodb.instant_alter_crash
Ensure that the 'auxiliary transactions' that are there for
flushing the incomplete undo log of the to-be-recovered DDL
transactions are actually making modifications.

This is a backport of 2fe40a7af0
from MariaDB 10.4.
2019-05-09 12:33:45 +03:00
Rasmus Johansson
8f9c8579d0 Appveyor configuration and addition of badge 2019-05-09 10:56:15 +02:00
Sergey Vojtovich
410585ca63 Removed dead code 2019-05-09 11:13:44 +04:00
Sergey Vojtovich
d0b73fb8d3 MDEV-16060 - InnoDB: Failing assertion: ut_strcmp(index->name, key->name)
A sequel to 9180e86 and 149b754.

ALTER TABLE ... ADD FOREIGN KEY may crash if parent table is updated
concurrently.

Block FK parent table updates even earlier, before intermediate child
table is created.

Use proper charset info for my_casedn_str() and don't update original
identifiers so that lower_cast_table_names == 2 is honoured.
2019-05-09 11:13:44 +04:00
Jan Lindström
9d3e2a7ca2 Merge 10.1 into 10.2 2019-05-08 20:05:30 +03:00
Igor Babaev
09aa5d3f69 MDEV-17894 Assertion `(thd->lex)->current_select' failed in MYSQLparse(),
query with VALUES()

A table value constructor can be used in all contexts where a select
can be used. In particular an ORDER BY clause or a LIMIT clause or both
of them can be attached to a table value constructor to produce a new
query. Unfortunately execution of such queries was not supported.
This patch fixes the problem.
2019-05-08 09:45:24 -07:00
Daniel Bartholomew
3e5526b0df bump the VERSION 2019-05-08 09:54:26 -04:00
Marko Mäkelä
4ad720282d Null merge mariadb-10.1.40 into 10.1 2019-05-08 16:50:51 +03:00
Andrea Kao
27232a9fa2 edit MariaDB license info so that GitHub recognizes it
GitHub uses a library called Licensee to identify a project's license
type. It shows this information in the status bar and via the API if it
can unambiguously identify the license.

This commit modifies a few of MariaDB's docs so that Licensee is able
to recognize the repository's license type. It renames the README's
"License" section to "Licensing" and renames COPYING.thirdparty to
THIRDPARTY.

These changes allow Licensee to bypass both files when it
scans the repo for license files, which thus allows Licensee to
successfully identify the license type of MariaDB as GPL 2.0.

Signed-off-by: Andrea Kao <eirinikos@gmail.com>
2019-05-08 15:04:15 +04:00
Sergey Vojtovich
9d805004d8 Added missing reset_changed()
Causes valgrind warnings, harmless otherwise.

Part of MDEV-14984 - regression in connect performance
2019-05-08 15:00:16 +04:00
Galina Shalygina
f2e27d53da MDEV-19139: pushdown condition with Item_func_set_user_var
The bug occurs because Item_func_set_user var is allowed to be pushed
into materialized derived table/view.
To fix it excl_dep_on_table() as added to Item_func_set_user_var class
to prevent pushdown.
2019-05-08 13:23:34 +03:00
Thirunarayanan Balathandayuthapani
7b93d71a4b MDEV-19387 innodb_ft_result_cache_limit_32 fails on s390x
Fix:
====
1) Combined innodb_ft_result_cache_limit_32.test and
innodb_ft_result_cache_limit_64.test test case in sys_vars suite.

2) Use word_size.inc for combinations of innodb_ft_result_cache_limit test case.
2019-05-08 12:49:08 +05:30
Marko Mäkelä
e0271a7b43 MDEV-19408 Assertion on trx->state failed in ReadView::copy_trx_ids
ReadView::copy_trx_ids(): Relax a debug check. It failed to account for
TRX_STATE_PREPARED_RECOVERED, which was introduced in MDEV-15772.
It was also reading trx->state twice and failed to tolerate
TRX_STATE_COMMITTED_IN_MEMORY, which could be concurrently assigned
in lock_trx_release_locks(), which is not holding trx_sys->mutex.

This bug is specific to the MariaDB 10.2 series. The ReadView was
introduced in MariaDB 10.2.2 by merging the code that had been
introduced in MySQL 5.7.2. In MariaDB 10.3, ReadView::snapshot()
would use the lock-free trx_sys.rw_trx_hash. MDEV-14638 moved the
corresponding assertion to trx_sys_t::find(), where it was duly
protected by trx->mutex, and later MDEV-14756 moved the check to
rw_trx_hash_t::validate_element(). This check was correctly adjusted
when MDEV-15772 was merged to 10.3.
2019-05-08 07:01:20 +03:00
Elena Stepanova
49ef1c75e3 Updated list of unstable tests for 10.2.24 2019-05-08 00:07:57 +03:00
Daniel Bartholomew
f92f313368 bump the VERSION 2019-05-07 16:41:07 -04:00
Sergei Golubchik
88961a28e2 MDEV-17710 "unknown error" with FLUSH LOGS if log directory is not writeable 2019-05-07 18:40:36 +02:00
Sergei Golubchik
15c79c41e4 MDEV-17845 Extreme high open file limit used
SHOW STATUS LIKE 'Open_files' was showing 18446744073709551615

my_file_opened used statistic_increment/statistic_decrement,
so one-off errors were normal and expected. But they confused
monitoring tools, so let's move my_file_opened to use atomics.
2019-05-07 18:40:36 +02:00
Sergei Golubchik
3d7e06d4ab cleanup: remove dead code 2019-05-07 18:40:36 +02:00
Sergei Golubchik
ffb83ba650 cleanup: move checksum code to handler class
make live checksum to be returned in handler::info(),
and slow table-scan checksum to be calculated in handler::checksum().

part of
MDEV-16249 CHECKSUM TABLE for a spider table is not parallel and saves all data in memory in the spider head by default
2019-05-07 18:40:36 +02:00
Sergei Golubchik
101144f279 MDEV-17640 UMASK_DIR configuration for mysql_install_db is not applied to mysql database
regression after 3db6de33b2

in RPMs continue creating the $datadir outside of mysql_install_db.
RPMs put the socket in there, so it cannot be chmod 0700.
2019-05-07 15:25:57 +02:00
Alexey Botchkov
651a43e0a0 MDEV-18782 mysqldump --all-databases causes segmentation fault.
Do not consider rows of Information_schema.files where
LOGFILE_GROUP_NAME is NULL.
2019-05-07 16:13:53 +04:00
Jan Lindström
26cb9f75ee MDEV-19404: Assertion failure on !is_thread_specific || (mysqld_server_initialized && thd)
In wsrep_plugins_post_init we iterate all theads and if they are
galera appliers (wsrep_applier) we init session variables. However,
current_thd was not set and recent changes on session variables
require holding LOCK_gloal_system_variables mutex.
2019-05-07 15:16:45 +03:00
Jan Lindström
db9622f1f5 MDEV-19405: Galera test failure on galera_parallel_autoinc_largetrx
Test case was not stable. Fixed also galera_parallel_autoinc_manytrx
as it has the same problem.
2019-05-07 12:51:59 +03:00
qingda2019
1214674b71 MDEV-13942 InnoDB SPATIAL INDEX corruption during root page split
The problem is in rtr_adjust_upper_level(), which allocates node_ptr
from heap, and then passes the same heap to btr_cur_pessimistic_insert().
The documentation of btr_cur_pessimistic_insert() says that the heap can
be emptied. If the heap is emptied and something else is allocated from
the heap, the node_ptr can become corrupted.
2019-05-07 10:44:00 +03:00
Oleksandr Byelkin
a5cfa416b4 Let us close library and only then free defaults. 2019-05-06 22:31:46 +02:00
Oleksandr Byelkin
5496df8e5d changes in innodb has influence on this test in rocksdb test suite 2019-05-06 19:34:06 +02:00
Oleksandr Byelkin
633946fb63 Merge branch '10.1' into 10.2 2019-05-06 18:07:40 +02:00
Marko Mäkelä
0573744a83 Revert "MDEV-19399 do not call slow my_timer_init() several times"
This reverts commit 8dc670a5e8.

The symbol sys_timer_info was not being exported correctly,
which caused linking failures on some platforms.
2019-05-06 17:15:32 +03:00
Sergei Golubchik
147c1239f1 MDEV-17640 UMASK_DIR configuration for mysql_install_db is not applied to mysql database
regression after 3db6de33b2

in RPMs continue creating the $datadir outside of mysql_install_db.
RPMs put the socket in there, so it cannot be chmod 0700.
2019-05-06 15:57:52 +02:00
Eugene Kosov
c83f837053 MDEV-18214 remove some duplicated MONITOR counters
MONITOR_PENDING_LOG_WRITE
MONITOR_PENDING_CHECKPOINT_WRITE
MONITOR_LOG_IO: read values from log_t members instead of updating own
monitor variables
2019-05-06 16:00:15 +03:00