- 02 Aug, 2022 4 commits
-
-
Jan Lindström authored
sets mysys_var pointer to NULL, so the next THD::THD will crash. Removed my_thread_init()/end() pairs and because Wsrep_allowlist_service::allowlist_cb is not always called from a new thread added a thread to do so. Fix co-authored by Sergei Golubchik <serg@mariadb.org> and mkaruza <mario.karuza@galeracluster.com> Reviewed-by:
Jan Lindström <jan.lindstrom@mariadb.com>
-
Jan Lindström authored
-
mkaruza authored
MDEV-27263 Cluster bootstrap node shows duplicate wsrep allowlist IP warning messages on each restart. We should clear `wsrep_allowlist` table on bootstrap before writing to it. Reviewed-by:
Jan Lindström <jan.lindstrom@mariadb.com>
-
mkaruza authored
MDEV-27246 Implement a method to add IPs to allowlist for Galera Cluster node addresses that can make SST/IST requests Reviewed-by:
Jan Lindström <jan.lindstrom@mariadb.com>
-
- 31 Jul, 2022 9 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Daniel Black authored
-
Sergei Golubchik authored
don't error out on values out of range, return NULL (as in, e.g. sqrt(-1))
-
Daniel Black authored
Bring the 5 warnings of select random_bytes(cast('x' as unsigned)+1); back to two. 1 for Item_func_random_bytes::fix_length_and_dec and one from Item_func_random_bytes::val_str. The warnings are from args[0]->val_int().
-
Daniel Black authored
Setting max_length to a negative value in Item_func_random_bytes::fix_length_and_dec underflowed resulting in debug optimizer assertion. Also set the maximium to 1024 rather than MAX_BLOB_WIDTH because we aren't going to return more than that.
-
Daniel Black authored
Mark the RANDOM_BYTES function as uncacheable.
-
Daniel Black authored
-
Vanislavsky authored
MySQL 5.6 added the RANDOM_BYTES function. https://dev.mysql.com/doc/refman/5.6/en/encryption-functions.html#function_random-bytes This is needed for compatibility purposes.
-
- 30 Jul, 2022 2 commits
-
-
Marko Mäkelä authored
This was missed in 5ab5ff08
-
Marko Mäkelä authored
-
- 28 Jul, 2022 7 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
but without server cert verification
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 27 Jul, 2022 10 commits
-
-
Sergei Golubchik authored
it is designed for no-ssl builds, since 5.5 it's only embedded
-
Sergei Golubchik authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Starting with commit da094188 (MDEV-24393), MariaDB will no longer acquire advisory file locks on InnoDB data files by default, because it would create a large number of entries in Linux /proc/locks. The motivation for acquiring the file locks is to prevent accidental concurrent startup of multiple server processes on the same data files. Such mistake still turns out to be relatively common, based on corruption bug reports from the community. To prevent corruption due to concurrent startup attempts, the Aria storage engine would unconditionally acquire an advisory lock on one of its log files. Solution: InnoDB will always lock its system tablespace files. (Ever since commit 685d958e the InnoDB log file will not necessarily be open while the server is running, because it can be accessed via memory-mapped I/O.) If more protection is desired, then the option --external-locking can be used. The mandatory advisory lock also fixes intermittent failures of some crash recovery tests. It turns out that when the mtr test harness kills and restarts the server, it will not actually ensure that the old process has terminated before starting the new one.
-
Oleksandr Byelkin authored
-
Marko Mäkelä authored
After reverting commit commit 39f45f6f all combinations of this test would crash the server.
-
Igor Babaev authored
This bug could cause a crash of the server when executing queries containing ANY/ALL predicands with redundant subqueries in GROUP BY clauses. These subqueries are eliminated by remove_redundant_subquery_clause() together with elimination of GROUP BY list containing these subqueries. However the references to the elements of the GROUP BY remained in the JOIN::all_fields list of the right operand of of the ALL/ANY predicand. Later these references confused make_aggr_tables_info() when forming proper execution structures after ALL/ANY predicands had been replaced with expressions containing MIN/MAX set functions. The patch just removes these references from JOIN::all_fields list used by the subquery of the ALL/ANY predicand when its GROUP BY clause is eliminated. Approved by Oleksandr Byelkin <sanja@mariadb.com>
-
- 26 Jul, 2022 8 commits
-
-
Brandon Nesterenko authored
New Feature: ======== This feature adds a safe replacement to the MASTER_USE_GTID=Current_Pos option for CHANGE MASTER TO as MASTER_DEMOTE_TO_SLAVE=<bool>. The use case of Current_Pos is to transition a master to become a slave; however, can break replication state if the slave executes local transactions due to actively updating gtid_current_pos with gtid_binlog_pos and gtid_slave_pos. MASTER_DEMOTE_TO_SLAVE changes this use case by forcing users to set Using_Gtid=Slave_Pos and merging gtid_binlog_pos into gtid_slave_pos once at CHANGE MASTER TO time. Note that if gtid_slave_pos is more recent than gtid_binlog_pos (as in the case of chain replication), the replication state should be preserved. Additionally, deprecate the `Current_Pos` option of MASTER_USE_GTID to suggest the safe alternative option MASTER_DEMOTE_TO_SLAVE=TRUE. Reviewed By: ============ Andrei Elkin <andrei.elkin@mariadb.com>
-
Brandon Nesterenko authored
MDEV-19801: Change defaults for CHANGE MASTER TO so that GTID-based replication is used by default if master supports it This commit makes replicas crash-safe by default by changing the Using_Gtid value to be Slave_Pos on a fresh slave start and after RESET SLAVE is issued. If the primary server does not support GTIDs (i.e., version < 10), the replica will fall back to Using_Gtid=No on slave start and after RESET SLAVE. The following additional informational messages/warnings are added: 1. When Using_Gtid is automatically changed. That is, if RESET SLAVE reverts Using_Gtid back to Slave_Pos, or Using_Gtid is inferred to No from a CHANGE MASTER TO given with log coordinates without MASTER_USE_GTID. 2. If options are ignored in CHANGE MASTER TO. If CHANGE MASTER TO is given with log coordinates, yet also specifies MASTER_USE_GTID=Slave_Pos, a warning message is given that the log coordinate options are ignored. Additionally, an MTR macro has been added for RESET SLAVE, reset_slave.inc, which provides modes/options for resetting a slave in log coordinate or gtid modes. When in log coordinates mode, the macro will execute CHANGE MASTER TO MASTER_USE_GTID=No after the RESET SLAVE command. When in GTID mode, an extra parameter, reset_slave_keep_gtid_state, can be set to reset or preserve the value of gtid_slave_pos. Reviewed By: =========== Andrei Elkin <andrei.elkin@mariadb.com>
-
Sergei Petrunia authored
Part #2: Extend heuristic pruning to use multiple tables as the "Model tables". Before the patch, heuristic pruning uses only one "Model table": The table which had the best cost AND record became the "Model table". After that, if a table's cost and record were both worse than those of the Model Table, the table would be pruned away. This didn't work well when the first table (the optimizer sorts them by record_count) had low record_count but relatively high cost: nothing could be pruned afterwards. The patch adds the two additional "Model tables": one with the least cost and the other with the least record_count. (In both cases, a table can be pruned away if BOTH its cost and record_count are worse than those of a Model table) The new pruning is active when the number of tables to consider for the prefix is higher than @@optimizer_extra_pruning_depth. One can see the new pruning in the Optimizer Trace as - "pruned_by_heuristic":"min_record_count", or - "pruned_by_heuristic":"min_read_time". Old heuristic pruning shows as "pruned_by_heuristic":1.
-
Oleg Smirnov authored
Dep_analysis_context::create_unique_pseudo_key_if_needed() was using std::set which allocated memory outside MEM_ROOT and so required explicit deallocation. This has been solved by replacing std::set with MY_BITMAP which is allocated on MEM_ROOT
-
Oleg Smirnov authored
SELECT_LEX::first_select()->join is NULL for degenerate derived tables which are known to have just one row and so were already materialized by the optimizer. This commit adds a check for this.
-
Oleg Smirnov authored
Elimination of unnecessary tables from SQL queries is already present in MariaDB. But it only works for regular tables and not for derived ones. Imagine we have a view: CREATE VIEW v1 AS SELECT a, b, max(c) AS maxc FROM t1 GROUP BY a, b Due to "GROUP BY a, b" the values of combinations {a, b} are unique, and this fact can be treated as like derived table "v1" has a unique key on fields {a, b}. Suppose we have a SQL query: SELECT t2.* FROM t2 LEFT JOIN v1 ON t2.a=v1.a and t2.b=v1.b 1. Since {v1.a, v1.b} is unique and both these fields are bound to t2, "v1" is functionally dependent on t2. This means every record of "t2" will be either joined with a single record of "v1" or NULL-complemented. 2. No fields of "v1" are present on the SELECT list These two facts allow the server to completely exclude (eliminate) the derived table "v1" from the query.
-
Monty authored
Replaced Cost_estimate prefix_cost with a double as prefix_cost was only used to store and retrive total prefix cost. This also speeds up things (a bit) as don't have to call Cost_estimate::total_cost() for every access to the prefix_cost. Sizeof POSITION decreased from 304 to 256.
-
Monty authored
This helps a lot when trying to find out why a table combination was pruned
-