summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| | | | * | Fix compile warning:Sergei Petrunia2020-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was: implicit conversion from 'ha_rows' (aka 'unsigned long long') to 'double' changes value from 18446744073709551615 to 18446744073709551616 Follow what JOIN::get_examined_rows() does for similar code.
| | | * | | InnoDB: improve error message for checksum mismatchEugene Kosov2020-03-121-1/+2
| | | | | |
| | | * | | Add galera debug sync to galera_slave_replay test.Jan Lindström2020-03-111-1/+2
| | | | | |
| | * | | | Add galera debug sync to galera_slave_replay test.Jan Lindström2020-03-121-1/+2
| | | | | |
| | * | | | Fixed wrong assert (found by clang)Monty2020-03-111-1/+1
| | | | | |
| * | | | | MDEV-21599 plugins.server_audit fails sporadically in buildbotSergei Golubchik2020-03-141-0/+3
| | | | | |
* | | | | | perfschema: remove unused variablesMarko Mäkelä2020-03-171-6/+3
| | | | | |
* | | | | | Fix the build on big-endian systemsMarko Mäkelä2020-03-171-15/+17
|\ \ \ \ \ \
| * | | | | | Fix compile on all big endian related to innodb:ut_crc32_swap_byteorderDaniel Black2020-03-171-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move function ut_crc32_swap_byteorder to a non-x86 #ifdef area. As its only used in BIGENDIAN, use #ifdefs around ut_crc32_swap_byteorder. Travis CI and Debian both include s390x in builds/test, which is big endian. Fixes commit: 1312b4ebb652
* | | | | | | MDEV-21956 Add class Sys_var_charptr_fscsAlexander Barkov2020-03-174-141/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplifying definitions on Sys_var_charptr*: - Removing sys_var::is_os_charset - Adding a new class Sys_var_charptr_fscs, to handle system variables with character_set_filesystem.
* | | | | | | Cleanup: Remove an unused variableMarko Mäkelä2020-03-161-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | log_write_buf(): Remove the unused variable write_header. The dependent code was removed in commit 0c2365c4e3c89c3b284315e19a7d95221b524868. That was dead or unnecessary code at least ever since commit 9ef2d29ff44de2013c95666a011b993e5c2e5674 removed the support for innodb_log_files_in_group>1.
* | | | | | | MDEV-21949 key rotation for innodb_encrypt_log is not working in 10.5Eugene Kosov2020-03-162-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | log_t::has_encryption_key_rotation(): checks whether key rotation is supported. In a subsequent redo log format version, this key rotation may be broken again.
* | | | | | | cleanup redo logEugene Kosov2020-03-163-46/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Write log header just ones when file is created, instead of writing to it on every log file wrap around. log_t::file::write_header_durable(): this one writes to log header log_write_buf(): this one stops writing to log header
* | | | | | | cleanup redo logEugene Kosov2020-03-161-20/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | move statistics modification into one place
* | | | | | | MDEV-21824 Crash in convert_error_messageVladislav Vaintroub2020-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | restore check for client charset_info == NULL, which was previously removed in MDEV-8844
* | | | | | | fix typo on non-Linux/WindowsVladislav Vaintroub2020-03-161-1/+1
| | | | | | |
* | | | | | | fix a copy-paste error in 8fd654ce0e5Sergei Golubchik2020-03-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that by a (un)lucky coincidence did not prevent 8fd654ce0e5 from working properly
* | | | | | | fix a nondeterminism in perfschema.statement_program_nesting_event_check testSergei Golubchik2020-03-162-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when selecting from perfschema, filter out statements used by the test istself in wait_condition.inc, because they, by design, can be repeated unpredictable number of times.
* | | | | | | MDEV-21945 Assertion w==OPT failed in trx_purge_add_undo_to_history()Marko Mäkelä2020-03-161-1/+2
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, when redo log is being written for modifying a persistent data page, the data page must actually be changed. If the write can sometimes be optimized away, then the template parameter w=mtr_t::OPT should be passed in order to silence the debug assertion failure. InnoDB undo log pages can be reused without properly freeing or initializing them in between. In particular, the undo log header page field TRX_UNDO_TRX_NO could have been part of an undo log record page, and those bytes could accidentally have the desired value when the page is reused as an undo log header page of another transaction. Because the function trx_undo_set_state_at_finish() always changes the TRX_UNDO_STATE of the page, and because recovery is only reading TRX_UNDO_TRX_NO for pages that either have the correct TRX_UNDO_STATE or, in trx_rseg_array_init(), are attached to the TRX_SYS page, the garbage values in TRX_UNDO_TRX_NO do not seem to cause a problem. This assertion failure affects debug builds only.
* | | | | | MDEV-21942 Building 10.5 requires Internet accessSergei Golubchik2020-03-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Force correct PCRE2 linking in the official binaries. System pcre2 in RPM/DEB, bundled in bintars.
* | | | | | MDEV-21942 Building 10.5 requires Internet accessSergei Golubchik2020-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | fix build requirements for debian
* | | | | | update the test result for new perfschemaSergei Golubchik2020-03-161-1/+1
| | | | | |
* | | | | | MDEV-21943 reduce the binary tarball sizeSergei Golubchik2020-03-162-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | strip all client binaries (that is, not mysqld) in bintars
* | | | | | MDEV-21943 reduce the binary tarball sizeSergei Golubchik2020-03-161-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in mysql_release builds only build embedded for rpm and deb but not for bintar
* | | | | | restore stack traces that were broken by ebfe8c4e0eSergei Golubchik2020-03-161-4/+0
| | | | | |
* | | | | | Merge branch '10.5' of github.com:MariaDB/server into 10.5Kentoku SHIBA2020-03-1647-111/+183
|\ \ \ \ \ \
| * | | | | | Fix various spelling errorsOtto Kekäläinen2020-03-1640-80/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e.g. - dont -> don't - occurence -> occurrence - succesfully -> successfully - easyly -> easily Also remove trailing space in selected files. These changes span: - server core - Connect and Innobase storage engine code - OQgraph, Sphinx and TokuDB storage engines Related to MDEV-21769.
| * | | | | | MDEV-21534 - Improve innodb redo log group commit performanceVladislav Vaintroub2020-03-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instrument new synchronization primitive with thd_wait_begin/end to inform threadpool about waits. This considerably improve performance on write benchmarks (e.g sysbench update_index) with generic threadpool, of course the cost is possibility of many newly created threads.
| * | | | | | MDEV-21922: Allow packing addon fields even if they don't honour ↵Varun Gupta2020-03-153-3/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | max_length_for_sort_data Addon fields will be packed if the length of addon fields is greater than max_length_for_sort_data.
| * | | | | | MDEV-742 test correction.Andrei Elkin2020-03-153-27/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed XA-ROLLBACK not to write into binlog when XA-prepare run in sql_log_bin-OFF environment. (Two tests affected).
* | | | | | | fix evaluating bitmap issue in spiderKentoku SHIBA2020-03-163-7/+7
|/ / / / / /
* | | | | | Test case fix: sort XA RECOVER resultSergey Vojtovich2020-03-153-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of MDEV-742 - XA PREPAREd transaction survive disconnect/server restart
* | | | | | MDEV-742 XA PREPAREd transaction survive disconnect/server restartAndrei Elkin2020-03-1472-220/+8867
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lifted long standing limitation to the XA of rolling it back at the transaction's connection close even if the XA is prepared. Prepared XA-transaction is made to sustain connection close or server restart. The patch consists of - binary logging extension to write prepared XA part of transaction signified with its XID in a new XA_prepare_log_event. The concusion part - with Commit or Rollback decision - is logged separately as Query_log_event. That is in the binlog the XA consists of two separate group of events. That makes the whole XA possibly interweaving in binlog with other XA:s or regular transaction but with no harm to replication and data consistency. Gtid_log_event receives two more flags to identify which of the two XA phases of the transaction it represents. With either flag set also XID info is added to the event. When binlog is ON on the server XID::formatID is constrained to 4 bytes. - engines are made aware of the server policy to keep up user prepared XA:s so they (Innodb, rocksdb) don't roll them back anymore at their disconnect methods. - slave applier is refined to cope with two phase logged XA:s including parallel modes of execution. This patch does not address crash-safe logging of the new events which is being addressed by MDEV-21469. CORNER CASES: read-only, pure myisam, binlog-*, @@skip_log_bin, etc Are addressed along the following policies. 1. The read-only at reconnect marks XID to fail for future completion with ER_XA_RBROLLBACK. 2. binlog-* filtered XA when it changes engine data is regarded as loggable even when nothing got cached for binlog. An empty XA-prepare group is recorded. Consequent Commit-or-Rollback succeeds in the Engine(s) as well as recorded into binlog. 3. The same applies to the non-transactional engine XA. 4. @@skip_log_bin=OFF does not record anything at XA-prepare (obviously), but the completion event is recorded into binlog to admit inconsistency with slave. The following actions are taken by the patch. At XA-prepare: when empty binlog cache - don't do anything to binlog if RO, otherwise write empty XA_prepare (assert(binlog-filter case)). At Disconnect: when Prepared && RO (=> no binlogging was done) set Xid_cache_element::error := ER_XA_RBROLLBACK *keep* XID in the cache, and rollback the transaction. At XA-"complete": Discover the error, if any don't binlog the "complete", return the error to the user. Kudos ----- Alexey Botchkov took to drive this work initially. Sergei Golubchik, Sergei Petrunja, Marko Mäkelä provided a number of good recommendations. Sergei Voitovich made a magnificent review and improvements to the code. They all deserve a bunch of thanks for making this work done!
* | | | | | Fixed compiler failures with gcc 7.4.1 and new my_malloc codeMonty2020-03-143-12/+16
| | | | | |
* | | | | | MDEV-21920 binlog_encryption.rpl_gtid_basic test failure with --psSergei Golubchik2020-03-141-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | revert e74c1c9ece7 to restore 2bbcf9a19cc
* | | | | | Merge branch 'github/10.5' into 10.5Sergei Golubchik2020-03-14125-1641/+1600
|\ \ \ \ \ \
| * | | | | | cleanup redo logEugene Kosov2020-03-142-18/+3
| | | | | | |
| * | | | | | Pre-MDEV-742 InnoDB fixesSergey Vojtovich2020-03-132-74/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Refactored innobase_close_connection(). Transaction must've already been rolled back by this time. We should expect only transactions in the PREPARED state when MDEV-742 is done. 2. Added missing put_pins() to trx_disconnect_prepared(). Missing put_pins() wasn't a problem because trx_disconnect_prepared() is a dead code. But it will get revived in the main MDEV-742 patch. 3. Fixed missing reset of trx->mysql_log_file_name when RW transaction didn't emit any log records (zero-modification RW). The problem was detected by ASAN when disconnected XA transaction was trying to make use of inherited mysql_log_file_name pointing into binlog data of detached THD. This missing reset also had user-visible side effect, when trx_sys_print_mysql_binlog_offset() would report binlog position not of the most recently committed transaction. One of possible scenarios that is expected to misbehave is as following: thr1> CREATE TABLE t1(a INT) ENGINE=InnoDB; thr1> INSERT INTO t1 VALUES(1); thr1> BEGIN; thr1> UPDATE t1 SET a=1 thr1> COMMIT; -- zero-modification, misses to reset mysql_log_file_name thr2> BEGIN; thr2> INSERT INTO t1 VALUES(2); thr2> COMMIT; thr1> BEGIN; thr1> do-some-real-changes; thr1> ROLLBACK; -- will store binlog pos from previous COMMIT in thr1? In this case it means if binlog is replayed from position reported by trx_sys_print_mysql_binlog_offset(), t1 will end up with two records containing '2'. Part of MDEV-742 - XA PREPAREd transaction survive disconnect/server restart
| * | | | | | Extended debug_sync_control life timeSergey Vojtovich2020-03-133-17/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It now lives from THD constructor to THD destructor. Reset before THD is released to a cache. Change user doesn't reset debug_sync_control anymore. Needed to be able to make use of DEBUG_SYNC() at later stages like ha_close_connection().
| * | | | | | MDEV-21903 FTS optimize thread aborts during shutdownThirunarayanan Balathandayuthapani2020-03-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This issue was caused by 5e62b6a5e06eb02cbde1e34e95e26f42d87fce02. fts_optimize_callback() should free fts_optimize_wq and make it as NULL when it receives FTS_MSG_STOP message. So that subsequent fts_optimize_callback() doesn't fail with segmentation fault.
| * | | | | | Update libmariadb to fix GCC -Wstringop-truncationMarko Mäkelä2020-03-131-0/+0
| | | | | | |
| * | | | | | MDEV-15058: Remove buf_pool_get_dirty_pages_count()Marko Mäkelä2020-03-133-50/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with commit 1a6f708ec594ac0ae2dd30db926ab07b100fa24b the function buf_pool_get_dirty_pages_count() is only used in a debug check. It was dead code for non-debug builds. buf_flush_dirty_pages(): Perform the debug check inline, and replace the assertion ut_ad(first || buf_pool_get_dirty_pages_count(id) == 0); with another one that is executed while holding the mutexes: ut_ad(id != bpage->id.space());
| * | | | | | MDEV-21920 binlog_encryption.rpl_gtid_basic test failure with --psAlexander Barkov2020-03-131-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updating libmariadb to use 3be5897c3346639fa6d7195480d93108798c4917, which fixed the problem.
| * | | | | | MDEV-20632: Fix -Wmaybe-uninitializedMarko Mäkelä2020-03-131-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create_tmp_table::add_fields(): Initialize uneven_delta= 0 to suppress the warning from GCC 9.2.1 and 10.0.1, and consistently indent the code with spaces.
| * | | | | | MDEV-21907: Fix or disable -Wconversion on GCC 5.3.0 i386Marko Mäkelä2020-03-136-13/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix or disable those -Wconversion that were missed by GCC 5.4.0 targeting AMD64.
| * | | | | | MDEV-21907: InnoDB: Enable -Wconversion on clang and GCCMarko Mäkelä2020-03-1280-682/+726
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The -Wconversion in GCC seems to be stricter than in clang. GCC at least since version 4.4.7 issues truncation warnings for assignments to bitfields, while clang 10 appears to only issue warnings when the sizes in bytes rounded to the nearest integer powers of 2 are different. Before GCC 10.0.0, -Wconversion required more casts and would not allow some operations, such as x<<=1 or x+=1 on a data type that is narrower than int. GCC 5 (but not GCC 4, GCC 6, or any later version) is complaining about x|=y even when x and y are compatible types that are narrower than int. Hence, we must rewrite some x|=y as x=static_cast<byte>(x|y) or similar, or we must disable -Wconversion. In GCC 6 and later, the warning for assigning wider to bitfields that are narrower than 8, 16, or 32 bits can be suppressed by applying a bitwise & with the exact bitmask of the bitfield. For older GCC, we must disable -Wconversion for GCC 4 or 5 in such cases. The bitwise negation operator appears to promote short integers to a wider type, and hence we must add explicit truncation casts around them. Microsoft Visual C does not allow a static_cast to truncate a constant, such as static_cast<byte>(1) truncating int. Hence, we will use the constructor-style cast byte(~1) for such cases. This has been tested at least with GCC 4.8.5, 5.4.0, 7.4.0, 9.2.1, 10.0.0, clang 9.0.1, 10.0.0, and MSVC 14.22.27905 (Microsoft Visual Studio 2019) on 64-bit and 32-bit targets (IA-32, AMD64, POWER 8, POWER 9, ARMv8).
| * | | | | | MDEV-21907: Fix some -Wconversion outside InnoDBMarko Mäkelä2020-03-1213-154/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some .c and .cc files are compiled as part of Mariabackup. Enabling -Wconversion for InnoDB would also enable it for Mariabackup. The .h files are being included during InnoDB or Mariabackup compilation. Notably, GCC 5 (but not GCC 4 or 6 or later versions) would report -Wconversion for x|=y when the type is unsigned char. So, we will either write x=(uchar)(x|y) or disable the -Wconversion warning for GCC 5. bitmap_set_bit(), bitmap_flip_bit(), bitmap_clear_bit(), bitmap_is_set(): Always implement as inline functions.
| * | | | | | MDEV-16264: Eliminate unsafe os_aio_userdata_t type castMarko Mäkelä2020-03-123-2/+8
| | | | | | |
| * | | | | | MDEV-21924 Clean up InnoDB GIS record comparisonMarko Mäkelä2020-03-128-541/+349
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The extension of the record comparison functions for SPATIAL INDEX in mysql/mysql-server@b66ad511b61fffe75c58d0a607cdb837c6e6c821 was suboptimal for multiple reasons: Some functions used unnecessary temporary variables of the int type, instead of the more appropriate size_t, causing type mismatch. Many functions unnecessarily required rec_get_offsets() to be computed, or a parameter for length, although the size of the minimum bounding rectangle (MBR) is hard-coded as SPDIMS * 2 * sizeof(double), or 32 bytes. In InnoDB SPATIAL INDEX records, there always is a 32-byte key followed by either a 4-byte child page number or the PRIMARY KEY value. The length parameters were not properly validated. The function cmp_geometry_field() was making an incorrect attempt at checking that the lengths are at least sizeof(double) (8 bytes), even though the function is accessing up to 32 bytes in both MBR. Functions that are called from only one compilation unit are defined in another compilation unit, making the code harder to follow and potentially slower to execute. cmp_dtuple_rec_with_gis(): FIXME: Correct the debug assertion and possibly the function TABLE_SHARE::init_from_binary_frm_image() or related code, which causes an unexpected length of DATA_MBR_LEN + 2 bytes to be passed to this function.
| * | | | | | MDEV-13362: Fix -Wset-but-unusedMarko Mäkelä2020-03-121-1/+1
| | | | | | |