From 6151721fffb05391082fdb11d98a66aae3e0f765 Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Thu, 23 Jan 2025 01:46:10 +0100 Subject: [PATCH] Fix a few typos --- bench/connection_pool.cpp | 4 ++-- doc/qbk/01_intro.qbk | 2 +- doc/qbk/07_prepared_statements.qbk | 2 +- doc/qbk/11_multi_function.qbk | 4 ++-- doc/qbk/12_connection_pool.qbk | 4 ++-- doc/qbk/16_metadata.qbk | 2 +- doc/upgrade_1_82.md | 2 +- example/3_advanced/connection_pool/handle_request.cpp | 4 ++-- example/3_advanced/connection_pool/server.hpp | 2 +- include/boost/mysql/any_address.hpp | 2 +- include/boost/mysql/any_connection.hpp | 4 ++-- include/boost/mysql/handshake_params.hpp | 2 +- include/boost/mysql/impl/format_sql.ipp | 2 +- .../mysql/impl/internal/protocol/impl/protocol_field_type.hpp | 2 +- include/boost/mysql/impl/internal/sansio/message_reader.hpp | 2 +- test/unit/test/connection_pool.cpp | 2 +- test/unit/test/detail/rows_iterator.cpp | 2 +- test/unit/test/metadata.cpp | 2 +- test/unit/test/sansio/top_level_algo.cpp | 2 +- test/unit/test/with_diagnostics.cpp | 2 +- 20 files changed, 25 insertions(+), 25 deletions(-) diff --git a/bench/connection_pool.cpp b/bench/connection_pool.cpp index dd25c28a9..a971ea8f1 100644 --- a/bench/connection_pool.cpp +++ b/bench/connection_pool.cpp @@ -227,7 +227,7 @@ void run_nopool(mysql::any_address server_addr, bool use_ssl) // Run ctx.run(); - // Print ellapsed time + // Print elapsed time std::cout << coord.ellapsed().count() << std::flush; } @@ -261,7 +261,7 @@ void run_pool(mysql::any_address server_addr, bool use_ssl) // Run ctx.run(); - // Print ellapsed time + // Print elapsed time std::cout << coord.ellapsed().count() << std::flush; } diff --git a/doc/qbk/01_intro.qbk b/doc/qbk/01_intro.qbk index 926ed3892..074801946 100644 --- a/doc/qbk/01_intro.qbk +++ b/doc/qbk/01_intro.qbk @@ -104,7 +104,7 @@ I would like to specially acknowledge [@https://github.com/madmongo1 Richard Hod for his invaluable technical guidance during development. Thanks also to Christian Mazakas for his ideas in early stages, and to [@https://github.com/klemens-morgenstern Klemens Morgenstern] and -and [@https://github.com/vinniefalco Vinnie Falco] for his techincal advice. +and [@https://github.com/vinniefalco Vinnie Falco] for his technical advice. Without you, this library would not exist. Finally, thanks to [@https://github.com/chriskohlhoff Christopher Kohlhoff] diff --git a/doc/qbk/07_prepared_statements.qbk b/doc/qbk/07_prepared_statements.qbk index 6b26098d4..e446c1c6b 100644 --- a/doc/qbk/07_prepared_statements.qbk +++ b/doc/qbk/07_prepared_statements.qbk @@ -107,7 +107,7 @@ operation that may block or fail. The following table contains a reference of the types that can be used when binding a statement. If a type can be used this way, we say to satisfy the `WritableField` concept. The table shows how a parameter `v` in a expression `conn.execute(stmt.bind(v), result)` -is interpreted by MySQL, depeding on `v`'s type. +is interpreted by MySQL, depending on `v`'s type. [table:writable_field_reference diff --git a/doc/qbk/11_multi_function.qbk b/doc/qbk/11_multi_function.qbk index f60a3be60..561add3a6 100644 --- a/doc/qbk/11_multi_function.qbk +++ b/doc/qbk/11_multi_function.qbk @@ -34,7 +34,7 @@ There are two separate cases: * If your query retrieved at least one column (even if no rows were generated), we're in ['case 1]. The server sends: * An initial packet informing that the query executed correctly, and that we're in ['case 1]. - * Some matadata packets describing the columns that the query retrieved. These become available + * Some metadata packets describing the columns that the query retrieved. These become available to the user and are necessary to parse the rows. * The actual rows. * An OK packet, which marks the end of the resultset and contains information like `last_insert_id` and @@ -128,7 +128,7 @@ Some remarks: [heading Accessing metadata and OK packet data] You can access metadata at any point, using [refmem execution_state meta] or [refmem static_execution_state meta]. -This function returns a collection of [reflink metadata] objects. For more information, plase refer to [link mysql.meta this section]. +This function returns a collection of [reflink metadata] objects. For more information, please refer to [link mysql.meta this section]. You can access OK packet data using functions like [refmemunq execution_state last_insert_id] and [refmemunq execution_state affected_rows] in both `execution_state` and `static_execution_state`. diff --git a/doc/qbk/12_connection_pool.qbk b/doc/qbk/12_connection_pool.qbk index cd54fc405..30813ebfc 100644 --- a/doc/qbk/12_connection_pool.qbk +++ b/doc/qbk/12_connection_pool.qbk @@ -150,7 +150,7 @@ In short: * When a connection is created, it goes into the `pending_connect` state. * Connection establishment is attempted. If it succeeds, the connection becomes `idle`. Otherwise, it stays `pending_connect`, and another attempt will be performed - after [refmem pool_params retry_interval] has ellapsed. + after [refmem pool_params retry_interval] has elapsed. * `idle` connections can be retrieved by [refmem connection_pool async_get_connection], and they become `in_use`. * If a connection is returned by [refmem pooled_connection return_without_reset], @@ -226,7 +226,7 @@ goes as follows: (a lightweight query). * `num_parallel` = 100 async agents are run in parallel. This means that, at any given point in time, no more than 100 parallel connections to MySQL are made. -* The test measures the time ellapsed between launching the first async agent +* The test measures the time elapsed between launching the first async agent and receiving the response for the last query (`ellapsed_time`). * The test is repeated 10 times for each different configuration, and results are averaged. This time is used to measure the throughput, in "connections/s" (as given by `N/ellapsed_time`). diff --git a/doc/qbk/16_metadata.qbk b/doc/qbk/16_metadata.qbk index 716cb6789..0762a5459 100644 --- a/doc/qbk/16_metadata.qbk +++ b/doc/qbk/16_metadata.qbk @@ -19,7 +19,7 @@ present even if no row was returned by the query (e.g. a `SELECT` on an empty ta how to handle metadata when running a query or a statement: * If [refmem connection meta_mode] is `metadata_mode::minimal` (the default), the library - will retain the minimal amout of data required to run the operation. Additional information, + will retain the minimal amount of data required to run the operation. Additional information, like column names, won't be retained. Unless you are using metadata explicitly, you should keep this default, as it consumes slightly less memory. * If [refmem connection meta_mode] is `metadata_mode::full`, the library will retain all the information diff --git a/doc/upgrade_1_82.md b/doc/upgrade_1_82.md index f68180bac..13b34ba39 100644 --- a/doc/upgrade_1_82.md +++ b/doc/upgrade_1_82.md @@ -25,7 +25,7 @@ This is a major upgrade, since a lot of changes have been made since the review * Binary types (`BLOB`, `BINARY`, `VARBINARY`, `GEOMETRY`) are now represented as a special type `blob_view`/`blob`. * **Action**: if you handle these types in your application, use `is_blob`, `get_blob` and `as_blob` functions in `field_view`. * The `collation` enum has been removed in favor of plain integers. - * **Action**: if you were using collations explicity, replace the enumerator by the collation ID. You can find them in `` and ``. + * **Action**: if you were using collations explicitly, replace the enumerator by the collation ID. You can find them in `` and ``. * `connection_params` has been reverted to `handshake_params`. * **Action**: replace occurrences of `connection_params` by `handshake_params`. * `row` is no longer streamable. The stream operation on `row` wasn't a universal agreement. diff --git a/example/3_advanced/connection_pool/handle_request.cpp b/example/3_advanced/connection_pool/handle_request.cpp index 6a0699cb3..cdf4cfd41 100644 --- a/example/3_advanced/connection_pool/handle_request.cpp +++ b/example/3_advanced/connection_pool/handle_request.cpp @@ -40,7 +40,7 @@ // This file contains all the boilerplate code to dispatch HTTP // requests to API endpoints. Functions here end up calling -// note_repository fuctions. +// note_repository functions. namespace asio = boost::asio; namespace http = boost::beast::http; @@ -232,7 +232,7 @@ class request_handler // Actually create the note auto res = repo_.create_note(args->title, args->content, yield); - // Return the newly crated note as response + // Return the newly created note as response return json_response(single_note_response{std::move(res)}); } else diff --git a/example/3_advanced/connection_pool/server.hpp b/example/3_advanced/connection_pool/server.hpp index d1eb77f88..b3d0a2f29 100644 --- a/example/3_advanced/connection_pool/server.hpp +++ b/example/3_advanced/connection_pool/server.hpp @@ -36,7 +36,7 @@ struct shared_state }; // Launches a HTTP server that will listen on 0.0.0.0:port. -// If the server fails to launch (e.g. because the port is aleady in use), +// If the server fails to launch (e.g. because the port is already in use), // returns a non-zero error code. ex should identify the io_context or thread_pool // where the server should run. The server is run until the underlying execution // context is stopped. diff --git a/include/boost/mysql/any_address.hpp b/include/boost/mysql/any_address.hpp index 9ae0bcc31..d5c13ab69 100644 --- a/include/boost/mysql/any_address.hpp +++ b/include/boost/mysql/any_address.hpp @@ -70,7 +70,7 @@ struct unix_path * regardless of the transport type being used. It can contain either a host * and port (to connect using TCP) or a UNIX path (to connect using UNIX domain sockets). * \n - * This class may be extended in the future to accomodate Windows named pipes. + * This class may be extended in the future to accommodate Windows named pipes. * \n * This type has value semantics: it is owning and regular. */ diff --git a/include/boost/mysql/any_connection.hpp b/include/boost/mysql/any_connection.hpp index 5ad93ba20..2324b3031 100644 --- a/include/boost/mysql/any_connection.hpp +++ b/include/boost/mysql/any_connection.hpp @@ -307,7 +307,7 @@ class any_connection } /** - * \brief Returns format options suitable to format SQL according to the current connection configuation. + * \brief Returns format options suitable to format SQL according to the current connection configuration. * \details * If the current character set is known (as given by \ref current_character_set), returns * a value suitable to be passed to SQL formatting functions. Otherwise, returns an error. @@ -332,7 +332,7 @@ class any_connection * \par Exception safety * No-throw guarantee. * - * \returns The matadata mode that will be used for queries and statement executions. + * \returns The metadata mode that will be used for queries and statement executions. */ metadata_mode meta_mode() const noexcept { return impl_.meta_mode(); } diff --git a/include/boost/mysql/handshake_params.hpp b/include/boost/mysql/handshake_params.hpp index e7790e6d1..4399a8cf3 100644 --- a/include/boost/mysql/handshake_params.hpp +++ b/include/boost/mysql/handshake_params.hpp @@ -22,7 +22,7 @@ namespace mysql { * * \par Object lifetimes * This object stores references to strings (like username and password), performing - * no copy of these values. Users are resposible for keeping them alive until required. + * no copy of these values. Users are responsible for keeping them alive until required. * * \par Legacy * This class is used with the legacy \ref connection class. diff --git a/include/boost/mysql/impl/format_sql.ipp b/include/boost/mysql/impl/format_sql.ipp index dd205b98d..618619883 100644 --- a/include/boost/mysql/impl/format_sql.ipp +++ b/include/boost/mysql/impl/format_sql.ipp @@ -66,7 +66,7 @@ void append_int(T integer, format_context_base& ctx) auto res = charconv::to_chars(buff, buff + buffsize, integer); - // Can only fail becuase of buffer being too small + // Can only fail because of buffer being too small BOOST_ASSERT(res.ec == std::errc()); // Copy diff --git a/include/boost/mysql/impl/internal/protocol/impl/protocol_field_type.hpp b/include/boost/mysql/impl/internal/protocol/impl/protocol_field_type.hpp index 139be975c..964cde213 100644 --- a/include/boost/mysql/impl/internal/protocol/impl/protocol_field_type.hpp +++ b/include/boost/mysql/impl/internal/protocol/impl/protocol_field_type.hpp @@ -39,7 +39,7 @@ enum class protocol_field_type : std::uint8_t json = 0xf5, // JSON newdecimal = 0xf6, // DECIMAL enum_ = 0xf7, // Apparently not sent - set = 0xf8, // Apperently not sent + set = 0xf8, // Apparently not sent tiny_blob = 0xf9, // Apparently not sent medium_blob = 0xfa, // Apparently not sent long_blob = 0xfb, // Apparently not sent diff --git a/include/boost/mysql/impl/internal/sansio/message_reader.hpp b/include/boost/mysql/impl/internal/sansio/message_reader.hpp index 12f7b43d5..6d26e80c8 100644 --- a/include/boost/mysql/impl/internal/sansio/message_reader.hpp +++ b/include/boost/mysql/impl/internal/sansio/message_reader.hpp @@ -88,7 +88,7 @@ class message_reader // Returns buffer space suitable to read bytes to span buffer() { return buffer_.free_area(); } - // Removes old messages stored in the buffer, and resizes it, if required, to accomodate + // Removes old messages stored in the buffer, and resizes it, if required, to accommodate // the message currently being parsed. BOOST_ATTRIBUTE_NODISCARD error_code prepare_buffer() diff --git a/test/unit/test/connection_pool.cpp b/test/unit/test/connection_pool.cpp index eb923f016..0a0999e6d 100644 --- a/test/unit/test/connection_pool.cpp +++ b/test/unit/test/connection_pool.cpp @@ -142,7 +142,7 @@ BOOST_AUTO_TEST_CASE(move_ctor_invalid_invalid) pooled_connection conn; pooled_connection conn2; - // Moving an invalid souce to an invalid target works + // Moving an invalid source to an invalid target works conn = std::move(conn2); BOOST_TEST(!conn.valid()); BOOST_TEST(!conn2.valid()); diff --git a/test/unit/test/detail/rows_iterator.cpp b/test/unit/test/detail/rows_iterator.cpp index 7937a72ba..6482f9548 100644 --- a/test/unit/test/detail/rows_iterator.cpp +++ b/test/unit/test/detail/rows_iterator.cpp @@ -364,7 +364,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(iterator_minus_iterator, RowType, rows_types) BOOST_TEST(It(it2) - It(it2) == 0); BOOST_TEST(It(itend) - It(itend) == 0); - // Self substract + // Self subtract BOOST_TEST(it1 - it1 == 0); BOOST_TEST(it2 - it2 == 0); BOOST_TEST(itend - itend == 0); diff --git a/test/unit/test/metadata.cpp b/test/unit/test/metadata.cpp index 09f069714..44169d5f8 100644 --- a/test/unit/test/metadata.cpp +++ b/test/unit/test/metadata.cpp @@ -21,7 +21,7 @@ using namespace boost::mysql::test; namespace collations = boost::mysql::mysql_collations; namespace column_flags = boost::mysql::detail::column_flags; -// TODO: these tests should be more targetted towards metadata's object responsibilities +// TODO: these tests should be more targeted towards metadata's object responsibilities // and less integration-y BOOST_AUTO_TEST_SUITE(test_metadata) diff --git a/test/unit/test/sansio/top_level_algo.cpp b/test/unit/test/sansio/top_level_algo.cpp index 8d1131d5d..693f86aa7 100644 --- a/test/unit/test/sansio/top_level_algo.cpp +++ b/test/unit/test/sansio/top_level_algo.cpp @@ -134,7 +134,7 @@ BOOST_AUTO_TEST_CASE(read_short_and_buffer_resizing) transfer(act.read_args().buffer, span(bytes.data(), 4)); act = algo.resume(error_code(), 4); - // The read request wasn't completely satisified, so more bytes are asked for + // The read request wasn't completely satisfied, so more bytes are asked for BOOST_TEST(act.type() == next_action_type::read); // Read part of the body diff --git a/test/unit/test/with_diagnostics.cpp b/test/unit/test/with_diagnostics.cpp index cbd7c63f1..a592e6f0d 100644 --- a/test/unit/test/with_diagnostics.cpp +++ b/test/unit/test/with_diagnostics.cpp @@ -305,7 +305,7 @@ static_assert( "" ); -// Applying with_diagnostics to an unkown signature is a pass-through +// Applying with_diagnostics to an unknown signature is a pass-through struct no_ec_initiation { template