Commit graph

13667 commits

Author SHA1 Message Date
Aleksey Midenkov
af52a0e516 MDEV-24690 Dropping primary key column from versioned table always fails with 1072
Exclude system-invisible key-parts from MDEV-11114 (04b288ae)
restriction.
2021-03-31 21:25:33 +03:00
Marko Mäkelä
d6d3d9ae2f Merge 10.2 into 10.3 2021-03-31 08:01:03 +03:00
Thirunarayanan Balathandayuthapani
b771ab242b MDEV-25200 Index count mismatch due to aborted FULLTEXT INDEX
- Aborting of fulltext index creation fails to remove the
index from sys indexes table. When we try to reload the
table definition, InnoDB fails with index count mismatch
error. InnoDB should remove the index from sys indexes while
rollbacking the secondary index creation.
2021-03-30 20:40:14 +05:30
Marko Mäkelä
7c423c26d9 Add missing have_perfschema.inc 2021-03-30 16:14:19 +03:00
Jan Lindström
dfda1c9283 Add supression for warning. 2021-03-30 08:58:10 +03:00
Alexey Botchkov
94dea8ef5b MDEV-25457 CREATE / DROP PROCEDURE not logged with audit plugin.
CREATE/DROP PROCEDIRE/FUNCTION is now treated as DDL.
2021-03-29 16:59:34 +04:00
Alexey Botchkov
96475b78c5 MDEV-25457 CREATE / DROP PROCEDURE not logged with audit plugin.
CREATE/DROP PROCEDIRE/FUNCTION is now treated as DDL.
2021-03-27 23:07:31 +04:00
Marko Mäkelä
3157fa182a Merge 10.2 into 10.3 2021-03-27 16:11:26 +02:00
Anel Husakovic
6769d1a078 MDEV-13467: Feature request: Support for ST_Distance_Sphere()
- Cherry-pick 51e48b9f89 - vscode gitignore
- Thanks Robin Dupret for the review.

Reviewed by:daniel@mariadb.org
            holyfoot@mariadb.com
2021-03-27 10:42:39 +01:00
Daniele Sciascia
3dae564703 Follow up fixes for making @@wsrep_provider read-only
* Remove usage of wsrep_provider variable in galera_ist_restart_joiner
* Rename galera_load_provider.inc and galera_unload_provider.inc to
  galera_stop_replication.inc and galera_start_replication.inc. Their
  original names were no longer reflecting what these include files do.

followup for ce3a2a688d

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2021-03-23 09:40:30 +02:00
Marko Mäkelä
56274bd5e4 MDEV-23076 Misleading "InnoDB: using atomic writes"
As suggested by Vladislav Vaintroub, let us remove misleading
and malformatted startup messages.

Even if the global variable srv_use_atomic_writes were set, we would
still invoke my_test_if_atomic_write() to check if writes are atomic
with a particular page size.

When using the default innodb_page_size=16k, page writes should be
atomic on NTFS when using ROW_FORMAT=COMPRESSED and KEY_BLOCK_SIZE<=4.

Disabling srv_use_atomic_writes when innodb_file_per_table=OFF does
not make sense, because that is a dynamic parameter.

We also correct the documentation string of innodb_use_atomic_writes
and remove the duplicate variable innobase_use_atomic_writes.
2021-03-22 18:12:44 +02:00
Marko Mäkelä
0f8caadc96 MDEV-22653: Remove the useless parameter innodb_simulate_comp_failures
The debug parameter innodb_simulate_comp_failures injected compression
failures for ROW_FORMAT=COMPRESSED tables, breaking the pre-existing
logic that I had implemented in the InnoDB Plugin for MySQL 5.1 to prevent
compressed page overflows. A much better check is already achieved by
defining UNIV_ZIP_COPY at the compilation time.
(Only UNIV_ZIP_DEBUG is part of cmake -DWITH_INNODB_EXTRA_DEBUG=ON.)
2021-03-22 18:12:44 +02:00
Marko Mäkelä
61e00db6ad MDEV-24796 Assertion `page_has_next... failed in btr_pcur_store_position()
In commit eaeb8ec4b8 (MDEV-24653)
an incorrect debug assertion was introduced.

btr_pcur_store_position(): If the only record in the page is the
instant ALTER TABLE metadata record, we cannot expect there to be
a successor page. The situation could be improved by MDEV-24673 later.
2021-03-22 15:22:59 +02:00
Alexey Yurchenko
209e8ecf9a MDEV-22240: don't use pc.splitbrain=true on node2 in galera.galera_gcache_recover 2021-03-21 10:19:35 +02:00
Alice Sherepa
0f3045e432 fix for engines/funcs/rpl_sp.test 2021-03-19 17:29:18 +01:00
Julius Goryavsky
a74fa579b9 MDEV-24903: mariabackup SST fails while adding --log-bin in startup command
Mariabackup SST fails if "--log-bin" option is added with no value
to command line parameters at server startup. This is because the SST
scripts do not correctly interpret the "--- log-bin" option without a
value. This patch adds correct handling of the "--log-bin" parameter
without value to the general part of the parameter parsing (for SST
scripts) and fixes the problem. Also added a test that checks the
correct operation of the server after the fix.
2021-03-19 15:24:06 +01:00
Alice Sherepa
2944d7e692 fix for tests from engines/funcs 2021-03-19 12:20:50 +01:00
Marko Mäkelä
19052b6deb Merge 10.2 into 10.3 2021-03-18 12:34:48 +02:00
Jan Lindström
f4e14f0e24 MDEV-18874 : Galera test MW-286 causes Mutex = TTASEventMutex<GenericPolicy>]: Assertion `!is_owned()' failed. assertion
MDEV-24649 galera.galera_bf_lock_wait MTR failed with sigabrt: Assertion `!is_ow
ned()' failed in sync0policy.ic on MutexDebug with Mutex = TTASEventMutex<GenericPolicy>

Bug was fixed as part of MDEV-23328, this just adds test cases to
regression set.
2021-03-18 07:21:22 +02:00
Jan Lindström
30dea4599e MDEV-24978 : SIGABRT in __libc_message
Keyvalue can be longer than REC_VERSION_56_MAX_INDEX_COL_LEN
and this leads out-of-array reference. Use dynamic memory
allocation using actual max length of key value.
2021-03-15 11:56:42 +02:00
Thirunarayanan Balathandayuthapani
eb7c5530ec MDEV-24730 Insert log operation fails after purge resets n_core_fields
Online log for insert operation of redundant table fails with
index->is_instant() assert. Purge can reset the n_core_fields when
alter is waiting to upgrade MDL for commit phase of DDL. In the
meantime, any insert DML tries to log the operation fails with
index is not being instant.

row_log_get_n_core_fields(): Get the n_core_fields of online log
for the given index.

rec_get_converted_size_comp_prefix_low(): Use n_core_fields of online
log when InnoDB calculates the size of data tuple during redundant
row format table rebuild.

rec_convert_dtuple_to_rec_comp(): Use n_core_fields of online log
when InnoDB does the conversion of data tuple to record during
redudant row format table rebuild.

- Adding the test case which has more than 129 instant columns.
2021-03-12 16:56:47 +05:30
Marko Mäkelä
08e8ad7c71 MDEV-25106 Deprecation warning for innodb_checksum_algorithm=none,innodb,...
MDEV-25105 (commit 7a4fbb55b0)
in MariaDB 10.6 will refuse the innodb_checksum_algorithm
values none, innodb, strict_none, strict_innodb.

We will issue a deprecation warning if innodb_checksum_algorithm
is set to any of these non-default unsafe values.

innodb_checksum_algorithm=crc32 was made the default in
MySQL 5.7 and MariaDB Server 10.2, and given that older versions
of the server have reached their end of life, there is no valid
reason to use anything else than innodb_checksum_algorithm=crc32
or innodb_checksum_algorithm=strict_crc32 in MariaDB 10.3.

Reviewed by: Sergei Golubchik
2021-03-11 12:50:04 +02:00
Marko Mäkelä
6e7ac4060d MDEV-25070 fixup: Correct the result 2021-03-11 12:34:56 +02:00
Thirunarayanan Balathandayuthapani
cc9c303a45 MDEV-25070 SIGSEGV in fts_create_in_mem_aux_table
InnoDB set the space in dict_table_t as NULL when table
is discarded. So InnoDB shouldn't use the space present
in table to detect whether the given tablespace is
temporary tablespace.
2021-03-10 16:50:10 +05:30
Alice Sherepa
ee12b055ff reenable tests from engines/funcs 2021-03-10 09:12:57 +01:00
Julius Goryavsky
7345d37141 MDEV-24853: Duplicate key generated during cluster configuration change
Incorrect processing of an auto-incrementing field in the
WSREP-related code during applying transactions results in
a duplicate key being created. This is due to the fact that
at the beginning of the write_row() and update_row() functions,
the values of the auto-increment parameters are used, which
are read from the parameters of the current thread, but further
along the code other values are used, which are read from global
variables (when applying a transaction). This can happen when
the cluster configuration has changed while applying a transaction
(for example in the high_priority_service mode for Galera 4).
Further during IST processing duplicating key is detected, and
processing of the DB_DUPLICATE_KEY return code (inside innodb,
in the write_row() handler) results in a call to the
wsrep_thd_self_abort() function.
2021-03-08 11:15:08 +01:00
Monty
ecc1cd219d Fixed that unit.pcre_test works again. 2021-03-05 14:12:56 +02:00
Marko Mäkelä
bcd160753c Merge 10.2 into 10.3 2021-03-05 10:06:42 +02:00
Vladislav Vaintroub
545cba13eb MDEV-22929 fixup. Print "completed OK!" if page corruption and --log-innodb-page-corruption
Since we do not stop at corrupted page error, there is no reason to log
a backup error.
2021-03-05 09:04:30 +01:00
Vicențiu Ciorbaru
e9b8b76f47 Merge branch '10.2' into 10.3 2021-03-04 16:04:30 +02:00
Vicențiu Ciorbaru
5da6ffe227 MDEV-25032: Window functions without column references get removed from ORDER BY
row_number() over () window function can be used without any column in the OVER
clause. Additionally, the item doesn't reference any tables, as it's not
effectively referencing any table. Rather it is specifically built based
on the end temporary table used for window function computation.

This caused remove_const function to wrongly drop it from the ORDER
list. Effectively, we shouldn't be dropping any window function from the
ORDER clause, so adjust remove_const to account for that.

Reviewed by: Sergei Petrunia sergey@mariadb.com
2021-03-04 15:37:47 +02:00
Thirunarayanan Balathandayuthapani
b044898b97 MDEV-24748 extern column check missing in btr_index_rec_validate()
In btr_index_rec_validate(), externally stored column
check is missing while matching the length of the field
with the length of the field data stored in record.
Fetch the length of the externally stored part and compare it
with the fixed field length.
2021-03-03 17:20:43 +05:30
Marko Mäkelä
ddbc612692 Merge 10.2 into 10.3 2021-03-03 09:41:50 +02:00
Monty
676987c4a1 MDEV-24532 Table corruption ER_NO_SUCH_TABLE_IN_ENGINE .. on table with foreign key
When doing a truncate on an Innodb under lock tables, InnoDB would rename
the old table to #sql-... and recreate a new 't1' table. The table lock
would still be on the #sql-table.

When doing ALTER TABLE, Innodb would do the changes on the #sql table
(which would disappear on close).
When the SQL layer, as part of inline alter table, would close the
original t1 table (#sql in InnoDB) and then reopen the t1 table, Innodb
would notice that this does not match it's own (old) t1 table and
generate an error.

Fixed by adding code in truncate table that if we are under lock tables
and truncating an InnoDB table, we would close, reopen and lock the
table after truncate. This will remove the #sql table and ensure that
lock tables is using the new empty table.

Reviewer: Marko Mäkelä
2021-03-02 15:23:56 +02:00
Monty
3f15d3bad9 Fixed unit test to not 'bail out' if some tests are not compiled.
Before the changes two things could happen:
- "path required name explain_filename path" error
- unit test never finishead (as it tried to execute just /bin/sh as
  a test case)
2021-03-01 22:09:05 +02:00
Alexey Botchkov
a18b39e3f4 MDEV-24965 With ALTER USER ...IDENTIFIED BY command, password doesn't replaced by asterisks in audit log.
Test result fixed.
2021-03-01 20:08:14 +04:00
Alexey Botchkov
25ecf8ed4b MDEV-24965 With ALTER USER ...IDENTIFIED BY command, password doesn't replaced by asterisks in audit log.
Check for the ALTER USER command added.
2021-02-26 13:26:00 +04:00
Igor Babaev
bf6484e7bb MDEV-24910 Crash with SELECT that uses table value constructor as a subselect
This bug caused crashes of the server when processing queries with table
value constructors (TVC) that contained subqueries and were used itself as
subselects. For such TVCs the following transformation is applied at the
prepare stage:
  VALUES (v1), ... (vn) => SELECT * FROM (VALUES (v1), ... (vn)) tvc_x.
This transformation allows to reduce the problem of evaluation of TVCs used
as subselects to the problem of evaluation of regular subselects.
The transformation is implemented in the wrap_tvc(). The code the function
to mimic the behaviour of the parser when processing the result of the
transformation. However this imitation was not free of some flaws. First
the function called the method exclude() that completely destroyed the
select tree structures below the transformed TVC. Second the function
used the procedure mysql_new_select to create st_select_lex nodes for
both wrapping select of the transformation and TVC. This also led to
constructing of invalid select tree structures.
The patch actually re-engineers the code of wrap_tvc().

Approved by Oleksandr Byelkin <sanja@mariadb.com>
2021-02-24 13:51:47 -08:00
Sergei Golubchik
0ab1e3914c Merge branch '10.2' into 10.3 2021-02-22 22:42:27 +01:00
Sergei Golubchik
ca126d96f5 Merge branch 'bb-10.3-release' into 10.3 2021-02-22 21:03:41 +01:00
Sergei Golubchik
3c021485c9 fix binlog_xa_recover test
1. wait for the binlog thread to reach the certain state, don't use
   a debug_sync that's incorrectly placed to detect the state
2. no need to do a (non-deterministic) `show binlog events` to verify
   what is guaranteed by the directly preceding line
2021-02-22 19:43:08 +01:00
Sergei Golubchik
bb98c6bf44 cleanup: renames, no need to create a new .inc file
if it's the whole content of a test anyway.
2021-02-22 19:43:08 +01:00
Sergei Golubchik
a638f1577a Merge branch 'bb-10.2-release' into 10.2 2021-02-22 18:43:03 +01:00
Jan Lindström
374f4c3f8c Suppress warning on galera_ssl_upgrade test. 2021-02-22 13:57:28 +02:00
Sergei Golubchik
0d55b020e1 Merge branch 'bb-10.2-release' into bb-10.3-release 2021-02-18 22:09:53 +01:00
Sergei Golubchik
ce3a2a688d make @@wsrep_provider and @@wsrep_notify_cmd read-only
this should simplify run-time cluster management
2021-02-18 19:03:01 +01:00
Jan Lindström
4d300ab1a8 MDEV-24867 : wsrep.variables MTR failed: Result length mismatch
Stabilize test case.
2021-02-17 10:28:37 +02:00
Marko Mäkelä
067465cd2f MDEV-15641 fixup: Make the test faster
Let us avoid the excessive allocation of explicit record locks
(a work-around of MDEV-24813) so that the test will execute
much faster under AddressSanitizer, MemorySanitizer, Valgrind.
2021-02-16 12:07:48 +02:00
Marko Mäkelä
e926964cb8 Remove useless test innodb.innodb_bug60049
The test innodb.innodb_bug60049 used to check that the record
(ID,NAME)=(12,'SYS_FOREIGN_COLS') is the last record in the
secondary index of the system table SYS_TABLES.
But, ever since commit 2336558423
or mysql/mysql-server@082d59670f
that record no longer is the last one in the table!

The more recent test innodb.purge_secondary covers the purge
functionality much better.
2021-02-15 18:12:31 +02:00
Alice Sherepa
6f14230643 MDEV-11862 rpl.rpl_semi_sync_event_after_sync 'fails if there is no semisync plugin 2021-02-15 13:41:44 +01:00