Console View
|
Categories: connectors experimental galera main |
|
| connectors | experimental | galera | main | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39813 ST_GeomFromGeoJSON does not control recursion depth Geometry::create_from_json reset the killedptr and the stack depth (stack_p) every time json_scan_start was called. We save/ restore these values so that the ST_GeomFrom_GeoJSON can be killed and incur timeout, and also so that its depth measurement is kept. Test case an bug report thanks to byteoverride. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge 10.6 into 10.11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PranavKTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dds | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39691 wsrep.cnf contains deprecated wsrep_causal_reads wsrep_causal_reads was deprecated in 10.1.3 and removed in 11.3.1. Put in place the equivalent (and default) wsrep_sync_wait=0. Amend a few early comments to show MariaDB as our product. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pekka Lampio
pekka.lampio@galeracluster.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40279 galera.tmp_space_usage test failure The MTR test galera.tmp_space_usage printed the exact Tmp_space_used / Max_tmp_space_used byte counts. These come from the binlog cache temporary file, whose size depends on binary log event encoding and thus varies across platforms and builds, making the test fail (e.g. 101706 vs the recorded 102054). Rewrite the test to check only the invariants the fix is about, as is already done in main.tmp_space_usage: after the inserts Tmp_space_used is non-zero and equals Max_tmp_space_used, and after change_user Tmp_space_used is reset to 0 while Max_tmp_space_used is preserved. Co-Authored-By: Claude Opus 4.8 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37996 CMake: MariaDB:: targets for bundled-or-system libraries Stop overwriting the standard find_package() result variables (ZLIB_FOUND, ZLIB_LIBRARIES, ZLIB_INCLUDE_DIR(S), ...), this breaks vcpkg. Provide namespaced INTERFACE targets that point at either the bundled or the system library and carry their include directories (and, for SSL, the compile definitions) MariaDB::zlib, MariaDB::OpenSSL, MariaDB::pcre2-8, MariaDB::pcre2-posix, MariaDB::fmt, MariaDB::readline Link these consistently instead of the scattered ${*_LIBRARIES} and ${*_INCLUDE_DIR(S)} variables sprinkled across the tree. Bundled pcre2-posix depends on pcre2-8 so the static link order is correct for consumers that link only posix. wolfssl carries its own usage requirements (HAVE_WOLFSSL, WOLFSSL_USER_SETTINGS); MariaDB::OpenSSL keeps only HAVE_OPENSSL. Update libmariadb to 3.3 (47a31a98): handles MariaDB::zlib as a submodule. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge branch '3.3' into 3.4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PranavKTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Incorporated CRC. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40312 SHOW CREATE SERVER incorrect quoting quote protocol name and option names |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
fix plugins.feedback_os_release failure on sles-1600 just the comment at the beginning of its /etc/os-release is already more than 256 bytes |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-33524: marked_for_read assertion with virtual column A couple of things interact in this scenario. 1. A virtual column whose value depends on session state, such as a VCOL calling DATE_FORMAT, has fix_fields (via fix_expr) run on it again before each INSERT. For a table reused from the cache this runs in Vcol_expr_context before setup_tables sets the table map. The test first opens t1 with a SELECT that fails before setup_tables, leaving it cached with map zero. 2. When the connection character set needs conversion, CONCAT (more generally, any charset aggregation) wraps that column in a charset converter. The converter evaluates any argument reported as constant, so it calls val_str() on the column as part of fix_fields, before a row exists and without the column in the read set. On DEBUG builds this fails the marked_for_read assertion; otherwise it reads an unread column. Consequently: When a table instance is opened, fix_fields runs with table->map already nonzero, but the fix_fields (via fix_expr) call from vcol_fix_expr did not have it nonzero; so set table->map=1 during Vcol_expr_context::init. The original Vcol_expr_context::init() (MDEV-24176) called init_lex_with_single_table, which set table->map= 1 as a side effect. A later merge of 10.2 into 10.3 (6f6c74b0d18) replaced that call with a backup of table->expr_arena, dropping the side effect. The destructor of the Vcol_expr_context will reset the map back to its original value. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PranavKTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38839: Assertion `(thd->state_flags & Open_tables_state::BACKUPS_AVAIL) || !thd->has_pending_row_events()' failed in close_thread_tables on CREATE TABLE Problem: CREATE TABLE ... SELECT ... FOR UPDATE involving a MyISAM temporary table can trigger an assertion in close_thread_tables() when binary logging is enabled in MIXED mode. Cause: MyISAM temporary tables do not support row-level locking, so FOR UPDATE acquires a write lock even for read-only access. This causes the table to be incorrectly classified as a write operation, preventing binlog_truncate_trx_cache() from running and ultimately triggering an assertion. Fix: Update decide_logging_format() to check tbl->updating and distinguish actual writes from read-only access. For read-only access to temporary non-transactional tables, mark the statement as STMT_READS_TEMP_NON_TRANS_TABLE instead of treating it as a write. This prevents incorrect write classification and avoids the assertion failure. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-33524: marked_for_read assertion with virtual column vcol.vcol_misc deadlocks under --view-protocol at the FLUSH TABLES WITH READ LOCK block. The main connection holds the global read lock. The SELECT COUNT(*) FROM t1 query becomes CREATE OR REPLACE VIEW on a separate connection, and that DDL blocks on the read lock and never returns. So the same mysqltest client never reaches unlock tables. The fix is to wrap only that one SELECT in the view_protocol guards. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alessandro Vetere
iminelink@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40210 Redundant CAS in async_flush_lsn::try_clear_if_at_most() MDEV-39600 added try_clear_if_at_most() to clear buf_flush_async_lsn with an atomic CAS that preserves a concurrent bump(). If the snapshot is already 0, compare_exchange_strong(0, 0) is a no-op, so return early on a zero snapshot and avoid the atomic read-modify-write. The page cleaner calls this on every pass, so in the common steady state (no async flush queued) it drops needless exclusive access to the m_lsn cache line. A zero value is already the cleared state and a concurrent bump() is preserved either way, so the result is identical. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-30041 don't set utf8_is_utf8mb3 by default in the old-mode | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pekka Lampio
pekka.lampio@galeracluster.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40279 Further improvements Removed unnecessary --enable/disable_query_log statements. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dmitry Shulga
dmitry.shulga@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37086 Service crashed on procedure call Extra tests were added |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40243 Fix leak and NULL-deref in mysqldump dump_all_servers() The SHOW CREATE SERVER dumping loop added by MDEV-34716 has two defects: - When "show create server <name>" fails, the function returned without freeing the outer "SELECT Server_name FROM mysql.servers" result (tableres), leaking it (Infer MEMORY_LEAK_C). - The result of that query was used without checking: "row= mysql_fetch_row(serverres); row[1]+= 14;" dereferences a NULL row (and assumes >= 2 columns). If the result is empty -- e.g. the server was dropped between the two queries, or is not visible -- mysqldump crashes. Free tableres on the error return, and validate the SHOW CREATE SERVER result (non-NULL row and at least two columns) before use, freeing both results on failure. This code path exists since MDEV-34716 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge 11.4 into 11.8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fix bundled pcre2 static link order (buildbot fulltest regression) pcre2-posix calls into pcre2-8, and as bundled static libs the linker resolves pcre2_pattern_info_8 only if pcre2-8 comes after pcre2-posix. mariadb-test-embedded links mysqlserver, which also pulls pcre2-8, so CMake de-duplicated the explicit trailing pcre2-8 and left it before pcre2-posix -> undefined reference. Declare pcre2-posix -> pcre2-8 as an interface dependency so the order is always correct (also fixes the mariadb-backup case that links only pcre2-posix). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thirunarayanan Balathandayuthapani
thiru@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38842 Server fails to drop .ibd file when vector table creation fails Problem: ======== When creating tables with vector indexes, if the secondary table creation fails after the main table is successfully created, the server was not properly cleaning up the main table's .ibd file. Stale file exists because create_table_impl() always called ddl_log_complete() on any error, which disables DDL log entries instead of executing them for cleanup. The main table would be left behind even though the overall CREATE TABLE operation failed. Solution: ========= ha_create_table(): Make it responsible for cleaning up everything it created when it returns an error. On failure of the high level index creation, drop the main table and shadow table. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-33524: marked_for_read assertion with virtual column A couple of things interact in this scenario. 1. A virtual column whose value depends on session state, such as a VCOL calling DATE_FORMAT, has fix_fields (via fix_expr) run on it again before each INSERT. For a table reused from the cache this runs in Vcol_expr_context before setup_tables sets the table map. The test first opens t1 with a SELECT that fails before setup_tables, leaving it cached with map zero. 2. When the connection character set needs conversion, CONCAT (more generally, any charset aggregation) wraps that column in a charset converter. The converter evaluates any argument reported as constant, so it calls val_str() on the column as part of fix_fields, before a row exists and without the column in the read set. On DEBUG builds this fails the marked_for_read assertion; otherwise it reads an unread column. Consequently: When a table instance is opened, fix_fields runs with table->map already nonzero, but the fix_fields (via fix_expr) call from vcol_fix_expr did not have it nonzero; so set table->map=1 during Vcol_expr_context::init. The original Vcol_expr_context::init() (MDEV-24176) called init_lex_with_single_table, which set table->map= 1 as a side effect. A later merge of 10.2 into 10.3 (6f6c74b0d18) replaced that call with a backup of table->expr_arena, dropping the side effect. The destructor of the Vcol_expr_context will reset the map back to its original value. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39829/MDEV-33532 s3.debug test failure MDEV-39516 corrected the interface with curl particularly around passing options. After this the s3.debug actually enabled curl debugging like is was meant to. With this enabled, there are addition s3_test_ pattens in the result file, from the error log where curl correctly provide debug message. ps-protocol test also failed under MDEV-33532 where a differnet number of entries was recored. Correct variations by using the $database/$table rather than just the s3_test_ pattern. As the purpose of this test is to check if s3_debug is dynamic, the second part of the test searches for a previously, under s3_debug=1, table t2 interaction, where the results should be NOT_FOUND. Remove count from the result file to allow for different curl versions and the possibiliy of being run under ps-protocol. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-16462: explain format=json produces illegal json text The attached_condition field of the produced json text had "String with illegal unicode symbol" instead of the proper unicode value. The reason is that, the item field when being written to the json writer in write_item(), used a String with charset my_charset_bin, and that prevented the string from being escaped. Solution is to change the charset to utf8mb4, and also use writer->add_escaped_str(...), instead of writer->add_str(...); |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PranavKTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dds | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Update libmariadb to 3.3 (47a31a98) Pulls the connector fix that removes the bogus stmt_fetch_to_bind length checks. Without it, connect.bson_udf/json_udf and wide decimal fetches fail with error 102 (CR_MALFORMED_PACKET) under --ps-protocol. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Remove length checks in mthd_stmt_fetch_to_bind, keep only the sentinel Commit dcd0a343 added checks that reject a row as CR_MALFORMED_PACKET based on server-declared lengths -- the field display width (field->length) and a hardcoded maximum decimal string length. Both reject valid data under --ps-protocol: - field->length is result-set metadata, unrelated to the bytes on the wire and routinely large for computed expressions and UDFs; it broke connect.bson_udf / connect.json_udf with error 102. - the decimal cap is a copy of a server-internal limit (already bumped 67 -> 83 -> 121) that goes stale whenever the server raises precision, and it guards nothing: a DECIMAL is fetched as a string and converted with bounded parsing/copies, so any in-packet length is handled safely. The sentinel (data_len > remaining packet space) is the real and only malformed-packet guard the row data needs. Remove both checks, the now unused MAX_ZEROFILL_LEN / MAX_DECIMAL_LEN, and the test case that asserted the removed display-length behaviour. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge 10.11 into 11.4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-16462: explain format=json produces illegal json text The attached_condition field of the produced json text had "String with illegal unicode symbol" instead of the proper unicode value. The reason is that, the item field when being written to the json writer in write_item(), used a String with charset my_charset_bin, and that prevented the string from being escaped. Solution is to change the charset to utf8mb4, and also use writer->add_escaped_str(...), instead of writer->add_str(...); |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
spelling correction: support-files/wsrep.cnf.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39558 Check resulting VECTOR length in type aggregation inference VECTOR, as a subtype of VARCHAR, has max length 65532, i.e. maximum dimension of 16383. BLOB/MEDIUMBLOB/LONGBLOB (and corresponding TEXT types) each has length exceeding 65532. Therefore, when aggregating VECTOR with one of these BLOB/TEXT types, the aggregated type has length exceeding the max length of VECTOR, which should result in an error. To that end, in this patch we add checks on the resulting vector length during type aggregation inference |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rucha Deodhar
rucha.deodhar@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-32726: Fix failing test for freebsd for json (10.6 backport) Json test about max statement time fails with freebsd because on some architectures the test might execute faster and the statement may not fail. To simulate failure regardless of architecture, introduce a wait of seconds longer than the max_statement_time. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
CREATE SERVER: fix option parsing to support backticks properly CREATE SERVER used to: * support arbitrary options in backticks and not in backticks * hard-coded historical options worked *only* without backticks * PORT range was different when given as a number or a string all that is fixed, unused keywords are removed |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-28404 JSON functions don't respect KILL QUERY Or max_statement_time limit or MAX_DEPTH. Correct interuptability and depth checking of: * JSON_CONTAINS * JSON_CONTAINS_PATH * JSON_EXISTS * JSON_EXTRACT * JSON_KEYS * ST_GeomFromGeoJSON Populate in the json library the killed as a specific error message. As the json library has a killed_ptr is approprate it handles it. As json_report_error now processes the killed there's no need of thd->check_killed(). Verified that the path after every json_scan_next, the location of checking the killed_ptr, reports errors correctly. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-29542: enable --view-protocol on set_password test By using the case correct User,Host,Password from the mysql.user view. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alessandro Vetere
iminelink@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40128 Use per-cell latch in lock_move_reorganize_page() lock_move_reorganize_page() was acquiring lock_sys.latch in exclusive mode (via LockMutexGuard) for the entire body of phase 2 (lock chain iteration, bitmap reset, and lock_rec_add_to_queue() calls). The function however only touches record locks belonging to a single page, which all live in a single lock_sys.rec_hash cell. Holding that cell latch in exclusive mode via LockGuard is sufficient: - The cell latch protects the cell's lock chain and the bitmaps of the lock_t objects in it (lock_rec_bitmap_reset and the new bit set by lock_rec_add_to_queue()). - It also protects lock->type_mode, including the LOCK_WAIT bit. The canonical clear in lock_reset_lock_and_trx_wait() runs under the cell latch, and lock_grant() invokes it before taking trx->mutex, so the bit is cell-latch state rather than trx->mutex state. Phase 1 only clears the bit and leaves trx->lock.wait_lock intact; the copy in old_locks keeps LOCK_WAIT and phase 2 re-adds the lock with it, so the wait relationship (guarded by lock_sys.wait_mutex) is preserved across the move. Neither trx->mutex nor wait_mutex is required here. - Each owning trx's mutex is acquired per-iteration to protect that trx's trx_locks list and lock_heap during lock_rec_add_to_queue(). The global exclusive latch was over-strong: it blocked every concurrent lock_sys.rd_lock() acquirer in lock_rec_lock() and lock_table() server-wide for the duration of the reorganize, contributing disproportionately to the lock_sys.latch convoy under heavy concurrency. The TMLockGuard fast-path empty check at the top of the function is preserved; for cells with no locks the cost is still just a TSX-elided read. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40313 mariadb client creates `.mariadb_histor` instead of `.mariadb_history` `histfile_size` in `client/mysql.cc` is calculated using the string "/.mysql_history" (15 chars) rather than "/.mariadb_history" (17 chars). Because the buffer is only allocated to that shorter length, the resulting filename is truncated by 2 characters. Thanks David Lu for the bug report and diagnosis. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-33524: marked_for_read assertion with virtual column vcol.vcol_misc deadlocks under --view-protocol at the FLUSH TABLES WITH READ LOCK block. The main connection holds the global read lock. The SELECT COUNT(*) FROM t1 query becomes CREATE OR REPLACE VIEW on a separate connection, and that DDL blocks on the read lock and never returns. So the same mysqltest client never reaches unlock tables. The fix is to wrap only that one SELECT in the view_protocol guards. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-30518: JSON functions cannot be killed on big-endian (backport) Backport to 10.6 without JSON_OVERLAPS The json_engine killed_ptr was of type uchar however the enum in the server is dependant on the architecture. On big-endian architectures like IBM Z, retreiving a uchar* retreived the unmodifed part of the THD->kill enum location and was always 0. As C++11 allows enums to inherit a type, used uint32_t as the base class of killed_state type in the server and used uint32_t in the json library. reload_acl_and_cache required an expression change to avoid the compile error: sql/sql_reload.cc:472:24: error: enumerated and non-enumerated type in conditional expression [-Werror=enum-conversion] 472 | return result || (thd ? thd->killed : 0); Added the kill_ptr assignment the following functions can be killed: * Item_func_json_depth::val_int * Item_func_json_type::val_str * Item_func_json_length::val_int Item_func_json_array_append::val_str, check_killed() only applied to json_error: label and not return_null. Item_func_json_format::val_str(), corresponding to the SQL, json_compact, json_detailed, json_loose - add debug instrumentation for the func_json_notembedded test. MDEV-26726 (fcd345de485f) added a json_pause_execution sync point however the test case used debug_max_statement_time, which doesn't exist. Fix the sync point name in the test. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||