View Bazaar branches
Get this repository:
git clone https://git.launchpad.net/maria

MariaDB has 18 active reviews.

Branches

Name Last Modified Last Commit
bb-10.4-MDEV-22543 2020-08-11 09:47:30 UTC 4 hours ago
MDEV-22543 : Galera SST donation fails, FLUSH TABLES WITH READ LOCK times out

Author: Jan Lindström
Author Date: 2020-08-10 08:44:42 UTC

MDEV-22543 : Galera SST donation fails, FLUSH TABLES WITH READ LOCK times out

During SST we need to let FTWRL to use normal timeout method
even when client is disconnected.

bb-10.5-MDEV-22543 2020-08-11 09:20:06 UTC 4 hours ago
MDEV-22543 : Galera SST donation fails, FLUSH TABLES WITH READ LOCK times out

Author: Jan Lindström
Author Date: 2020-08-10 08:44:42 UTC

MDEV-22543 : Galera SST donation fails, FLUSH TABLES WITH READ LOCK times out

During SST we need to let FTWRL to use normal timeout method
even when client is disconnected.

bb-10.3-MDEV-22543 2020-08-11 09:19:27 UTC 4 hours ago
MDEV-22543 : Galera SST donation fails, FLUSH TABLES WITH READ LOCK times out

Author: Jan Lindström
Author Date: 2020-08-10 08:44:42 UTC

MDEV-22543 : Galera SST donation fails, FLUSH TABLES WITH READ LOCK times out

During SST we need to let FTWRL to use normal timeout method
even when client is disconnected.

10.5 2020-08-11 08:35:19 UTC 5 hours ago
MDEV-23054 Assertion `!item->null_value' failed in Type_handler_inet6::make_s...

Author: Alexander Barkov
Author Date: 2020-08-11 08:35:19 UTC

MDEV-23054 Assertion `!item->null_value' failed in Type_handler_inet6::make_sort_key_part (#2)

IFNULL(inet6_not_null_expr, 'foo') erroneously set its nullability to NOT NULL.

Fix:
- Moving the line "maybe_null= args[1]->maybe_null" before the call
  of fix_length_and_dec2(), so the call of Type_handler method
  Item_hybrid_func_fix_attributes() can reset it when desired.

- Fixing Type_handler_inet6::Item_hybrid_func_fix_attributes()
  to ignore args[0] when detecting nullability of IFNULL().

10.4 2020-08-11 07:53:28 UTC 6 hours ago
Merge 10.3 into 10.4

Author: Marko Mäkelä
Author Date: 2020-08-11 07:53:28 UTC

Merge 10.3 into 10.4

10.2 2020-08-11 06:58:26 UTC 7 hours ago
MDEV-22543 : Galera SST donation fails, FLUSH TABLES WITH READ LOCK times out

Author: Jan Lindström
Author Date: 2020-08-10 08:44:42 UTC

MDEV-22543 : Galera SST donation fails, FLUSH TABLES WITH READ LOCK times out

During SST we need to let FTWRL to use normal timeout method
even when client is disconnected.

10.1 2020-08-11 06:33:10 UTC 7 hours ago
Fixing sporading builtbot test failures happening at '00:00:00' sharp

Author: Alexander Barkov
Author Date: 2020-08-11 06:33:10 UTC

Fixing sporading builtbot test failures happening at '00:00:00' sharp

Some tests relied on the fact that DATETIME->DATE conversion
always produce a truncation (with a warning). This is not the case
when the SQL statement is executed at current time '00:00:00' sharp.

Adding a new SET TIMESTAMP statements to make sure time is not '00:00:00'.

10.3 2020-08-11 06:08:05 UTC 8 hours ago
Work around MDEV-23445 in the MDEV-14836 test case

Author: Marko Mäkelä
Author Date: 2020-08-11 06:08:05 UTC

Work around MDEV-23445 in the MDEV-14836 test case

bb-10.2-MDEV-22543 2020-08-11 05:46:12 UTC 8 hours ago
Fix test.

Author: Jan Lindström
Author Date: 2020-08-11 05:46:12 UTC

Fix test.

bb-10.6-backport-ks 2020-08-10 20:24:49 UTC 17 hours ago
MENT-807 Crash with CREATE TEMPORARY TABLE .. ENGINE=SPIDER .. wrapper "odbc"

Author: Kentoku SHIBA
Author Date: 2020-08-10 12:38:51 UTC

MENT-807 Crash with CREATE TEMPORARY TABLE .. ENGINE=SPIDER .. wrapper "odbc"

bb-mdev21211-hf 2020-08-10 20:01:53 UTC 18 hours ago
MDEV-21211 LOCK_plugin optimization.

Author: Alexey Botchkov
Author Date: 2020-08-10 20:01:53 UTC

MDEV-21211 LOCK_plugin optimization.

Use Apc_target calls to 'notify' threads about changes in plugins.

bb-10.2-midenok 2020-08-10 16:19:56 UTC 21 hours ago
MDEV-10962 Deadlock with 3 concurrent DELETEs by unique key

Author: midenok
Author Date: 2020-05-25 14:51:51 UTC

MDEV-10962 Deadlock with 3 concurrent DELETEs by unique key

Deadlock on concurrent acquisition of multiple types is fixed by
prioritization over waiting locks if transaction already has
non-waiting lock on same (block, heap_no).

Deadlock happens by this scheme:

1. TXA acquires L1 (index "a", X|NOT_GAP);
2. TXB waits L2 (index "a", X|NOT_GAP) for L1;
3. TXA waits L3 (index "a", X) for L2.

TXB waits TXA, TXA waits TXB: DeadlockChecker wants a victim.

Since L3 is weaker than L1 we can not apply optimization from
MDEV-18706. But the problem of this loop is silly queuing. TXA already
acquired non-gap lock L1 and wants to expand it into next-key. TXB from
parallel thread does the same. Deadlock detection processes the
requests in FIFO order so the above order fails. But if L3 is acquired
before L2 there is no deadlock.

We can make queue smarter: if there are already lock seized on same
resource (block, heap_no), no matter what type it is, we priritize all
further locks on that transaction. There is no treat to fair
scheduling as this is basically lock promotion in 2PL scheme.

bb-10.2-anel-without_server 2020-08-10 13:54:28 UTC 2020-08-10
MDEV-23429: Remove WSREP when using WITHOUT_SERVER

Author: Anel Husakovic
Author Date: 2020-08-07 13:26:54 UTC

MDEV-23429: Remove WSREP when using WITHOUT_SERVER

- Man pages related to `wsrep` are still there since they belong to `MAN1_SERVER`
component and can be excluded while configuring with cmake.
```
-- Installing: /tmp/102_noserver/include/mysql/server/mysql/service_wsrep.h
-- Installing: /tmp/102_noserver/include/mysql/server/private/./wsrep.h
-- Installing: /tmp/102_noserver/man/man1/wsrep_sst_common.1
-- Installing: /tmp/102_noserver/man/man1/wsrep_sst_mysqldump.1
-- Installing: /tmp/102_noserver/man/man1/wsrep_sst_rsync.1
-- Installing: /tmp/102_noserver/man/man1/wsrep_sst_xtrabackup-v2.1
-- Installing: /tmp/102_noserver/man/man1/wsrep_sst_xtrabackup.1
-- Installing: /tmp/102_noserver/man/man1/wsrep_sst_mariabackup.1
-- Installing: /tmp/102_noserver/man/man1/wsrep_sst_rsync_wan.1
```
- Additionally move replace/mysqlhot/mysql_setpermission/mysql_convert_table_format
man pages to `ManPagesClient` component.

bb-10.1-MDEV-23440-danielblack-mysql_tzinfo_to_sql-with-transactions 2020-08-10 12:56:39 UTC 2020-08-10
MDEV-23440: mysql_tzinfo_to_sql to use transactions

Author: Daniel Black
Author Date: 2020-08-10 08:23:25 UTC

MDEV-23440: mysql_tzinfo_to_sql to use transactions

Since MDEV-18778, timezone tables get changed to innodb
to allow them to be replicated to other galera nodes.

Even without galera, timezone tables could be declared innodb.
With the standalone innodb tables, the mysql_tzinfo_to_sql takes
approximately 27 seconds.

With the transactions enabled in this patch, 1.2 seconds is
the approximate load time.

While explicit checks for the engine of the time zone tables could be
done, or checks against !opt_skip_write_binlog, non-transactional
storage engines will just ignore the transactional state without
even a warning so its safe to enact globally.

Leap seconds are pretty much ignored as they are a single insert
statement and have gone out of favour as they have caused MariaDB
stalls in the past.

bb-10.4-MDEV-23326-danielblack-mysql_tzinfo_to_sql--skip-wsrep-check 2020-08-10 10:19:49 UTC 2020-08-10
MDEV-23326: mysql_tzinfo_to_sql add --skip-wsrep-check

Author: Daniel Black
Author Date: 2020-08-10 10:08:22 UTC

MDEV-23326: mysql_tzinfo_to_sql add --skip-wsrep-check

Several mysql_tzinfo_to_sql behaviours are dependent on
checking the wsrep_on==ON specificly for galera initialization
of timezone (or skipping of them).

There are two scenarios where the lack of the checking would
be very useful.

With the --skip-write-binary-log, binary logs are explictly
skipped, allowing for loading in classical replication scenarios.

Without the --skip-write-binary-log, innodb can be used for
loading the timezone tables signficantly faster than Aria
with TRANSACTIONAL=1.

The lack of checking the wsrep status also make it possible
to use mysql_tzinfo_to_sql in the mysqld --bootstrap input
allowing for a single initialization of all system tables.

10.2-varun 2020-08-10 09:46:24 UTC 2020-08-10
MDEV-22702: Assertion `!field->is_null()' failed in my_decimal::my_decimal fa...

Author: varun
Author Date: 2020-08-10 08:41:58 UTC

MDEV-22702: Assertion `!field->is_null()' failed in my_decimal::my_decimal fails in ONLY_FULL_GROUP_BY mode

The issue here is query with aggregate function and non-aggregate field
in the SELECT LIST with ONLY_FULL_GROUP_BY was not disallowed.
In ONLY_FULL_GROUP_BY mode non-aggregate fields are only allowed inside an
aggregate functions or the non-aggregate fields are part of the GROUP BY clause.

In the query for the failing assert the non-aggregate field was inside
a WINDOW function and the window function was treated as an aggregate function
and so no error was thrown.

The fix would be to make sure to mark that a non-aggregate field is used inside a
window function and not an aggregate function and throw an error then.

bb-10.3-sujatha 2020-08-10 07:19:06 UTC 2020-08-10
MDEV-22338-10.3 changes.

Author: Sujatha Sivakumar
Author Date: 2020-08-07 12:34:00 UTC

MDEV-22338-10.3 changes.

Revert MDEV-8203 and add new patch.

bb-10.1-sujatha 2020-08-10 06:59:48 UTC 2020-08-10
MDEV-22338: Assertion `!current_stmt_is_commit || !rgi->tables_to_lock' faile...

Author: Sujatha Sivakumar
Author Date: 2020-08-10 06:59:48 UTC

MDEV-22338: Assertion `!current_stmt_is_commit || !rgi->tables_to_lock' failed in Query_log_event::do_apply_event

Analysis:
=========
With row based replication, master can generate event groups like shown below.

BEGIN
TABLE_MAP
COMMIT

i.e A binlog event group, without any rows event in it. Such groups are
possible when a query operating on transactional table, doesn't modify any
data in the table. For example a transaction is trying to modify both trans
and non-trans tables and a trigger exists on non-transtable which modifies a
trans table.

CREATE TABLE t1 (id int) engine=innodb;
CREATE TABLE t2 (id int) engine=myisam;
CREATE TRIGGER t2 BEFORE INSERT ON t2 FOR EACH ROW DELETE FROM t1 LIMIT 1;
INSERT INTO t2 VALUES (1);

Above insert will write a record in 't2' table and its corresponding binlog
entry is generated. First table map events are added to appropriate caches.

t2's Table_Map is written into statement_cache.
t1's Table_Map is written into transaction_cache.
'Write_rows' event is added to t2's statement_cache.

Since there are no rows to remove from table 't1' there will not be any
'Delete_rows' event in the transaction cache. There won't be any 'Xid' event
as well. During flush operation 'COMMIT' will be added to the transaction
cache to complete the group.

"t2's statement_cache" "t1's transaction_cache"

BEGIN BEGIN
TABLE_MAP TABLE_MAP
WRITE_ROWS COMMIT
COMMIT

On the slave side it has strict rules, that a 'Table_Map' event should be
followed by a rows event. This rule gets violated for 't1' transaction and
results in an assert.

Fix:
====
Replace the assert with if-else block. In a case where TABLE_MAP event is not
followed by rows event invoke 'rows_event_stmt_cleanup' to initiate
appropriate cleanup.

The fix is based on upstream patch:
commit da01f3846b62a2e41111256f9d6f0a2bb2de23c4
Author: Andrei Elkin <aelkin@mysql.com>

bb-10.5-bar 2020-08-10 05:06:40 UTC 2020-08-10
MDEV-23162 Improve Protocol performance for numeric data

Author: Alexander Barkov
Author Date: 2020-07-24 04:07:04 UTC

MDEV-23162 Improve Protocol performance for numeric data

An alternative implementation (replacing the one based on repertoire).

This implementation makes Field send itself to Protocol_text using
data type specific Protocol methods rather than field->val_str()
followed by protocol_text->store_str().

As now Field sends itself in the same way to all protocol types
(e.g. Protocol_binary, Protocol_text, Protocol_local),
the method Field::send_binary() was renamed just to Field::send().

Note, this change introduces symmetry between Field and Item,
because Items also send themself using a single method Item::send(),
which is used for *all* protocol types.

Performance improvement is achieved by the fact that Protocol_text
implements these data type specific methods using store_numeric_string_aux()
rather than store_string_aux(). The conversion now happens only when
character_set_results is not ASCII compatible character sets
(e.g. UCS2, UTF16, UTF32).

In the old code (before any MDEV-23162 work, e.g. as of 10.5.4),
Protocol_text::store(Field*) used val_str() for all data types.
So the execution went through the character set conversion routines
even for numeric and temporal data types.

bb-10.4-bar 2020-08-08 05:44:31 UTC 2020-08-08
MDEV-23415 Server crash or Assertion `dec_length <= str_length' failed in Ite...

Author: Alexander Barkov
Author Date: 2020-08-08 05:44:31 UTC

MDEV-23415 Server crash or Assertion `dec_length <= str_length' failed in Item_func_format::val_str_ascii

Problem:

The crash happened in FORMAT(double, dec>=31, 'de_DE').

The patch for MDEV-23118 (commit 0041dacc1b8e85e1958355d1cfdc36055b05a884)
did not take into account that String::set_real() has a limit of 31
(FLOATING_POINT_DECIMALS) fractional digits. So for the range of 31..38
digits, set_real() switches to use:
- my_fcvt() - decimal point notation, e.g. 1.9999999999
- my_gcvt() - scientific notation, e.g. 1e22

my_gcvt() returned a shorter string than Item_func_format::val_str_ascii()
expected to get after the my_fcvt() call, so it crashed on assert.

Solution:

We cannot extend set_real() to use the my_fcvt() mode for the range of
31..38 fractional digits, because set_real() is used in a lot of places
and such a change will break everything.

Introducing String::set_fcvt() which always prints using my_fcvt()
for the whole range of decimals 0..38, supported by the FORMAT() function.

bb-10.5-MDEV-23424-danielblack-win32-compile-warning-type-conv-unireg 2020-08-07 23:29:21 UTC 2020-08-07
MDEV-23424: unireg to prevent win32 overflows use size_t

Author: Daniel Black
Author Date: 2020-08-07 07:57:52 UTC

MDEV-23424: unireg to prevent win32 overflows use size_t

Attempt to prevent compile errors:

C:\Buildbot\win32-1809\build\sql\unireg.cc(1253,15): error C2220: the following warning is treated as an error [C:\Buildbot\win32-1809\build\sql\sql.vcxproj]
C:\Buildbot\win32-1809\build\sql\unireg.cc(1253,15): error C2220: if (reserve(store_size)) [C:\Buildbot\win32-1809\build\sql\sql.vcxproj]
C:\Buildbot\win32-1809\build\sql\unireg.cc(1253,15): error C2220: ^ [C:\Buildbot\win32-1809\build\sql\sql.vcxproj]
C:\Buildbot\win32-1809\build\sql\unireg.cc(1253,15): warning C4244: 'argument': conversion from 'ulonglong' to 'size_t', possible loss of data [C:\Buildbot\win32-1809\build\sql\sql.vcxproj]
C:\Buildbot\win32-1809\build\sql\unireg.cc(1253,15): warning C4244: if (reserve(store_size)) [C:\Buildbot\win32-1809\build\sql\sql.vcxproj]
C:\Buildbot\win32-1809\build\sql\unireg.cc(1253,15): warning C4244: ^ [C:\Buildbot\win32-1809\build\sql\sql.vcxproj]

bb-10.1-anel-PR1527autize 2020-08-07 15:23:20 UTC 2020-08-07
mtr: main.mysqld--help autosized table{-open,}-cach and max-connections

Author: Daniel Black
Author Date: 2020-05-05 09:23:29 UTC

mtr: main.mysqld--help autosized table{-open,}-cach and max-connections

But lets assume that >400 are available and that
we can set the result back to the start value.
All of these system variables are autosized and can
generate MTR output differences.

10.6-varun 2020-08-07 15:06:00 UTC 2020-08-07
Checking for simple sargable predicates

Author: varun
Author Date: 2020-08-06 06:46:48 UTC

Checking for simple sargable predicates

bb-10.3-anel-withoutserver 2020-08-07 15:03:17 UTC 2020-08-07
compile for without_server

Author: Anel Husakovic
Author Date: 2020-08-07 15:03:17 UTC

compile for without_server

bb-10.2-thiru 2020-08-07 14:22:40 UTC 2020-08-07
MDEV-22934 Table disappear after two alter table command

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2020-08-07 13:32:48 UTC

MDEV-22934 Table disappear after two alter table command

Problem:
=======
InnoDB drops the column which has foreign key relations on it. So it
tries to load the foreign key during rename process of copy algorithm
even though the foreign_key_check is disabled.

Solution:
========
During alter copy algorithm, InnoDB ignores the error while loading
the foreign key constraint if foreign key check is disabled. It
should throw the warning about failure of the foreign key constraint
when foreign key check is disabled.

bb-10.5-midenok-MDEV-16417 2020-08-07 12:54:35 UTC 2020-08-07
MDEV-21052 InnoDB foreign key refactoring for TABLE_SHARE::foreign_keys

Author: midenok
Author Date: 2020-06-29 17:57:20 UTC

MDEV-21052 InnoDB foreign key refactoring for TABLE_SHARE::foreign_keys

Refactor dict_load_foreigns() for synchronising TABLE_SHARE foreign
data with dict_table_t cache.

Remove a number of routines working with SYS_FOREIGNS and
SYS_FOREIGN_COLS. innobase_update_foreign_try() is now used solely for
ER_FK_INCORRECT_OPTION check.

Prelock parent tables as well as child tables. This is done for the
case when parent table doesn't know about its children when they
created before parent with foreign_key_checks=0. Opening the parent
table initiates fk_resolve_referenced_keys() which updates its
referenced_keys. Due to CREATE TABLE doesn't not know about "illegal"
children it can not check for foreign consistency. F.ex. this would
succeed:

set foreign_key_checks= 0;
create table child (fk int references parent (id)) engine=innodb;
set foreign_key_checks= 1;

create table parent (id bigint primary key) engine=innodb;

In the above case dict_load_foreigns() deduces which tables are
unknown to opened parent (tables_missing) and reloads their foreign
data via recursion. Infinite recursion is not possible via test case:
a table cannot be "parent after child" and "child before parent"
simultaneously. Though infinite recursion is possible via malicously
crafted FRM file, there is no protection from that at InnoDB level but
there is protection at SQL level: thd->fk_circular_check.

Later though it would not allow DML on child as well as on parent (see
innodb.foreign_key MDEV-10083). So this is pretty acceptable:
foreign_key_checks is unnormal setting, checking parent on CREATE
TABLE would impose all frms scanning which is not acceptable.

ha_innobase::open() then synchronizes these referenced_keys with its
referenced_set cache by calling dict_load_foreigns().

Disable self-references on same column. The Bug 12902967 restricted
them on some condition of "same column/index" (see
innodb_bug12902967.test), though such self-references were not
completely disabled (see other self-ref cases changed in this
patch). It is not clear why they worked if they are "self-refs on same
column/index".

bb-10.5-release 2020-08-07 11:43:08 UTC 2020-08-07
Merge branch '10.4' into 10.5

Author: Sergei Golubchik
Author Date: 2020-08-07 11:43:08 UTC

Merge branch '10.4' into 10.5

bb-10.2-MDEV-22626 2020-08-07 07:22:38 UTC 2020-08-07
Replaced infinite loop in procedure with limited loop to avoid

Author: Jan Lindström
Author Date: 2020-08-07 07:22:38 UTC

Replaced infinite loop in procedure with limited loop to avoid
hang.

10.6 2020-08-06 18:21:56 UTC 2020-08-06
[Spider] Add add checking default_value for default_file, host, port

Author: Kentoku SHIBA
Author Date: 2020-08-05 01:10:33 UTC

[Spider] Add add checking default_value for default_file, host, port

bb-10.2-nikita 2020-08-06 17:03:43 UTC 2020-08-06
add more tests from duplicates

Author: Nikita Malyavin
Author Date: 2020-08-06 17:03:13 UTC

add more tests from duplicates

bb-10.3-nikita 2020-08-06 17:03:13 UTC 2020-08-06
add more tests from duplicates

Author: Nikita Malyavin
Author Date: 2020-08-06 17:03:13 UTC

add more tests from duplicates

bb-10.4-release 2020-08-06 15:13:02 UTC 2020-08-06
Merge branch '10.3' into 10.4

Author: Sergei Golubchik
Author Date: 2020-08-06 15:13:02 UTC

Merge branch '10.3' into 10.4

bb-10.5-nikita 2020-08-06 15:03:28 UTC 2020-08-06
MDEV-20618 Assertion `btr_validate_index...' failed in row_upd_sec_index_entry

Author: Nikita Malyavin
Author Date: 2020-08-06 14:06:54 UTC

MDEV-20618 Assertion `btr_validate_index...' failed in row_upd_sec_index_entry

Add a proper error handling of innobase_get_computed_value results in row_upd_store_row/row_upd_store_v_row.

Also add an assertion in row_vers_build_clust_v_col to fail during row purge.
Add one more assertion in row_sel_sec_rec_is_for_clust_rec for possible future catches.

bb-10.3-release 2020-08-06 15:01:44 UTC 2020-08-06
Merge branch '10.2' into 10.3

Author: Sergei Golubchik
Author Date: 2020-08-06 15:01:44 UTC

Merge branch '10.2' into 10.3

bb-10.4-nikita 2020-08-06 15:00:56 UTC 2020-08-06
MDEV-20618 Assertion `btr_validate_index...' failed in row_upd_sec_index_entry

Author: Nikita Malyavin
Author Date: 2020-08-06 14:06:54 UTC

MDEV-20618 Assertion `btr_validate_index...' failed in row_upd_sec_index_entry

Add a proper error handling of innobase_get_computed_value results in row_upd_store_row/row_upd_store_v_row.

Also add an assertion in row_vers_build_clust_v_col to fail during row purge.
Add one more assertion in row_sel_sec_rec_is_for_clust_rec for possible future catches.

bb-10.2-release 2020-08-06 14:47:39 UTC 2020-08-06
Merge branch '10.1' into 10.2

Author: Sergei Golubchik
Author Date: 2020-08-06 14:47:39 UTC

Merge branch '10.1' into 10.2

10.5-MDEV-19165 2020-08-06 13:42:03 UTC 2020-08-06
MDEV-19165: EVENT can be on all nodes after Galera SST

Author: Julius Goryavsky
Author Date: 2020-08-06 13:42:03 UTC

MDEV-19165: EVENT can be on all nodes after Galera SST

This patch fixes a bug related to the fact that after
restarting the Galera node that created the event, it
has the erroneous status of SLAVESIDE_DISABLED instead
of ENABLED on this node.

bb-10.2-varun 2020-08-06 12:31:00 UTC 2020-08-06
MDEV-15180: server crashed with NTH_VALUE()

Author: varun
Author Date: 2020-08-06 12:20:20 UTC

MDEV-15180: server crashed with NTH_VALUE()

fix_fields for the arguments of the NTH_VALUE function was updating the same reference,
so for the second argument (or after the first argument) the items were not resolved
to their corresponding field from the view as they were updating the reference to the
first argument.

bb-10.1-release 2020-08-06 12:02:01 UTC 2020-08-06
link failure on fulltest (xenial)

Author: Sergei Golubchik
Author Date: 2020-08-06 12:02:01 UTC

link failure on fulltest (xenial)

depending on build config the error might be hidded,
in particular liblz4.so and libjemalloc.so make it to disappear,
but with -DWITH_INNODB_LZ4=NO -DWITH_JEMALLOC=NO it reappears.

bb-10.5-MDEV-23178 2020-08-06 11:53:49 UTC 2020-08-06
MDEV-23178: Qualified asterisk not supported in INSERT .. RETURNING

Author: Rucha Deodhar
Author Date: 2020-08-06 11:53:49 UTC

MDEV-23178: Qualified asterisk not supported in INSERT .. RETURNING

Anaylsis: When we have INSERT/REPLACE...RETURNING and have qualified asterisk,
table_name is not NULL and context->table_list is either NULL or has
incorrect reference because context->table_list has tables from the FROM clause.
context->table_list has incorrect reference (has table from the FROM clause
instead of table we are inserting into) for INSERT/REPLACE...SELECT...RETURNING
because we have a FROM clause from the SELECT statement.
For INSERT/REPLACE...RETURNING it is NULL because there is no FROM clause.
Fix: If table_name is not null, check if we have INSERT/REPLACE...RETURNING.
If so, the reference should be the table we are inserting into and not
the table in the FROM clause.

bb-10.5-mdev22278 2020-08-05 14:28:53 UTC 2020-08-05
MDEV-22278 change temp-pool to be 0 by default

Author: Alexander Barkov
Author Date: 2020-08-05 14:28:53 UTC

MDEV-22278 change temp-pool to be 0 by default

bb-10.1-varun 2020-08-05 12:50:20 UTC 2020-08-05
MDEV-9513: Assertion `join->group_list || !join->is_in_subquery()' failed in ...

Author: varun
Author Date: 2020-08-04 09:06:01 UTC

MDEV-9513: Assertion `join->group_list || !join->is_in_subquery()' failed in create_sort_index

Removing the ORDER BY clause from the UNION when UNION is inside an IN/ALL/ANY subquery.
The rewrites are done for subqueries but this rewrite is not done for the fake_select of
the UNION.

bb-10.5-for-axel 2020-08-05 10:15:24 UTC 2020-08-05
disable counter reading and writing

Author: Eugene Kosov
Author Date: 2020-07-28 11:16:41 UTC

disable counter reading and writing

bb-10.3-kevgs 2020-08-05 07:20:56 UTC 2020-08-05
MDEV-21251 CHECK TABLE fails to check info_bits of records

Author: Eugene Kosov
Author Date: 2020-08-04 07:13:35 UTC

MDEV-21251 CHECK TABLE fails to check info_bits of records

btr_validate_index(): do not stop checking after some level failed.
That way it'll become possible to see errors in leaf pages even when
uppers layers are corrupted too.

page_validate(): check info_bits and status_bits more

bb-10.1-bar 2020-08-05 04:14:49 UTC 2020-08-05
MDEV-23105 Cast number string with many leading zeros to decimal gives unexpe...

Author: Alexander Barkov
Author Date: 2020-08-05 04:14:49 UTC

MDEV-23105 Cast number string with many leading zeros to decimal gives unexpected result

Skip leading zeros when converting a string to decimal_t.

bb-10.1-MDEV-20207 2020-08-04 19:03:03 UTC 2020-08-04
MDEV-20207: Assertion `! is_set()' failed in Diagnostics_area::set_eof_status

Author: Rucha Deodhar
Author Date: 2020-07-31 10:59:32 UTC

MDEV-20207: Assertion `! is_set()' failed in Diagnostics_area::set_eof_status
upon HANDLER READ

Analysis: The error state is not stored while checking condition and key name.
Fix: Return true while checking condition and key name if error is reported
because geometry object can't be created from the data in the index value for
HANDLER READ.

bb-10.1-MDEV-21526 2020-08-04 12:25:58 UTC 2020-08-04
MDEV-21526: mysqld_multi no longer works with different server binaries

Author: Julius Goryavsky
Author Date: 2020-08-04 12:25:58 UTC

MDEV-21526: mysqld_multi no longer works with different server binaries

The problem is caused by the fact that adding the
--defaults-group-suffix option to fix MDEV-18863 causes
mysqld to read all options from the appropriate sections
of the config file, including options specific to mysqld_multi.
Reading unknown options (which are not supported by mysqld)
causes mysqld to terminate with an error.

However, the MDEV-18863 problem has been completely fixed
by passing options on the command line, and now there is no
need to specify the --defaults-group-suffix option (we just
need to give priority to options passed through the command
line, so as not to break MDEV-18863).

bb-10.1-serg 2020-08-04 11:29:52 UTC 2020-08-04
Merge branch 'merge/merge-tokudb-5.6' into 10.1

Author: Sergei Golubchik
Author Date: 2020-08-04 11:29:52 UTC

Merge branch 'merge/merge-tokudb-5.6' into 10.1

bb-10.5-serg 2020-08-04 11:09:30 UTC 2020-08-04
Deb: fix Conflicts/Replaces/Breaks

Author: Sergei Golubchik
Author Date: 2020-08-04 07:35:17 UTC

Deb: fix Conflicts/Replaces/Breaks

also restore libreadline-dev dependency, as ColumnStore still needs it

bb-10.1-MDEV-23209 2020-08-04 09:15:23 UTC 2020-08-04
MDEV-23209: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())'

Author: Rucha Deodhar
Author Date: 2020-08-04 07:51:54 UTC

MDEV-23209: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())'
failed in Diagnostics_area::set_ok_status on INSERT

Analysis: Error is not returned when strict mode is enabled and value is
truncated because double is outside range.
Fix: Return HA_ERR_AUTOINC_ERANGE if the error was reported when double is
outside range.

bb-10.1-MDEV-21039 2020-08-04 09:09:14 UTC 2020-08-04
MDEV-21039: Server fails to start with unknown mysqld_safe options

Author: Julius Goryavsky
Author Date: 2020-08-04 09:09:14 UTC

MDEV-21039: Server fails to start with unknown mysqld_safe options

Adding any unknown option to the "[mysqld_safe]" section makes
mysqld impossible to start with mysqld_multi. For example, after
adding the unknown option "numa_interleave" to the "[mysqld_safe]"
section, mysqld_multi exits with the following diagnostics:

[ERROR] /usr/local/mysql/bin/mysqld: unknown option '--numa_interleave'

To get rid of this behavior, this patch by default adds the "--loose"
prefix to all unknown (for mysqld_safe) options. This behavior can be
enabled explicitly with the --ignore-unknown option and disabled with
the --no-ignore-unknown option.

bb-10.4-serg 2020-08-04 08:50:06 UTC 2020-08-04
MDEV-23358 main.upgrade_MDEV-19650 fails with result difference

Author: Sergei Golubchik
Author Date: 2020-08-04 08:50:06 UTC

MDEV-23358 main.upgrade_MDEV-19650 fails with result difference

no it doesn't

bb-10.5-monty 2020-08-04 08:03:53 UTC 2020-08-04
MDEV-23330 Server crash when using DES_DECYPT

Author: Michael Widenius
Author Date: 2020-08-03 07:33:24 UTC

MDEV-23330 Server crash when using DES_DECYPT

Item_func_des_decrypt::val_str() didn't set the character for the
result string properly, which confused pack_sort_string().

Fixed Item_func_des_decrypt::val_str(). I also added an assert() to detect
this in debug binaries and for extra safety added extra code that will
assure things are always correct for non debug binaries.

bb-10.3-bar 2020-08-04 05:49:44 UTC 2020-08-04
MDEV-22022 Various mangled SQL statements will crash 10.3 to 10.5 debug builds

Author: Alexander Barkov
Author Date: 2020-08-04 05:49:44 UTC

MDEV-22022 Various mangled SQL statements will crash 10.3 to 10.5 debug builds

Lex_input_stream::scan_ident_delimited() could go beyond the end
of the input when a starting backtick (`) delimiter did not have a
corresponding ending backtick.

Fix: catch the case when yyGet() returns 0, which means
either eof-of-query or straight 0x00 byte inside backticks,
and make the parser fail on syntax error, displaying the left
backtick as the syntax error place.

In case of filename in a script like this:

SET CHARACTER_SET_CLIENT=17; -- 17 is 'filename'
SELECT doc.`Children`.0 FROM t1;

the ending backtick was not recognized as such because my_charlen() returns 0 for
a straight backtick (backticks must normally be encoded as @0060 in filename).

The same fix works for 'filename': the execution skips the backtick
and reaches the end of the query, then yyGet() returns 0.
This fix is OK for now. But eventually 'filename' should either be disallowed
as a parser character set, or fixed to handle encoded punctuation properly.

bb-10.5-MDEV-23330-sanja 2020-08-03 17:35:10 UTC 2020-08-03
MDEV-23330 Server crash or ASAN negative-size-param in my_strnncollsp_binary ...

Author: Oleksandr "Sanja" Byelkin
Author Date: 2020-08-03 17:35:10 UTC

MDEV-23330 Server crash or ASAN negative-size-param in my_strnncollsp_binary / SORT_FIELD_ATTR::compare_packed_varstrings

In case of skipping decodding fix charset to be binary.

bb-10.1-23089 2020-08-03 15:36:04 UTC 2020-08-03
MDEV-23089 rpl_parallel2 fails in 10.5

Author: sachin
Author Date: 2020-07-16 08:54:30 UTC

MDEV-23089 rpl_parallel2 fails in 10.5

Problem:- rpl_parallel2 was failing non-deterministically
Analysis:-
When FLUSH TABLES WITH READ LOCK is executed, it will allow all worker
threads to complete their ongoing transactions and then it will pause them.
At this state FTWRL will proceed to acquire global read lock. FTWRL first
blocks threads from starting new commits, then upgrades the lock to block
commit of existing transactions.
  Step1:
    FLUSH TABLES WITH READ LOCK - Blocks new commits
  Step2:
    * STOP SLAVE command enables 'force_abort=1' which unblocks workers,
      they continue to execute events.
    * T1: Waits in 'record_gtid' call to update 'gtid_slave_pos' table with
      its current GTID, but it is blocked becuase of Step1.
    * T2: Holds COMMIT lock and waits for T1 to commit.
  Step3:
    FLUSH TABLES WITH READ LOCK - Waiting to get BLOCK_COMMIT.
This results in deadlock. When STOP SLAVE command allows paused workers to
proceed, workers should skip the execution of all further events, similar
to 'conservative' parallel mode.
Solution:-
We will assign 1 to skip_event_group when we are aborted in do_ftwrl_wait.
rpl_parallel_entry->pause_sub_id is only reset when force_abort is off in
rpl_pause_after_ftwrl.

bb-10.2-MDEV-23101 2020-08-03 12:15:40 UTC 2020-08-03
MDEV-23101: SIGSEGV in lock_rec_unlock() when Galera is enabled

Author: Jan Lindström
Author Date: 2020-08-03 12:15:40 UTC

MDEV-23101: SIGSEGV in lock_rec_unlock() when Galera is enabled

lock_rec_has_to_wait
wsrep_kill_victim
lock_rec_create_low
lock_rec_add_to_queue
DeadlockChecker::select_victim()

 THD can't change from normal transaction to BF (brute force) transaction
 here, thus there is no need to syncronize access in wsrep_thd_is_BF
 function.

lock_rec_has_to_wait_in_queue

 Add condition that lock is not NULL and add assertions if we are in
 strong state.

bb-10.5-23089 2020-08-03 11:48:57 UTC 2020-08-03
MDEV-23089 rpl_parallel2 fails in 10.5

Author: sachin
Author Date: 2020-08-03 11:48:57 UTC

MDEV-23089 rpl_parallel2 fails in 10.5

Remove rpl_parallel2 from disabled.def

bb-10.4-23089 2020-08-03 09:18:17 UTC 2020-08-03
MDEV-23089 rpl_parallel2 fails in 10.5

Author: sachin
Author Date: 2020-07-16 08:54:30 UTC

MDEV-23089 rpl_parallel2 fails in 10.5

Problem:- rpl_parallel2 was failing non-deterministically
Analysis:-
When FLUSH TABLES WITH READ LOCK is executed, it will allow all worker
threads to complete their ongoing transactions and then it will pause them.
At this state FTWRL will proceed to acquire global read lock. FTWRL first
blocks threads from starting new commits, then upgrades the lock to block
commit of existing transactions.
  Step1:
    FLUSH TABLES WITH READ LOCK - Blocks new commits
  Step2:
    * STOP SLAVE command enables 'force_abort=1' which unblocks workers,
      they continue to execute events.
    * T1: Waits in 'record_gtid' call to update 'gtid_slave_pos' table with
      its current GTID, but it is blocked becuase of Step1.
    * T2: Holds COMMIT lock and waits for T1 to commit.
  Step3:
    FLUSH TABLES WITH READ LOCK - Waiting to get BLOCK_COMMIT.
This results in deadlock. When STOP SLAVE command allows paused workers to
proceed, workers should skip the execution of all further events, similar
to 'conservative' parallel mode.
Solution:-
We will assign 1 to skip_event_group when we are aborted in do_ftwrl_wait.
rpl_parallel_entry->pause_sub_id is only reset when force_abort is off in
rpl_pause_after_ftwrl.

bb-10.2-serg 2020-08-02 18:23:53 UTC 2020-08-02
build failure on mac-1012-bintar

Author: Sergei Golubchik
Author Date: 2020-08-02 18:23:53 UTC

build failure on mac-1012-bintar

Undefined symbols for architecture x86_64:
  "_my_init_stacktrace", referenced from:
      _main in mysqltest.cc.o
ld: symbol(s) not found for architecture x86_64

bb-10.3-vicentiu-json-review 2020-08-02 13:38:51 UTC 2020-08-02
Cleanup after review

Author: Anel Husakovic
Author Date: 2020-02-03 18:54:01 UTC

Cleanup after review

bb-10.3-serg 2020-08-02 08:31:07 UTC 2020-08-02
MDEV-21201 No records produced in information_schema query, depending on proj...

Author: Sergei Golubchik
Author Date: 2020-08-01 11:12:50 UTC

MDEV-21201 No records produced in information_schema query, depending on projection

Reimplement MDEV-14275 Improving memory utilization for information schema

Postpone temp table instantiation until after setup_fields().

Replace all unused (not marked in read_set) columns in an I_S table
with CHAR(0). This can drastically reduce the footprint of a MEMORY
table (a TABLE_CATALOG alone is 1538 bytes per row).

This does not change the engine. If the table was decided to be Aria
(because of, say, blobs) then after optimization it'll stay Aria
even if all blobs were removed.

Note 1: when transforming table structure, share->blob_fields is
preserved, otherwise Aria might switch from DYNAMIC to STATIC row format
and expect a special field for a deleted mark, which create_tmp_tabe
didn't provide.

Note 2: optimizer was doing handler::info() (to know the number of rows)
before the temp table is populated. That didn't make much sense. Now
it's done before the table is even instantiated. Preserve the old
behavior and report 0 rows.

This reverts e2664ee8362 and a8458a2345e

bb-10.5-anel-MDEV-22552 2020-08-02 07:10:17 UTC 2020-08-02
Deb: Move my_print_defaults to MariaDB client core package

Author: Otto Kekäläinen
Author Date: 2020-06-04 19:06:06 UTC

Deb: Move my_print_defaults to MariaDB client core package

The my_print_default is required by mytop which is also in the MariaDB
client package, which in turn requires the client core package.
This way it is ensured my_print_deafult is always available when mytop
is installed.

The my_print_defaults is also required by the server logrotate files
and mysqld_safe script etc, but this change is fine, since the server
core package always depends on the MariaDB client core package anyway
and they are both installed on server installations.

Related: https://github.com/MariaDB/server/pull/1566

Closes 1581

bb-10.4-MDEV-19508-danielblack 2020-08-01 02:50:48 UTC 2020-08-01
MDEV-19508 - Issue with: #define SI_KERNEL

Author: Sergey Vojtovich
Author Date: 2020-04-28 10:25:42 UTC

MDEV-19508 - Issue with: #define SI_KERNEL

Reverted 07e9b1389, use setsid() instead.

Conventional use of SIGHUP to dump daemon information or flush caches
assumes preceeding setsid() call.

Ideally we should not setup SIGHUP handler in bootstrap and (probably)
debug_gdb modes.

Additional information on SysV style and systemd style daemons:
https://www.freedesktop.org/software/systemd/man/daemon.html

closes #1392

10.4-merge 2020-07-31 14:07:15 UTC 2020-07-31
fix

Author: Oleksandr "Sanja" Byelkin
Author Date: 2020-07-31 14:07:15 UTC

fix

bb-10.1-MDEV-17729 2020-07-31 10:38:07 UTC 2020-07-31
MDEV-17729: Assertion `! is_set() || m_can_overwrite_status' failed in

Author: Rucha Deodhar
Author Date: 2020-07-26 21:21:33 UTC

MDEV-17729: Assertion `! is_set() || m_can_overwrite_status' failed in
Diagnostics_area::set_error_status

Analysis: When strict mode is enabled, all warnings are converted to errors
including those which do not occur because of bad data.
Fix: Query should not be aborted when we have warning because limit to
examine rows was reached because it doesn't happen due to bad data.
So thd->abort_on_warning should be false.

10.2-MDEV-11799 2020-07-31 05:33:05 UTC 2020-07-31
MDEV-11799 InnoDB can abort if the doublewrite buffer contains a bad and good...

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2020-07-30 17:21:52 UTC

MDEV-11799 InnoDB can abort if the doublewrite buffer contains a bad and good copy

- Addressed marko's review comments.

bb-10.5-MDEV-23299-danielblack-pr-1643 2020-07-31 00:05:30 UTC 2020-07-31
MDEV-23299: Bad data in mysql.func can cause crash

Author: zbdba
Author Date: 2020-07-29 14:48:53 UTC

MDEV-23299: Bad data in mysql.func can cause crash

udf_init() can crash when the name field is empty.

We correct this by applying CHECK column constraints on
columns in the mysql.func tables.

The constrains are as follows:
* name cannot be an empty string;
* ret, the return type can be;
  * STRING_RESULT(0),
  * REAL_RESULT(1),
  * INT_RESULT(2),
  * and DECIMAL_RESULT(4);
  * but not ROW_RESULT(3) or TIME_RESULT(5).
* dl, cannot be empty string

Upgrades ensure that any invalid functions are deleted.

closes #1643

bb-10.4-MDEV-11799 2020-07-30 17:22:30 UTC 2020-07-30
MDEV-11799 InnoDB can abort if the doublewrite buffer contains a bad and good...

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2020-07-30 17:21:52 UTC

MDEV-11799 InnoDB can abort if the doublewrite buffer contains a bad and good copy

- Addressed marko's review comments.

bb-10.2-MDEV-23327 2020-07-29 19:54:24 UTC 2020-07-29
MDEV-23327 Can't uninstall UDF if the implementation library file doesn't exist

Author: Oleksandr "Sanja" Byelkin
Author Date: 2020-07-29 19:54:24 UTC

MDEV-23327 Can't uninstall UDF if the implementation library file doesn't exist

Made cleanup of DROP (udf) FUNCTION procedure and also check of mysql.func (not only loaded udf).

bb-10.2-for-axel 2020-07-29 17:28:52 UTC 2020-07-29
MDEV-21330 Lock monitor doesn't print a semaphore's last reserved thread in n...

Author: Eugene Kosov
Author Date: 2020-07-23 06:46:01 UTC

MDEV-21330 Lock monitor doesn't print a semaphore's last reserved thread in non-debug builds and INFORMATION_SCHEMA.INNODB_SYS_SEMAPHORE_WAITS is totally broken

SourceLocation: a class to store a filename and a line number

MutexRelease: a class similar to MutexDebug. It stores source location
where the mutex was taken the last time. Now measurable time/space
overhead is expected

GenericPolicy: now stores last lock() location in release build too

BlockMutexPolicy: now stores last lock() location in release build too

sync_array_cell_print(): prints source location in release build too

sync_arr_fill_sys_semphore_waits_table(): more info, namely mutex acquisition
location, is printed in INFORMATION_SCHEMA now

bb-10.2-anel-PR900 2020-07-29 14:04:41 UTC 2020-07-29
wsrep_notify exclusion

Author: Anel Husakovic
Author Date: 2020-07-29 14:04:41 UTC

wsrep_notify exclusion

bb-10.4-galera 2020-07-29 09:43:38 UTC 2020-07-29
Enable test for testing.

Author: Jan Lindström
Author Date: 2020-07-29 09:43:38 UTC

Enable test for testing.

bb-10.5-kevgs 2020-07-29 05:54:33 UTC 2020-07-29
MDEV-23322 use std::chrono for my_timer_*seconds() functions

Author: Eugene Kosov
Author Date: 2020-07-29 05:34:47 UTC

MDEV-23322 use std::chrono for my_timer_*seconds() functions

AFTER:
----- Routine ---------------
myt.cycles.routine : 5
myt.nanoseconds.routine : 29
myt.microseconds.routine : 29
myt.milliseconds.routine : 29
myt.ticks.routine : 17
----- Frequency -------------
myt.cycles.frequency : 2588288557
myt.nanoseconds.frequency : 1000000000
myt.microseconds.frequency : 1000000
myt.milliseconds.frequency : 1037
myt.ticks.frequency : 108
----- Resolution ------------
myt.cycles.resolution : 1
myt.nanoseconds.resolution : 1
myt.microseconds.resolution : 1
myt.milliseconds.resolution : 1
myt.ticks.resolution : 1
----- Overhead --------------
myt.cycles.overhead : 12
myt.nanoseconds.overhead : 32
myt.microseconds.overhead : 34
myt.milliseconds.overhead : 34
myt.ticks.overhead : 1552

BEFORE:
----- Routine ---------------
myt.cycles.routine : 5
myt.nanoseconds.routine : 11
myt.microseconds.routine : 13
myt.milliseconds.routine : 11
myt.ticks.routine : 17
----- Frequency -------------
myt.cycles.frequency : 2587273631
myt.nanoseconds.frequency : 1000000000
myt.microseconds.frequency : 1000000
myt.milliseconds.frequency : 1036
myt.ticks.frequency : 101
----- Resolution ------------
myt.cycles.resolution : 1
myt.nanoseconds.resolution : 1
myt.microseconds.resolution : 1
myt.milliseconds.resolution : 4
myt.ticks.resolution : 1
----- Overhead --------------
myt.cycles.overhead : 14
myt.nanoseconds.overhead : 32
myt.microseconds.overhead : 28
myt.milliseconds.overhead : 18446744073709551610
myt.ticks.overhead : 1502

As you can see, std::chrono::steady_clock has a little bigger overhead.
BTW, what's wrong with milliseconds overhead?
IMO don't use these my_timer_*() functions
and use chrono directly to not pay for unavoidable (we don't use LTO)
overhead of my_timer_() function calls.

bb-10.3-wlad 2020-07-28 19:05:06 UTC 2020-07-28
MDEV-21101 unexpected wait_timeout with pool-of-threads

Author: Vladislav Vaintroub
Author Date: 2020-07-28 13:59:38 UTC

MDEV-21101 unexpected wait_timeout with pool-of-threads

Due to restricted size of the threadpool, execution of client queries can
be delayed (queued) for a while. This delay was interpreted as client
inactivity, and connection is closed, if client idle time + queue time
exceeds wait_timeout.

But users did not expect queue time to be included into wait_timeout.

This patch changes the behavior. We don't close connection anymore,
if there is some unread data present on connection,
even if wait_timeout is exceeded. Unread data means that client
was not idle, it sent a query, which we did not have time to process yet.

bb-10.2-MDEV-21258 2020-07-28 12:06:56 UTC 2020-07-28
MDEV-21258: (p1) Can't uninstall plugin if the library file doesn't exist

Author: Oleksandr "Sanja" Byelkin
Author Date: 2020-07-28 08:39:05 UTC

MDEV-21258: (p1) Can't uninstall plugin if the library file doesn't exist

Part 1: removing plugin from the mysql.plugin even if the plugin is not loaded

10.4-MDEV-21201 2020-07-28 08:34:49 UTC 2020-07-28
cleanup: formatting

Author: Sergei Golubchik
Author Date: 2020-07-28 08:33:16 UTC

cleanup: formatting

bb-10.4-kevgs 2020-07-28 08:06:12 UTC 2020-07-28
MDEV-23245 Still getting assertion failure in file data0type.cc line 67

Author: Eugene Kosov
Author Date: 2020-07-28 06:37:45 UTC

MDEV-23245 Still getting assertion failure in file data0type.cc line 67

Doesn't allow instant alter of a field which is a prefix part of some key

is_part_of_a_key_prefix(): I hope the name of the function is clear

ha_innobase::can_convert_string()
ha_innobase::can_convert_varstring()
ha_innobase::can_convert_blob(): it can't when field is_part_of_a_key_prefix()

bb-10.4-thiru 2020-07-28 06:46:52 UTC 2020-07-28
MDEV-23199 page_compression flag is missing for full_crc32 tablespace

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2020-07-28 06:45:09 UTC

MDEV-23199 page_compression flag is missing for full_crc32 tablespace

Problem:
======
Making the tablespace as page_compressed doesn't do table rebuild.
It does change only the FSP_FLAG.

During recovery:
1) InnoDB encounters FILE_CREATE redo log and opens the tablespace
with old FSP_FLAG value.
2) Only parsing of redo log has been finished. Now InnoDB tries to load
the table. If the existing tablespace flags doesn't match with table
flags then InnoDB should read page0. But in fsp_flags_try_adjust(),
skips the page read for full_crc32 format.
3) After that, InnoDB tries to open the clustered index and it leads to
failure of page validation.

Fix:
===
Remove the expection for full_crc32 format in fsp_flags_try_adjust().
Allow page0 to be read and set the tablespace flags if page compression
doesn't match.

fsp_flags_try_adjust(): Remove full_crc32 expection, add the check
for page_compression flag and change the tablespace flag.

is_flags_full_crc32_equal(), is_flags_non_full_crc32_equal(): Rename
the variable page_ssize and space_page_ssize with fcrc32_psize and
non_fcrc32_psize.

bb-mdev-17399-hf 2020-07-27 22:51:48 UTC 2020-07-27
MDEV-17399 Add support for JSON_TABLE.

Author: Alexey Botchkov
Author Date: 2020-07-27 22:51:48 UTC

MDEV-17399 Add support for JSON_TABLE.

EXPLAIN and EXPLAIN FORMAT=JSON added for the JSON_TABLE.

bb-10.5-drrtuy 2020-07-27 15:16:54 UTC 2020-07-27
The solution to minor upgrade issue

Author: Roman Nozdrin
Author Date: 2020-07-13 14:50:43 UTC

The solution to minor upgrade issue

MCS doesn't need expect and libreadline as dependencies

RPM packages now depends on jemalloc again

10.2-sysprg-MDEV-21910 2020-07-27 11:34:37 UTC 2020-07-27
MDEV-21910: merge reworked 10.4-MDEV-21910 patch into 10.2

Author: Julius Goryavsky
Author Date: 2020-07-27 11:34:37 UTC

MDEV-21910: merge reworked 10.4-MDEV-21910 patch into 10.2

bb-10.5-MDEV-21175 2020-07-24 13:07:00 UTC 2020-07-24
WIP MDEV-21175 Remove dict_table_t::n_foreign_key_checks_running

Author: Marko Mäkelä
Author Date: 2020-07-24 13:07:00 UTC

WIP MDEV-21175 Remove dict_table_t::n_foreign_key_checks_running

The counter dict_table_t::n_foreign_key_checks_running
was a work-around for missing meta-data locking (MDL)
on the SQL layer.

ER_TABLE_IN_FK_CHECK: Replaced with ER_UNUSED_26.

HA_ERR_TABLE_IN_FK_CHECK: Remove.

dict_table_t: Remove inc_fk_checks(), dec_fk_checks(),
n_foreign_key_checks_running.

row_ins_check_foreign_constraints(),
row_upd_check_references_constraints(): Do not acquire
a shared dict_sys latch nor touch the reference counters.

row_drop_table_for_mysql(): Make the checks stricter.
We will still employ row_mysql_drop_list for
TRUNCATE TABLE and for dropping internal tables related
to FULLTEXT INDEX. So, this will not fix MDEV-21283 yet.

MDEV-21602 CREATE TABLE…PRIMARY KEY…SELECT workaround
causes DROP TABLE to ignore locks

The error handling of CREATE…SELECT would invoke
handler::delete_table() while still holding locks
on the table, due to not having invoked handlerton::rollback
first. InnoDB used to work around this as well.
In MDEV-742 this was worked around further by breaking
MDL, causing MDEV-22733.

bb-10.4-jan 2020-07-24 08:56:01 UTC 2020-07-24
Silence unnecessary warning.

Author: Jan Lindström
Author Date: 2020-07-24 08:56:01 UTC

Silence unnecessary warning.

bb-10.2-kevgs 2020-07-23 20:51:10 UTC 2020-07-23
MDEV-21330 Lock monitor doesn't print a semaphore's last reserved thread in n...

Author: Eugene Kosov
Author Date: 2020-07-23 06:46:01 UTC

MDEV-21330 Lock monitor doesn't print a semaphore's last reserved thread in non-debug builds and INFORMATION_SCHEMA.INNODB_SYS_SEMAPHORE_WAITS is totally broken

SourceLocation: a class to store a filename and a line number

MutexRelease: a class similar to MutexDebug. It stores source location
where the mutex was taken the last time. Now measurable time/space
overhead is expected

GenericPolicy: now stores last lock() location in release build too

BlockMutexPolicy: now stores last lock() location in release build too

sync_array_cell_print(): prints source location in release build too

sync_arr_fill_sys_semphore_waits_table(): more info, namely mutex acquisition
location, is printed in INFORMATION_SCHEMA now

bb-10.2-MDEV-14711 2020-07-23 12:08:46 UTC 2020-07-23
MDEV-14711 Assertion `mode == 16 || mode == 12 || !fix_block->page.file_page_...

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2020-07-23 11:29:30 UTC

MDEV-14711 Assertion `mode == 16 || mode == 12 || !fix_block->page.file_page_was_freed' failed in buf_page_get_gen (rollback requesting a freed undo page)

Problem:
=======
In buf_cur_optimistic_latch_leaves(), requesting a left block with BTR_GET
after releasing current block. But there is no guarantee that left block
could be still available.

Fix:
====

(1) In btr_cur_optimistic_latch_leaves(), replace the BUF_GET with
BUF_GET_POSSIBLY_FREED for fetching left block.
(2) Once InnoDB acquires left block, it should check FIL_PAGE_NEXT with
current block page number. If not, release cursor->left_block and return
false.

bb-10.5-varun 2020-07-23 10:00:29 UTC 2020-07-23
MDEV-23216: LONGTEXT column with collation doesn't sort

Author: varun
Author Date: 2020-07-23 10:00:29 UTC

MDEV-23216: LONGTEXT column with collation doesn't sort

An overflow was happening with LONGTEXT columns, when the length was converted to the length
in the strxfrm form (mem-comparable keys).
Introduced a function to truncate the length to the max_sort_length before calculating
the length of the strxfrm form.

bb-10.2-MDEV-181777 2020-07-23 05:59:18 UTC 2020-07-23
MDEV-18177 : Galera test failure on galera_autoinc_sst_mariabackup

Author: Jan Lindström
Author Date: 2020-07-23 05:59:18 UTC

MDEV-18177 : Galera test failure on galera_autoinc_sst_mariabackup

Add wait_condition

bb-10.5-sujatha 2020-07-22 10:39:27 UTC 2020-07-22
MDEV-14302: 10.5 changes.

Author: Sujatha Sivakumar
Author Date: 2020-07-22 10:39:27 UTC

MDEV-14302: 10.5 changes.

10.1-varun 2020-07-22 10:32:39 UTC 2020-07-22
MDEV-17066: Bytes lost or Assertion `status_var.local_memory_used == 0 after ...

Author: varun
Author Date: 2020-07-22 10:02:57 UTC

MDEV-17066: Bytes lost or Assertion `status_var.local_memory_used == 0 after DELETE with subquery with ROLLUP

The issue here is when records are read from the temp table via a
cache(rr_from_cache), the cache is allocated for each execution of
the correlated subquery. But the deallocation of the cache only
happened after the entire execution of the parent select was done.
The fix here would be free the cache on each execution of the
subquery.

bb-10.4-sujatha 2020-07-22 10:09:52 UTC 2020-07-22
MDEV-14203: 10.4 changes

Author: Sujatha Sivakumar
Author Date: 2020-07-22 10:09:52 UTC

MDEV-14203: 10.4 changes

bb-10.5-MDEV-21910 2020-07-22 05:20:10 UTC 2020-07-22
MDEV-21910 Deadlock between BF abort and manual KILL command

Author: sjaakola
Author Date: 2020-05-19 08:12:26 UTC

MDEV-21910 Deadlock between BF abort and manual KILL command

When high priority replication slave applier encounters lock conflict in innodb,
it will force the conflicting lock holder transaction (victim) to rollback.
This is a must in multi-master sychronous replication model to avoid cluster lock-up.
This high priority victim abort (aka "brute force" (BF) abort), is started
from innodb lock manager while holding the victim's transaction's (trx) mutex.
Depending on the execution state of the victim transaction, it may happen that the
BF abort will call for THD::awake() to wake up the victim transaction for the rollback.
Now, if BF abort requires THD::awake() to be called, then the applier thread executed
locking protocol of: victim trx mutex -> victim THD::LOCK_thd_data

If, at the same time another DBMS super user issues KILL command to abort the same victim,
it will execute locking protocol of: victim THD::LOCK_thd_data -> victim trx mutex.
These two locking protocol acquire mutexes in opposite order, hence unresolvable mutex locking
deadlock may occur.

The fix in this commit adds THD::wsrep_aborter flag to synchronize who can kill the victim
This flag is set both when BF is called for from innodb and by KILL command.
Either path of victim killing will bail out if victim's wsrep_killed is already
set to avoid mutex conflicts with the other aborter execution. THD::wsrep_aborter
records the aborter THD's ID. This is needed to preserve the right to kill
the victim from different locations for the same aborter thread.
It is also good error logging, to see who is reponsible for the abort.

A new test case was added in galera.galera_bf_kill_debug.test for scenario where
wsrep applier thread and manual KILL command try to kill same idle victim

bb-10.2-sujatha 2020-07-21 09:43:42 UTC 2020-07-21
MDEV-14203: rpl.rpl_extra_col_master_myisam, rpl.rpl_slave_load_tmpdir_not_ex...

Author: Sujatha Sivakumar
Author Date: 2020-07-21 09:43:42 UTC

MDEV-14203: rpl.rpl_extra_col_master_myisam, rpl.rpl_slave_load_tmpdir_not_exist failed in buildbot with a warning

Problem:
=======
rpl.rpl_slave_load_tmpdir_not_exist 'stmt' w3 [ fail ] Found warnings/errors
in server log file!

Test ended at 2017-09-27 20:34:55
[Warning] Master is configured to log replication events with checksum, but
will not send such events to slaves that cannot process them
^ Found warnings in /mnt/buildbot/build/mariadb-10.2.10/mysql-test/var/3/log/mysqld.1.err
ok
Analysis:
========
When slave tries to connect to master 'get_master_version_and_clock' function
is invoked to perform elaborated slave-master handshake. During this process
slave server queries master server, to know if it is checksum aware and at the
same time master is notified about its CRC-awareness. The master's side
instant value of @@global.binlog_checksum is stored in the dump thread's
uservar area as well as cached locally to become known in consensus by master
and slave.

Post hand-shake slave requests master for binlog dump. It sends
'COM_BINLOG_DUMP'. This command is sent to master by 'cli_advanced_command'
call. If there is some temporary network failure during this request_dump
call, 'end_server' is invoked to close the current connection between master
and slave. Upon connection close the dump thread on the master gets terminated
and it clears the 'uservar' data it got through master-slave handshake.

The 'COM_BINLOG_DUMP' command is sent once again without master-slave
handshake. Since the checksum data is not available with new dump thread a
warning gets reported.

Fix:
===
Upon network write error donot attempt reconnect, proceed to master-slave
handshake. This ensures that master is aware of slave's capability to use
checksums.

10.4-varun 2020-07-21 08:30:27 UTC 2020-07-21
MDEV-19039: Wrong result from query, using window function and GROUP BY .. WI...

Author: varun
Author Date: 2020-07-21 08:30:27 UTC

MDEV-19039: Wrong result from query, using window function and GROUP BY .. WITH ROLLUP

WIP

bb-10.5-MDEV-16039-nikita 2020-07-21 03:06:36 UTC 2020-07-21
move fix_vcol_exprs into TABLE

Author: Nikita Malyavin
Author Date: 2020-07-21 03:06:36 UTC

move fix_vcol_exprs into TABLE

bb-10.3-midenok-MDEV-18706 2020-07-20 15:45:53 UTC 2020-07-20
Formatting

Author: midenok
Author Date: 2020-07-20 15:45:53 UTC

Formatting

bb-10.4-monty 2020-07-20 12:20:27 UTC 2020-07-20
MDEV-21953 deadlock between BACKUP STAGE BLOCK_COMMIT and parallel repl.

Author: Monty
Author Date: 2020-07-20 12:19:25 UTC

MDEV-21953 deadlock between BACKUP STAGE BLOCK_COMMIT and parallel repl.

The issue was:
T1, a parallel slave worker thread, is waiting for another worker thread to
commit. While waiting, it has the MDL_BACKUP_COMMIT lock.
T2, working for mariabackup, is doing BACKUP STAGE BLOCK_COMMIT and blocks
all commits.
This causes a deadlock as the thread T1 is waiting for can't commit.

Fixed by moving locking of MDL_BACKUP_COMMIT from ha_commit_trans() to
commit_one_phase_2()

Other things:
- Added a new argument to ha_comit_one_phase() to signal if the
  transaction was a write transaction.
- Ensured that ha_maria::implicit_commit() is always called under
  MDL_BACKUP_COMMIT. This code is not needed in 10.5
- Ensure that MDL_Request values 'type' and 'ticket' are always
  initialized. This makes it easier to check the state of the MDL_Request.
- Moved thd->store_globals() earlier in handle_rpl_parallel_thread() as
  thd->init_for_queries() could use a MDL that could crash if store_globals
  where not called.
- Don't call ha_enable_transactions() in THD::init_for_queries() as this
  is both slow (uses MDL locks) and not needed.

bb-10.1-MDEV-23082 2020-07-18 06:55:11 UTC 2020-07-18
MDEV-23082: ER_TABLEACCESS_DENIED_ERROR error message is truncated,

Author: Rucha Deodhar
Author Date: 2020-07-13 08:49:18 UTC

MDEV-23082: ER_TABLEACCESS_DENIED_ERROR error message is truncated,
and inaccurately

The list of all privileges is 118 characters wide. However, the format of error
message was: "%-.32s command denied to user '%s'@'%s' for table '%-.192s'".
get_length() sets the maximum width to 32 characters. Hence, eventually,
only first 32 characters of list of privilege are stored.
Fix: Changing the format to "%-.118..." so that get_length() sets width to 118.
Hence, all 118 characters of the list of privilege are stored.

bb-10.5-thiru 2020-07-17 15:33:50 UTC 2020-07-17
- check empty container for range_set_t::iterator::find

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2020-07-17 15:33:50 UTC

- check empty container for range_set_t::iterator::find

bb-10.2-MDEV-15703 2020-07-17 11:47:26 UTC 2020-07-17
Fix of typo in the comment.

Author: Oleksandr "Sanja" Byelkin
Author Date: 2020-07-14 08:12:22 UTC

Fix of typo in the comment.

1100 of 726 results

Other repositories

Name Last Modified
lp:maria 2 hours ago
lp:~maria-captains/maria/+git/connector-c 2018-01-08
12 of 2 results
You can't create new repositories for MariaDB.