- 02 May, 2023 1 commit
-
-
sara authored
changed tast case 2 to be deterministic Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
-
- 29 Apr, 2023 2 commits
-
-
Alexander Barkov authored
Adding virtual methods to class Schema: make_item_func_replace() make_item_func_substr() make_item_func_trim() This is a non-functional preparatory change for MDEV-27744.
-
Alexander Barkov authored
-
- 28 Apr, 2023 4 commits
-
-
Angelique authored
The fix was introduced, along with re-ordering to do other macros that check test environment capabilities before master/slave is set up.
-
Sergei Petrunia authored
Variant #2. When Histogram::point_selectivity() sees that the point value of interest falls into one bucket, it tries to guess whether the bucket has many different (unpopular) values or a few popular values. (The number of rows is fixed, as it's a Height-balanced histogram). The basis for this guess is the "width" of the value range the bucket covers. Buckets covering wider value ranges are assumed to contain values with proportionally lower frequencies. This is just a [brave] guesswork. For a very narrow bucket, it may produce an estimate that's larger than total #rows in the bucket or even in the whole table. Remove the guesswork and replace it with basic logic: return either the per-table average selectivity of col=const, or selectivity of one bucket, whichever is lower.
-
Sergei Golubchik authored
exclude generated columns from the "has default value" check
-
Oleg Smirnov authored
MDEV-31113 Server crashes in store_length / Type_handler_string_result::make_sort_key with DISTINCT and group function Fix-up for commit 476b24d0 Author: Monty Date: Thu Feb 16 14:19:33 2023 +0200 MDEV-20057 Distinct SUM on CROSS JOIN and grouped returns wrong result which misses initializing of sorder->suffix_length. In this commit the initialization is implemented by passing MY_ZEROFILL flag to the allocation of SORT_FIELD elements
-
- 27 Apr, 2023 2 commits
-
-
Sergei Golubchik authored
FreeBSD 13.2
-
Oleksandr Byelkin authored
-
- 26 Apr, 2023 5 commits
-
-
Oleksandr Byelkin authored
Keep Item_in_optimizer cache always (but only once) in statement memory.
-
Oleksandr Byelkin authored
Fix leack in TABLE_SHARE::init_from_sql_statement_string by removing uneeded switching arenas.
-
Oleksandr Byelkin authored
Fix leack in Item_subselect::mark_as_dependent (allocation of temporary list in statement memory inctroduced in f4d55210 )
-
Sergei Golubchik authored
followup for d1a46c68
-
Sergei Golubchik authored
remove ancient hard-coded treatment of --core-file. This enables normal my_getopt behavior for the already existing sysvar
-
- 25 Apr, 2023 2 commits
-
-
Andrei authored
The error was seen by a number of mtr tests being caused by overdue initialization of rpl_parallel::LOCK_parallel_entry. Specifically, SHOW-SLAVE-STATUS might find in rpl_parallel::workers_idle() a gtid domain hash entry already inserted whose mutex had not done mysql_mutex_init(). Fixed with swapping the mutex init and the its entry's stack insertion. Tested with a generous number of `mtr --repeat` of a few of the reported to fail tests, incl rpl.parallel_backup.
-
Sergei Petrunia authored
Timers require my_timer_init() call. It was made only in mysqld_main(). Call it also from init_embedded_server().
-
- 24 Apr, 2023 5 commits
-
-
Brandon Nesterenko authored
When replicating MDL events for a table that uses system versioning without primary keys, ensure that for data sets with duplicate records, the updates to these records with duplicates are enacted on the correct row. That is, there was a bug (reported in MDEV-30430) such that the function to find the row to update would stop after finding the first matching record. However, in the absence of primary keys, the version of the record is needed to compare the row to ensure we are updating the correct one. The fix, therefore, updates the record comparison functionality to use system version columns when there are no primary keys on the table. Reviewed By: ============ Andrei Elkin <andrei.elkin@mariadb.com>
-
Brandon Nesterenko authored
Removed trailing whitespaces
-
Brandon Nesterenko authored
Problem: ======== A master can segfault if it can't set up decryption for its binary log during a binlog dump with Using_Gtid=Slave_Pos. If slave connects using GTID mode, the master will call into log.cc::get_gtid_list_event(), which iterate through binlog events looking for a Gtid_list_log_event. On an encrypted binlog that the master cannot decrypt, the first event will be a START_ENCRYPTION_EVENT which will call into the following decryption branch if (fdle->start_decryption((Start_encryption_log_event*) ev)) errormsg= ‘Could not set up decryption for binlog.’; The event iteration however, does not stop in spite of this error. The master will try to read the next event, but segfault while trying to decrypt it because decryption failed to initialize. Solution: ======== Break the event iteration if decryption cannot be set up. Reviewed By: ============ Andrei Elkin <andrei.elkin@mariadb.com>
-
Igor Babaev authored
This bug could manifest itself at the first execution of prepared statement created for queries using a materialized view defined as union. A crash could happen for sure if the query contained a condition pushable into the view and this condition was over the column defined via a complex string expression requiring implicit conversion from one charset to another for some of its sub-expressions. The bug could cause crashes when executing PS for some other queries whose optimization needed building clones for such expressions. This bug was introduced in the patch for MDEV-29988 where the class Item_direct_ref_to_item was added. The implementations of the virtual methods get_copy() and build_clone() were invalid for the class and this could cause crashes after the method build_clone() was called for expressions containing objects of the Item_direct_ref_to_item type. Approved by Sergei Golubchik <serg@mariadb.com>
-
Alexander Barkov authored
Fixing buildbot failures on mariabackup.aria_log_dir_path_rel. The problem was that directory_exists() was called with the relative aria_log_dir_path value, while the current directory in mariadb-backup is not necessarily equal to datadir when MTR is running. Fix: - Moving building the absolute path un level upper: from the function copy_back_aria_logs() to the function copy_back(). - Passing the built absolute path to both directory_exists() and copy_back_aria_logs() as a parameter.
-
- 22 Apr, 2023 1 commit
-
-
Igor Babaev authored
This bug caused server crash when processing a multi-update statement that used views if optimizer tracing was enabled. The bug was introduced in the patch for MDEV-30539 that could incorrectly detect the most top level selects of queries if views were used in them. Approved by Oleksandr Byelkin <sanja@mariadb.com>
-
- 21 Apr, 2023 3 commits
-
-
Alexander Barkov authored
- `mariadb-backup --backup` was fixed to fetch the value of the @@aria_log_dir_path server variable and copy aria_log* files from @@aria_log_dir_path directory to the backup directory. Absolute and relative (to --datadir) paths are supported. Before this change aria_log* files were copied to the backup only if they were in the default location in @@datadir. - `mariadb-backup --copy-back` now understands a new my.cnf and command line parameter --aria-log-dir-path. `mariadb-backup --copy-back` in the main loop in copy_back() (when copying back from the backup directory to --datadir) was fixed to ignore all aria_log* files. A new function copy_back_aria_logs() was added. It consists of a separate loop copying back aria_log* files from the backup directory to the directory specified in --aria-log-dir-path. Absolute and relative (to --datadir) paths are supported. If --aria-log-dir-path is not specified, aria_log* files are copied to --datadir by default. - The function is_absolute_path() was fixed to understand MTR style paths on Windows with forward slashes, e.g. --aria-log-dir-path=D:/Buildbot/amd64-windows/build/mysql-test/var/...
-
Daniel Black authored
fp->field_length was unsigned and therefore the negative condition around it. Backport of cc182aca fixes it, however to correct the consistent use of types pcf->Length needs to be unsigned too. At one point pcf->Precision is assigned from pcf->Length so that's also unsigned. GetTypeSize is assigned to length and has a length argument. A -1 default value seemed dangerious to case, so at least 0 should assert if every hit.
-
Oleksandr Byelkin authored
-
- 20 Apr, 2023 1 commit
-
-
Mikhail Chalov authored
Similar to 567b6812 continue to replace use of strcat() and strcpy() with safer options strncat() and strncpy(). All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services
-
- 19 Apr, 2023 5 commits
-
-
Marko Mäkelä authored
do_shutdown_server(): After sending SIGKILL, invoke wait_until_dead(). Thanks to Sergei Golubchik for pointing out that the previous fix does not actually work.
-
Thirunarayanan Balathandayuthapani authored
- Change buffer should not buffer the changes for uncommitted index
-
Thirunarayanan Balathandayuthapani authored
stored externally row_merge_buf_add(): Has strict assert that fixed length mismatch shouldn't happen while rebuilding the redundant row format table btr_index_rec_validate(): Fixed size column can be stored externally. So sum of inline stored length and external stored length of the column should be equal to total column length
-
Thirunarayanan Balathandayuthapani authored
This issue happens when race condition happens when DDL and fts optimize thread. DDL adds the new index to fts cache. At the same time, fts optimize thread clears the cache and reinitialize it. Take cache init lock before reinitializing the cache. fts_sync_commit() should take dict_sys mutex to avoid the deadlock with create index.
-
Marko Mäkelä authored
do_shutdown_server(): Call wait_until_dead() also when we are forcibly killing the process (timeout=0). We have evidence that killing the process may take some time and cause mystery failures in crash recovery tests. For InnoDB, several failures were observed between commit da094188 and commit 0ee1082b when no advisory file locking was being used by default.
-
- 18 Apr, 2023 2 commits
-
-
Daniele Sciascia authored
Assertion `thd->mdl_context.is_lock_owner()` fires when a client is disconnected, while transaction and and a table is opened through `HANDLER` interface. Reason for the assertion is that when a connection closes, its ongoing transaction is eventually rolled back in `Wsrep_client_state::bf_rollback()`. This method also releases explicit which are expected to survive beyond the transaction lifetime. This patch also removes calls to `mysql_ull_cleanup()`. User level locks are not supported in combination with Galera, making these calls unnecessary.
-
Daniele Sciascia authored
CREATE TABLE AS SELECT is not supported in combination with streaming replication.
-
- 17 Apr, 2023 1 commit
-
-
Florian Weimer authored
The glibc headers declare fallocate only if _GNU_SOURCE is defined. Without this change, the probe fails with C compilers which do not support implicit function declarations even if the system does in fact support the fallocate function. Upstream rocksdb does not need this because the probe is run with the C++ compiler, and current g++ versions define _GNU_SOURCE automatically.
-
- 13 Apr, 2023 2 commits
-
-
Daniel Black authored
Corrections from 1e58b8af. * Re-add #pragma alloca for AIX - now in my_alloca.h
-
Julius Goryavsky authored
This commit adds a new 'no-sni' option to socat which is required to properly authenticate with newer socat versions (after version 1.7.4+). This option is needed to disable the automatic use of the SNI feature (Server Name Indication) since the SST script directly specifies the commonname if necessary and automatic activation of the SNI feature is unnecessary in such scenarios.
-
- 12 Apr, 2023 2 commits
-
-
Igor Babaev authored
This bug could affect multi-update statements as well as single-table update statements processed as multi-updates when the where condition contained a range condition over a non-indexed varchar column. The optimizer calculates selectivity of such range conditions using histograms. For each range the buckets containing endpoints of the the range are determined with a procedure that stores the values of the endpoints in the space of the record buffer where values of the columns are usually stored. For a range over a varchar column the value of a endpoint may exceed the size of the buffer and in such case the value is stored with truncation. This truncations cannot affect the result of the calculation of the range selectivity as the calculation employes only the beginning of the value string. However it can trigger generation of an unexpected error on this truncation if an update statement is processed. This patch prohibits truncation messages when selectivity of a range condition is calculated for a non-indexed column. Approved by Oleksandr Byelkin <sanja@mariadb.com>
-
Alexander Barkov authored
This is a non-functional change. simplifying the code logic: - removing global variables ds_data and ds_meta - passing these variables as parameters to functions instead - adding helper classes: Datasink_free_list and Backup_datasinks - moving some function accepting a ds_ctxt parameter as methods to ds_ctxt.
-
- 11 Apr, 2023 1 commit
-
-
Jan Lindström authored
If we are inside stored function or trigger we should not commit or rollback current statement transaction. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
-
- 10 Apr, 2023 1 commit
-
-
lilinjie authored
Signed-off-by: lilinjie <1136268146@qq.com>
-