Skip to content

Commit 47ab793

Browse files
committed
Merge 10.3 into 10.4
2 parents de2fa9e + 524b4a8 commit 47ab793

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1534
-65
lines changed

appveyor.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
init:
2+
# Install bison
3+
- choco feature disable --name showDownloadProgress
4+
- choco install -y winflexbison
5+
- C:\ProgramData\chocolatey\lib\winflexbison\tools\win_bison.exe --version
6+
17
version: build-{build}~branch-{branch}
28

39
clone_depth: 1
@@ -17,7 +23,7 @@ build_script:
1723
- set BUILD_TYPE=MinSizeRel
1824
- set GENERATOR=-GNinja
1925
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
20-
- cmake -E time cmake %GENERATOR% .. -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DMYSQL_MAINTAINER_MODE=ERR -DFAST_BUILD=1 -DBISON_EXECUTABLE=C:\cygwin64\bin\bison -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_FEEDBACK=NO
26+
- cmake -E time cmake %GENERATOR% .. -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DMYSQL_MAINTAINER_MODE=ERR -DFAST_BUILD=1 -DBISON_EXECUTABLE=C:\ProgramData\chocolatey\lib\winflexbison\tools\win_bison.exe -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_FEEDBACK=NO
2127
- set /A jobs=2*%NUMBER_OF_PROCESSORS%
2228
- cmake -E time cmake --build . -j %jobs% --config %BUILD_TYPE% --target minbuild
2329

client/mysql.cc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Copyright (c) 2000, 2018, Oracle and/or its affiliates.
3-
Copyright (c) 2009, 2019, MariaDB Corporation.
3+
Copyright (c) 2009, 2021, MariaDB Corporation.
44
55
This program is free software; you can redistribute it and/or modify
66
it under the terms of the GNU General Public License as published by
@@ -90,10 +90,14 @@ extern "C" {
9090
#if defined(__WIN__)
9191
#include <conio.h>
9292
#else
93-
#include <readline.h>
94-
#if !defined(USE_LIBEDIT_INTERFACE)
95-
#include <history.h>
96-
#endif
93+
# ifdef __APPLE__
94+
# include <editline/readline.h>
95+
# else
96+
# include <readline.h>
97+
# if !defined(USE_LIBEDIT_INTERFACE)
98+
# include <history.h>
99+
# endif
100+
# endif
97101
#define HAVE_READLINE
98102
#define USE_POPEN
99103
#endif

cmake/cpack_rpm.cmake

Lines changed: 67 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,82 @@ SET(CPACK_RPM_PACKAGE_RELOCATABLE FALSE)
4848
SET(CPACK_PACKAGE_RELOCATABLE FALSE)
4949
SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases")
5050
SET(CPACK_RPM_PACKAGE_URL ${CPACK_PACKAGE_URL})
51-
SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
5251

5352
SET(CPACK_RPM_shared_PACKAGE_VENDOR "MariaDB Corporation Ab")
5453
SET(CPACK_RPM_shared_PACKAGE_LICENSE "LGPLv2.1")
55-
SET(CPACK_RPM_shared_PACKAGE_SUMMARY "LGPL MariaDB client library")
56-
SET(CPACK_RPM_shared_PACKAGE_DESCRIPTION "
57-
This is LGPL MariaDB client library that can be used to connect to MySQL
54+
55+
# Set default description for packages
56+
SET(CPACK_RPM_PACKAGE_DESCRIPTION "MariaDB: a very fast and robust SQL database server
57+
58+
It is GPL v2 licensed, which means you can use the it free of charge under the
59+
conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/).
60+
61+
MariaDB documentation can be found at https://mariadb.com/kb
62+
MariaDB bug reports should be submitted through https://jira.mariadb.org")
63+
64+
# Packages with default description
65+
SET(CPACK_RPM_client_PACKAGE_SUMMARY "MariaDB database client binaries")
66+
SET(CPACK_RPM_common_PACKAGE_SUMMARY "MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)")
67+
SET(CPACK_RPM_compat_PACKAGE_SUMMARY "MariaDB database client library MySQL compat package")
68+
SET(CPACK_RPM_devel_PACKAGE_SUMMARY "MariaDB database development files")
69+
SET(CPACK_RPM_server_PACKAGE_SUMMARY "MariaDB database server binaries")
70+
SET(CPACK_RPM_test_PACKAGE_SUMMARY "MariaDB database regression test suite")
71+
72+
# libmariadb3
73+
SET(CPACK_RPM_shared_PACKAGE_SUMMARY "LGPL MariaDB database client library")
74+
SET(CPACK_RPM_shared_PACKAGE_DESCRIPTION "This is LGPL MariaDB client library that can be used to connect to MySQL
5875
or MariaDB.
5976
6077
This code is based on the LGPL libmysql client library from MySQL 3.23
6178
and PHP's mysqlnd extension.
6279
6380
This product includes PHP software, freely available from
64-
<http://www.php.net/software/>
65-
")
81+
http://www.php.net/software/")
82+
83+
# Summary and descriptions per package
84+
SET(CPACK_RPM_backup_PACKAGE_SUMMARY "Backup tool for MariaDB server")
85+
SET(CPACK_RPM_backup_PACKAGE_DESCRIPTION "Mariabackup is an open source tool provided by MariaDB
86+
for performing physical online backups of InnoDB, Aria and MyISAM tables.
87+
For InnoDB, “hot online” backups are possible.
88+
It was originally forked from Percona XtraBackup 2.3.8.")
89+
90+
SET(CPACK_RPM_cassandra-engine_PACKAGE_SUMMARY "Cassandra storage engine for MariaDB")
91+
SET(CPACK_RPM_cassandra-engine_PACKAGE_DESCRIPTION "The Cassandra Storage Engine allows access to data in a Cassandra cluster from
92+
MariaDB, combining the best of SQL and no-SQL worlds. Cassandra SE (storage
93+
engine) makes Cassandra's column family appear as a table in MariaDB that you
94+
can insert to, update, and select from. You can write joins against this table,
95+
it is possible to join data that's stored in MariaDB with data that's stored in
96+
Cassandra.")
97+
98+
SET(CPACK_RPM_connect-engine_PACKAGE_SUMMARY "Connect storage engine for MariaDB")
99+
SET(CPACK_RPM_connect-engine_PACKAGE_DESCRIPTION "Connect engine supports a number of file formats (dbf, xml, txt, bin, etc),
100+
connections to ODBC tables and remote MySQL tables, as well as a number of
101+
other interesting features.")
102+
103+
SET(CPACK_RPM_cracklib-password-check_PACKAGE_SUMMARY "CrackLib Password Validation Plugin for MariaDB")
104+
SET(CPACK_RPM_cracklib-password-check_PACKAGE_DESCRIPTION "This password validation plugin uses cracklib to allow only
105+
sufficiently secure (as defined by cracklib) user passwords in MariaDB.")
106+
107+
SET(CPACK_RPM_gssapi-server_PACKAGE_SUMMARY "GSSAPI authentication plugin for MariaDB server")
108+
SET(CPACK_RPM_gssapi-server_PACKAGE_DESCRIPTION "The gssapi authentication plugin allows the user to authenticate with services
109+
that use the Generic Security Services Application Program Interface (GSSAPI).
110+
The gssapi authentication plugin is most often used for authenticating with Microsoft Active Directory.")
111+
112+
SET(CPACK_RPM_oqgraph-engine_PACKAGE_SUMMARY "OQGraph storage engine for MariaDB")
113+
SET(CPACK_RPM_oqgraph-engine_PACKAGE_DESCRIPTION "The Open Query GRAPH computation engine, or OQGRAPH as the engine itself is called,
114+
allows you to handle hierarchies (tree structures) and complex graphs
115+
(nodes having many connections in several directions).
116+
It is intended to be used for retrieving hierarchical information, such as those used for graphs,
117+
routes or social relationships, in plain SQL.")
118+
119+
SET(CPACK_RPM_rocksdb-engine_PACKAGE_SUMMARY "RocksDB storage engine for MariaDB")
120+
SET(CPACK_RPM_rocksdb-engine_PACKAGE_DESCRIPTION "The RocksDB storage engine is a high performance storage engine, aimed
121+
at maximising storage efficiency while maintaining InnoDB-like performance.")
122+
123+
SET(CPACK_RPM_tokudb-engine_PACKAGE_SUMMARY "TokuDB storage engine for MariaDB")
124+
SET(CPACK_RPM_tokudb-engine_PACKAGE_DESCRIPTION "The TokuDB storage engine is for use in high-performance and write-intensive
125+
environments, offering increased compression and better performance based
126+
on fractal indexes.")
66127

67128
SET(CPACK_RPM_SPEC_MORE_DEFINE "
68129
%define mysql_vendor ${CPACK_PACKAGE_VENDOR}

extra/mariabackup/ds_compress.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ create_worker_threads(uint n)
370370
thd)) {
371371
msg("compress: pthread_create() failed: "
372372
"errno = %d", errno);
373+
pthread_mutex_unlock(&thd->ctrl_mutex);
373374
goto err;
374375
}
375376
}
@@ -386,6 +387,13 @@ create_worker_threads(uint n)
386387
return threads;
387388

388389
err:
390+
while (i > 0) {
391+
comp_thread_ctxt_t *thd;
392+
i--;
393+
thd = threads + i;
394+
pthread_mutex_unlock(&thd->ctrl_mutex);
395+
}
396+
389397
my_free(threads);
390398
return NULL;
391399
}

mysql-test/lib/My/Debugger.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ sub do_args($$$$$) {
147147
my %vars = (
148148
vardir => $::opt_vardir,
149149
exe => $$exe,
150-
args => join(' ', map { quote_from_mtr $_ } @$$args, '--loose-gdb'),
150+
args => join(' ', map { quote_from_mtr $_ } @$$args,
151+
'--loose-debug-gdb', '--loose-skip-stack-trace'),
151152
input => $input,
152153
script => "$::opt_vardir/tmp/${k}init.$type",
153154
log => "$::opt_vardir/log/$type.$k",

mysql-test/main/alter_table.result

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,6 +2585,22 @@ set max_statement_time= 0;
25852585
drop table t1;
25862586
drop view v1;
25872587
#
2588+
# MDEV-25803 Inplace ALTER breaks MyISAM/Aria tables when order of keys is changed
2589+
#
2590+
set @save_default_engine= @@default_storage_engine;
2591+
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x)) engine myisam;
2592+
alter table t1 change x xx int, algorithm=inplace;
2593+
check table t1;
2594+
Table Op Msg_type Msg_text
2595+
test.t1 check status OK
2596+
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x));
2597+
alter table t1 change x xx int, algorithm=inplace;
2598+
check table t1;
2599+
Table Op Msg_type Msg_text
2600+
test.t1 check status OK
2601+
drop table t1;
2602+
set @@default_storage_engine= @save_default_engine;
2603+
#
25882604
# End of 10.3 tests
25892605
#
25902606
#

mysql-test/main/alter_table.test

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,6 +2099,47 @@ set max_statement_time= 0;
20992099
drop table t1;
21002100
drop view v1;
21012101

2102+
--echo #
2103+
--echo # MDEV-25803 Inplace ALTER breaks MyISAM/Aria tables when order of keys is changed
2104+
--echo #
2105+
set @save_default_engine= @@default_storage_engine;
2106+
--disable_query_log
2107+
if ($MTR_COMBINATION_INNODB)
2108+
{
2109+
set default_storage_engine= innodb;
2110+
}
2111+
if ($MTR_COMBINATION_ARIA)
2112+
{
2113+
set default_storage_engine= aria;
2114+
}
2115+
--enable_query_log
2116+
2117+
if (!$MTR_COMBINATION_INNODB)
2118+
{
2119+
--disable_query_log
2120+
--disable_result_log
2121+
# There is no inplace ADD INDEX for MyISAM/Aria:
2122+
create or replace table t1 (x int);
2123+
--error ER_ALTER_OPERATION_NOT_SUPPORTED
2124+
alter table t1 add unique (x), algorithm=inplace;
2125+
--error ER_ALTER_OPERATION_NOT_SUPPORTED
2126+
alter table t1 add primary key(x), algorithm=inplace;
2127+
--error ER_ALTER_OPERATION_NOT_SUPPORTED
2128+
alter table t1 add index(x), algorithm=inplace;
2129+
--enable_query_log
2130+
--enable_result_log
2131+
}
2132+
2133+
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x)) engine myisam;
2134+
alter table t1 change x xx int, algorithm=inplace;
2135+
check table t1;
2136+
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x));
2137+
alter table t1 change x xx int, algorithm=inplace;
2138+
check table t1;
2139+
# cleanup
2140+
drop table t1;
2141+
set @@default_storage_engine= @save_default_engine;
2142+
21022143
--echo #
21032144
--echo # End of 10.3 tests
21042145
--echo #

0 commit comments

Comments
 (0)