maria:bb-11.2-getcpu-counter

Last commit made on 2023-08-05
Get this branch:
git clone -b bb-11.2-getcpu-counter https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-11.2-getcpu-counter
Repository:
lp:maria

Recent commits

9325d74... by Nikita Malyavin

optimize ib_counter_t with getcpu

getcpu is not an ultimate solution, since by the ultimate default it is a
syscall.

However there is a set of platforms where it is implemented via vdso:
https://github.com/search?q=repo%3Alattera%2Fglibc%20__vdso_getcpu&type=code

After linux added rseq, redhat developers have implemented its support in
glibc, specifically to speed up getcpu:
https://bugzilla.redhat.com/show_bug.cgi?id=2024347
rseq is supported as of v2.35 https://lwn.net/Articles/883104/

de9541d... by Nikita Malyavin

MDEV-31838 Assertion fails upon replication online alter with MINIMAL row

Replica honors its own binlog_row_image value when it sets up read_set.
Avoid shrinking the set when online alter is running, i.e. leave it all set

1015123... by Nikita Malyavin

MDEV-31804 Assertion `thd->m_transaction_psi == __null' fails

... upon replicating online ALTER

Two separate problems were here:
1. copy_data_between_tables issued an implicit commit, where the assertion
was evaluated.
In INPLACE, on the contrary, the assertion is not triggered,
since the commit is done normally, by issuing trans_commit_stmt in
mysql_execute_command.
2. m_transaction_psi was also wrongly re-created in trans_register_ha,
called when a binlog write is issued. This branch is connected with
IDEMPOTENT switch and side-effects from COPY's early commit.

The exact effects of this early commit
(see mysql_trans_commit_alter_copy_data call) are not studied, so its
removal is opted out. Instead a PSI commit was added there.

95e3094... by Nikita Malyavin

MDEV-31781 ALTER TABLE ENGINE=s3 fails

s3 is read-only. No need to update to a read-only engine with LOCK=NONE.

eb684a4... by Nikita Malyavin

MDEV-31777 ER_GET_ERRNO upon online alter on CONNECT table

Forbid Online for CONNECT.

235a654... by Nikita Malyavin

MDEV-31631 Adding auto-increment to table with history online misbehaves

Adding an auto_increment column online leads to an undefined behavior.
Basically any DEFAULTs that depend on a row order in the table, or on
the non-deterministic (in scope of the ALTER TABLE statement) function
is UB.

For example, NOW() is considered generally non-deterministic
(Item_func_now_utc is marked with VCOL_NON_DETERMINISTIC), but it's fixed
in scope of a single statement.

Same for any other function that depends only on the session/status vars
apart from its arguments.

Only two UB cases are known:
* adding new AUTO_INCREMENT column. Modifying the existing column may be
fine under certain circumstances, see MDEV-31058.
* adding new column with DEFAULT(nextval(...)). Modifying the existing
column is possible, since its value will be always present in the online
event, except for the NULL -> NOT NULL modification

dc83de0... by Nikita Malyavin

MDEV-31776 Online ALTER reports the number of affected rows incorrectly

Add a new virtual function that will increase the inserted rows count
for the insert log event and decrease it for the delete event.

Reuses Rows_log_event::m_row_count on the replication side, which was only
set on the logging side.

c97fe13... by Nikita Malyavin

Rows_log_event: reorganize the class layout for a lower memory footprint

18694ee... by Nikita Malyavin

MDEV-31775 Server crash upon online alter on sequence

forbid online for sequences

51f1d8e... by Nikita Malyavin

review fixes WIP