summaryrefslogtreecommitdiff
path: root/mysql-test
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.3 into 10.4Marko Mäkelä2021-09-2917-229/+334
|\
| * MDEV-20699 fixup: Re-record compat/oracle.sp-package resultMarko Mäkelä2021-09-291-0/+8
| |
| * Merge 10.2 into 10.3Marko Mäkelä2021-09-298-212/+279
| |\
| | * Make innodb.innodb_defrag_stats more deterministicMarko Mäkelä2021-09-292-162/+143
| | | | | | | | | | | | | | | | | | Let us mask the actual values of the defragmentation-related fields, because they may vary. Also, remove the dependency on purge, and instead delete records by a ROLLBACK of INSERT.
| | * MDEV-24454 Crash at change_item_treebb-10.2-MDEV-24454Oleksandr Byelkin2021-09-274-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use in_sum_func (and so nest_level) only in LEX to which SELECT lex belong to Reduce usage of current_select (because it does not always point on the correct SELECT_LEX, for example with prepare. Change context for all classes inherited from Item_ident (was only for Item_field) in case of pushing down it to HAVING. Now name resolution context have to have SELECT_LEX reference if the context is present. Fixed feedback plugin stack usage.
| | * Remove test from galera_fulltext until MDEV-24978 is fixed.bb-10.2-jan-galeraJan Lindström2021-09-272-50/+21
| | |
| * | MDEV-26672 test fixupMarko Mäkelä2021-09-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Occasionally, after restart, additional transactions will have been executed, possibly related to innodb_stats_auto_recalc. We should only care that the transaction ID sequence does not go backwards.
| * | MDEV-20699 mysqldump of routines causes MariaDB to get killed by oom-killerbb-10.3-wlad-MDEV-20699Vladislav Vaintroub2021-09-275-12/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason for this behavior is that SP get cached, per connection. The stored_program_cache is size of this cache, which amounts to 256 routines by default. A compiled stored procedure can easily be several megabytes in size. Thus calling SHOW CREATE PROCEDURE for all stored procedures, like mysqldump does, can require significant amount of memory. Fixed by bypassing the cache for "SHOW CREATE". This should normally be fine also perfomance-wise, as cache is meant to be used for repeated execution, not repeated SHOW CREATEs. Added a test to verify that CREATE PROCEDURE + SHOW CREATE PROCEURE do not cache, i.e amount of allocated memory does not change. Note, there is a change in existing behavior in an edge case : If "SHOW CREATE PROCEDURE p1" called from p1, after p1 was altered, now this will now return altered code. Previour behavior - relied on caching and would return old code. The previous behavior might was not necessarily correct.
* | | MDEV-21806 : galera.galera_partition MTR failed: failed to recover from ↵bb-10.4-MDEV-20451-galeraJan Lindström2021-09-273-0/+12
| | | | | | | | | | | | | | | | | | DONOR state Add wait_condition to wait until all nodes are in cluster
* | | Add wait_condition before problematic selectJan Lindström2021-09-273-2/+25
| | |
* | | Merge 10.3 into 10.4Marko Mäkelä2021-09-242-51/+0
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2021-09-242-51/+0
| |\ \ | | |/
| | * Revert MDEV-25114Marko Mäkelä2021-09-248-474/+28
| | | | | | | | | | | | | | | | | | Revert 88a4be75a5f3b8d59ac8f6347ff2c197813c05dc and 9d97f92febc89941784d17d59c60275e21140ce0, which had been prematurely pushed by accident.
| | * Revert "MDEV-24978 : SIGABRT in __libc_message"bb-10.2-MDEV-24978-fJan Lindström2021-09-242-51/+0
| | | | | | | | | | | | This reverts commit 30dea4599e44e3008fb9bc5fe79ab5747841f21f.
| | * MDEV-25114 Crash: WSREP: invalid state ROLLED_BACK (FATAL)sjaakola2021-09-248-28/+474
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is the plan D variant for fixing potetial mutex locking order exercised by BF aborting and KILL command execution. In this approach, KILL command is replicated as TOI operation. This guarantees total isolation for the KILL command execution in the first node: there is no concurrent replication applying and no concurrent DDL executing. Therefore there is no risk of BF aborting to happen in parallel with KILL command execution either. Potential mutex deadlocks between the different mutex access paths with KILL command execution and BF aborting cannot therefore happen. TOI replication is used, in this approach, purely as means to provide isolated KILL command execution in the first node. KILL command should not (and must not) be applied in secondary nodes. In this patch, we make this sure by skipping KILL execution in secondary nodes, in applying phase, where we bail out if applier thread is trying to execute KILL command. This is effective, but skipping the applying of KILL command could happen much earlier as well. This patch also fixes mutex locking order and unprotected THD member accesses on bf aborting case. We try to hold THD::LOCK_thd_data during bf aborting. Only case where it is not possible is at wsrep_abort_transaction before call wsrep_innobase_kill_one_trx where we take InnoDB mutexes first and then THD::LOCK_thd_data. This will also fix possible race condition during close_connection and while wsrep is disconnecting connections. Added wsrep_bf_kill_debug test case Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | Merge branch '10.3' into 10.4Vladislav Vaintroub2021-09-242-108/+4
|\ \ \ | |/ /
| * | MDEV-11499 mysqltest, Windows : improve diagnostics if server fails to shutdownVladislav Vaintroub2021-09-242-108/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create minidump when server fails to shutdown. If process is being debugged, cause a debug break. Moves some code which is part of safe_kill into mysys, as both safe_kill, and mysqltest produce minidumps on different timeouts. Small cleanup in wait_until_dead() - replace inefficient loop with a single wait.
* | | Merge 10.3 into 10.4Marko Mäkelä2021-09-242-33/+16
|\ \ \ | |/ /
| * | MDEV-26672 innodb_undo_log_truncate may reset transaction ID sequenceMarko Mäkelä2021-09-242-32/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trx_rseg_header_create(): Add a parameter for the value that is to be written to TRX_RSEG_MAX_TRX_ID. If we omit this write, then the updated test innodb.undo_truncate will fail for the 4k, 8k, 16k page sizes. This was broken ever since commit 947efe17ed8188ca4feef6deb0c2831a246b5c8f (MDEV-15158) removed the writes of transaction identifiers to the TRX_SYS page. srv_do_purge(): Truncate undo tablespaces also during slow shutdown (innodb_fast_shutdown=0). Thanks to Krunal Bauskar for noticing this problem.
* | | MDEV-26566 : galera.galera_var_cluster_address MTR failed: InnoDB: Assertion ↵Jan Lindström2021-09-234-4/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | failure in file row0ins.cc line 3206 Actual problem was that we tried to calculate persistent statistics to wsrep_schema tables in this case wsrep_streaming_log. These tables should not have persistent statistics. Therefore, in table creation tables should be created with STATS_PERSISTENT=0 table option. During rolling-upgrade tables naturally already exists, thus we need to alter them to contain STATS_PERSISTENT=0 table option.
* | | MDEV-26571 : galera_sr.GCF-627 MTR failed: Result length mismatchJan Lindström2021-09-232-12/+8
| | | | | | | | | | | | | | | Test changes only: do not output mysql.wsrep_streaming_log contents.
* | | Merge 10.3 into 10.4Marko Mäkelä2021-09-2210-308/+69
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2021-09-228-202/+73
| |\ \ | | |/
| | * MDEV-26450: Corruption due to innodb_undo_log_truncatebb-10.2-MDEV-26450Marko Mäkelä2021-09-222-81/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least since commit 055a3334adc004bd3a897990c2f93178e6bb5f90 (MDEV-13564) the undo log truncation in InnoDB did not work correctly. The main issue is that during the execution of trx_purge_truncate_history() some pages of the newly truncated undo tablespace could be discarded. fsp_try_extend_data_file(): Apply the peculiar rounding of fil_space_t::size_in_header only to the system tablespace, whose size can be expressed in megabytes in a configuration parameter. Other files may freely grow by a number of pages. fseg_alloc_free_page_low(): Do allow the extension of undo tablespaces, and mention the file name in the error message. mtr_t::commit_shrink(): Implement crash-safe shrinking of a tablespace file. First, durably write the log, then shrink the file, and finally release the page latches of the rebuilt tablespace. Refactored from trx_purge_truncate_history(). log_write_and_flush_prepare(), log_write_and_flush(): New functions to durably write log during mtr_t::commit_shrink().
| | * MDEV-26636: InnoDB defragmentation statistics cause races on TEMPORARY TABLEMarko Mäkelä2021-09-182-115/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | btr_defragment_save_defrag_stats_if_needed(): Do not save defragmentation statistics for temporary tables. They are exempt of defragmentation anyway (ha_innobase::optimize() never invokes defragmentation for them), and the user-visible names are not available inside InnoDB. Furthermore, InnoDB assumes that temporary tables are never accessed by other threads than the one that handles the session with which the temporary table is associated with. Furthermore, we simplify the test innodb.innodb_defrag_stats and include a test case that demonstrates that defragmentation statistics are no longer being saved for temporary tables.
| | * MDEV-15675 encryption.innodb_encryption failed in buildbot with timeoutbb-10.2-MDEV-15675Thirunarayanan Balathandayuthapani2021-09-172-3/+5
| | | | | | | | | | | | | | | Test case fail to include undo tablespace while waiting for the encryption thread to encrypt all existing tablespace
| | * Give less memory to get reliable error.Oleksandr Byelkin2021-09-162-3/+3
| | |
| * | MDEV-26521 Remove mdev-504.testVladislav Vaintroub2021-09-212-104/+0
| | |
* | | Fixed random failure of main.truncate_notembeddedMonty2021-09-212-2/+4
| | | | | | | | | | | | | | | The test depends on how the server allocates memory and may fail randomly. Fixed by accepting that TRUNCATE may work in some cases (happened to me)
* | | Updated main.alias test to fix max_lengthMonty2021-09-212-7/+7
| | | | | | | | | | | | | | | The test will work after libmariadb has been updated to return correct max_length for prepared statements
* | | Fixed alias.test to also works with psMonty2021-09-172-7/+7
| | | | | | | | | | | | | | | | | | The issue is that max_length for prepared statements are different from normal queries, which can optimize the max_length based on the result length.
* | | MDEV-19950 addendum: galera_ssl_upgrade removed from the list of disabled ↵bb-10.4-MDEV-19950-addendum-galeraJulius Goryavsky2021-09-172-1/+3
| | | | | | | | | | | | tests and adapted for 10.4+
* | | MDEV-26053 : TRUNCATE on table with Foreign Key Constraint no longer ↵bb-10.4-truncateJan Lindström2021-09-172-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | replicated to other nodes Problem was that there was extra condition !thd->lex->no_write_to_binlog before call to begin TOI. It seems that this variable is not initialized. TRUNCATE does not support [NO_WRITE_TO_BINLOG | LOCAL] keywords, thus we should not check this condition. All this was hidden in a macro, so I decided to remove those macros that were used only a few places with actual function calls.
* | | MDEV-26621 assertion failue "index->table->persistent_autoinc" in ↵bb-10.4-kevgsEugene Kosov2021-09-162-0/+27
| | | | | | | | | | | | | | | | | | | | | /storage/innobase/btr/btr0btr.cc during IMPORT dict_index_t::clear_instant_alter(): when searhing for an AUTO_INCREMENT column don't skip the beginning of the list because the field can be at the beginning of the list
* | | MDEV-23519 Protocol packet - "Original Name" info is showing alias name,Monty2021-09-142-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | instead of original name of the column When doing refactoring of temporary table field creation a mistake was done when copying the column name when creating internal temporary tables. For internal temporary tables we should use the original field name, not the item name (= alias).
* | | MDEV-21613 Failed to open table mysql.wsrep_streaming_log for writingbb-10.4-MDEV-21613Daniele Sciascia2021-09-143-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix sporadic failure for MTR test galera_sr.GCF-1018B. The test sometimes fails due to an error that is logged to the error log unnecessarily. A deterministic test case (included in this patch) shows that the error is loggen when a transaction is BF aborted right before it opens the streaming log table to perform fragment removal. When that happens, the attempt to open the table fails and consequently an error is logged. There is no need to log this error, as an ER_LOCK_DEADLOCK error is returned to the client. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | Merge 10.3 into 10.4Marko Mäkelä2021-09-113-0/+14
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2021-09-113-0/+14
| |\ \ | | |/
| | * Fix an occasional timeout in innodb.alter_partitionedMarko Mäkelä2021-09-112-0/+8
| | |
| | * MDEV-26537 InnoDB corrupts files due to incorrect st_blksize calculationMarko Mäkelä2021-09-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The st_blksize returned by fstat(2) is not documented to be a power of 2, like we assumed in commit 58252fff15acfe7c7b0452a87e202e3f8e454e19 (MDEV-26040). While on Linux, the st_blksize appears to report the file system block size (which hopefully is not smaller than the sector size of the underlying block device), on FreeBSD we observed st_blksize values that might have been something similar to st_size. Also IBM AIX was affected by this. A simple test case would lead to a crash when using the minimum innodb_buffer_pool_size=5m on both FreeBSD and AIX: seq -f 'create table t%g engine=innodb select * from seq_1_to_200000;' \ 1 100|mysql test& seq -f 'create table u%g engine=innodb select * from seq_1_to_200000;' \ 1 100|mysql test& We will fix this by not trusting st_blksize at all, and assuming that the smallest allowed write size (for O_DIRECT) is 4096 bytes. We hope that no storage systems with larger block size exist. Anything larger than 4096 bytes should be unlikely, given that it is the minimum virtual memory page size of many contemporary processors. MariaDB Server on Microsoft Windows was not affected by this. While the 512-byte sector size of the venerable Seagate ST-225 is still in widespread use, the minimum innodb_page_size is 4096 bytes, and innodb_log_file_size can be set in integer multiples of 65536 bytes. The only occasion where InnoDB uses smaller data file block sizes than 4096 bytes is with ROW_FORMAT=COMPRESSED tables with KEY_BLOCK_SIZE=1 or KEY_BLOCK_SIZE=2 (or innodb_page_size=4096). For such tables, we will from now on preallocate space in integer multiples of 4096 bytes and let regular writes extend the file by 1024, 2048, or 3072 bytes. The view INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES.FS_BLOCK_SIZE should report the raw st_blksize. For page_compressed tables, the function fil_space_get_block_size() will map to 512 any st_blksize value that is larger than 4096. os_file_set_size(): Assume that the file system block size is 4096 bytes, and only support extending files to integer multiples of 4096 bytes. fil_space_extend_must_retry(): Round down the preallocation size to an integer multiple of 4096 bytes.
* | | Merge branch '10.3' into 10.4Sergei Golubchik2021-09-094-54/+55
|\ \ \ | |/ /
| * | Merge branch '10.2' into 10.3Sergei Golubchik2021-09-094-54/+55
| |\ \ | | |/
| | * fix main.truncate failures in --embeddedSergei Golubchik2021-09-094-54/+55
| | |
* | | post-merge fixSergei Golubchik2021-09-091-0/+2
| | |
* | | Merge remote-tracking branch 'upstream/10.3' into 10.4Vicențiu Ciorbaru2021-09-09115-1584/+3233
|\ \ \ | |/ /
| * | Merge branch '10.2' into 10.3Vicențiu Ciorbaru2021-09-07116-1585/+3233
| |\ \ | | |/
| | * MDEV-25325 built-in documentation for performance_schema tablesHaidong Ji2021-09-07107-1582/+3072
| | | | | | | | | | | | | | | | | | Improve documentation of performance_schema tables by appending COLUMN comments to tables. Additionally improve test coverage and update corresponding tests.
| | * MDEV-23365: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())'bb-10.2-MDEV-23365Rucha Deodhar2021-09-062-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | failed upon killed TRUNCATE Note: This is a backport of 1cb4caa66d5fd2a9bc095d68988324b7b358d70f from 10.3 Analysis: Assertion failure happens because less session memory is set and so table can't be reopened. So the statement can't be used. This error goes unreported. Fix: Return the error state.
| | * MDEV-12055 binlog.binlog_stm_ctype_ucs postfixDaniel Black2021-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As highlighted in https://bugs.gentoo.org/807995, people occasionaly run tests in the 20:00->23:59:59 time range. Fixes 265e3253f1e5218c8f85f1c412575069cb15f2c0 binlog.binlog_stm_ctype_ucs 'mix' w1 [ fail ] Test ended at 2021-08-11 22:55:35 CURRENT_TEST: binlog.binlog_stm_ctype_ucs --- /var/tmp/portage/dev-db/mariadb-10.5.11/work/mysql/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result 2021-06-18 18:19:11.000000000 +0800 +++ /var/tmp/portage/dev-db/mariadb-10.5.11/work/mysql/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.reject 2021-08-11 22:55:34.993447479 +0800 @@ -76,21 +76,21 @@ /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at # -#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created YYMMDD HH:MM:SS +#210811 22:55:34 server id # end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 210811 22:55:34
| | * MDEV-26518 ; Galera incorrectly handles primary or unique keys with any ↵bb-10.2-MDEV-26517Jan Lindström2021-09-024-0/+108
| | | | | | | | | | | | | | | | | | | | | multi-byte character set We need to set temporary buffer large enough to fit also multi-byte characters.