Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
7ac3b5c
wl#10799 integrate MySQL Router into MySQL Server repository
Aug 10, 2018
bd08fe9
wl#10799 integrate MySQL Router into MySQL Server repository
Aug 10, 2018
0495dbf
Merge branch 'mysql-8.0' into mysql-trunk
Aug 14, 2018
bb14e58
Bug #26399073: MYSQL DOES NOT COMPILE WITH CLANG ON WINDOWS [noclose]
Sep 5, 2018
fab0848
Bug #26399073: MYSQL DOES NOT COMPILE WITH CLANG ON WINDOWS [noclose]
Sep 6, 2018
0201ceb
Revert "Bug #26399073: MYSQL DOES NOT COMPILE WITH CLANG ON WINDOWS […
Sep 7, 2018
86509cd
Bug#28699828: FIX -WDEPRECATED WARNINGS
jhauglid Sep 25, 2018
4a45eb1
BUG#28793334 Router process is aborted after receiving invalid packet
Oct 22, 2018
38de8aa
Bug#28892711 MYSQL BUILD FAILED ON MSVC ON WINDOWS
Nov 7, 2018
31435e9
Bug#29003649 ROUTER FAILS BUILD AND REPORTS WARNINGS WITH CLANG7 ON W…
weigon Nov 28, 2018
ae510a0
Bug#31503429 export-header mysql-protocol
weigon Jun 14, 2020
c973450
Bug#31503554 do not inherit from std::vector
weigon Jun 16, 2020
18f7341
Bug#31820147: FIX MSVC C4275 WARNINGS
Sep 1, 2020
c2b444d
WL#12012 tls-endpoint, codec [1/7]
weigon Oct 23, 2020
bc1955a
WL#12012 tls-endpoint, splicing [5/7]
weigon Sep 30, 2020
9dcae0d
Bug#32146402 remove superseeded protocol classes [3/3]
weigon Oct 30, 2020
b1ce618
BUG#32368342: UPDATE COPYRIGHT HEADERS TO 2021
Jan 21, 2021
b8310df
Bug#32607646 session_track::State is a single-byte
weigon Mar 1, 2021
2e79f17
Bug#32661958 typos in variable names
weigon Mar 1, 2021
268cac1
Bug#32661979 ColumnCount and ListFields message are missing
weigon Mar 1, 2021
e7fae13
Bug#32662868 decoding Eof-session-track broken
weigon Mar 1, 2021
fdb831b
Bug#32663921 mysql-4.0 client-greeting decode missing nul-terminator
weigon Mar 1, 2021
e577c91
Bug#32667060 add session_track::Gtid codec
weigon Mar 1, 2021
4ac7838
Bug#32667486 ensure cmd-byte is unique
weigon Mar 23, 2021
417a152
Bug#32667681 codec server::SendFileRequest
weigon Mar 22, 2021
ff11cb9
Bug#32670016 codec server::StmtPrepareOk
weigon Mar 22, 2021
da4671b
Bug#32670084 codec server::Statistics
weigon Mar 22, 2021
b89136d
Bug#32670242 codec client::Reload
weigon Mar 22, 2021
e2c8608
Bug#32672117 codec client::Kill
weigon Mar 22, 2021
2060611
Bug#32672673 codec client::SendFile
weigon Mar 22, 2021
fcbe838
Bug#32672769 codec client::AuthMethodData
weigon Mar 22, 2021
cd39279
Bug#33059724 missing cmd_byte() in server::AuthMethodData
weigon Jun 24, 2021
d12e34d
Bug#33302907 remove C++11 support from stdx/type_traits.h
weigon Sep 1, 2021
20181c9
Bug#33318115 use static_assert() from C++17
weigon Sep 6, 2021
efec0cf
Bug#33357723 Oracle Analytic Cloud connection failure
weigon Sep 15, 2021
56b999e
Bug#33357723 Oracle Analytic Cloud connection failure
weigon Sep 15, 2021
4fa9223
Bug#33425108 fix doc-comment for StmtParamAppendData
weigon Sep 29, 2021
e61f86c
Merge branch 'mysql-8.0.27-release' into mysql-8.0
bjornmu Oct 19, 2021
dccf058
WL#12771 reuse connection [12/26] - classic::clone protocol
weigon Jan 17, 2022
1197882
WL#12771 reuse connection [14/26] - classic::binlog protocol
weigon Jan 17, 2022
0cff438
Bug#33773243 stdx::expected<T, void> is deprecated
weigon Jan 18, 2022
5334429
Bug#34105472 session-tracker trx-state codec misses length
weigon Mar 1, 2022
9b2b906
BUG#33764808: UPDATE COPYRIGHT HEADERS TO 2022 [8.0 patch]
Apr 28, 2022
200921c
Bug#34163323: Fix remaining spell check issues in code comments
MRajcic May 3, 2022
d3ef747
Bug#34376474 protocol constants miss query-attributes capability
weigon Jul 1, 2022
009bd68
Bug#34376510 client::greeting misses settors
weigon Jul 12, 2022
bec8133
Bug#34604207 wrongly named StmtSetOption
weigon Sep 13, 2022
244933b
Bug #34278103 Compile MySQL with GCC 13 [noclose]
Sep 28, 2022
328c046
Bug #34278103 Compile MySQL with GCC 13 [noclose]
Sep 28, 2022
29f6736
NULL Merge branch 'mysql-8.0' into mysql-trunk
Oct 4, 2022
000f519
Bug#34969754 speedup message decoding
weigon Jan 9, 2023
c6455bc
Bug#34982979 setter for Ok and Eof
weigon Dec 28, 2022
282dcc3
Merged BUG#34750847 from 5.7 to 8.0.
Jan 17, 2023
aa3cbdd
Bug#34278103 Compile MySQL with GCC 13 [noclose]
Jan 13, 2023
b291b67
Bug#34278103 Compile MySQL with GCC 13 [noclose]
Jan 13, 2023
ee8d0c4
NULL Merge branch 'mysql-8.0' into mysql-trunk
Jan 18, 2023
90f97c4
Bug#34996516 wrong encoded buffers with gcc
weigon Jan 19, 2023
7f4acc4
Bug#34996521 remove more const-buffer-sequence support from codec
weigon Jan 19, 2023
6f5b5c8
Bug#34996528 simplify basic wire-types
weigon Jan 19, 2023
f1e3958
Merge branch 'mysql-8.0' into mysql-trunk
weigon Jan 23, 2023
09c4a39
Bug#35006489 allow zero-copy classic codec
weigon Jan 20, 2023
36f50df
Merge branch 'mysql-8.0' into mysql-trunk
weigon Jan 26, 2023
ac44d56
Bug#35072489 message::server::Error has no setters
weigon Feb 10, 2023
f3e59f6
Merge branch 'mysql-8.0' into mysql-trunk
weigon Feb 13, 2023
4022ddf
Bug#35097388 short Error packet does not fail with Bad Message
weigon Feb 16, 2023
1cb829d
Bug#35097429 compile error with borrowed StmtExecute
weigon Feb 16, 2023
d85cabc
Bug#35097439 stmt-execute with new params bound = 0 encode
weigon Feb 17, 2023
20dbdd7
Bug#35097470 BinlogDumpGtid decoder fails to decode without SIDs
weigon Feb 17, 2023
4cfa4df
Merge branch 'mysql-8.0' into mysql-trunk
weigon Feb 20, 2023
40ec967
Bug#35115810 stmt-execute with new-params-bound = 0 [1/2]
weigon Feb 21, 2023
2b4d430
Bug#35115810 stmt-execute with new-params-bound = 0 [2/2]
weigon Feb 21, 2023
a63e03a
Merge branch 'mysql-8.0' into mysql-trunk
weigon Feb 24, 2023
a86c1b1
Bug#35163483 StmtPrepareOk::warning_count() is not settable
weigon Mar 8, 2023
0878bd6
Bug#35120039 support query attributes in StmtExecute and Query codec
weigon Feb 27, 2023
ab3fa47
Merge branch 'mysql-8.0' into mysql-trunk
weigon Mar 9, 2023
f95765f
Bug#35318781 parameter_count_available has the wrong value
weigon Apr 21, 2023
0230759
Merge branch 'mysql-8.0' into mysql-trunk
weigon Apr 24, 2023
3676bae
Bug#35318797 decode StmtExecute after StmtParamAppendData fails
weigon Apr 4, 2023
8f52abb
Bug#35340772 server::Greeting misses setter
weigon Apr 28, 2023
44b315f
Merge branch 'mysql-8.0' into mysql-trunk
weigon Apr 28, 2023
e28410f
Bug#35373628 mock-server can not set session-tracker from script
weigon May 9, 2023
cd29dc4
Bug#35463262 mysql_dump_debug_info() fails through router
weigon Jun 2, 2023
29318c2
Bug#35472467 build failure with gcc-12 on EL8
weigon Jun 7, 2023
288b7c2
Bug#35468897 connection-sharing does not work with PHP [2/5]
weigon May 18, 2023
e891bdb
Bug#35472467 build failure with gcc-12 on EL8
weigon Jun 7, 2023
42c3fc3
Merge branch 'mysql-8.1.0-release' into mysql-trunk
bjornmu Jul 18, 2023
565a68d
Bug#36018328 replace stdx::endian with std::endian
weigon Nov 15, 2023
a95dbd1
Bug#36018362 replace stdx::span with std::span
weigon Nov 15, 2023
a1c4dca
Bug#36018398 remove std::expected::get_unexpected
weigon Nov 16, 2023
f8ac5be
Bug#36018408 replace stdx::make_unexpected() by std::unexpected()
weigon Nov 16, 2023
10e39e3
Bug#36031364 set-but-unused-variables warnings
weigon Nov 20, 2023
7a5e0eb
BUG#36122452: Update copyright headers to 2024 [8.0 patch]
Jan 5, 2024
1383e25
Merged BUG#36122452 from 8.0 to trunk.
Jan 5, 2024
c3f873a
GPL License Exception Update
bjornmu Feb 7, 2024
df819f1
Merge branch 'mysql-8.0' into mysql-trunk
bjornmu Feb 7, 2024
fabf351
GPL License Exception Update
bjornmu Feb 7, 2024
528379e
Bug#37287684 removed clang-format directives
weigon Nov 15, 2024
13dad8e
Bug#36374232 read-write splitting fails with connector-j
weigon Dec 16, 2024
b3c6d04
BUG#37354028: Update copyright headers to 2025 [8.0 patch]
Jan 15, 2025
89369de
Merged BUG#37354028 from 8.0 to 8.4
Jan 15, 2025
3dfe460
Bug#38817886 Update copyright headers to 2026 [noclose]
marcalff Jan 8, 2026
95318cc
Bug#38817886 Update copyright headers to 2026 [noclose]
marcalff Jan 12, 2026
46e4eb6
Merge branch 'mysql-8.4' into mysql-trunk
marcalff Jan 12, 2026
a3a9357
Bug#38817886 Update copyright headers to 2026 [noclose]
marcalff Jan 19, 2026
c5f0ae2
Merge branch 'mysql-8.0' into mysql-8.4
marcalff Jan 20, 2026
66dfd9f
Merge branch 'mysql-8.4' into mysql-trunk
marcalff Jan 20, 2026
d6daf90
Added mysql_protocol subtree from mysql-9.7.1
percona-ysorokin Jun 24, 2026
84bee8e
PBS-28 feature: Merge code from the MySQL Protocol Prototype onto the…
percona-ysorokin Jun 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extra/mysql_protocol/mysqlrouter/*
3 changes: 2 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ Checks: "
-llvm-header-guard
"
WarningsAsErrors: '*'
HeaderFilterRegex: ''
HeaderFilterRegex: '.*'
ExcludeHeaderFilterRegex: 'mysqlrouter/.*'
6 changes: 5 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,14 @@ jobs:
if: matrix.config.run_clang_tidy
run: clang-tidy-20 --version

- name: Dump Clang Tidy Config
if: matrix.config.run_clang_tidy
run: clang-tidy-20 --dump-config --config-file=${{github.workspace}}/src/.clang-tidy

- name: Clang Tidy
if: matrix.config.run_clang_tidy
# Run Clang Tidy
run: run-clang-tidy-20 -header-filter=.* -j=${{steps.cpu-cores.outputs.count}} -use-color -p=${{github.workspace}}/src-build-${{matrix.config.label}}
run: run-clang-tidy-20 -config-file=${{github.workspace}}/src/.clang-tidy -j=${{steps.cpu-cores.outputs.count}} -use-color -p=${{github.workspace}}/src-build-${{matrix.config.label}}

- name: Application version
working-directory: ${{github.workspace}}/src-build-${{matrix.config.label}}
Expand Down
70 changes: 69 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ if(WITH_ASAN)
target_link_options(binlog_server_compiler_flags INTERFACE "-fsanitize=address")
endif()

find_package(Boost 1.90.0 EXACT REQUIRED COMPONENTS url json)
find_package(Boost 1.90.0 EXACT REQUIRED COMPONENTS url json asio)

find_package(MySQL REQUIRED)

Expand Down Expand Up @@ -536,6 +536,74 @@ set_target_properties(binlog_server PROPERTIES
CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS NO
)
set(mysql_harness_source_files
extra/mysql_protocol/mysql/harness/net_ts/buffer.h

extra/mysql_protocol/mysql/harness/stdx/bit.h
extra/mysql_protocol/mysql/harness/stdx/expected.h
extra/mysql_protocol/mysql/harness/stdx/flags.h
extra/mysql_protocol/mysql/harness/stdx/ranges.h
extra/mysql_protocol/mysql/harness/stdx/type_traits.h
)

set(mysql_protocol_source_files
extra/mysql_protocol/mysqlrouter/classic_protocol.h
extra/mysql_protocol/mysqlrouter/classic_protocol_binary.h
extra/mysql_protocol/mysqlrouter/classic_protocol_clone.h
extra/mysql_protocol/mysqlrouter/classic_protocol_codec.h
extra/mysql_protocol/mysqlrouter/classic_protocol_codec_base.h
extra/mysql_protocol/mysqlrouter/classic_protocol_codec_binary.h
extra/mysql_protocol/mysqlrouter/classic_protocol_codec_clone.h
extra/mysql_protocol/mysqlrouter/classic_protocol_codec_error.h
extra/mysql_protocol/mysqlrouter/classic_protocol_codec_frame.h
extra/mysql_protocol/mysqlrouter/classic_protocol_codec_message.h
extra/mysql_protocol/mysqlrouter/classic_protocol_codec_session_track.h
extra/mysql_protocol/mysqlrouter/classic_protocol_codec_wire.h
extra/mysql_protocol/mysqlrouter/classic_protocol_constants.h
extra/mysql_protocol/mysqlrouter/classic_protocol_frame.h
extra/mysql_protocol/mysqlrouter/classic_protocol_message.h
extra/mysql_protocol/mysqlrouter/classic_protocol_session_track.h
extra/mysql_protocol/mysqlrouter/classic_protocol_wire.h)

set(minimysql_source_files
src/minimysql/caching_sha2_password_authenticator.hpp
src/minimysql/caching_sha2_password_authenticator.cpp
src/minimysql/connection_context_fwd.hpp
src/minimysql/connection_context.hpp
src/minimysql/connection_context.cpp

src/minimysql_app.cpp
)

add_executable(minimysql_server ${minimysql_source_files} ${mysql_protocol_source_files} ${mysql_harness_source_files})

# GCC 14 may report a false-positive mismatched allocation/deallocation
# warning in boost::asio coroutine machinery (awaitable_frame) used in
# minimysql_app.cpp.
# Also, there are some false-positive null-dereference warnings in boost::asio
# io_context.
# Keep -Werror globally and suppress only this source file.
set_source_files_properties(src/minimysql_app.cpp PROPERTIES
COMPILE_OPTIONS
"$<$<AND:$<COMPILE_LANG_AND_ID:CXX,GNU>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,14>>:-Wno-error=mismatched-new-delete;-Wno-error=null-dereference>"
)

target_compile_definitions(minimysql_server PRIVATE BOOST_ASIO_NO_DEPRECATED)
target_link_libraries(minimysql_server
PRIVATE
binlog_server_compiler_flags
Boost::headers Boost::asio
OpenSSL::Crypto
)

target_include_directories(minimysql_server PRIVATE "${PROJECT_SOURCE_DIR}/extra/mysql_protocol")

# it is not possible to propagate CXX_EXTENSIONS and CXX_STANDARD_REQUIRED
# via interface library (binlog_server_compiler_flags)
set_target_properties(minimysql_server PROPERTIES
CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS NO
)

include(CTest)
if(BUILD_TESTING)
Expand Down
40 changes: 40 additions & 0 deletions extra/mysql_protocol/mysql/harness/net_ts/buffer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
Copyright (c) 2019, 2026, Oracle and/or its affiliates.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.

This program is designed to work with certain software (including
but not limited to OpenSSL) that is licensed under separate terms,
as designated in a particular file or component or in included license
documentation. The authors of MySQL hereby grant you an additional
permission to link the program and your derivative works with the
separately licensed software that they have either included with
the program or referenced in the documentation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef MYSQL_HARNESS_NET_TS_BUFFER_H
#define MYSQL_HARNESS_NET_TS_BUFFER_H

#include <boost/asio/buffer.hpp>

namespace net {

using boost::asio::buffer;
using boost::asio::buffer_size;
using boost::asio::const_buffer;
using boost::asio::mutable_buffer;

} // namespace net

#endif // MYSQL_HARNESS_NET_TS_BUFFER_H
37 changes: 37 additions & 0 deletions extra/mysql_protocol/mysql/harness/stdx/bit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
Copyright (c) 2019, 2026, Oracle and/or its affiliates.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.

This program is designed to work with certain software (including
but not limited to OpenSSL) that is licensed under separate terms,
as designated in a particular file or component or in included license
documentation. The authors of MySQL hereby grant you an additional
permission to link the program and your derivative works with the
separately licensed software that they have either included with
the program or referenced in the documentation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef MYSQL_HARNESS_STDX_BIT_H
#define MYSQL_HARNESS_STDX_BIT_H

#include <bit>

namespace stdx {

using std::byteswap;

} // namespace stdx

#endif // MYSQL_HARNESS_STDX_BIT_H
38 changes: 38 additions & 0 deletions extra/mysql_protocol/mysql/harness/stdx/expected.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
Copyright (c) 2019, 2026, Oracle and/or its affiliates.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.

This program is designed to work with certain software (including
but not limited to OpenSSL) that is licensed under separate terms,
as designated in a particular file or component or in included license
documentation. The authors of MySQL hereby grant you an additional
permission to link the program and your derivative works with the
separately licensed software that they have either included with
the program or referenced in the documentation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef MYSQL_HARNESS_STDX_EXPECTED_H
#define MYSQL_HARNESS_STDX_EXPECTED_H

#include <expected>

namespace stdx {

using std::expected;
using std::unexpected;

} // namespace stdx

#endif // MYSQL_HARNESS_STDX_EXPECTED_H
Loading
Loading