Skip to content

Commit b32b1f2

Browse files
committed
Merge remote-tracking branch '10.6' into 10.7
Update debian changes to 10.7 to enable debian packaging to work again.
2 parents 2c4d1fb + 74f5aa1 commit b32b1f2

Some content is hidden

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

48 files changed

+774
-76
lines changed

.gitlab-ci.yml

Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
---
2+
# This Gitlab-CI pipeline offers basic validation that a commit did not
3+
# introduce easily detectable regressions. Builds run primairly on a new Fedora,
4+
# which has all the latest upstream build dependencies and thus is the primary
5+
# testing target, as eventually everything in Fedora becomes the next CentOS and
6+
# Red Hat releases.
7+
#
8+
# In addition test building on CentOS 7 and 8 to ensure that the code base
9+
# remains reasonably backwards compatible.
10+
#
11+
# This is now intentionally simple, to keep it fast and accurate with minimal
12+
# false positive failures. If one wants to extend it, see debian/salsa-ci.yml
13+
# for inspiration on more integration tests to run.
14+
#
15+
# Also make sure the pipeline stays within the bounds of what CI workers on
16+
# Gitlab-CI are capable of executing, thus ensuring that any potential
17+
# contributor can at any point in time fork to their own Gitlab account and
18+
# start working towards meaningful contributions!
19+
#
20+
# NOTE TO MERGERS: Most of the contents in the Gitlab-CI configuration has been
21+
# tailored for a specific release or MariaDB. As a general rule, do not merge
22+
# changes in this file across MariaDB branches to avoid breaking the CI. Updates
23+
# the Gitlab-CI pipeline are most of the time better done manually per major
24+
# release branch.
25+
26+
stages:
27+
- build
28+
- test
29+
- Salsa-CI
30+
31+
# Base image for builds and tests unless otherwise defined
32+
# @TODO: Fedora 34 is latest, but fails to start on Gitlab.com with error "shell not found"
33+
image: fedora:33
34+
35+
# Define common CMAKE_FLAGS for all builds. Skim down build by omitting all
36+
# submodules (a commit in this repo does not affect their builds anyway) and
37+
# many components that are otherwise slow to build.
38+
variables:
39+
CMAKE_FLAGS: "-DWITH_SSL=system -DPLUGIN_COLUMNSTORE=NO -DPLUGIN_ROCKSDB=NO -DPLUGIN_S3=NO -DPLUGIN_MROONGA=NO -DPLUGIN_CONNECT=NO -DPLUGIN_MROONGA=NO -DPLUGIN_TOKUDB=NO -DPLUGIN_PERFSCHEMA=NO -DWITH_WSREP=OFF"
40+
# Major version dictates which branches share the same ccache
41+
MARIADB_MAJOR_VERSION: "10.6"
42+
# Most steps don't need the source code, only artifacts
43+
GIT_STRATEGY: none
44+
# Hack to satisfy directory name length requirement by CPackRPM in CMake 3.x
45+
# https://cmake.org/cmake/help/v3.7/module/CPackRPM.html#variable:CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX
46+
GIT_CLONE_PATH: $CI_BUILDS_DIR/CPACK_BUILD_SOURCE_DIRS_LONG_NAME_REQUIREMENT
47+
48+
# Define once, use many times
49+
.rpm_listfiles: &rpm_listfiles
50+
- |
51+
echo "Generating rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log ..."
52+
for package in *.rpm
53+
do
54+
echo "$package"
55+
rpm -qlpv "$package" | awk '{print $1 " " $3 "/" $4 " ." $9 " " $10 " " $11}' | sort -k 3
56+
echo "------------------------------------------------"
57+
done >> ../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
58+
# CPackRPM lists contents in build log, so no need to show the output of this,
59+
# just store it as a build artifact that can be downloaded and diffed against
60+
# other builds to detect which files where added/removed/moved
61+
62+
fedora:
63+
stage: build
64+
variables:
65+
GIT_STRATEGY: fetch
66+
GIT_SUBMODULE_STRATEGY: normal
67+
script:
68+
- yum install -y yum-utils rpm-build ccache openssl-devel
69+
- source /etc/profile.d/ccache.sh
70+
- export CCACHE_DIR="$(pwd)/.ccache"; ccache -s
71+
# Accelerate builds with unsafe disk access, as we can afford to loose the entire build anyway
72+
- yum install -y https://github.com/stewartsmith/libeatmydata/releases/download/v129/libeatmydata-129-1.fc33.x86_64.rpm
73+
# This repository does not have any .spec files, so install dependencies based on Fedora spec file
74+
- yum-builddep -y mariadb-server
75+
- mkdir builddir; cd builddir
76+
- cmake -DRPM=$CI_JOB_NAME $CMAKE_FLAGS .. 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
77+
- eatmydata make package 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
78+
# @TODO: Don't use -j on Gitlab.com as builds just get stuck when running
79+
# multi-proc, needs more debugging
80+
- make test || true # Unit tests constantly fail, see https://jira.mariadb.org/browse/MDEV-25820
81+
# - make test-force || true # mysql-test-runner takes too long, run it in a separate job instead
82+
- *rpm_listfiles
83+
- mkdir ../rpm; mv *.rpm ../rpm
84+
- ccache -s
85+
artifacts:
86+
when: always # Must be able to see logs
87+
paths:
88+
- build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
89+
- rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
90+
- rpm
91+
- builddir/_CPack_Packages/Linux/RPM/SPECS/
92+
cache:
93+
key: $MARIADB_MAJOR_VERSION-$CI_JOB_NAME
94+
paths:
95+
- .ccache
96+
# policy: pull
97+
# @TODO: It would be enough to only download the cache. There is no need for
98+
# every job to upload a new cache every time. A monthly or weekly scheduled
99+
# run could update the cache for all other builds to us.
100+
101+
centos8:
102+
stage: build
103+
image: centos:8
104+
variables:
105+
GIT_STRATEGY: fetch
106+
GIT_SUBMODULE_STRATEGY: normal
107+
script:
108+
- yum install -y yum-utils rpm-build openssl-devel
109+
- yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
110+
# dnf --enablerepo=powertools install Judy-devel #--> not found
111+
- dnf config-manager --set-enabled powertools
112+
# Error:
113+
# Problem: conflicting requests
114+
# - package Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.i686 is filtered out by modular filtering
115+
# - package Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.x86_64 is filtered out by modular filtering
116+
# Solution: install Judy-devel directly from downloaded rpm file:
117+
- yum install -y http://mirror.centos.org/centos/8/PowerTools/x86_64/os/Packages/Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.x86_64.rpm
118+
# Use eatmydata to speed up build
119+
- yum install -y https://github.com/stewartsmith/libeatmydata/releases/download/v129/libeatmydata-129-1.fc33.x86_64.rpm
120+
- yum install -y ccache # From EPEL
121+
- source /etc/profile.d/ccache.sh
122+
- export CCACHE_DIR="$(pwd)/.ccache"; ccache -s
123+
# This repository does not have any .spec files, so install dependencies based on CentOS spec file
124+
- yum-builddep -y mariadb-server
125+
- mkdir builddir; cd builddir
126+
- cmake -DRPM=$CI_JOB_NAME $CMAKE_FLAGS .. 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
127+
- eatmydata make package 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
128+
# @TODO: Don't use -j on Gitlab.com as builds just get stuck when running
129+
# multi-proc and out of memory, see https://jira.mariadb.org/browse/MDEV-25968
130+
- make test || true # Unit tests constantly fail, see https://jira.mariadb.org/browse/MDEV-25820
131+
# - make test-force || true # mysql-test-runner takes too long, run it in a separate job instead
132+
- *rpm_listfiles
133+
- mkdir ../rpm; mv *.rpm ../rpm
134+
- ccache -s
135+
artifacts:
136+
when: always # Must be able to see logs
137+
paths:
138+
- build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
139+
- rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
140+
- rpm
141+
- builddir/_CPack_Packages/Linux/RPM/SPECS/
142+
cache:
143+
key: $MARIADB_MAJOR_VERSION-$CI_JOB_NAME
144+
paths:
145+
- .ccache
146+
147+
centos7:
148+
stage: build
149+
image: centos:7
150+
variables:
151+
GIT_STRATEGY: fetch
152+
GIT_SUBMODULE_STRATEGY: normal
153+
script:
154+
# This repository does not have any .spec files, so install dependencies based on Fedora spec file
155+
- yum-builddep -y mariadb-server
156+
# ..with a few extra ones, as CentOS 7 is very old and these are added in newer MariaDB releases
157+
- yum install -y yum-utils rpm-build gcc gcc-c++ bison libxml2-devel libevent-devel openssl-devel
158+
- mkdir builddir; cd builddir
159+
- cmake -DRPM=$CI_JOB_NAME $CMAKE_FLAGS .. 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
160+
- make package 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
161+
# @TODO: Don't use -j on Gitlab.com as builds just get stuck when running
162+
# multi-proc and out of memory, see https://jira.mariadb.org/browse/MDEV-25968
163+
- make test || true # Unit tests constantly fail, see https://jira.mariadb.org/browse/MDEV-25820
164+
# - make test-force || true # mysql-test-runner takes too long, run it in a separate job instead
165+
- *rpm_listfiles
166+
- mkdir ../rpm; mv *.rpm ../rpm
167+
artifacts:
168+
when: always # Must be able to see logs
169+
paths:
170+
- build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
171+
- rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
172+
- rpm
173+
- builddir/_CPack_Packages/Linux/RPM/SPECS/
174+
175+
mysql-test-run:
176+
stage: test
177+
dependencies:
178+
- fedora
179+
script:
180+
# Install packages so tests and the dependencies install
181+
# @TODO: RPM missing 'patch' as dependency, so installing it manually for now
182+
- yum install -y rpm/*.rpm patch
183+
# @TODO: Fix on packaging level for /usr/share/mariadb to work and errormsg.sys be found
184+
- rm -rf /usr/share/mariadb; ln -s /usr/share/mysql /usr/share/mariadb
185+
# mtr expects to be launched in-place and with write access to it's own directories
186+
- cd /usr/share/mysql-test
187+
- |
188+
echo "
189+
main.mysqldump : flaky on Gitlab-CI
190+
main.flush_logs_not_windows : flaky in containers in general
191+
main.mysql_upgrade_noengine : requires diff but diffutils is not a dependency
192+
" > skiplist
193+
# @TODO: Flaky tests are skipped for now, but should be fixed
194+
- ./mtr --suite=main --force --xml-report=$CI_PROJECT_DIR/junit.xml --skip-test-list=skiplist
195+
artifacts:
196+
when: always # Also show results when tests fail
197+
reports:
198+
junit:
199+
- junit.xml
200+
201+
rpmlint:
202+
stage: test
203+
dependencies:
204+
- fedora
205+
script:
206+
- yum install -y rpmlint
207+
- rm -f rpm/*debuginfo* # Not relevant in this test
208+
# Limit output to 1000 lines as Gitlab-CI max output is 4194304 bytes
209+
# Save everything in a log file so it can be viewed in full via artifacts
210+
- rpmlint --info rpm/*.rpm | tee -a rpmlint-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
211+
artifacts:
212+
when: always # Also show results when tests fail
213+
paths:
214+
- rpmlint-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
215+
allow_failure: true
216+
# @TODO: The package is not rpmlint clean, must allow failure for now
217+
218+
fedora install:
219+
stage: test
220+
dependencies:
221+
- fedora
222+
script:
223+
- rm -f rpm/*debuginfo* # Not relevant in this test
224+
# Nothing provides galera-4 on Fedora, so this step fails if built with wsrep
225+
- yum install -y rpm/*.rpm
226+
# Fedora does not support running services in Docker (like Debian packages do) so start it manually
227+
- /usr/bin/mariadb-install-db -u mysql
228+
- sudo -u mysql /usr/sbin/mariadbd & sleep 10
229+
# @TODO: Since we did a manual start, we also need to run upgrade manually
230+
- /usr/bin/mariadb-upgrade -u root --socket /var/lib/mysql/mysql.sock
231+
- |
232+
mysql --skip-column-names -e "SELECT @@version, @@version_comment" | tee /tmp/version
233+
grep $MARIADB_MAJOR_VERSION /tmp/version || echo "MariaDB didn't upgrade properly"
234+
235+
fedora upgrade:
236+
stage: test
237+
dependencies:
238+
- fedora
239+
script:
240+
- yum install -y mariadb-server
241+
# Fedora does not support running services in Docker (like Debian packages do) so start it manually
242+
- /usr/libexec/mysql-check-socket
243+
- /usr/libexec/mysql-prepare-db-dir
244+
- sudo -u mysql /usr/libexec/mysqld --basedir=/usr & sleep 10
245+
- /usr/libexec/mysql-check-upgrade
246+
- mysql --skip-column-names -e "SELECT @@version, @@version_comment" # Show version
247+
# @TODO: Upgrade from Fedora 33 MariaDB 10.4 to MariaDB.org latest does not work
248+
# so do this manual step to remove conflicts until packaging is fixed
249+
- >
250+
yum remove -y mariadb-server-utils mariadb-gssapi-server mariadb-cracklib-password-check
251+
mariadb-backup mariadb-connector-c-config
252+
- rm -f rpm/*debuginfo* # Not relevant in this test
253+
- yum install -y rpm/*.rpm procps # procps provides pkill
254+
# nothing provides galera-4 on Fedora, so this step fails if built with wsrep
255+
- pkill mysqld || true; sleep 5; pkill mysqld || true; sleep 5
256+
- /usr/bin/mariadb-install-db -u mysql
257+
- sudo -u mysql /usr/sbin/mariadbd & sleep 10
258+
# @TODO: Since we did a manual start, we also need to run upgrade manually
259+
- /usr/bin/mariadb-upgrade -u root --socket /var/lib/mysql/mysql.sock
260+
- |
261+
mysql --skip-column-names -e "SELECT @@version, @@version_comment" | tee /tmp/version
262+
grep $MARIADB_MAJOR_VERSION /tmp/version || echo "MariaDB didn't upgrade properly"
263+
264+
# Once all RPM builds and tests have passed, also run the DEB builds and tests
265+
# @NOTE: This is likely to work well only on salsa.debian.org as the Gitlab.com
266+
# runners are too small for everything this stage does.
267+
# build_deb:
268+
# stage: Salsa-CI
269+
# trigger:
270+
# include: debian/salsa-ci.yml

client/mysqltest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8416,7 +8416,7 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
84168416
append_session_track_info(ds, mysql);
84178417

84188418

8419-
if (!disable_warnings)
8419+
if (!disable_warnings && !mysql_more_results(stmt->mysql))
84208420
{
84218421
/* Get the warnings from execute */
84228422

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
-- require include/have_pool_of_threads.require
1+
--source include/not_aix.inc
2+
--require include/have_pool_of_threads.require
23
disable_query_log;
34
show variables like 'thread_handling';
45
enable_query_log;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
# run with and without threadpool
2+
--source include/not_aix.inc
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[nm]
2+
3+
[ps]

mysql-test/include/protocol.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# The goal of including this file is to enable protocol
2+
# combinations (see include/protocol.combinations)

mysql-test/main/features,ps.rdiff

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--- features.result
2+
+++ features,ps.result
3+
@@ -46,7 +46,7 @@
4+
1212
5+
show status like "feature_dynamic_columns";
6+
Variable_name Value
7+
-Feature_dynamic_columns 2
8+
+Feature_dynamic_columns 4
9+
#
10+
# Feature fulltext
11+
#
12+
@@ -93,7 +93,7 @@
13+
drop table t1;
14+
show status like "feature_subquery";
15+
Variable_name Value
16+
-Feature_subquery 4
17+
+Feature_subquery 5
18+
#
19+
# Feature timezone
20+
#
21+

mysql-test/main/features.test

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
# Testing of feature statistics
2-
if (`SELECT $PS_PROTOCOL != 0`)
3-
{
4-
--skip Test temporarily disabled for ps-protocol
5-
}
62

73
-- source include/have_geometry.inc
4+
-- source include/protocol.inc
85

96
--disable_warnings
107
drop table if exists t1;

mysql-test/main/join_outer_innodb.result

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,3 +496,22 @@ natural right outer join t3;
496496
drop table t1,t2,t3;
497497
set optimizer_prune_level=@mdev4270_opl;
498498
set optimizer_search_depth=@mdev4270_osd;
499+
#
500+
# Bug #20939184:INNODB: UNLOCK ROW COULD NOT FIND A 2 MODE LOCK ON THE
501+
# RECORD
502+
#
503+
CREATE TABLE t1 (c1 INT, c2 INT, c3 INT, PRIMARY KEY (c1,c2) ) engine=innodb;
504+
CREATE TABLE t2 (c1 INT, c2 INT, c3 INT, PRIMARY KEY (c1), KEY (c2)) engine=innodb;
505+
INSERT INTO t1 VALUES (1,2,3),(2,3,4),(3,4,5);
506+
INSERT INTO t2 SELECT * FROM t1;
507+
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
508+
START TRANSACTION;
509+
SELECT * FROM t1 LEFT JOIN t2 ON t1.c2=t2.c2 AND t2.c1=1 FOR UPDATE;
510+
c1 c2 c3 c1 c2 c3
511+
1 2 3 1 2 3
512+
2 3 4 NULL NULL NULL
513+
3 4 5 NULL NULL NULL
514+
UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c2 AND t2.c1 = 3 SET t1.c3 = RAND()*10;
515+
COMMIT;
516+
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
517+
DROP TABLE t1,t2;

mysql-test/main/join_outer_innodb.test

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,3 +374,20 @@ drop table t1,t2,t3;
374374
set optimizer_prune_level=@mdev4270_opl;
375375
set optimizer_search_depth=@mdev4270_osd;
376376

377+
--echo #
378+
--echo # Bug #20939184:INNODB: UNLOCK ROW COULD NOT FIND A 2 MODE LOCK ON THE
379+
--echo # RECORD
380+
--echo #
381+
CREATE TABLE t1 (c1 INT, c2 INT, c3 INT, PRIMARY KEY (c1,c2) ) engine=innodb;
382+
CREATE TABLE t2 (c1 INT, c2 INT, c3 INT, PRIMARY KEY (c1), KEY (c2)) engine=innodb;
383+
INSERT INTO t1 VALUES (1,2,3),(2,3,4),(3,4,5);
384+
INSERT INTO t2 SELECT * FROM t1;
385+
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
386+
START TRANSACTION;
387+
#unlocks rows in table t2 where c1 = 1
388+
SELECT * FROM t1 LEFT JOIN t2 ON t1.c2=t2.c2 AND t2.c1=1 FOR UPDATE;
389+
UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c2 AND t2.c1 = 3 SET t1.c3 = RAND()*10;
390+
COMMIT;
391+
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
392+
DROP TABLE t1,t2;
393+

0 commit comments

Comments
 (0)