108 Commits

Author SHA1 Message Date
Anarthal (Rubén Pérez)
303b9f0b59
Added benchmarks against the official drivers
Added one_small_row, one_big_row, many_rows, stmt_params benchmarks against libmysqlclient and libmariadb
Added a CI build to compile and run benchmarks
Added a Python script to run the benchmarks
Refactored the connection_pool benchmark to be use data independent from examples

close #458
2025-04-02 11:32:43 +02:00
Anarthal (Rubén Pérez)
e988c9ad9e
Added docs on using asio::cancel_after with pool_params::thread_safe
close #402
2025-02-24 22:11:35 +01:00
Anarthal (Rubén Pérez)
33660e2710
Starting operations while engaged in multi-function ops is no longer UB
Attempting to start an operation involving server communication after a
multi-function operation has been started and before all its associated
packets have been read now fails with
client_errc::engaged_in_multi_function, instead of causing undefined
behavior.
Attempting to start a read_some_rows or read_resultset_head operation
with no in-progress multi-function operation now fails with
client_errc::not_engaged_in_multi_function.
Attempting to start an operation that requires an established session
before a successful connect now fails with client_errc::not_connected.
Added the three client_errc enum values mentioned above.
Renamed detail::connection_status (connection_pool) to node_status.
Added detail::connection_status (connection_state_data).
Removed redundant spotcheck tests.

close #448 
close #450
2025-02-22 19:15:03 +01:00
Anarthal (Rubén Pérez)
dd9690921a
Reworked the static interface exposition page
close #419
2025-02-19 16:13:07 +01:00
Anarthal (Rubén Pérez)
07200f17c2
Made the asio::yield_context HTTP server single-threaded and reworked it
The example is now much more legible
The example no longer crashes on termination
Renamed it to match the C++ standard it requires

close #414
2025-02-14 21:13:01 +01:00
Anarthal (Rubén Pérez)
b4365f3254
Reworked the dynamic interface exposition page
close #418
2025-02-14 14:03:20 +01:00
Anarthal (Rubén Pérez)
eb4c2af073
Added a section on interfacing sync and async code
Replaces an incorrect sync connection_pool snippet that contained a race
condition.

close #412
2025-02-14 14:03:03 +01:00
Anarthal (Rubén Pérez)
5a3a2f40c9
Reworked the text queries and SQL formatting exposition pages
close #417 
close #424
2025-02-13 21:40:01 +01:00
Anarthal (Rubén Pérez)
6a24faa7da
Reworked the prepared statement exposition page
close #416
2025-02-12 18:17:52 +01:00
Anarthal (Rubén Pérez)
c89e4f3751
Renamed the connection_pool example to http_server_cpp11_coroutines 2025-02-12 16:15:19 +01:00
Anarthal (Rubén Pérez)
793b678287
Updated file copyrights to 2025 2025-02-11 20:42:41 +01:00
Anarthal (Rubén Pérez)
c3f1cbfd8f
Added an HTTP server example using C++20 coroutines
Contributes to #365
2025-02-11 18:43:35 +01:00
Anarthal (Rubén Pérez)
829dbf775c
Connections now check for in-progress async operations and fail without UB
connection and any_connection now check whether there is an in-progress
async operation, and fail with client_errc::operation_in_progress if
there is one. This situation no longer triggers undefined behavior.
Refactored the internal sans-io algorithms

close #405
2025-02-05 20:15:54 +01:00
Dirk Stolle
403ce603aa
Fixed a few typos 2025-01-24 15:45:45 +01:00
Anarthal (Rubén Pérez)
c438f26731
Fixed a render problem in the async discussion page 2024-12-04 17:01:40 +01:00
Anarthal (Rubén Pérez)
c343cde1fb
Improved discussion and examples
Added a tutorial on UPDATEs, transactions and multi-queries
Added a tutorial on connection_pool
Added a tutorial on error handling
Added examples on INSERTs and DELETEs
Rewrote the discussion page on character sets
Added a discussion page on the templated connection class
Removed superseded examples on timeouts and multi-queries
Updated the coverage build to gcc-14 (gcc-13 was using a non-LTS release
that caused problems)

Contributes to #365 and #366
2024-11-29 17:47:44 +01:00
Anarthal (Rubén Pérez)
f6c119210d
Boost 1.87: new discussion and examples (part 1)
Added tutorials 2, 3 and 4
Changed most of the discussion to use any_connection
Added examples on disabling TLS, multi-function operations, multi-queries and transactions
All examples now use any_connection
Automate parts of example qbk generation

Partially addresses #365 and #366
2024-11-05 00:12:27 +01:00
Anarthal (Rubén Pérez)
272533c938
Boost 1.87 API status update
any_connection, client-side SQL formatting and connection_pool are now
stable
connection is now marked as legacy (not recommended for new code)
Added legacy/experimental tags in quickref file

close #364
2024-10-29 18:02:54 +01:00
Anarthal (Rubén Pérez)
eba723f5a7
connection_pool destructor now cancels async operations
Improved connection_pool docs on thread-safety.

close #370
2024-10-14 13:35:32 +02:00
Anarthal (Rubén Pérez)
6842c2d83d
sequence now returns an owning type
Renamed format_sequence_view to format_sequence
format_sequence members are now part of the public API
Moved sequence to a separate header
Added sequence_range_t

close #359
2024-10-11 22:17:17 +02:00
Anarthal (Rubén Pérez)
7ef6ff8773
Removed pool executor params
Added pool_params::connection_executor

close #350
2024-10-03 06:28:43 +02:00
Anarthal (Rubén Pérez)
e72b4906af
Removed connection_pool::async_get_connection timeout overloads
Please use asio::cancel_after, instead.
Replaced client_errc::timeout, client_errc::cancelled by
    client_errc::no_connection_available, client_errc::pool_cancelled
async_get_connection no longer uses the last connect error code as failure error code,
    but embeds this info in the output diagnostics

close #349
2024-09-26 08:30:52 +02:00
Anarthal (Rubén Pérez)
1f79e5ce3f
connection_pool thread-safety is now more robust
Thread-safety is now achieved using pool_params::thread_safe.
Removed pool_executor_params::thread_safe
Unsafe pools now use the standard Asio semantics
Safe pools are now safe even if the handlers' associated executors point
    to a context different from the pool's context

close #268
2024-09-14 13:06:54 +02:00
Anarthal (Rubén Pérez)
6d08247bab
Migrate docs to pydocca
Improved reference docs linkage and fixed several formatting issues
Removed obsolete performance warning about close_statement

close #334
2024-09-06 16:38:38 +02:00
Anarthal (Rubén Pérez)
95a9aa1068
Added with_diagnostics completion token
Made with_diagnostics(deferred) the default token for any_connection and
connection_pool.
throw_on_error is now marked as legacy.

close #329 
close #296
2024-08-13 10:48:49 +02:00
Anarthal (Rubén Pérez)
a20fc3e5ea
Added with_params
close #218
2024-08-01 12:59:56 +02:00
Anarthal (Rubén Pérez)
a918c6b6b5
Improved server feature detection for integration tests
Introduced BOOST_MYSQL_DISABLED_SERVER_FEATURES env var
Removed BOOST_MYSQL_NO_UNIX_SOCKET_TESTS env var
JSON tests in database_types are now actually run

close #29
2024-07-11 17:36:42 +02:00
Anarthal (Rubén Pérez)
3a49afeb87
Boost 1.86 new CI builds
Added gcc-14 build
Updated mysql8 to MySQL 8.4.1
Updated mariadb to MariaDB 11.4.2
Updated some CMake builds to the latest compiler versions
Updated GHA workflows to use Node 20 actions
Updated deprecated ENV commands in Dockerfiles
Removed debugging statements in OSX CI build
DB entrypoints are now inline scripts in Dockerfiles
TSAN is now run in ARM CIs and recent gcc's
TSAN is now disabled for TS executors

close #302
2024-07-08 17:12:43 +02:00
Anarthal (Rubén Pérez)
0944b2af77
Added a max limit to any_connection buffer size
any_connection max buffer size is now 64MB
Renamed any_connection_params::initial_read_buffer_size to initial_buffer_size
Renamed pool_params::initial_read_buffer_size to initial_buffer_size

close #278
2024-06-30 15:49:27 +02:00
Anarthal (Rubén Pérez)
d1f1219e4b
Removed the pipeline static interface
close #288
2024-06-26 16:47:27 +02:00
Anarthal (Rubén Pérez)
77361353a5
Added formattable_ref
format_context_base::append_value now uses formattable_ref instead of being a template

close #284
2024-06-23 18:35:26 +02:00
Anarthal (Rubén Pérez)
80a86189e9
Support for ranges in client-side SQL formatting
close #280
2024-06-22 11:48:45 +02:00
Anarthal (Rubén Pérez)
08abb5d073
Client-side SQL formatting now supports specifiers
Added the 'i' and 'r' specifiers
Removed the identifier class

close #217
2024-06-17 21:53:07 +02:00
Anarthal (Rubén Pérez)
9ba4f9dfed
Pipeline API
Removed sansio_algorithm base class

close #75
2024-06-08 12:47:42 +02:00
Anarthal (Rubén Pérez)
22eddece25
Docs about MSVC tzdb leak reports
close #273
2024-05-27 12:01:36 +02:00
Anarthal (Rubén Pérez)
44ba9abe1d
Date and datetime is now compatible with C++20 local_time
close #263
2024-05-19 10:37:28 +02:00
Anarthal (Rubén Pérez)
75c7415118
Added is_fatal_error
Updated osx CIs to run in macos-latest (macos 14)

close #253
2024-04-30 16:17:16 +02:00
Anarthal (Rubén Pérez)
7eec4954a7
Added support for Boost.PFR in the static interface
target_include_directories no longer uses the SYSTEM option

close #185
2024-04-18 15:52:00 +02:00
Anarthal (Rubén Pérez)
6e2b833a05
Split snippets into separate files (#242)
close #237
2024-03-21 23:22:10 +01:00
Ruben Perez
9950b91519 Improved client-side SQL formatting docs
close #223
2024-03-15 19:59:14 +01:00
Ruben Perez
f98427c3b8 Connection pools now always use utf8mb4
Fixes error-prone behavior for connection pools, where connections would use the server's default character set.

close #187
2024-03-04 18:11:00 +01:00
Ruben Perez
d8b69d0e78 Bumped copyright to 2024 2024-02-18 12:48:14 +01:00
Ruben Perez
5e8992ba88 Client-side SQL formatting functions
Added format_sql, format_sql_to and basic_format_context
Boost.Charconv is now a mandatory dependency
Text queries are now locale-independent
any_connection::current_character_set now uses system::result
Added any_connection::format_opts
field_view, field and statement::bind now disallow character types
escape_string can now be used with any OutputString type
Added constant_string_view
character_set now uses string_view and span
set_character_set hardening

close #69
close #208
2024-02-15 16:02:39 +01:00
Ruben Perez
88d12feb58 Added escape_string and character_set
Added any_connection::backslash_escapes
Added utf8mb4_charset and latin1_charset

close #202
2024-01-02 21:51:38 +01:00
Ruben Perez
bc5577ede5 Connection pool
Added any_connection and any_address
Added connection_pool and pooled_connection
Added thread_safety tests
Added defaults.hpp header

close 19
2023-12-20 18:46:31 +01:00
Ruben Perez
2dcea3f5e7 Added sanitizer builds
Fixed problem with header-only builds where
    meta_check_context didn't include its .ipp file
Fixed integer overflow problems in datetime::datetime
Fixed NULL memcpy problem in serialization_context::write
Updated tested systems in README and intro

close #33
2023-06-24 22:41:49 +02:00
Ruben Perez
88fbe387ac Separate compilation
Separate compilation
Immediate completions are now posted through the I/O executor
Jamfiles now correctly requires C++11
Refactored the protocol and channel modules
Removed example on default completion tokens

close #23
close #112
2023-06-22 12:03:24 +02:00
Ruben Perez
b51115668d Added support for the static interface
Added support for the static interface
Statement execution now supports bool and optionals
Replaced the FieldLikeTuple and FieldLike concepts
    by WritableFieldTuple and WritableField
Added diagnostics::client_message
Solved a problem with blob types and stored procedures
    under MariaDB
Removed a troublesome assert in row_impl
Protected numeric_limits min/max from intrusive macros
Added C++11/14 order management examples
Documentation section collapsing
Test Jamfiles now show output only on failure

close #60
close #153
close #154
2023-05-22 14:05:12 +02:00
Ruben Perez
0571e4b886 Generic execute and start_execution functions
Added execute, start_execution, ExecutionRequest and
    statement::bind. Deprecated query, execute_statement,
    start_query and start_statement_execution.
Statements can now be executed specifying parameters
    as iterator ranges.
Fixed a bug that caused build problems when FieldViewForwardIterator's
    reference is convertible to field_view, but not field_view.

Close #111
Close #137
Close #138
2023-04-03 16:31:33 +02:00
Ruben Perez
ed007e31ae Multi-resultset
Added support for running stored procedures that SELECT data
Added support for running multiple semicolon-separated queries
Added support for running stored procedures with OUT params
Added resultset and resultset_view
Fixed documentation typos and wording
Refactored object creation in tests

Close #133
Close #132
Close #8
2023-03-31 00:44:46 +02:00