summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-22553: Assertion `info->lastpos == (~ (my_off_t) 0)' failed in mi_rkeySergei Petrunia2020-07-083-1/+1655
| | | | | | In mi_check_index_tuple(), when rowid filter check returns CHECK_OUT_OF_RANGE, set info->lastpos= HA_OFFSET_ERROR, like it is done above for the ICP check.
* MDEV-23102 10.4 create mariadb.sys user on each update even is the user is ↵Oleksandr Byelkin2020-07-086-4/+862
| | | | | | not needed Check if we really need the mariadb.sys user
* Merge 10.3 into 10.4Marko Mäkelä2020-07-041-3/+16
|\
| * Fixup the parent commit for MSAN and ValgrindMarko Mäkelä2020-07-041-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 484931325e7bcecddc6daf1a55c008ddd67497e4 was a necessary fix for the buffer pool resizing tests in 10.5 in AddressSanitizer. However, that change would break the tests innodb.innodb_buffer_pool_resize and innodb.innodb_buffer_pool_resize_with_chunks when run in MemorySanitizer, or presumably in Valgrind as well. (Those tests run "forever" in Valgrind.) buf_pool_resize(): Cancel the effect of MEM_NOACCESS() in Valgrind and ASAN. In MSAN, MEM_NOACCESS() is a no-op, and hence we must do nothing special here. MEM_MAKE_ADDRESSABLE() would declare the memory contents undefined. In this particular case, we must actually declare the contents defined for Valgrind.
* | Merge remote-tracking branch 'origin/10.3' into 10.4Monty2020-07-037-4/+16
|\ \ | |/
| * Fix for MSAN from Marko related to buf_pool_resizeMonty2020-07-031-0/+5
| |
| * Don't give errors for default value copy in create_tmp_tableMonty2020-07-033-0/+41
| |
| * Fixed errors found by MSANMonty2020-07-024-3/+5
| |
* | Merge branch '10.4-MDEV-22222' of ↵10.4-MDEV-22222Julius Goryavsky2020-07-033-0/+39
|\ \ | | | | | | | | | https://github.com/codership/mariadb-server into 10.4-MDEV-22222
| * | MDEV-22222: Assertion `state() == s_executing || state() == s_preparing || ↵mkaruza2020-06-283-0/+39
| | | | | | | | | | | | | | | | | | state() == s_prepared || state() == s_must_abort || state() == s_aborting || state() == s_cert_failed || state() == s_must_replay' failed in wsrep::transaction::before_rollback LOCK TABLE will do implicit commit, we need to properly handle transaction after commit.
* | | Don't give errors for default value copy in create_tmp_tableMonty2020-07-031-0/+7
| | |
* | | Merge remote-tracking branch 'origin/10.3' into 10.4Monty2020-07-0339-180/+165
|\ \ \ | | |/ | |/|
| * | MDEV-20377 post-fix: Introduce MEM_MAKE_ADDRESSABLEMarko Mäkelä2020-07-0218-87/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In AddressSanitizer, we only want memory poisoning to happen in connection with custom memory allocation or freeing. The primary use of MEM_UNDEFINED is for declaring memory uninitialized in Valgrind or MemorySanitizer. We do not want MEM_UNDEFINED to have the unwanted side effect that AddressSanitizer would no longer be able to complain about accessing unallocated memory. MEM_UNDEFINED(): Define as no-op for AddressSanitizer. MEM_MAKE_ADDRESSABLE(): Define as MEM_UNDEFINED() or ASAN_UNPOISON_MEMORY_REGION(). MEM_CHECK_ADDRESSABLE(): Wrap also __asan_region_is_poisoned().
| * | Fixed bugs found by valgrindMonty2020-07-0232-126/+171
| | | | | | | | | | | | | | | | | | | | | - Some of the bug fixes are backports from 10.5! - The fix in innobase/fil/fil0fil.cc is just a backport to get less error messages in mysqld.1.err when running with valgrind. - Renamed HAVE_valgrind_or_MSAN to HAVE_valgrind
| * | Don't copy uninitialized bytes when copying varstringsMonty2020-07-025-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | When using field_conv(), which is called in case of field1=field2 copy in fill_records(), full varstring's was copied, including unitialized bytes. This caused valgrind to compilain about usage of unitialized bytes when using Aria static length records. Fixed by not using memcpy when copying varstrings but instead just copy the real bytes.
| * | MDEV-22535 TABLE::initialize_quick_structures() takes 0.5% in oltp_read_onlyMonty2020-07-022-5/+5
| | | | | | | | | | | | | | | | | | | | | - Removed not needed bzero in void TABLE::initialize_quick_structures(). - Replaced bzero with TRASH_ALLOC() to have this change verfied with memory checkers - Added missing table->quick_keys.is_set in table_cond_selectivity()
* | | Merge 10.3 into 10.4Marko Mäkelä2020-07-02213-748/+2485
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2020-07-02210-698/+2371
| |\ \
| | * \ Merge 10.1 into 10.2Marko Mäkelä2020-07-024-31/+43
| | |\ \
| | | * | Revert "Fix result of merge."Marko Mäkelä2020-07-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e0793d386517f4ff9c0267830d558f91c75263aa. In idiomatic C++, accessor functions should not discard qualifiers.
| | | * | MDEV-22941: Fix the DBUG_ENTER nameMarko Mäkelä2020-07-021-4/+4
| | | | |
| | | * | MDEV-23067 Windows : manually registered services rejected mysql_upgrade_serviceVladislav Vaintroub2020-07-011-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - service not using "--defaults-file" can have any name not just "MySQL" - service with "--defaults-file", without datadir in them use default datadir (install_root\data)
| | | * | MDEV-23052 mysql_install_db.exe can run on existing non-empty directory,Vladislav Vaintroub2020-07-011-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and remove it on error Disable existing non-empty datadir for mysql_install_db.exe
| | * | | MDEV-20377: Fix cmake -DPLUGIN_PERFSCHEMA=NOMarko Mäkelä2020-07-021-0/+1
| | | | |
| | * | | MDEV-20377: Fix -Wunused-but-set-variableMarko Mäkelä2020-07-011-17/+8
| | | | |
| | * | | MDEV-20428 after-merge fix: Stabilize the testMarko Mäkelä2020-07-012-6/+6
| | | | |
| | * | | MDEV-20377: Make WITH_MSAN more usableMarko Mäkelä2020-07-0141-447/+368
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MemorySanitizer (clang -fsanitize=memory) requires that all code be compiled with instrumentation enabled. The only exception is the C runtime library. Failure to use instrumented libraries will cause bogus messages about memory being uninitialized. In WITH_MSAN builds, we must avoid calling getservbyname(), because even though it is a standard library function, it is not instrumented, not even in clang 10. Note: Before MariaDB Server 10.5, ./mtr will typically fail due to the old PCRE library, which was updated in MDEV-14024. The following cmake options were tested on 10.5 in commit 94d0bb4dbeb28a94d1f87fdd55f4297ff3df0157: cmake \ -DCMAKE_C_FLAGS='-march=native -O2' \ -DCMAKE_CXX_FLAGS='-stdlib=libc++ -march=native -O2' \ -DWITH_EMBEDDED_SERVER=OFF -DWITH_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug \ -DWITH_INNODB_{BZIP2,LZ4,LZMA,LZO,SNAPPY}=OFF \ -DPLUGIN_{ARCHIVE,TOKUDB,MROONGA,OQGRAPH,ROCKSDB,CONNECT,SPIDER}=NO \ -DWITH_SAFEMALLOC=OFF \ -DWITH_{ZLIB,SSL,PCRE}=bundled \ -DHAVE_LIBAIO_H=0 \ -DWITH_MSAN=ON MEM_MAKE_DEFINED(): An alias for VALGRIND_MAKE_MEM_DEFINED() and __msan_unpoison(). MEM_GET_VBITS(), MEM_SET_VBITS(): Aliases for VALGRIND_GET_VBITS(), VALGRIND_SET_VBITS(), __msan_copy_shadow(). InnoDB: Replace the UNIV_MEM_ macros with corresponding MEM_ macros. ut_crc32_8_hw(), ut_crc32_64_low_hw(): Use the compiler built-in functions instead of inline assembler when building WITH_MSAN. This will require at least -msse4.2 when building for IA-32 or AMD64. The inline assembler would not be instrumented, and would thus cause bogus failures.
| | * | | MDEV-21222 mariabackup.incremental_backup failed with memory allocation failureSergei Golubchik2020-07-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mariabackup tries to allocate a buffer of page_size*page_size/4 size. for 64k page it means 1Gb, which doesn't work very well on 32-bit builders. Skip the 64k page test on 32bit.
| | * | | MDEV-22779: Fix a memory leak in the unit testMarko Mäkelä2020-07-011-0/+2
| | | | |
| | * | | Merge 10.1 into 10.2bb-10.2-mergeMarko Mäkelä2020-07-01129-138/+1426
| | |\ \ \ | | | |/ /
| | | * | MDEV-23003 INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION requires SUPER ↵Eugene Kosov2020-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead PROCESS privilege Fix a typo in a source code. Now real required privileges corresponds to a ones mentions in documentation. Documentation states that this table requires PROCESS privilege: https://mariadb.com/kb/en/information-schema-innodb_tablespaces_encryption-table/
| | | * | signal handler: use mariadb kb URL rather than MySQL oneDaniel Black2020-06-291-1/+1
| | | | |
| | | * | MDEV-17606: Query returns wrong results (while using CHARACTER SET utf8)Varun Gupta2020-06-273-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue here was that the left expr and right expr of the ANY subquery had different character sets, so we were converting the left expr to utf8 character set. So when this conversion was happening we were actually converting the item inside the cache, it looked like <cache>(convert(t1.l1 using utf8)), which is incorrect. To fix this problem we are going to store the reference of the left expr and convert that to utf8 character set, it would look like convert(<cache>(`test`.`t1`.`l1`) using utf8)
| | | * | MDEV-22806: MSAN reports use-of-uninitialized-value for ↵Sujatha2020-06-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rpl_parallel_conflicts.test Problem: ======== Relay_log_info::flush reports following MSAN issue. ==17820==WARNING: MemorySanitizer: use-of-uninitialized-value is reported #5 0x00005584f0981441 in my_write (Filedes=22, Buffer=0x72500003e818 "5\n./slave-relay-bin.000003\n21385\n master-bin.000001\n21643\n0\n", '\245' <repeats 141 times>..., Count=118, MyFlags=532) at /home/sujatha/bug_repo/test-10.5-msan/mysys/my_write.c:49 Analysis: ========= In parallel replication at the end of each statement execution the worker execution status is updated in 'relay-log.info' file. When two workers try to flush the status at the same time, since the write to cache is not serialized both workers write to the same address simultaneously and increment the length twice. Because of this the length of buffer is more than actual data. When flush code tries to read the buffer beyond valid data length MSAN reports uninitialized values error. Fix: === Serialize the relay log flush operation using "rli->data_lock".
| | | * | Merge branch '10.1-MDEV-22763' of ↵10.1-MDEV-22763Julius Goryavsky2020-06-250-0/+0
| | | |\ \ | | | | | | | | | | | | | | | | | | https://github.com/codership/mariadb-server into 10.1-MDEV-22763
| | | | * | MDEV-22763 backporting MDEV-20225 fix into 10.1sjaakola2020-06-0311-12/+978
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported the support for aborting and replaying stored procedure and fix for trigger key assigments from 10.4 version. Backported also two mtr tests: wsrep_sp_bf_abort and MDEV-20225
| | | * | | MDEV-22950 followupVladislav Vaintroub2020-06-251-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deadlock in DbugParse, on Linux. In 10.1, DBUG recursive mutex was improperly implemented. CODE_STATE::locked counter was never updated. Copy the code around LockMutex/UnlockMutex from 10.2
| | | * | | MDEV-22706: Assertion `!current' failed in PROFILING::start_new_querySujatha2020-06-253-8/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Analysis: ======== When "Profiling" is enabled, server collects the resource usage of each statement that gets executed in current session. Profiling doesn't support nested statements. In order to ensure this behavior when profiling is enabled for a statement, there should not be any other active query which is being profiled. This active query information is stored in 'current' variable. When a nested query arrives it finds 'current' being not NULL and server aborts. When 'init_connect' and 'init_slave' system variables are set they contain a set of statements to be executed. "execute_init_command" is the function call which invokes "dispatch_command" for each statement provided in 'init_connect', 'init_slave' system variables. "execute_init_command" invokes "start_new_query" and it passes the statement list to "dispatch_command". This "dispatch_command" intern invokes "start_new_query" which leads to nesting of queries. Hence '!current' assert is triggered. Fix: === Remove profiling from "execute_init_command" as it will be done within "dispatch_command" execution.
| | | * | | Test fixes.Jan Lindström2020-06-245-0/+9
| | | | | |
| | | * | | MTR tests to test Galera fix for node joining over several configurationAlexey Yurchenko2020-06-246-0/+979
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changes. This requires Galera commit 065e484144c5999709ae8fd19844da72bb785073
| | | * | | Fix result of merge.Oleksandr Byelkin2020-06-231-5/+1
| | | | | |
| | | * | | mtr: use env for perlDaniel Black2020-06-2397-97/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On FreeBSD, perl isn't in /usr/bin, its in /usr/local/bin or elsewhere in the path. Like storage/{maria/unittest/,}ma_test_* , we use /usr/bin/env to find perl and run it.
| | | * | | Disable dtrace probes on Windows.Vladislav Vaintroub2020-06-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, in Win10, dtrace is avaialable, but it does not work with MariaDB user probes
| | | * | | MDEV-22950 : fix race condition in dbugVladislav Vaintroub2020-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | FreeState() zeros init_settings.out_file, which another thread can be using
| | | * | | MDEV-22941 Assertion `idx < array.elements' failed in ↵Alexander Barkov2020-06-193-13/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dynamic_array<st_mysql_const_lex_string*>::at The code in fill_schema_schemata() did not take into account that make_db_list() can leave empty db_names if the requested database name was too long, so the call for db_names.at(0) crashed on assert. - Moving the code testing if the database directory exists into a separate function verify_database_directory_exists() - Modifying the test to check if db_names is not empty
| | | * | | MDEV-20428: "Start binlog_dump" message doesn't indicate GTID positionSujatha2020-06-163-2/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======= The "Start binlog_dump" message hasn't been updated to include the slave's requested GTID position: 20:05:05 139836760311552 [Note] Start binlog_dump to slave_server(2), pos(, 4) For diagnostic purposes, it would be helpful if the GTID position were included. Fix: === Imporve "Start binlog_dump" print message to include "using_gtid" and "GTID position" requested by slave. Ex: [Note] Start binlog_dump to slave_server(2), pos(, 4), using_gtid(1), gtid('1-1-201,2-2-100') [Note] Start binlog_dump to slave_server(3), pos('mariadb-bin.004142', 507988273), using_gtid(0), gtid('')
| | | * | | Check for krb5_xfree instead of krb5_free_unparsed_nameVicențiu Ciorbaru2020-06-152-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use krb5_xfree if available, otherwise default to krb5_free_unparsed_name.
| | * | | | MDEV-22852: SIGSEGV in sortlength (optimized builds)Varun Gupta2020-07-013-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue here is for a DEPENDENT subquery that has an aggregate function in the ORDER BY clause, is wrapped inside an Item_aggregate_ref. For computation of ORDER BY we need to refer to the temp table field corresponding to this item. But in the function make_sortorder, we were explicitly casting Item_aggrgate_ref to Item_sum, which leads to us not getting the temp table field corresponding to the item.
| | * | | | MDEV-22984: Throw an error when arguments to window functions are window ↵Varun Gupta2020-06-303-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions Window function is not allowed as arguments to window functions according to the standard.
| | * | | | speed up fil_validate() in debug buildsEugene Kosov2020-06-301-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is very common in a debug build. I can even see it in profiler. This patch reduces execution time of fil_validate() from 8948ns 8367ns 8650ns 8906ns 8448ns to 260ns 232ns 403ns 275ns 169ns in my environment. The trick is a faster fil_space_t iteration. Hash table is typically initialized with a size of 50,000. And looping through it is slow. Slower, than iterating an exact amount of fil_space_t which is typically less than ten. Only debug builds are affected.