Skip to content

Commit

Permalink
Upgrade to MySQL 8.1.0, MariaDB 11.1.2
Browse files Browse the repository at this point in the history
Updated test database containers
Added new error codes
Fixed build problem in OSX CI
Docker images are now built automatically when they change

close #178
  • Loading branch information
anarthal committed Oct 11, 2023
1 parent f410967 commit 0bc8554
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#

_triggers = { "branch": [ "master", "develop", "drone*", "feature/*", "bugfix/*", "fix/*", "pr/*" ] }
_container_tag = 'c94b77a716a0cc2cf5f489d9a97e9a0aefa7c0de'
_win_container_tag = '6efce57d289bfa028da8d4a9b50158f1f073984f'
_container_tag = '454e58d36a2e801a1a6b4e9fd2f995c3087740b1'
_win_container_tag = '454e58d36a2e801a1a6b4e9fd2f995c3087740b1'


def _image(name):
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
OPENSSL_ROOT: /usr/local/opt/openssl
steps:
- uses: actions/checkout@v3
- run: unlink /usr/local/bin/python
- run: ln -s /usr/local/bin/python3 /usr/local/bin/python
- run: bash tools/setup_db_osx.sh
- run: |
unlink /usr/local/bin/python
ln -s /usr/local/bin/python3 /usr/local/bin/python
source tools/setup_db_osx.sh
python tools/ci.py \
--build-kind=b2 \
--source-dir=$(pwd) \
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@

name: Build Docker images

on: workflow_dispatch
on:
workflow_dispatch:
push:
paths:
- tools/docker/**


jobs:
linux-images:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1841,6 +1841,9 @@ const char* boost::mysql::detail::mysql_error_to_string(int v) noexcept
case 4160: return "er_install_component_set_null_value";
case 4161: return "er_install_component_set_unused_value";
case 4162: return "er_warn_deprecated_user_defined_collations";
case 4163: return "er_user_lock_overlong_name";
case 4164: return "er_warn_no_space_version_comment";
case 4165: return "er_validate_password_insufficient_changed_characters";

default: return "<unknown MySQL-specific server error>";
}
Expand Down Expand Up @@ -2195,6 +2198,8 @@ const char* boost::mysql::detail::mariadb_error_to_string(int v) noexcept
case 4190: return "warn_option_changing";
case 4191: return "er_cm_option_missing_requirement";
case 4192: return "er_slave_statement_timeout";
case 4193: return "er_json_invalid_value_for_keyword";
case 4194: return "er_json_schema_keyword_unsupported";

default: return "<unknown MariaDB-specific server error>";
}
Expand Down
6 changes: 6 additions & 0 deletions include/boost/mysql/mariadb_server_errc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,12 @@ constexpr int er_cm_option_missing_requirement = 4191;
/// Server error specific to mariadb. Error number: 4192, symbol: ER_SLAVE_STATEMENT_TIMEOUT.
constexpr int er_slave_statement_timeout = 4192;

/// Server error specific to mariadb. Error number: 4193, symbol: ER_JSON_INVALID_VALUE_FOR_KEYWORD.
constexpr int er_json_invalid_value_for_keyword = 4193;

/// Server error specific to mariadb. Error number: 4194, symbol: ER_JSON_SCHEMA_KEYWORD_UNSUPPORTED.
constexpr int er_json_schema_keyword_unsupported = 4194;

} // namespace mariadb_server_errc

} // namespace mysql
Expand Down
9 changes: 9 additions & 0 deletions include/boost/mysql/mysql_server_errc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2809,6 +2809,15 @@ constexpr int er_install_component_set_unused_value = 4161;
/// Server error specific to mysql. Error number: 4162, symbol: ER_WARN_DEPRECATED_USER_DEFINED_COLLATIONS.
constexpr int er_warn_deprecated_user_defined_collations = 4162;

/// Server error specific to mysql. Error number: 4163, symbol: ER_USER_LOCK_OVERLONG_NAME.
constexpr int er_user_lock_overlong_name = 4163;

/// Server error specific to mysql. Error number: 4164, symbol: ER_WARN_NO_SPACE_VERSION_COMMENT.
constexpr int er_warn_no_space_version_comment = 4164;

/// Server error specific to mysql. Error number: 4165, symbol: ER_VALIDATE_PASSWORD_INSUFFICIENT_CHANGED_CHARACTERS.
constexpr int er_validate_password_insufficient_changed_characters = 4165;

} // namespace mysql_server_errc

} // namespace mysql
Expand Down
2 changes: 1 addition & 1 deletion tools/docker/mariadb.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#

FROM mariadb:11.0
FROM mariadb:11.1.2

ENV MYSQL_ALLOW_EMPTY_PASSWORD=1
ENV MYSQL_ROOT_PASSWORD=
Expand Down
4 changes: 2 additions & 2 deletions tools/docker/mysql8.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#

FROM mysql:8.0.33
FROM mysql:8.1.0

ENV MYSQL_ALLOW_EMPTY_PASSWORD=1
ENV MYSQL_ROOT_PASSWORD=
Expand All @@ -14,4 +14,4 @@ COPY tools/docker/mysql_entrypoint.sh /
COPY tools/docker/ssl.cnf /etc/mysql/conf.d/
COPY tools/ssl/*.pem /etc/ssl/certs/mysql/

ENTRYPOINT ["/bin/bash", "/mysql_entrypoint.sh"]
ENTRYPOINT ["/bin/bash", "/mysql_entrypoint.sh"]
5 changes: 5 additions & 0 deletions tools/error_codes.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2092,8 +2092,11 @@ numbr,symbol,category
4162,ER_UNKNOWN_OPERATOR,mariadb
4162,ER_WARN_DEPRECATED_USER_DEFINED_COLLATIONS,mysql
4163,ER_WARN_HISTORY_ROW_START_TIME,mariadb
4163,ER_USER_LOCK_OVERLONG_NAME,mysql
4164,ER_PART_STARTS_BEYOND_INTERVAL,mariadb
4164,ER_WARN_NO_SPACE_VERSION_COMMENT,mysql
4165,ER_GALERA_REPLICATION_NOT_SUPPORTED,mariadb
4165,ER_VALIDATE_PASSWORD_INSUFFICIENT_CHANGED_CHARACTERS,mysql
4166,ER_LOAD_INFILE_CAPABILITY_DISABLED,mariadb
4167,ER_NO_SECURE_TRANSPORTS_CONFIGURED,mariadb
4168,ER_SLAVE_IGNORED_SHARED_TABLE,mariadb
Expand Down Expand Up @@ -2121,3 +2124,5 @@ numbr,symbol,category
4190,WARN_OPTION_CHANGING,mariadb
4191,ER_CM_OPTION_MISSING_REQUIREMENT,mariadb
4192,ER_SLAVE_STATEMENT_TIMEOUT,mariadb
4193,ER_JSON_INVALID_VALUE_FOR_KEYWORD,mariadb
4194,ER_JSON_SCHEMA_KEYWORD_UNSUPPORTED,mariadb
2 changes: 1 addition & 1 deletion tools/scripts/server_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def invoke_file_headers() -> None:

def main():
old_codes = load_csv()
new_codes = parse_headers(REPO_BASE.joinpath('private', 'errors', '1.83'))
new_codes = parse_headers(REPO_BASE.joinpath('private', 'errors', '1.84'))
codes = merge_new_codes(old_codes, new_codes)
write_csv(codes)
write_headers(codes)
Expand Down
4 changes: 1 addition & 3 deletions tools/setup_db_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
#

# Setup database. We can't use a Docker service as Docker
# is not supported in osx

set -e
# is not supported in osx.

# Install the DB
brew install [email protected]
Expand Down

0 comments on commit 0bc8554

Please sign in to comment.