For connections made using X Plugin, Connector/C++ now provides control over the use of compression to minimize the number of bytes sent over connections to the server. Connection URIs and
SessionSettingsobjects permit explicitly specifying a compression option:
URI strings permit a
compressionoption with permitted values of
REQUIRED(not case-sensitive). Examples:
mysqlx://user:password@host:port/db?compression=DISABLED mysqlx://user:password@host:port/db?compression=PREFERRED mysqlx://user:password@host:port/db?compression=REQUIRED
SessionSettingsobjects permit a
SessionOption::COMPRESSIONoption with permitted values of
mysqlx::Session sess(SessionOption::USER, "user_name", SessionOption::PWD, "password", SessionOption::COMPRESSION, CompressionMode::PREFERRED);
These rules apply:
If compression is disabled, the connection is uncompressed.
If compression is preferred, Connector/C++ and the server negotiate to find a compression algorithm they both permit. If no common algorithm is available, the connection is uncompressed. This is the default mode if not specified explicitly.
If compression is required, compression algorithm negotiation occurs as for preferred mode, but if no common algorithm is available, the connection request terminates with an error.
To avoid CPU inefficiency, data packets are not compressed even when compression is enabled unless they exceed a threshold size (currently 1000 bytes; this is subject to change).
See also Connection Compression with X Plugin. (WL #12150)
Previously, Connector/C++ binary distributions were compatible with projects built using MSVC 2019 (using either dynamic or static connector libraries) or MSVC 2017 (using dynamic connector libraries only). Binary distributions now are also compatible with MSVC 2017 using the static X DevAPI connector library. This means that binary distributions are fully compatible with MSVC 2019, and fully compatible with MSVC 2017 with the exception of the static legacy (JDBC) connector library. (WL #13729)
For connections made using X Plugin, the last byte was removed from
DATETIMEvalues fetched as raw bytes. (Bug #30838230)
JSONvalues from query results failed due to an extra
\0character erroneously being added to the end of such values. (Bug #29847865)
For connections made using X Plugin, warnings sent following result sets were not captured, and were thus unavailable to
getWarnings(). (Bug #28047970)