summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-25440: Indexed CHAR columns are broken with NO_PAD collationsbb-10.4-MDEV-25440Marko Mäkelä2022-01-213-102/+75
| | | | | | | | | | | | | | | | | | | | cmp_data(): Compare different-length CHAR fields with the new strnncollsp_nchars function that will pad spaces if needed. Any InnoDB ROW_FORMAT except the original one that was named ROW_FORMAT=REDUNDANT in MySQL 5.0.3 will internally store CHAR(n) columns as variable-length if the character encoding is variable length. Spaces may be trimmed from the end. For NOT NULL values, the minimum length is always n*mbminlen. In cmp_data() we only know the lengths in bytes and we cannot easily know the ROW_FORMAT. is_strnncoll_compatible(): Refactored from innobase_mysql_cmp(). innobase_mysql_cmp(): Merged to cmp_whole_field(). cmp_whole_field(): Invoke strnncollsp_nchars for the DATA_MYSQL (the CHAR type with any other collation than latin1_swedish_ci).
* Cleanup: Simplify cmp_geometry_field() and cmp_whole_field()Marko Mäkelä2022-01-211-11/+4
| | | | Let us always compare DATA_GEOMETRY with cmp_geometry_field().
* MDEV-25904 New collation functions to compare InnoDB style trimmed NO PAD ↵bb-10.4-bar-MDEV-25904Alexander Barkov2022-01-2125-144/+1150
| | | | strings
* Fixed test case for MDEV-25830Monty2022-01-202-15/+9
|
* MDEV-27552 Change the return type of my_uca_context_weight_find() to ↵bb-10.4-bar-MDEV-27552Alexander Barkov2022-01-202-28/+30
| | | | MY_CONTRACTION*
* MDEV-25830 optimizer_use_condition_selectivity=4 sometimes produces worse ↵Monty2022-01-195-24/+207
| | | | | | | | | | | | plan than optimizer_use_condition_selectivity=1 The issue was that calc_cond_selectivity_for_table prefered ranges with many parts and when deciding on which selectivity to use. Fixed by going through ranges according to the number of rows in the range. This ensures that selectivity from ranges with few rows will be prefered over ranges with many rows for indexes that uses the same columns.
* MDEV-25538 Crash on REPAIR VIEW that was created from IS tablebb-10.4-MDEV-25538Daniele Sciascia2022-01-199-445/+459
| | | | | | | | | | | Remove calls to wsrep_append_fk_parent_table() during REPAIR/OPTIMIZE TABLE processing. It turns out that REPAIR or OPTIMIZE commands on table t, do not acquire MDL locks on parent tables of t (as shown in the included test). Thus making wsrep_append_fk_parent_table() unnecessary for OPTIMIZE and REPAIR. This also fixes MDEV-24446 and reenables test galera.mysql-wsrep#198. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* MDEV-26583 SIGSEGV's in spider_get_select_limit_from_select_lex when DELAYED ↵Nayuta Yanagisawa2022-01-194-0/+86
| | | | | | INSERT is used Spider dereferences a freed select_lex and then results in SIGSEGV.
* MDEV-27272 Crash on EXPORT/IMPORT tablespace with column added in the middlebb-10.4-MDEV-27272-import-instant-addEugene Kosov2022-01-195-10/+52
| | | | | | | dict_index_t::reconstruct_fields(): add input validation by replacing some assertions handle_instant_metadata(): fix nullptr dereference
* MDEV-25977 : Warning: Memory not freed: 32 on SET GLOBAL wsrep_sst_auth=USERbb-10.4-MDEV-25494Jan Lindström2022-01-181-0/+1
| | | | Add missing wsrep_sst_auth_free call.
* MDEV-25494 : Assertion `tl->table == __null' failed in bool ↵Jan Lindström2022-01-183-3/+33
| | | | | | | THD::open_temporary_table(TABLE_LIST*) There is no need to open or process temporary tables at wsrep_append_fk_parent_table.
* MDEV-27341 Use SET PASSWORD to change PAM serviceSergei Golubchik2022-01-174-2/+41
| | | | | | | | | | SET PASSWORD = PASSWORD('foo') would fail for pam plugin with ERROR HY000: SET PASSWORD is ignored for users authenticating via pam plugin but SET PASSWORD = 'foo' would not. Now it will.
* MDEV-26339 Account specifics to be handled before proxyingSergei Golubchik2022-01-173-55/+118
|
* MDEV-23326: mtr fix - slow on timezone intialisationbb-10.4-danielblack-fix-mysql_tz_to_sql_wsrepDaniel Black2022-01-141-2/+28
| | | | Fix wsrep.mysql_tzinfo_to_sql_symlink_skip test result.
* Revert "MDEV-26345 SELECT MIN on Spider table returns more rows than expected"bb-10.4-mdev-26345Nayuta Yanagisawa2022-01-145-102/+7
| | | | This reverts commit b9730226dce5bf34b87aa28963f1df68a695a93c.
* MDEV-25659 trigger name is empty after upgrade to 10.4bb-10.4-bar-MDEV-25659Alexander Barkov2022-01-144-3/+546
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: At some point, we made stored rountines fail at CREATE time instead of execution time in case of this syntax: IF unknown_variable ... END IF As a result, a trigger created before this change and contained an unknown variable worked in a bad way after upgrade: - It was displayed with an empty trigger name by SHOW CREATE TRIGGER - It was displayed with an empty trigger name by INFORMATION_SCHEMA.TRIGGERS - An attempt to DROP this trigger returned errors - nothing happened. - DROP TABLE did not remove the .TRN file corresponding to this broken trigger. Underlying code observations: The old code assumed that the trigger name resides in the current lex: if(thd->lex->spname) m_trigger_name= &thd->lex->spname->m_name; This is not always the case. Some SP statements (e.g. IF) do the following in their beginning: - create a separate local LEX - set thd->lex to this new local LEX - push the new local LEX to the stack in sp_head::m_lex and the following at the end of the statement: - pop the previous LEX from the stack sp_head::m_lex - set thd->lex back to the popped value So when the parse error happens inside e.g. IF statement, thd->lex->spname is a NULL pointer, because thd->lex points to the local LEX (without SP name) rather than the top level LEX (with SP name). Fix: - Adding a new method sp_head::find_spname_recursive() which walks inside the LEX stack sp_head::m_lex from the top (the newest, most local) to the bottom (the oldest), and finds the one which contains a non-zero spname pointer. - Using the new method inside Deprecated_trigger_syntax_handler::handle_condition(): First it still tests thd->lex->spname (like before this change), and uses it in case it is not empty. Otherwise (if thd->lex->spname is empty), it calls sp_head::find_spname_recursive() to find the LEX with a non-empty spname inside the LEX stack of the current sphead.
* MDEV-21650 Non-empty statement transaction on global rollback after TRT ↵Aleksey Midenkov2022-01-125-5/+67
| | | | | | update error TRT opens statement transaction. Cleanup it in case of error.
* MDEV-23326: Aria significantly slow on timezone intialisationDaniel Black2022-01-124-69/+467
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --skip-write-binary-log added to mysql_tzinfo_to_sql in MDEV-18778 was only effective if galera was enabled on the server. This is because it tied together three concepts under one option: 1. binary logging 2. wsrep replication, and 3. using innodb as a transitional table type. Change 1: small change in help option to reflect this. To solve the performance problem with Aria tables, LOCK TABLES WRITE is used to eliminate the need to fdatasync until the UNLOCK TABLES. If galera isn't enabled, then we also want to use the LOCK TABLE WRITE mechanism. The START TRANSACTION added in MDEV-23440 needed to be moved to before LOCK TABLES otherwise it would cancel their effect. TRUNCATE TABLE statements also need to be before the LOCK TABLES. When changing back from InnoDB to Aria, include the ORDER BY that was originally there in 6aaccbcbf790 and matching the final ALTER TABLE in the timezonedir branch. Running: mariadb-tzinfo-to-sql --skip-write-binlog /usr/share/zoneinfo now generates 16 Aria_transaction_log_syncs from 7053.
* MDEV-26345 SELECT MIN on Spider table returns more rows than expectedNayuta Yanagisawa2022-01-115-7/+102
| | | | | | | | | The Spider storage engine ignored the implicit grouping when aggregation was converted to constant by the query optimizer. As a result, the Spider SE returned rows more than expected. To fix the problem, we notify the Spider SE of the existence of the implicit grouping via Query::distinct.
* MDEV-18848 : Galera: 10.4 node crashed with Assertion ↵bb-10.4-24845Jan Lindström2022-01-103-2/+59
| | | | | | | | `client_state.transaction().active()` after altering SEQUENCE table's engine to myisam and back to innodb We need to start Galera transaction for select NEXT VALUE FOR sequence if it is not yet started. Note that ALTER is handled as TOI and transaction is already started.
* MDEV-19353 : Alter Sequence do not replicate to another nodes with in Galera ↵Jan Lindström2022-01-103-0/+58
| | | | | | Cluster Galera replication of new DDL-case was missing
* MDEV-20886 galera.MDEV-20225Jan Lindström2022-01-103-3/+7
| | | | Fix test MDEV-20225.
* MDEV-27446 Windows, MSI - fix redistributable merge module path for VS2022bb-10.4-wladVladislav Vaintroub2022-01-081-30/+13
|
* MDEV-22846 Server crashes in handler_index_cond_check on SELECTIgor Babaev2022-01-074-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | If the optimizer decides to rewrites a NOT IN predicand of the form outer_expr IN (SELECT inner_col FROM ... WHERE subquery_where) into the EXISTS subquery EXISTS (SELECT 1 FROM ... WHERE subquery_where AND (outer_expr=inner_col OR inner_col IS NULL)) then the pushed equality predicate outer_expr=inner_col can be used for ref[or_null] access if inner_col is a reference to an indexed column. In this case if there is a selective range condition over this column then a Rowid filter may be employed coupled the with ref[or_null] access. The filter is 'pushed' into the engine and in InnoDB currently it cannot be used with index look-ups by primary key. The ref[or_null] access can be used only when outer_expr is not NULL. Otherwise the original predicand is evaluated to TRUE only if the result set returned by the query SELECT 1 FROM ... WHERE subquery_where is empty. When performing this evaluation the executor switches to the table scan by primary key. Before this patch the pushed filter still remained marked as active and the engine tried to apply the filter. This was incorrect and in InnoDB this attempt to use the filter led to an assertion failure. This patch fixes the problem by disabling usage of the filter when outer_expr is evaluated to NULL.
* MDEV-14907 FEDERATEDX doesn't respect DISTINCTMonty2022-01-057-3/+138
| | | | | | | | | | | | | | | | | | | | | | | Federated and Federatex cannot be used with ROR scans Federated::position() and Federatex::position() is storing in 'ref' a pointer into a local result set buffer. This means that one cannot compare 'ref' from different handler instances to see if they point to the same physical record. This bug caused federated.federatedx to return wrong results when the optimizer tried to use index_merge to resolve some queries. Fixed by introducing table flag HA_NON_COMPARABLE_ROWID and using this with the above handlers. Todo: - Fix multi_delete(), multi_update and read_records() to use primary key instead of 'ref' if case HA_NON_COMPARABLE_ROWID is set. The current code only works if we have only one range (like table scan) for the tables that will be updated in the second pass. - Enable DBUG_ASSERT() in ha_federated::cmp_ref() and ha_federatedx::cmp_ref().
* Add --valgrind to VERSION() string for valgrind buildsMonty2021-12-281-0/+2
| | | | Fixes main.sp-no-valgrind for valgrind builds not done with BUILD scripts
* MDEV-27184 Assertion `(old_top == initial_top (av) && old_size == 0) || ↵Nayuta Yanagisawa2021-12-274-1/+55
| | | | | | | ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed, Assertion `str.alloced_length() >= str.length() + data_len' failed Spider crashes on a query that inserts some rows including float. This is because Spider allocates a string of insufficient length.
* Merge branch 10.3 into 10.4Julius Goryavsky2021-12-2546-341/+733
|\
| * Merge branch 10.2 into 10.3st-10.3-juliusJulius Goryavsky2021-12-246-214/+214
| |\
| | * MDEV-24097: galera[_3nodes] suite tests in MTR sporadically failsbb-10.2-MDEV-24097-galeraJulius Goryavsky2021-12-2314-285/+292
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first part of the fixes for MDEV-24097. This commit contains the fixes for instability when testing Galera and when restarting nodes quickly: 1) Protection against a "stuck" old SST process during the execution of the new SST (after restarting the node) is now implemented for mariabackup / xtrabackup, which should help to avoid almost all conflicts due to the use of the same ports - both during testing with mtr, so and when restarting nodes quickly in a production environment. 2) Added more protection to scripts against unexpected return of the rc != 0 (in the commands for deleting temporary files, etc). 3) Added protection against unexpected crashes during binlog transfer (in SST scripts for rsync). 4) Spaces and some special characters in binlog filenames shouldn't be a problem now (at the script level). 5) Daemon process termination tracking has been made more robust against crashes due to unexpected termination of the previous SST process while new scripts are running. 6) Reading ssl encryption parameters has been moved from specific SST scripts to a common wsrep_sst_common.sh script, which allows unified error handling, unified diagnostics and simplifies script revisions in the future. 7) Improved diagnostics of errors related to the use of openssl. 8) Corrections have been made for xtrabackup-v2 (both in tests and in the script code) that restore the work of xtrabackup with updated versions of innodb. 9) Fixed some tests for galera_3nodes, although the complete solution for the problem of starting three nodes at the same time on fast machines will be done in a separate commit. No additional tests are required as this commit fixes problems with existing tests.
| * | Merge branch 10.2 into 10.3Julius Goryavsky2021-12-2328-126/+385
| |\ \ | | |/
| | * MDEV-23175: my_timer_milliseconds clock_gettime for multiple platfomrsbb-10.2-MDEV-23175-backportDaniel Black2021-12-221-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Small postfix to MDEV-23175 to ensure faster option on FreeBSD and compatibility to Solaris that isn't high resolution. ftime is left as a backup in case an implementation doesn't contain any of these clocks. FreeBSD $ ./unittest/mysys/my_rdtsc-t 1..11 # ----- Routine --------------- # myt.cycles.routine : 5 # myt.nanoseconds.routine : 11 # myt.microseconds.routine : 13 # myt.milliseconds.routine : 11 # myt.ticks.routine : 17 # ----- Frequency ------------- # myt.cycles.frequency : 3610295566 # myt.nanoseconds.frequency : 1000000000 # myt.microseconds.frequency : 1000000 # myt.milliseconds.frequency : 899 # myt.ticks.frequency : 136 # ----- Resolution ------------ # myt.cycles.resolution : 1 # myt.nanoseconds.resolution : 1 # myt.microseconds.resolution : 1 # myt.milliseconds.resolution : 7 # myt.ticks.resolution : 1 # ----- Overhead -------------- # myt.cycles.overhead : 26 # myt.nanoseconds.overhead : 19140 # myt.microseconds.overhead : 19036 # myt.milliseconds.overhead : 578 # myt.ticks.overhead : 21544 ok 1 - my_timer_init() did not crash ok 2 - The cycle timer is strictly increasing ok 3 - The cycle timer is implemented ok 4 - The nanosecond timer is increasing ok 5 - The nanosecond timer is implemented ok 6 - The microsecond timer is increasing ok 7 - The microsecond timer is implemented ok 8 - The millisecond timer is increasing ok 9 - The millisecond timer is implemented ok 10 - The tick timer is increasing ok 11 - The tick timer is implemented
| | * MDEV-27181 fixup: compatibility with Windows + small correctionsbb-10.2-MDEV-27181-fixJulius Goryavsky2021-12-176-95/+229
| | | | | | | | | | | | | | | | | | | | | 1) Removed symlinks that are not very well supported in tar under Windows. 2) Added comment + changed code formatting in viosslfactories.c 3) Fixed a small bug in the yassl code. 4) Fixed a typo in the script code.
| | * MDEV-21866: Assertion `!result' failed in convert_const_to_int upon 2nd ↵bb-10.2-MDEV-21866Dmitry Shulga2021-12-163-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | execution of PS Consider the following use case: MariaDB [test]> CREATE TABLE t1 (field1 BIGINT DEFAULT -1); MariaDB [test]> CREATE VIEW v1 AS SELECT DISTINCT field1 FROM t1; Repeated execution of the following query as a Prepared Statement MariaDB [test]> PREPARE stmt FROM 'SELECT * FROM v1 WHERE field1 <=> NULL'; MariaDB [test]> EXECUTE stmt; results in a crash for a server built with DEBUG. MariaDB [test]> EXECUTE stmt; ERROR 2013 (HY000): Lost connection to MySQL server during query Assertion failed: (!result), function convert_const_to_int, file item_cmpfunc.cc, line 476. Abort trap: 6 (core dumped) The crash inside the function convert_const_to_int() happens by the reason that the value -1 is stored in an instance of the class Field_longlong on restoring its original value in the statement result= field->store(orig_field_val, TRUE); that leads to assigning the value 1 to the variable 'result' with subsequent crash in the DBUG_ASSERT statement following it DBUG_ASSERT(!result); The main matter here is why this assertion failure happens on the second execution of the prepared statement and doens't on the first one. On first handling of the statement 'EXECUTE stmt;' a temporary table is created for serving the query involving the view 'v1'. The table is created by the function create_tmp_table() in the following calls trace: (trace #1) JOIN::prepare (at sql_select.cc:725) st_select_lex::handle_derived LEX::handle_list_of_derived TABLE_LIST::handle_derived mysql_handle_single_derived mysql_derived_prepare select_union::create_result_table create_tmp_table Note, that the data member TABLE::status of a TABLE instance returned by the function create_tmp_table() has the value 0. Later the function setup_table_map() is called on the TABLE instance just created for the sake of the temporary table (calls trace #2 is below): JOIN::prepare (at sql_select.cc:737) setup_tables_and_check_access setup_tables setup_table_map where the data member TABLE::status is set to the value STATUS_NO_RECORD. After that when execution of the method JOIN::prepare reaches calling of the function setup_without_group() the following calls trace is invoked JOIN::prepare setup_without_group setup_conds Item_func::fix_fields Item_func_equal::fix_length_and_dec Item_bool_rowready_func2::fix_length_and_dec Item_func::setup_args_and_comparator Item_func::convert_const_compared_to_int_field convert_const_to_int There is the following code snippet in the function convert_const_to_int() at the line item_cmpfunc.cc:448 bool save_field_value= (field_item->const_item() || !(field->table->status & STATUS_NO_RECORD)); Since field->table->status has bits STATUS_NO_RECORD set the variable save_field_value is false and therefore neither the method Field_longlong::val_int() nor the method Field_longlong::store is called on the Field instance that has the numeric value -1. That is the reason why first execution of the Prepared Statement for the query 'SELECT * FROM v1 WHERE field1 <=> NULL' is successful. On second running of the statement 'EXECUTE stmt' a new temporary tables is also created by running the calls trace #1 but the trace #2 is not executed by the reason that data member SELECT_LEX::first_cond_optimization has been set to false on first execution of the prepared statemet (in the method JOIN::optimize_inner()). As a consequence, the data member TABLE::status for a temporary table just created doesn't have the flags STATUS_NO_RECORD set and therefore on re-execution of the prepared statement the methods Field_longlong::val_int() and Field_longlong::store() are called for the field having the value -1 and the DBUG_ASSERT(!result) is fired. To fix the issue the data member TABLE::status has to be assigned the value STATUS_NO_RECORD in every place where the macros empty_record() is called to emptify a record for just instantiated TABLE object created on behalf the new temporary table.
| | * MDEV-27270: Wrong query plan with Range Checked for Each Record and ORDER BY ↵bb-10.2-mdev2720Sergei Petrunia2021-12-153-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... LIMIT Followup to fix for MDEV-25858: When test_if_skip_sort_order() decides to use an index to satisfy ORDER BY ... LIMIT clause, it should disable "Range Checked for Each Record" optimization. Do this in all cases.
| | * Disable following tests from galera_3nodes suitebb-10.2-janJan Lindström2021-12-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * galera_pc_bootstrap * galera_ipv6_mariabackup * galera_ipv6_mariabackup_section * galera_ipv6_rsync * galera_ipv6_rsync_section * galera_ssl_reload * galera_toi_vote * galera_wsrep_schema_init because MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
| | * MDEV-27268 Failed InnoDB initialization leaves garbage files behindMarko Mäkelä2021-12-153-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | create_log_files(): Check log_set_capacity() before modifying or creating any log files. innobase_start_or_create_for_mysql(): If create_log_files() fails and we were initializing a new database, delete the system tablespace files before exiting.
| | * MDEV-27181: Galera SST scripts should use ssl_capath for CA directorybb-10.2-MDEV-27181-galeraJulius Goryavsky2021-12-1421-411/+1033
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Galera SST scripts should use ssl_capath (not ssl_ca) for CA directory. The current implementation tries to automatically detect the path using the trailing slash in the ssl_ca variable value, but this approach is not compatible with the server configuration. Now, by analogy with the server, SST scripts also use a separate ssl_capath variable. In addition, a similar tcapath variable has been added for the old-style configuration (in the "sst" section). 2. Openssl utility detection made more reliable. 3. Removed extra spaces in automatically generated command lines - to simplify debugging of the SST scripts. 4. In general, the code for detecting the presence or absence of auxiliary utilities has been improved - it is made more reliable in some configurations (and for shells other than bash).
| | * MDEV-27235: Crash on SET GLOBAL innodb_encrypt_tablesMarko Mäkelä2021-12-133-0/+7
| | | | | | | | | | | | | | | fil_crypt_set_encrypt_tables(): If no encryption threads have been initialized, do nothing.
| | * don't use buffered_option_error_reporter without perfschemaSergei Golubchik2021-12-101-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | it's not printed, not cleaned up without perfschema, so isn't supposed to be written into either this fixes "Memory not freed" warnings when early command line options produce warnings in non-perfschema builds
| | * enable partition_open_files_limit testbb-10.2-aliceforkfun2021-12-094-8/+5
| | |
| | * MDEV-19129: Fixed configure for Xcode, CMake generateSergei Krivonos2021-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake Error in wsrep-lib/CMakeLists.txt: The custom command generating /Users/name/build/mariadb-server/sql/lex_token.h is attached to multiple targets: GenServerSource sql but none of these is a common dependency of the other(s). This is not allowed by the Xcode "new build system".
| | * Don't beep in mysql_upgrade_service.exeVladislav Vaintroub2021-12-071-2/+2
| | | | | | | | | | | | | | | This beep looks especially strange, as mysqladmin output is redirected to the log file
| | * MDEV-27191 MariaDB client - "system" command does not work on WindowsVladislav Vaintroub2021-12-071-8/+3
| | | | | | | | | | | | | | | - define USE_POPEN, like it is done elsewhere. - use Notepad as default editor on Windows for the "edit" command.
| | * Appveyor - cache chocolatey packagesVladislav Vaintroub2021-12-071-0/+4
| | |
| * | MDEV-27195 SIGSEGV in ↵bb-10.3-bar-MDEV-27195Alexander Barkov2021-12-224-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Table_scope_and_contents_source_st::vers_check_system_fields The old code erroneously used default_charset_info to compare field names. default_charset_info can point to any arbitrary collation, including ucs2*, utf16*, utf32*, including those that do not support strcasecmp(). my_charset_utf8mb4_unicode_ci, which is used in this scenario: CREATE TABLE t1 ENGINE=InnoDB WITH SYSTEM VERSIONING AS SELECT 0; does not support strcasecmp(). Fixing the code to use Lex_ident::streq(), which uses system_charset_info instead of default_charset_info.
| * | MDEV-27332 SIGSEGV in fetch_data_into_cache()Marko Mäkelä2021-12-213-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit fb335b48b5e3263698b7d9a74ff3f20ef406df9f we may have a null pointer in purge_sys.query when fetch_data_into_cache() is invoked and innodb_force_recovery>4. This is because the call to purge_sys.create() would be skipped. fetch_data_into_cache(): Load the purge_sys pseudo transaction pointer to a local variable (null pointer if purge_sys is not initialized).
| * | MDEV-27244 Table corruption upon adding serial data typeAleksey Midenkov2021-12-164-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-25803 excluded some cases from key sort upon alter table. That particularly depends on ALTER_ADD_INDEX flag. Creating a column of SERIAL data type missed that flag. Though equivalent operation alter table t1 add x bigint unsigned not null auto_increment unique; has ALTER_ADD_INDEX flag.
| * | MDEV-23182: Server crashes in Item::fix_fields_if_needed / ↵bb-10.3-MDEV-23182Dmitry Shulga2021-12-163-2/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | table_value_constr::prepare upon 2nd execution of PS Repeating execution of a query containing the clause IN with string literals in environment where the server variable in_predicate_conversion_threshold is set results in server abnormal termination in case the query is run as a Prepared Statement and conversion of charsets for string values in the query are required. The reason for server abnormal termination is that instances of the class Item_string created on transforming the IN clause into subquery were created on runtime memory root that is deallocated on finishing execution of Prepared statement. On the other hand, references to Items placed on deallocated memory root still exist in objects of the class table_value_constr. Subsequent running of the same prepared statement leads to dereferencing of pointers to already deallocated memory that could lead to undefined behaviour. To fix the issue the values being pushed into a values list for TVC are created by cloning their original items. This way the cloned items are allocate on the PS memroot and as consequences no dangling pointer does more exist.
| * | MDEV-27181: Galera SST scripts should use ssl_capath for CA directorybb-10.3-MDEV-27181-galeraJulius Goryavsky2021-12-1419-259/+859
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Galera SST scripts should use ssl_capath (not ssl_ca) for CA directory. The current implementation tries to automatically detect the path using the trailing slash in the ssl_ca variable value, but this approach is not compatible with the server configuration. Now, by analogy with the server, SST scripts also use a separate ssl_capath variable. In addition, a similar tcapath variable has been added for the old-style configuration (in the "sst" section). 2. Openssl utility detection made more reliable. 3. Removed extra spaces in automatically generated command lines - to simplify debugging of the SST scripts. 4. In general, the code for detecting the presence or absence of auxiliary utilities has been improved - it is made more reliable in some configurations (and for shells other than bash).