summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2020-11-0344-236/+1705
|\
| * Merge 10.3 into 10.4Marko Mäkelä2020-11-0396-826/+3165
| |\
| | * Merge 10.2 into 10.3Marko Mäkelä2020-11-021-1/+1
| | |\
| | | * fixup a593e03d58f922a99ba49de1bec6810fc7e9874f: nullptrMarko Mäkelä2020-11-021-1/+1
| | | | | | | | | | | | | | | | C++11 is allowed only starting with MariaDB Server 10.4.
| | * | Merge 10.2 into 10.3Marko Mäkelä2020-11-0232-96/+1635
| | |\ \ | | | |/
| | | * MDEV-22387: Do not violate __attribute__((nonnull))Marko Mäkelä2020-11-0222-47/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This follows up commit commit 94a520ddbe39ae97de1135d98699cf2674e6b77e and commit 7c5519c12d46ead947d341cbdcbb6fbbe4d4fe1b. After these changes, the default test suites on a cmake -DWITH_UBSAN=ON build no longer fail due to passing null pointers as parameters that are declared to never be null, but plenty of other runtime errors remain.
| | | * Merge bb-10.2-release into 10.2Marko Mäkelä2020-11-029-385/+416
| | | |\
| | | | * List of unstable tests for 10.2.35 releasemariadb-10.2.35Elena Stepanova2020-10-311-384/+352
| | | | |
| | | * | MDEV-23630 fixup: main.mysqldump resultMarko Mäkelä2020-11-021-2/+3
| | | | | | | | | | | | | | | | | | | | This was missed in commit d6ea03fa94dc008b30932bf1e8ea40c3346f51c8.
| | | * | Add dbug_print_sel_arg() debugging help functionSergei Petrunia2020-11-011-0/+107
| | | | |
| | | * | MDEV-23630: mysqldump logically dump system table informationDaniel Black2020-11-015-19/+1406
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add --system={all, users, plugins, udfs, servers, stats, timezones} This will dump system information from the server in a logical form like: * CREATE USER * GRANT * SET DEFAULT ROLE * CREATE ROLE * CREATE SERVER * INSTALL PLUGIN * CREATE FUNCTION "stats" is the innodb statistics tables or EITS and these are dumped as INSERT/REPLACE INTO statements without recreating the table. "timezones" is the collection of timezone tables which are important to transfer to generate identical results on restoration. Two other options have an effect on the SQL generated by --system=all. These are mutually exclusive of each other. * --replace * --insert-ignore --replace will include "OR REPLACE" into the logical form like: * CREATE OR REPLACE USER ... * DROP ROLE IF EXISTS (MySQL-8.0+) * CREATE OR REPLACE ROLE ... * UNINSTALL PLUGIN IF EXISTS (10.4+) ... (before INSTALL PLUGIN) * DROP FUNCTION IF EXISTS (MySQL-5.7+) * CREATE OR REPLACE [AGGREGATE] FUNCTION * CREATE OR REPLACE SERVER --insert-ignore uses the construct " IF NOT EXISTS" where supported in the logical syntax. 'CREATE OR REPLACE USER' includes protection against being run as the same user that is importing the mysqldump. Includes experimental support for dumping mysql-5.7/8.0 system tables and exporting logical SQL compatible with MySQL. Updates mysqldump man page, including this information and (removing obsolute bug reference) Reviewed-by: anel@mariadb.org
| | | * | Fix RPM packaging on cmake 3.18+Sergei Golubchik2020-10-301-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmake has caught up and since version 3.18 it started supporting CPACK_RPM_POST_TRANS_SCRIPT_FILE, something we've supported for two years and cmake 2.8.11. Both implementation add %posttrans tag and rpmbuild gets confused. Disable our implementation for cmake 3.18+
| | * | | List of unstable tests for 10.3.26 releasemariadb-10.3.26Elena Stepanova2020-11-011-464/+373
| | | | |
| * | | | fixup 67cb7ea22ac1a510dcbaf9bc48f0f8cf9e0ce8f5Marko Mäkelä2020-11-032-6/+6
| | | | |
| * | | | Clean up wsrep.variablesJan Lindström2020-11-032-136/+3
| | | | |
| * | | | MDEV-23872 Crash in galera::TrxHandle::state()Teemu Ollakka2020-11-031-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepared statements which were run over binary protocol crashed a server if the statement did not have CF_PS_ARRAY_BINDING_OPTIMIZED flag and the statement was executed in bulk mode and a BF abort occrurred. This was because the bulk execution resulted in several statements without calling wsrep_after_statement() between, which confused wsrep transaction state tracking. As a fix, call wsrep_after_statement() in bulk loop after each execution if CF_PS_ARRAY_BINDING_OPTIMIZED is not set. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| * | | | MDEV-24072 Assertion 'ib_table.n_v_cols' failed in ↵Marko Mäkelä2020-11-023-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instant_alter_column_possible() instant_alter_column_possible(): Relax a too strict debug assertion. The existence of an index stub or a corrupted index on virtual columns does not imply that virtual columns exist.
| * | | | MDEV-22974: mysql_native_password make "invalid" validDaniel Black2020-10-315-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per b9f3f06857ac, mysql_system_tables_data.sql creates a mysql_native_password with a salted hash of "invalid" so that `set password` will detect a native password can be applied:. SHOW CREATE USER; diligently uses this value in its output generating the SQL: MariaDB [(none)]> show create user; +---------------------------------------------------------------------------------------------------+ | CREATE USER for dan@localhost | +---------------------------------------------------------------------------------------------------+ | CREATE USER `dan`@`localhost` IDENTIFIED VIA mysql_native_password USING 'invalid' OR unix_socket | +---------------------------------------------------------------------------------------------------+ Attempting to execute this before this patch results in: MariaDB [(none)]> CREATE USER `dan2`@`localhost` IDENTIFIED VIA mysql_native_password USING 'invalid' OR unix_socket; ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number As such, deep the implementation of mysql_native_password we make "invalid" valid (pun intended) such that the above create user will succeed. We do this by storing "*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE" (credit: Oracle MySQL), that is of an INCORRECT length for a scramble. In native_password_authenticate we check the length of this cached value and immediately fail if it is anything other than the scramble length. native_password_get_salt is only called in the context of set_user_salt, so all setting of native passwords to hashed content of 'invalid', quite literally create an invalid password. So other forms of "invalid" are valid SQL in creating invalid passwords: MariaDB [(none)]> set password = 'invalid'; Query OK, 0 rows affected (0.001 sec) MariaDB [(none)]> alter user dan@localhost IDENTIFIED BY PASSWORD 'invalid'; Query OK, 0 rows affected (0.000 sec) closes #1628 Reviewer: serg@mariadb.com
* | | | | Fix appvyeor's perl.exe pathVladislav Vaintroub2020-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The one which is in PATH by default is MinGW perl, which uses Unix paths. This perl does not work with mtr.
* | | | | Fix clang -Winconsistent-missing-overrideMarko Mäkelä2020-11-021-18/+16
| | | | |
* | | | | Windows : require at least VS2019 for MSVC.Vladislav Vaintroub2020-11-022-2/+5
| | | | | | | | | | | | | | | | | | | | This will avoid some errors on appveyor, due to outdated SDKs.
* | | | | handler: move row change start signal down after the checksNikita Malyavin2020-11-021-8/+8
| | | | |
* | | | | MDEV-22506 Malformed error message for ER_KEY_CONTAINS_PERIOD_FIELDSNikita Malyavin2020-11-022-89/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Though this is an error message task, the problem was deep in the `mysql_prepare_create_table` implementation. The problem is described as follows: 1. `append_system_key_parts` was called before `mysql_prepare_create_table`, though key name generation was done close to the latest stage of the latter. 2. We can't move `append_system_key_parts` in the end, because system keys should be appended before some checks done. 3. If the checks from `append_system_key_parts` are moved to the end of `mysql_prepare_create_table`, then some other inappropriate errors are issued. like `ER_DUP_FIELDNAME`. To have key name specified in error message, name generation should be done before the checks, which consequenced in more changes. The final design for key initialization in `mysql_prepare_create_table` follows. The initialization is done in three phases: 1. Calculate a total number of keys created with respect to keys ignored. Allocate KEY* buffer. 2. Generate unique names; calculate a total number of key parts. Make early checks. Allocate KEY_PART_INFO* buffer. 3. Initialize key parts, make the rest of the checks.
* | | | | MDEV-22677 UPDATE crashes on partitioned HEAP table WITHOUT OVERLAPSNikita Malyavin2020-11-023-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ha_heap::clone` was creating a handler by share's handlerton, which is partition handlerton. handler's handlerton should be used instead. Here in particular, HEAP handlerton will be used and it will create ha_heap handler.
* | | | | MDEV-22608 ASAN use-after-poison in TABLE::check_period_overlapsNikita Malyavin2020-11-022-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug was fixed by MDEV-22599 bugfix, which changed `Field::cmp` call to `Field::cmp_prefix` in `TABLE::check_period_overlaps`. The trick is that `Field_bit::cmp` apparently calls `Field_bit::cmp_key`, which condiders an argument an actual pointer to data, which isn't correct for `Field_bit`, since it stores data by `bit_ptr`. which is in the beginning of the record, and using `ptr` is incorrect (we use it through `ptr_in_record` call)
* | | | | MDEV-22639 Assertion failed in ha_check_overlaps upon multi-table updateNikita Malyavin2020-11-023-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After Sergei's cleanup this assertion is not actual anymore -- we can't predict if the handler was used for lookup, especially in multi-update scenario. `position(old_data)` is made earlier in `ha_check_overlaps`, therefore it is guaranteed that we compare right refs.
* | | | | MDEV-22714 Assertion failed upon multi-update on table WITHOUT OVERLAPSNikita Malyavin2020-11-023-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem here was that ha_check_overlaps internally uses ha_index_read, which in case of fail overwrites table->status. Even though the handlers are different, they share a common table, so the value is anyway spoiled. This is bad, and table->status is badly designed and overweighted by functionality, but nothing can be done with it, since the code related to this logic is ancient and it's impossible to extract it with normal effort. So let's just save and restore the value in ha_update_row before and after the checks. Other operations like INSERT and simple UPDATE are not in risk, since they don't use this table->status approach. DELETE does not do any unique checks, so it's also safe.
* | | | | Add DBUG_ASSERT in Field::ptr_in_recordNikita Malyavin2020-11-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Subtracting table->record[0] from record is UB (non-contiguous buffers) 2. It is very popular to use move_field_offset, which changes Field::ptr, but leaves table->record[0] unchanged. This makes a ptr_in_record result incorrect, since it relies on table->record[0] value. The check ensures the result is within the queried record boundaries.
* | | | | List of unstable tests for 10.5.7 releaseElena Stepanova2020-11-021-491/+393
| | | | |
* | | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2020-11-0161-154/+1124
|\ \ \ \ \
| * \ \ \ \ Merge branch '10.3' into 10.4Oleksandr Byelkin2020-10-3163-145/+1135
| |\ \ \ \ \ | | |/ / / / | |/| / / / | | |/ / /
| | * | | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-10-3062-146/+1082
| | |\ \ \ | | | | |/ | | | |/|
| | | * | MDEV-23991 fixup: Initialize the memoryMarko Mäkelä2020-10-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This regression was introduced in commit afc9d00c66db946c8240fe1fa6b345a3a8b6fec1. This is a partial backport of commit 199863d72b7cccaa4c75641c50c45a83b568ab8c from 10.4.
| | | * | Update Connector/CMarko Mäkelä2020-10-301-0/+0
| | | | |
| | | * | MDEV-24033: SIGSEGV in __memcmp_avx2_movbe from queue_insert | SIGSEGV in ↵Varun Gupta2020-10-306-1/+61
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __memcmp_avx2_movbe from native_compare The issue here was the system variable max_sort_length was being applied to decimals and it was truncating the value for decimals to the number of bytes set by max_sort_length. This was leading to a buffer overflow as the values were written to the buffer without truncation and then we moved the offset to the number of bytes(set by max_sort_length), that are needed for comparison. The fix is to not apply max_sort_length for fixed size types like INT, DECIMALS and only apply max_sort_length for CHAR, VARCHARS, TEXT and BLOBS.
| | | * Fix sporadic test failure on galera_parallel_apply_3nodes.Jan Lindström2020-10-302-5/+23
| | | | | | | | | | | | | | | | Test itself is not deterministic.
| | | * MDEV-19838: fix of error messagesOleksandr Byelkin2020-10-291-5/+2
| | | |
| | | * MDEV-19838: followup, fix for PS & embeddedOleksandr Byelkin2020-10-291-1/+2
| | | | | | | | | | | | | | | | Use 9 byte (min length packet)
| | | * Merge branch '10.1' into 10.2Oleksandr Byelkin2020-10-2916-34/+110
| | | |\
| | | | * MDEV-23702 calculating(auto rounding) issueSergei Golubchik2020-10-2912-24/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a different fix for "MDEV-19232: Floating point precision / value comparison problem" Instead of truncating decimal values after every division, truncate them for comparison purposes. This reverts commit 62d73df6b270 but keeps the test.
| | | | * update result files after backportSergei Golubchik2020-10-293-12/+0
| | | | | | | | | | | | | | | | | | | | followup for 3e807d255e0e and eae10a87ff60
| | | | * Move result files at the correct place.Oleksandr Byelkin2020-10-293-0/+0
| | | | |
| | | | * MDEV-24040 - fix appveyor buildVladislav Vaintroub2020-10-281-0/+5
| | | | | | | | | | | | | | | | | | | | Old SDK is missing #define SECURITY_MAX_SID_STRING_CHARACTERS
| | | | * MDEV-24040 Named pipe permission issuebb-10.1-wladVladislav Vaintroub2020-10-271-13/+57
| | | | | | | | | | | | | | | | | | | | | | | | | Tighten access control - deny FILE_CREATE_PIPE_INSTANCE permission to everyone except current user (the one that runs mysqld)
| | | * | remove non-working debug assertSergei Golubchik2020-10-292-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | and restore the test modified in the same commit (the non-replication related deadlock will be reported separately)
| | | * | MDEV-19838 Wrong direxec param data caused crashLawrin Novitsky2020-10-292-12/+336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of direct execution(stmtid=-1, mariadb_stmt_execute_direct in C API) application is in control of how many parameters client sends to the server. In case this number is not equal to actual query parameters number, the server may start to interprete packet data incorrectly, e.g. starting from the size of null bitmap. And that could cause it to crash at some point. The commit introduces some additional COM_STMT_EXECUTE packet sanity checks: - checking that "types sent" byte is set, and the value is equal to 1. if it's not direct execution, then that value is 0 or 1. - checking that parameter type value is a valid type, and parameter flags value is 0 or only "unsigned" bit is set - added more checks that read does not go beyond the end of the packet
| | | * | MDEV-24026: InnoDB: Failing assertion: os_total_large_mem_allocated >= size ↵Vlad Lesin2020-10-295-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | upon incremental backup mariabackup deallocated uninitialized write_filt_ctxt.u.wf_incremental_ctxt in xtrabackup_copy_datafile() when some table should be skipped due to parsed DDL redo log record.
| | | * | new CCOleksandr Byelkin2020-10-291-0/+0
| | | | |
| | | * | MDEV-22707 : galera got stuck after flush tablesJan Lindström2020-10-282-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary condition and add necessary include for non debug Galera library.
| | | * | Merge branch '10.1' into 10.2Oleksandr Byelkin2020-10-2823-76/+510
| | | |\ \ | | | | |/