Commit graph

79208 commits

Author SHA1 Message Date
Oleksandr Byelkin
7a65dcb59e MDEV-34704 Quick mode produces the bug for mariadb client
--quick-max-column-width parameter added to limit field
    width in --quick mode.
2024-08-27 15:38:12 +02:00
Oleksandr Byelkin
cb5bb4b319 Merge branch '11.6' into 11.7 2024-08-21 15:26:07 +02:00
Oleksandr Byelkin
492a7c2430 Merge branch '11.5' into 11.6 2024-08-21 15:13:47 +02:00
Oleksandr Byelkin
342fa29615 Merge branch '11.4' into 11.5 2024-08-21 11:52:54 +02:00
Oleksandr Byelkin
eb70e0d6e2 Merge branch '11.2' into 11.4 2024-08-21 09:30:54 +02:00
Oleksandr Byelkin
6197e6abc4 Merge branch '10.11' into 11.2 2024-08-21 07:58:46 +02:00
Oleksandr Byelkin
2b11450d09 Merge branch '11.1' into 11.2 2024-08-20 11:29:44 +02:00
Sergei Golubchik
9adc81791e 11.7 branch 2024-08-20 10:44:48 +02:00
Oleksandr Byelkin
70afc62750 Merge branch '10.6' into 10.11 2024-08-20 10:00:39 +02:00
Oleksandr Byelkin
fc5772ce17 Merge branch '10.5' into 10.6 2024-08-20 09:11:34 +02:00
Kristian Nielsen
7318fa180d Fix sporadic test failure of mariabackup.slave_provision_nolock
The test requires a larger innodb log file size; this was lost as a
side-effect of d7699c51eb.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2024-08-19 21:19:07 +02:00
Kristian Nielsen
78fcb9474c Fix sporadic failure in test rpl.rpl_rotate_logs
Clarify confusing comments in the previous commit, and note that the failure
started after push of MDEV-34504.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2024-08-19 21:18:56 +02:00
Oleksandr Byelkin
ae02999cdb MDEV-34776 Assertion failure in Item_string::do_build_clone
Added missed methods to Item_string child.
2024-08-19 18:49:04 +02:00
Oleksandr Byelkin
fccfdc28b8 MDEV-34771 Types mismatch when cloning items causes debug assertion
Missing methods added to Item_bin_string
2024-08-19 17:15:46 +02:00
Monty
db8ab4aca2 Sort result from table_statistics and index_statistics
This is needed as the order of rows are not deterministic,
especially in future versions of table statistics.
2024-08-19 11:14:11 +03:00
Monty
e51d55a63f Revert "mtr: remove not_valgrind_build"
The original code is correct.

valgrind and asan binaries should be built with a specialiced version of
mem_root that makes it easier to find memory overwrites.
This is what the BUILD scripts is doing.

The specialiced mem_root code allocates a new block for every allocation
which is visiable for any test that depenmds on the default original malloc
size and usage.
2024-08-19 10:59:57 +03:00
Yuchen Pei
8b8c8fcb86
MDEV-33836 Compute modulus correctly in sequence
When the sequence is unsigned bigint, it needs to be cast to unsigned
for correct computation of the modulus.
2024-08-19 11:16:32 +10:00
Yuchen Pei
2603453436
MDEV-33836 Fix version markers in tests relating to MDEV-28152
MDEV-28152 was pushed to 11.5, not 11.4
2024-08-19 11:16:31 +10:00
Kristian Nielsen
5dc2fe4815 Fix sporadic failure in test rpl.rpl_rotate_logs
The test started failing after push of MDEV-31404.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2024-08-16 22:27:01 +02:00
Marko Mäkelä
62bfcfd8b2 Merge 10.6 into 10.11 2024-08-14 11:36:52 +03:00
Marko Mäkelä
757c368139 Merge 10.5 into 10.6 2024-08-14 10:56:11 +03:00
JunSeong
72ab8bc990 fix: fix typo at mysql-test README 2024-08-14 10:42:50 +10:00
Thirunarayanan Balathandayuthapani
b304ec3030 MDEV-14231 MATCH() AGAINST( IN BOOLEAN MODE), results mismatch
- Added plugin_debug.test, multiple_index.test to innodb_fts suite
from mysql-5.7.

- commit c5b28e55f6 removes the warning
for InnoDB rebuilding table to add FTS_DOC_ID

- multiple_index test case  has MATCH(a) values are smaller
than in MySQL because ROLLBACK updates the stat_n_rows.

- st_mysql_ftparser_boolean_info structure conveys boolean
metadata to mysql search engine for every word in the query.
This structure misses the position value to store the correct
offset of every word. So phrase search queries in plugin_debug
test case with boolean mode for simple parser throws
wrong result.
2024-08-13 15:22:09 +05:30
Jan Lindström
cd8b8bb964 MDEV-34594 : Assertion `client_state.transaction().active()' failed in
int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type)

CREATE TABLE [SELECT|REPLACE SELECT] is CTAS and idea was that
we force ROW format. However, it was not correctly enforced
and keys were appended before wsrep transaction was started.

At THD::decide_logging_format we should force used stmt binlog
format to ROW in CTAS case and produce a warning if used
binlog format was not ROW.

At ha_innodb::update_row we should not append keys similarly
as in ha_innodb::write_row if sql_command is SQLCOM_CREATE_TABLE.
Improved error logging on ::write_row, ::update_row and ::delete_row
if wsrep key append fails.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-08-12 23:54:30 +02:00
Alexander Barkov
0e27351028 MDEV-34376 Wrong data types when mixing an utf8 *TEXT column and a short binary
A mixture of a multi-byte *TEXT column and a short binary column
produced a too large column.
For example, COALESCE(tinytext_utf8mb4, short_varbinary)
produced a BLOB column instead of an expected TINYBLOB.

- Adding a virtual method Type_all_attributes::character_octet_length(),
  returning max_length by default.
- Overriding Item_field::character_octet_length() to extract
  the octet length from the underlying Field.
- Overriding Item_ref::character_octet_length() to extract
  the octet length from the references Item (e.g. as VIEW fields).
- Fixing Type_numeric_attributes::find_max_octet_length() to
  take the octet length using the new method character_octet_length()
  instead of accessing max_length directly.
2024-08-12 17:13:31 +04:00
Ian Gilfillan
c83ba513da Update sponsors 2024-08-12 09:32:30 +01:00
Sergei Golubchik
05fe3f1c18 Two problems with auth_parsec.so
1. it links with ${SSL_LIBRARIES}, in WolfSSL builds it's a static
   library, so when a plugin is loaded there will be two copies of
   wolfssl in the same address space. It breaks odr (at least).
2. Plugin can linked with OpenSSL and the server with WolfSSL or
   vice versa. It might load, but then we'll have both WolfSSL and
   OpenSSL at the same time. Kind of risky.

Fix: link the plugin statically into the server if it's a WolfSSL build

adjust tests to work with static and dynamic parsec
2024-08-12 10:32:03 +02:00
Sergei Golubchik
18cf72df56 disable the test that doesn't work in MSAN
here MSAN complains that

==218853==WARNING: MemorySanitizer: use-of-uninitialized-value
   #0 0x7f84a77c60a3 in _gnutls_rnd_init /tmp/msan/lib/random.c:69:6
   #1 0x7f84a77c60a3 in gnutls_rnd /tmp/msan/lib/random.c:168:6

but the line lib/random.c:69 in gnutls-3.7.1 is

 69  	if (unlikely(!rnd_initialized)) {

and rnd_initialized is declared as

 40 static _Thread_local unsigned rnd_initialized = 0;

which apparently MSAN isn't happy with
2024-08-10 19:39:21 +02:00
Oleksandr Byelkin
7e3dfe3e75 fix version 2024-08-10 19:04:55 +02:00
Oleksandr Byelkin
43d478d41d fix parameters values of the calls 2024-08-09 14:48:33 +02:00
Nikita Malyavin
e580cf7ae0 MDEV-32618 new auth plugin
PARSEC: Password Authentication using Response Signed with Elliptic Curve

new authentication plugin that uses salted passwords,
key derivation, extensible password storage format,
and both server- and client-side scrambles.

It signs the response with ed25519, but it uses stock
unmodified ed25519 as provided by OpenSSL/WolfSSL/GnuTLS.

Edited by: Sergei Golubchik
2024-08-09 14:01:12 +02:00
Oleksandr Byelkin
3e3a326108 Merge branch '11.1' into mariadb-11.1.6 2024-08-09 08:57:07 +02:00
Oleksandr Byelkin
662bb50784 Merge branch '10.5' into mariadb-10.5.26 2024-08-09 08:47:24 +02:00
Nikita Malyavin
25e2d0a6bb MDEV-34632 Assertion failed in handler::assert_icp_limitations
Assertion `table->field[0]->ptr >= table->record[0] &&
table->field[0]->ptr <= table->record[0] + table->s->reclength' failed in
handler::assert_icp_limitations.

table->move_fields has some limitations:
1. It cannot be used in cascade
2. It should always have a restoring pair.

Rule 1 is covered by assertions in handler::assert_icp_limitations
and handler::ptr_in_record (commit 30894fe9a9).

Rule 2 should be manually maintained with care. Hopefully, the rule 1 assertions
may sometimes help as well.

In ha_myisam::repair, both rules are broken. table->move_fields is used
asymmetrically there: it is set on every param->fix_record call
(i.e. in compute_vcols) but is restored only once, in the end of repair.

The reason to updating field ptr's for every call is that compute_vcols can
(supposedly) be called in parallel, that is, with the same table, but different
records.

The condition to "unmove" the pointers in ha_myisam::restore_vcos_after_repair
is incorrect, when stored vcols are available, and myisam stores a VIRTUAL field
if it's the only field in the table (the record cannot be of zero length).

This patch solves the problem by "unmoving" the pointers symmetrically, in
compute_vcols. That is, both rules will be preserved maintained.
2024-08-07 14:50:19 +02:00
Oleksandr Byelkin
d6444022ca Merge branch 'bb-11.5-release' into bb-11.6-release 2024-08-06 17:28:38 +02:00
Oleksandr Byelkin
ea75a0b600 Merge branch '11.4' into 11.5 2024-08-05 17:50:18 +02:00
Hugo Wen
9e1923ca23 Extend Unix socket authentication to support authentication_string
Before this change the unix socket auth plugin returned true only when
the OS socket user id matches the MariaDB user name.
The authentication string was ignored.

Now if an authentication string is defined with in `unix_socket`
authentication rule, then the authentication string will be used to
compare with the socket's user name, and the plugin will return a
positive if matching.

Make the plugin to fill in the @@external_user variable.

This change is similar to MySQL commit of
https://github.com/mysql/mysql-server/commit/6ddbc58e.
However there's one difference with above commit:

- For MySQL, both Unix user matches DB user name and Unix user matches the
  authentication string will be allowed to connect.
- For MariaDB, we only allows the Unix user matches the authentication
  string to connect, if the authentication string is defined.
  This is because allowing both Unix user names has risks and couldn't
  handle the case that a customer only wants to allow one single Unix user
  to connect which doesn't matches the DB user name.

If DB user is created with multiple unix_socket options for example:
`create user A identified via unix_socket as 'B' or unix_socket as 'C';`
Then both Unix user of B and C are accepted.

Existing MTR test of `plugins.unix_socket` is not impacted.
Also add a new MTR test to verify authentication with authentication
string. See the MTR test cases for supported/unsupported cases.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2024-08-05 10:51:49 +01:00
Sergei Golubchik
5ab81ffe00 fix plugins.rpl_auth failure in bintars
in bintars the server is linked with wolfssl, while the connector
is linked with gnutls. Thus client_ed25519.so gets gnutls
dependency, unresolved symbols and it cannot be loaded into the
server and gnutls symbols aren't present there.

linking the plugin statically with gnutls fixes that and the test passes.
but when such a plugin is loaded into the client, the client gets
two copies of gnutls - they conflict and ssl doesn't work at all.

let's detect this and disable the test for now.
2024-08-05 10:39:50 +02:00
Jan Lindström
8b51d34462 MDEV-34640 : galera_var_ignore_apply_errors test freezes
Test improvements only to make test more robust.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-08-04 18:12:13 +02:00
Jan Lindström
71f289e5d1 MDEV-25614 : Galera test failure on GCF-354
Modified node config with longer timeouts for suspect,
inactive, install and wait_prim timeout. Increased
node_1 weight to keep it primary component when
other nodes are voted out.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-08-04 17:59:13 +02:00
Jan Lindström
eb30a9d633 MDEV-34647 : 'INSERT...SELECT' on MyISAM table suddenly replicated by Galera
Replication of MyISAM and Aria DML is experimental and best
effort only. Earlier change make INSERT SELECT on both
MyISAM and Aria to replicate using TOI and STATEMENT
replication. Replication should happen only if user
has set needed wsrep_mode setting.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-08-04 17:56:39 +02:00
Jan Lindström
cb80ef93a9 MDEV-32778 : galera_ssl_reload failed with warning message
Fixed used configuration and added suppression for warning
message. Test case changes only.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-08-04 17:54:05 +02:00
Jan Lindström
0ba6068a82 MDEV-32782 : galera_sst_mysqldump_with_key test failed
Modified test configuration file to use wsrep_sync_wait
to make sure committed transactions are replicated before
next operation.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-08-04 17:53:45 +02:00
Sergei Golubchik
1787164cdd fix plugins.rpl_auth failure on Debian
Client plugins on Debian are installed in a separate location,
outside of server's plugin-dir
2024-08-04 17:28:12 +02:00
Sergei Golubchik
66f14ef6a1 update C/C 3.4
note that:
* unit.conc_tls is broken in mtr
* schannel now doesn't fail on invalid ca path unless
  --ssl-verify-server-cert is used. openssl still does.
2024-08-04 17:28:08 +02:00
Oleksandr Byelkin
1640c9b06e Merge branch '11.2' into 11.4 2024-08-04 17:27:48 +02:00
Oleg Smirnov
cf202decde MDEV-34683 Types mismatch when cloning items causes debug assertion
New runtime type diagnostic (MDEV-34490) has detected that classes
Item_func_eq, Item_default_value and Item_date_literal_for_invalid_dates
incorrectly return an instance of its ancestor classes when being cloned.
This commit fixes that.

Additionally, it fixes a bug at Item_func_case_simple::do_build_clone()
which led to an endless loop of cloning functions calls.

Reviewer: Oleksandr Byelkin <sanja@mariadb.com>
2024-08-03 16:08:29 +07:00
Oleksandr Byelkin
dced6cbdb6 Merge branch '11.1' into 11.2 2024-08-03 09:50:16 +02:00
Oleksandr Byelkin
80abd847da Merge branch '10.11' into 11.1 2024-08-03 09:32:42 +02:00
Oleksandr Byelkin
0e8fb977b0 Merge branch '10.6' into 10.11 2024-08-03 09:15:40 +02:00