maria:bb-10.3-sachin

Last commit made on 2021-04-14
Get this branch:
git clone -b bb-10.3-sachin https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.3-sachin
Repository:
lp:maria

Recent commits

bef2dae... by Sachin Setiya

MDEV-25336 Parallel replication causes failed assert while restarting

BackPorting MDEV-20821 and MDEV-22370 fixes the issue, This commit just add test
case for it.

777cb59... by Sachin Setiya

MDEV-22370 safe_mutex: Trying to lock uninitialized mutex at /data/src/10.4-bug/sql/rpl_parallel.cc, line 470 upon shutdown during FTWRL

Problem:- When we issue FTWRL with shutdown in parallel, there is race between
FTWRL and shutdown. Shutdown might destroy the mutex (pool->LOCK_rpl_thread_pool)
before FTWRL can lock it. So we can get crash on FTWRL thread

Solution:- mysql_mutex_destroy(pool->LOCK_rpl_thread_pool) should wait for
FTWRL thread to complete its work , and then destroy.
So slave_prepare_for_shutdown will just deactivate the pool, and mutex is destroyed
later in end_slave()

2e186cd... by Andrei Elkin <email address hidden>

MDEV-20821 parallel slave server shutdown hang

Parallel slave server shutdown found to be hanging in
close_connections() triggered by shutdown due to a slave worker thread
would not be notified to exit in case the worker was sitting idle.

Fixed with destroying the worker pool earlier that is in
slave_prepare_for_shutdown() when all their driver threads have already left.
A test file is added to simulate the bug condition as well as check
multi-sourced and not-idle worker cases.

db9f8e4... by Sachin Setiya

MDEV-19157 Optimistic Parallel Replication fails when gtid_slave_pos table is non transactional and binlog events are transactional

Problem:- In Optimistic/Aggressive mode of parallel replication when we have
conflict, we retry the transaction, But if gtid_slave_pos is non transactional
In that case retry may result into duplicate key error for table because
the conflicted transaction can not rollback the changes in gtid_slave_pos table
So when we try the same trans again, We get the Duplicate Key error

Solution:- Users are advised to use transactional storage engine for gtid_slave_pos.
In this patch we are throwing warning when we see that gtid_slave_pos in non
transactional.

Working:- is_gtid_slave_pos_transactional variable is added into rpl_slave_state
which will take care of caching result of gtid_slave_pos transactionality
We are updating this variable in find_gtid_pos_tables_cb, this function will
be called for each gtid_slave_pos_XYZ table at the time of start slave by
handle_slave_sql.
We are also checking for opt_gtid_pos_auto_plugins while giving warning
because it can be possible that respective gtid_slave_pos_XYZ table has
not been created yet but user has set the variable.

4c80dcd... by Eugene

fix gcc optimized build

../sql/spatial.cc: In member function ‘double Gis_point::calculate_haversine(const Geometry*, double, int*)’:
../sql/spatial.cc:1093:45: error: ‘y1r’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1093 | res= 2*sphere_radius*asin((sqrt(dlat + cos(y1r)*cos(y2r)*dlong)));
      | ~~~^~~~~
../sql/spatial.cc:1092:20: error: ‘x1r’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1092 | dlong= sin((x2r - x1r)/2)*sin((x2r - x1r)/2);
      | ~~~~~^~~~~~
../sql/spatial.cc:1093:54: error: ‘y2r’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1093 | res= 2*sphere_radius*asin((sqrt(dlat + cos(y1r)*cos(y2r)*dlong)));
      | ~~~^~~~~
../sql/spatial.cc:1092:20: error: ‘x2r’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1092 | dlong= sin((x2r - x1r)/2)*sin((x2r - x1r)/2);
      | ~~~~~^~~~~~
c

77ffbbc... by midenok

MDEV-25172 Wrong error message for ADD COLUMN .. AS ROW START

Handle one more condition in fix_alter_info() for non-versioned table
and produce ER_VERS_NOT_VERSIONED error.

0c99e6e... by midenok

MDEV-22562 Assertion `next_insert_id == 0' upon UPDATE on system-versioned table

Don't update autoinc counter on history row insert. Uniqueness is kept
due to merge with row_end.

af52a0e... by midenok

MDEV-24690 Dropping primary key column from versioned table always fails with 1072

Exclude system-invisible key-parts from MDEV-11114 (04b288ae)
restriction.

b9d1c65... by midenok

MDEV-23446 goto error cleanup

d6d3d9a... by Marko Mäkelä

Merge 10.2 into 10.3