- 04 Jul, 2023 1 commit
-
-
Yuchen Pei authored
The error code is non-deterministic, presumably due to some race condition from the SLEEP statement above. The correct error should be 12701 ER_SPIDER_REMOTE_SERVER_GONE_AWAY_NUM as it is the last failure. Nevertheless, this contrived test is needed to cover the error reporting when setting lock wait timeout, until we find a better test case and/or fixing the non-deterministic error reporting (MDEV-31586)
-
- 02 Jul, 2023 2 commits
-
-
Trevor Gross authored
Allocate a temporary buffer instead of using the same buffer in some cases, and add assertions to verify the buffers do not overlap. See [1] for reasonsing. [1] https://github.com/MariaDB/server/pull/2438#discussion_r1137403645Signed-off-by:
Trevor Gross <tmgross@umich.edu>
-
Trevor Gross authored
This patch ensures that all direct and indirect calls to encryption_crypt provide a `dlen` value correctly initialized to the destination buffer length, allowing encryption plugins to verify available space. It also adds assertions to verify related invariants. Signed-off-by:
Trevor Gross <tmgross@umich.edu>
-
- 28 Jun, 2023 2 commits
-
-
Marko Mäkelä authored
-
Yuchen Pei authored
When setting the server lockwait timeout, spider should do some basic checks first, like whether the remote server is still reachable. So instead of directly calling spider_db_mbase::exec_query(), it should call spider_db_query(). The reset of the lock wait timeout does not need to do such checks, because they happen after the successfully setting the lock wait timeout, implying the checks have been passed already.
-
- 27 Jun, 2023 5 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
recv_sys_t::parse(): For undo tablespace truncation mini-transactions, remember the start_lsn instead of the end LSN. This is what we expect after commit 461402a5 (MDEV-30479).
-
- 26 Jun, 2023 3 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Rucha Deodhar authored
mysql.proc. The table is probably corrupted" Analysis: When mysql_upgrade runs statements for upgrade, characterset is converted to utf8mb4 because server starts with old_mode that interprets utf8 to utf8mb4, but mysql.proc table has "utf8mb3" as hardcoded, so it crashes with corrupted table. Fix: Changed Table_check_intact::check() definition to allow both utf8mb3 and utf8mb4 by checking prefix and changing the upgrade scripts to explicitly use utf8mb3
-
- 25 Jun, 2023 9 commits
-
-
Monty authored
-
Monty authored
This is mainly done to be able to push to 11.0 The test is moved in 10.6 to another file, which will add back the test.
-
Michael Widenius authored
MDEV-29253 Detect incompatible MySQL partition scheme and either convert them or report to user and in error log. This task is about converting in place MySQL 5.6 and 5.7 partition tables to MariaDB as part of mariadb-upgrade. - Update TABLE_SHARE::init_from_binary_frm_image() to be able to read MySQL frm files with partitions. - Create .par file, if it do not exists, on open of partitioned table. Executing mariadb-upgrade will create all the missing .par files. The MySQL .frm file will be changed to MariaDB format after next ALTER TABLE. Other changes: - If we are using stored mysql_version to distingush between MySQL and MariaDB .frm file information, do not upgrade mysql_version in the .frm file as part of CHECK TABLE .. FOR UPGRADE as this would cause problems next time we parse the .frm file.
-
Monty authored
- Moved view checks after privilege tables are fixed. This is to avoid warnings about wrongly defined mysql.proc when checking views. - Don't use stat tables before they have been fixed. - Don't run mysql_fix_view() if 'FOR MYSQL' is used if the view is already a MariaDB view. - Added 'FOR UPGRADE' as an option for 'REPAIR VIEW' to be able to detect if the REPAIR command comes from mariadb_upgrade. In this case we get a warning, instead of an error, if a definer of a view does not exists.
-
Vicentiu Ciorbaru authored
In this case, one would end up calling my_error(ER_BAD_DB_ERROR, ...) with a null ptr for DB, which caused a NULL ptr dereference.
-
Vicentiu Ciorbaru authored
-
Vicentiu Ciorbaru authored
The original code generated a warning in gcc 13.1
-
Monty authored
-
Monty authored
-
- 21 Jun, 2023 3 commits
-
-
Brandon Nesterenko authored
When opening and locking tables, if triggers will be invoked in a separate database, thd->set_db() is invoked, thus freeeing the memory and headers which thd->db had previously pointed to. In row based replication, the event execution logic initializes thd->db to point to the database which the event targets, which is owned by the corresponding table share (introduced in d9898c9a for MDEV-7409). The problem then, is that during the table opening and locking process for a row event, memory which belongs to the table share would be freed, which is not valid. This patch replaces the thd->reset_db() calls to thd->set_db(), which copies-by-value, rather than by reference. Then when the memory is freed, our copy of memory is freed, rather than memory which belongs to a table share. Notes: 1. The call to change thd->db now happens on a higher-level, in Rows_log_event::do_apply_event() rather than ::do_exec_row(), in the call stack. This is because do_exec_row() is called within a loop, and each invocation would redundantly set and unset the db to the same value. 2. thd->set_db() is only used if triggers are to be invoked, as there is no vulnerability in the non-trigger case, and copying memory would be an unnecessary inefficiency. Reviewed By: ============ Andrei Elkin <andrei.elkin@mariadb.com>
-
Monty authored
The reason for the crash wad that 'best splitting' optimization predicted less rows to be found than what opt_range did. This code in apply_selectivity_for_table(), when using use_cond_selectivity=1, was not prepared for this case which caused an assert in debug builds. Production builds is not affected. The fix is to choose the smaller of the two row counts. It will have a minimum on costs when using use_cond_selectivity=1 and should not cause any problems in production.
-
Monty authored
MDEV-31445 Server crashes in ha_partition::index_blocks / cost_for_index_read The crash happened in the case where partition pruning finds 0 partitions.
-
- 20 Jun, 2023 1 commit
-
-
Sergei Petrunia authored
-
- 19 Jun, 2023 1 commit
-
-
Meng-Hsiu Chiang authored
-Wdeprecated-declarations: Replace deprecated xmlXPathInit() with xmlInitParser()[1] -Wmaybe-uninitialized: `fil1` was initialized to 0 in commit 0138220f to fix compiler warnings, but `fil2` was missed. ref: [1]: https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-xpath.html#xmlXPathInit
-
- 18 Jun, 2023 1 commit
-
-
Monty authored
It could cause wrong range estimation for GROUP BY queries that are using 'WHERE index_part >= constant'. (The function was trying to check for 'index_part = constant') Reporter: Yuty Chaikou
-
- 16 Jun, 2023 1 commit
-
-
Thirunarayanan Balathandayuthapani authored
- InnoDB shouldn't acquire the tablespace when it is being stopped or closed
-
- 15 Jun, 2023 1 commit
-
-
Sergei Petrunia authored
Fix a typo in make_join_statistics(): when updating statistics for derived table, set s->table->... not "table->..."
-
- 14 Jun, 2023 1 commit
-
-
Sergei Petrunia authored
(Same as TODO-3938: best_access_path shows negative costs for mrr=on) best_access_path() assumes that quick select cost includes (quick->rows/TIME_FOR_COMPARE) as a cost of checking the attached part of the WHERE condition. It calls adjust_quick_cost() to subtract addition from quick's cost. The problem was that DS-MRR cost formula didn't include this cost. For very large tables, adjust_quick_cost() would produce a negative cost which would cause assert in debug build or bad query plan choice in release builds. Approved-by:
Monty <monty@mariadb.org>
-
- 13 Jun, 2023 2 commits
-
-
Monty authored
The effect was that that ROOT_FLAG_THREAD_SPECIFIC was cleared and the memory allocated by memroot would be contributed the the system, not to the thread. This exposed a bug in how "show explain for ..." allocated data. - The thread that did provide the explain allocated data in the "show explain" threads mem_root, which is marked as THREAD_SPECIFIC. - Fixed by allocating the explain data in a temporary explain_mem_root which is not THREAD_SPECIFIC. Other things: - Added extra checks when using update_malloc_size() - Do not call update_malloc_size() for memory not registered with update_malloc_size(). This avoid some wrong 'memory not freed' reports. - Added a checking of 'thd->killed' to ensure that main.truncate_notembedded.test still works. Reported by: Yury Chaikou
-
Monty authored
-
- 12 Jun, 2023 1 commit
-
-
Monty authored
-
- 10 Jun, 2023 1 commit
-
-
Monty authored
-
- 09 Jun, 2023 2 commits
-
-
Thirunarayanan Balathandayuthapani authored
After further I/O on a tablespace has been stopped (for example due to DROP TABLE or an operation that rebuilds a table), page cleaner thread tries to flush the pending writes for the tablespace and releases the tablespace reference even though it was not acquired. fil_space_t::flush(): Don't release the tablespace when it is being stopped and closed Thanks to Marko Mäkelä for suggesting this patch.
-
Tuukka Pasanen authored
Commit fixes Debian SySV-init script fail: /etc/init.d/mariadb: line 90: [: : integer expression expected which happens if datadir is not changed in configuration which makes it invisible when printing MariaDB config defaults. Commit makes sure that there is some value if nothing else if in hand use default /usr/lib/mysql or fail with correct error message if directory is not present
-
- 08 Jun, 2023 3 commits
-
-
Monty authored
-
Monty authored
- Remove -Wimplicit-fallthrough=2 for gcc versions < 6 - Don't do git submodule update one fresh git clones This fixes an issue when using git 1.0 that gives errors on empty submodule directories
-
Thirunarayanan Balathandayuthapani authored
- InnoDB throws ASAN error while adding the index on virtual column of system versioned table. InnoDB wrongly assumes that virtual column collation type changes, creates new column with different character set. This leads to failure while detaching the column from indexes.
-