Commit graph

195914 commits

Author SHA1 Message Date
Alexey Botchkov
a9f6abedde MDEV-25875: JSON_TABLE: extract document fragment into JSON column
Accept JSON values for the JSON fields.
2022-05-31 12:09:11 +05:30
Alexey Botchkov
6b6d745b9e let numeric in the DEMAULT. 2022-05-31 12:08:54 +05:30
Monty
e7de50a821 Bug fixes for S3
- Fixed wrong DBUG_ASSERT when waiting for big-block-read
- Update S3_pagecache_reads counter when reading a block from S3.
  Before this patch the variable value was always 0

Reviewer: Oleksandr Byelkin <sanja@mariadb.com>
2022-05-30 18:36:59 +03:00
Monty
9d10b7107c Fixed bug in ma_loghandler.cc that could cause an assert
The assert happens in 10.6 with the following command:

./mtr --no-reorder --verbose-restart main.update_ignore_216 main.upgrade_MDEV-19650 main.upgrade_MDEV-23102-1 main.upgrade_MDEV-23102-2 main.upgrade_geometrycolumn_procedure_definer main.upgrade_mdev_24363 main.varbinary sys_vars.aria_log_file_size_basic

Reviewer: Oleksandr Byelkin <sanja@mariadb.com>
2022-05-30 17:26:48 +03:00
Monty
131c318b16 Remove compiler warning about unused variables 2022-05-30 17:26:48 +03:00
Marko Mäkelä
863c3eda87 MDEV-28689, MDEV-28690: Incorrect error handling for ctrl_mutex
comp_thread_ctxt_t: Remove ctrl_mutex, ctrl_cond, started. We do not
actually need them for anything.

destroy_worker_thread(): Split from destroy_worker_threads().

create_worker_threads(): We already initialize
thd->data_avail=FALSE and thd->cancelled=FALSE before
invoking pthread_create(). If any thread creation fails,
clean up by destroy_worker_thread().

compress_worker_thread_func(): Assume that thd->started and
thd->data_avail are already initialized.

Reviewed by: Vladislav Vaintroub
2022-05-30 15:49:45 +03:00
Masashi Tomooka
f7137a619f
MDEV-28599 EXCHANGE PARTITION on view causes ER_CHECK_NO_SUCH_TABLE instead of ER_WRONG_OBJECT
ER_CHECK_NO_SUCH_TABLE was raised because a view does not have
the corresponding TABLE instance connected to TABLE_LIST and the
server interprets the absence as the absence of the table itself.

To fix the problem, we add a check to ensure that the target table
to be swapped with a partition is not a view.

Reviewed by: Nayuta Yanagisawa
2022-05-30 19:28:44 +09:00
mkaruza
ebbd5ef6e2 MDEV-27862 Galera should replicate nextval()-related changes in sequences with INCREMENT <> 0, at least NOCACHE ones with engine=InnoDB
Sequence storage engine is not transactionl so cache will be written in
stmt_cache that is not replicated in cluster. To fix this replicate
what is available in both trans_cache and stmt_cache.

Sequences will only work when NOCACHE keyword is used when sequnce is
created. If WSREP is enabled and we don't have this keyword report error
indicting that sequence will not work correctly in cluster.

When binlog is enabled statement cache will be cleared in transaction
before COMMIT so cache generated from sequence will not be replicated.
We need to keep cache until replication.

Tests are re-recorded because of replication changes that were
introducted with this PR.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2022-05-30 12:43:52 +03:00
Jan Lindström
c8fabbed42 MDEV-20627 : Galera 4 not able to report proper wsrep_incoming_addresses
wsrep_server_incoming_address function always returned value of the
wsrep_node_incoming_address even when actual incoming address
was resolved to inc_addr variable. Fixed by returning inc_addr
if it does contain incoming address.
2022-05-30 12:43:46 +03:00
Sergei Golubchik
2840d7750d fix not_valgrind.inc not to error out in embedded 2022-05-30 09:58:40 +02:00
Sergei Golubchik
8b19f521f1 move alter_table combinations to a separate test file
no need to run all alter tests three times with no changes whatsoever
2022-05-30 09:58:40 +02:00
Monty
96329d6321 Fixed that CHECK TABLE on an S3 table doesn't try to write to files
The symtom of the bug was that check table on an S3 table when using
--s3_slave-ignore-updates=1 could print "9 when updating keyfile"
2022-05-29 12:10:50 +03:00
Daniel Black
0e0a3580ef MDEV-27314 Condense innodb buffer pool resize message (postfix) 2022-05-28 09:04:28 +10:00
Mathew Heard
c4e87cb22c MDEV-9020: Connect issues ALTER TABLE DISABLE KEYS when inserting data
If the connecting user doesn't have alter table privilege this isn't
allowed.

This patch removes enable / disable key commands that should never have been here

Closes #2002
2022-05-27 11:15:07 +10:00
Ting Nian
31e30329a3 Add option --enable-cleartext-plugin to the MariaDB client
For compatibility reasons, add the option to the MariaDB client without
any functional changes besides simply accepting the option and emitting
a warning that it is obsolete.

In MySQL this security related option is compulsory in certain use
cases. When users switch to MariaDB, this client command that used to
work starts failing without a sensible error message. In worst case
users resort to re-installing the mysql client from MySQL.

In MariaDB the option is obsolete and should simply be ignored. Users
however don't have any opportunity to learn that unless the client
program tells them so.

Before:

    mysql --enable-cleartext-plugin ...
    mysql: unknown option '--enable-cleartext-plugin'

    (program terminates)

After:

    mysql --enable-cleartext-plugin ...
    WARNING: option '--enable-cleartext-plugin' is obsolete.

    (program executes)

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.
2022-05-26 14:21:23 +10:00
Haidong Ji
41068a890e MDEV-27314 Condense innodb buffer pool resize message
InnoDB buffer pool resize messages are more succinct from this change:

Before:
```
2022-05-07 17:10:33 0 [Note] InnoDB: Completed resizing buffer pool from 14745600 to 19660800 bytes.
2022-05-07 17:10:33 0 [Note] InnoDB: Completed resizing buffer pool.
2022-05-07 17:10:33 8 [Note] InnoDB: Completed resizing buffer pool. (New size: 19660800 bytes).
```
After:
```
2022-05-07 17:10:33 0 [Note] InnoDB: Completed resizing buffer pool from 14745600 to 19660800 bytes.
```

Additionally, the INNODB_BUFFER_POOL_RESIZE_STATUS has more complete
info: it contains both the old and new buffer pool size values.
2022-05-26 12:10:29 +10:00
kkz
f85d488ad2 remove obsolete fix_session_vcol_expr{,_for_read} function declarations 2022-05-26 09:28:22 +10:00
karmengc
c1752a9f8f server.cnf: adjust major version to 10.8 2022-05-26 09:20:02 +10:00
Marko Mäkelä
05d049bdbe Merge 10.5 into 10.6 2022-05-25 14:39:42 +03:00
Marko Mäkelä
ea40c75c27 Merge 10.4 into 10.5 2022-05-25 14:24:51 +03:00
Marko Mäkelä
99c8aed00d MDEV-28601 InnoDB history list length was reverted to 32 bits
srv_do_purge(): In commit edde1f6e0d
when the de-facto 32-bit trx_sys_t::history_size() was replaced with
32-bit trx_sys.rseg_history_len, some more variables were changed
from ulint (size_t) to uint32_t.

The history list length is the number of committed transactions whose
undo logs are waiting to be purged. Each TRX_RSEG_HISTORY list is
storing the number of entries in a 32-bit field and each transaction
will occupy at least one undo log page. It is thinkable that the
length of each TRX_RSEG_HISTORY list may approach the maximum
representable number. The number cannot be exceeded, because the
rollback segment header is allocated from the same tablespace as
the undo log header pages it is pointing to, and because the page
numbers of a tablespace are stored in 32 bits. In any case, it is
possible that the total number of unpurged committed transactions
cannot be represented in 32 but 39 bits (corresponding to
128 rollback segments and undo tablespaces).
2022-05-25 14:06:04 +03:00
Marko Mäkelä
db0fde3f24 MDEV-28665 aio_uring::thread_routine terminates prematurely, causing hang
aio_uring::thread_routine(): Handle -EINTR from io_uring_wait_cqe()
in the same way as aio_linux::getevent_thread_routine() does it:
simply ignore it and invoke the system call again.

Reviewed by: Vladislav Vaintroub
2022-05-25 13:18:24 +03:00
Marko Mäkelä
a0e4853eff MDEV-28668 Recovery or backup of INSERT may be incorrect
page_cur_insert_rec_low(): When checking for common bytes with
the preceding record, exclude the header bytes of next_rec
that could have been updated by this function.

The scenario where this caused corruption was an insert of
a node pointer record. The child page number was written as
0x203 but recovered as 0x103 because the n_owned field of next_rec
was changed from 1 to 2 before the comparison was invoked.
2022-05-25 13:15:56 +03:00
Thirunarayanan Balathandayuthapani
7fe474fe7e MDEV-25257 SEGV in fts_get_next_doc_id upon some INSERT
- InnoDB fails to create a fts cache while loading the innodb fts
table which is stored in system tablespace. InnoDB should create
the fts cache while loading FTS_DOC_ID column from system column.
2022-05-25 13:32:58 +05:30
Marko Mäkelä
105647df78 man: adjust major version to 10.8 2022-05-25 08:39:05 +03:00
Marko Mäkelä
c2bae9c77f Merge 10.7 into 10.8 2022-05-25 08:38:17 +03:00
Sergei Golubchik
57e66dc7e6 Merge branch 'bb-10.6-release' into 10.6 2022-05-24 22:10:38 +02:00
Monty
915afddba2 main.alter_table_lock could fail with query "'LOCK TABLE t1 WRITE' failed"
Backported fix from MariaDB 10.5
2022-05-24 15:14:37 +03:00
Monty
ddb1f7c4e4 Remove warning when using connect have_libxml2.inc 2022-05-24 15:14:37 +03:00
Michael Widenius
847ca89d6d Added check for libxml2 for connect.misc
Test will fail if XML support is not compiled. This can happen if
XML support is disabled or if the libxml2 library is not installed.
2022-05-24 14:13:35 +03:00
Michael Widenius
734f10f601 Fix that spider test doesn't crash if my_gethwaddr() fails
This can happen if one doesn't have a working network connection when running
spider tests
2022-05-24 14:10:34 +03:00
Sergei Golubchik
e8cb91943c fix a bad merge in ec62f46a61 2022-05-24 11:05:24 +02:00
Daniel Black
771c61e965 man: merge error in mysqld.8 2022-05-24 17:12:54 +10:00
Daniel Black
61727fa40f man: adjust major version to 10.7 2022-05-24 17:11:01 +10:00
Jan Lindström
c1d380aa88 Update galera disabled.def file 2022-05-24 09:52:58 +03:00
Jan Lindström
0263944a7f MDEV-20888 : Galera test failure on galera.galera_pc_ignore_sb: 2013: Lost connection to MySQL server during query
Add debug info.
2022-05-24 09:52:58 +03:00
Jan Lindström
665c01d1f2 MDEV-15794 : Test failure on galera.galera_var_retry_autocommit
Add expected error.
2022-05-24 09:52:58 +03:00
Jan Lindström
82f45ef576 MDEV-18179 : Galera test failure on galera.galera_kill_largechanges
MDEV-18283 : Galera test failure on galera.GCF-1081

Remove tests.
2022-05-24 09:52:58 +03:00
Marko Mäkelä
f00ac20b03 Merge 10.6 into 10.7 2022-05-24 09:49:48 +03:00
Jan Lindström
cc4384badf Update galera_sr disabled.def file 2022-05-24 07:37:08 +03:00
Norio Akagi
571a8f4a08 MDEV-27892 Improve an error message for foreign server exists (backport)
Improve and add more languages for the ERROR 1476: Foreign Server
already exists.
2022-05-24 11:03:30 +10:00
Tuukka Pasanen
d3d50570de MDEV-28376: Make sure available Perl MariaDB DBI driver is chosen
Commit introduces automatic detection which supported
Perl MariaDB DBI driver is available:

 * DBD::mysql
 * DBD::MariaDB

If nothing is then bail out and die

Current Detection prefers Perl DBD:MariaDB driver.

This is mainly for older Linux distros or Windows which does not
have Perl DBD:MariaDB packaged or does not want to use Perl cpan command.
2022-05-24 10:57:13 +10:00
Norio Akagi
af869493b4 MDEV-27892 Improve an error message for foreign server exists
Improve and add more languages for the ERROR 1476: Foreign Server
already exists.
2022-05-24 10:57:13 +10:00
Daniel Black
a2bdd52835 Merge branch 10.5 into 10.6 2022-05-24 10:56:25 +10:00
Daniel Black
0d9aba05ec MDEV-28153: Debian autobake to get control (postfix)
The debian/mariabd-plugin-columnstore.install should
not have been committed. It was removed on other branches,
just 10.6 was missed. This prevented packages being built
because the debain/control wasn't populated.
2022-05-24 10:42:39 +10:00
Tuukka Pasanen
443590406c MDEV-28376: Make sure available Perl MariaDB DBI driver is chosen
Commit introduces automatic detection which supported
Perl MariaDB DBI driver is available:

 * DBD::mysql
 * DBD::MariaDB

If nothing is then bail out and die

Current Detection prefers Perl DBD:MariaDB driver.

This is mainly for older Linux distros or Windows which does not
have Perl DBD:MariaDB packaged or does not want to use Perl cpan command.
2022-05-24 10:32:13 +10:00
Norio Akagi
99566fc894 MDEV-27892 Improve an error message for foreign server exists
Improve and add more languages for the ERROR 1476: Foreign Server
already exists.
2022-05-24 10:31:00 +10:00
Tingyao Nian
3dd3dccb8e MDEV-22023 Update man pages titles to say MariaDB instead of MySQL
When reading the man page of e.g. 'mysql' on a system with MariaDB
installed one would actually see the man page of 'mariadb'. However the
man page had no indication of the page being for 'mariadb', which was
confusing for users.

Fix this by updating the man page title lines to use mariadb-* instead
of mysql* for MariaDB binaries that are drop-in replacements for MySQL
equivalents, indicating that the commands are actually of the MariaDB
version.

In long term, all the commands in man pages should be replaced by their
MariaDB counterparts. Update the title lines as a start, and only those
that exist as symlinks to their MariaDB counterparts.

Before:

    man mariadb-upgrade | head -n 1
    MYSQL_UPGRADE(1) ...

After:

    man mariadb-upgrade | head -n 1
    MARIADB-UPGRADE(1) ...

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.
2022-05-24 09:21:12 +10:00
Vladislav Vaintroub
babb803222 MDEV-28648 main.ssl_timeout fails with OpenSSL 3.0.3
Depending on OpenSSL version, and at least in 3.0.3, the client-side socket
timeout is reported as generic error (SSL_ERROR_SYSCALL), losing further
details (both errno and GetLastError() return 0). This results in client
reporting "Unknown OpenSSL error" 2026, instead of another generic
"Lost connection to server during query" 2013

Adjusted test case.
2022-05-23 15:28:29 +02:00
Honza Horak
78412ab028 MDEV-27778 md5 in FIPS crashes with OpenSSL 3.0.0
OpenSSL 3.0.0+ does not support EVP_MD_CTX_FLAG_NON_FIPS_ALLOW any longer.
In OpenSSL 1.1.1 the non FIPS allowed flag is context specific, while
in 3.0.0+ it is a different EVP_MD provider.

Fixes #2010

part of MDEV-28133
2022-05-23 15:28:19 +02:00