summaryrefslogtreecommitdiff
path: root/mysql-test
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-18019, MDEV-18135: Renew test OpenSSL certs at level 3 securityOtto Kekäläinen2021-04-1118-750/+1185
| | | | | | | | | | | | Touch attribute file to fix errors like: Can't open ./demoCA/index.txt.attr for reading, No such file or directory 140553384993216:error:02001002:system library: fopen:No such file or directory:../crypto/bio/bss_file.c:72: fopen('./demoCA/index.txt.attr','r') 140553384993216:error:2006D080:BIO routines: BIO_new_file:no such file:../crypto/bio/bss_file.c:79: Check that the request matches the signature
* MDEV-25297 Assertion: trx->roll_limit <= trx->undo_no in ROLLBACK TO SAVEPOINTMarko Mäkelä2021-04-092-0/+40
| | | | | | | | | | | | | In commit 8ea923f55b7666a359ac2c54f6c10e8609d16846 (MDEV-24818) when we optimized multi-statement INSERT transactions into empty tables, we would roll back the entire transaction on any error. But, we would fail to invalidate any SAVEPOINT that had been requested in the past. trx_t::savepoints_discard(): Renamed from trx_roll_savepoints_free(). row_mysql_handle_errors(): If we were in bulk insert, invoke trx_t::savepoints_discard(). In this way, a future attempt of ROLLBACK TO SAVEPOINT will return an error.
* MDEV-25315 Crash in SHOW ENGINE INNODB STATUSMarko Mäkelä2021-04-082-0/+35
| | | | | | | | | | | | | | In commit 8ea923f55b7666a359ac2c54f6c10e8609d16846 (MDEV-24818) when we optimized multi-statement INSERT into an empty table, we would sometimes wrongly enable bulk insert into a table that is actually already using row-level locking and undo logging. trx_has_lock_x(): New predicate, to check if the transaction of the current thread is holding an exclusive lock on a table. trx_undo_report_row_operation(): Only invoke trx_mod_table_time_t::start_bulk_insert() if trx_has_lock_x() holds.
* MDEV-20220: Merge 5.7 P_S replication table ↵Sujatha2021-04-084-0/+145
| | | | | | | | | | | | | | 'replication_applier_status_by_worker Step 3: ====== Preserve worker pool information on either STOP SLAVE/Error. In case STOP SLAVE is executed worker threads will be gone, hence worker threads will be unavailable. Querying the table at this stage will give empty rows. To address this case when worker threads are about to stop, due to an error or forced stop, create a backup pool and preserve the data which is relevant to populate performance schema table. Clear the backup pool upon slave start.
* MDEV-20220: Merge 5.7 P_S replication table ↵Sujatha2021-04-085-25/+49
| | | | | | | | | | | | | | | | | | | 'replication_applier_status_by_worker Step2: ===== Add two extra columns mentioned below. --------------------------------------------------------------------------- |Column Name: | Description: | |-------------------------------------------------------------------------| | | | |WORKER_IDLE_TIME | Total idle time in seconds that the worker | | | thread has spent waiting for work from | | | co-ordinator thread | | | | |LAST_TRANS_RETRY_COUNT | Total number of retries attempted by last | | | transaction | ---------------------------------------------------------------------------
* MDEV-20220: Merge 5.7 P_S replication table ↵Sujatha2021-04-088-27/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'replication_applier_status_by_worker Step1: ===== Backport 'replication_applier_status_by_worker' from upstream. Iterate through rpl_parallel_thread_pool and display slave worker thread specific information as part of 'replication_applier_status_by_worker' table. --------------------------------------------------------------------------- |Column Name: | Description: | |-------------------------------------------------------------------------| | | | |CHANNEL_NAME | Name of replication channel through which the | | | transaction is received. | | | | |THREAD_ID | Thread_Id as displayed in 'performance_schema. | | | threads' table for thread with name | | | 'thread/sql/rpl_parallel_thread' | | | | | | THREAD_ID will be NULL when worker threads are | | | stopped due to an error/force stop | | | | |SERVICE_STATE | Thread is running or not | | | | |LAST_SEEN_TRANSACTION | Last GTID executed by worker | | | | |LAST_ERROR_NUMBER | Last Error that occured on a particular worker | | | | |LAST_ERROR_MESSAGE | Last error specific message | | | | |LAST_ERROR_TIMESTAMP | Time stamp of last error | | | | --------------------------------------------------------------------------- CHANNEL_NAME will be empty when the worker has not processed any transaction. Channel_name points to valid source channel_name when it is processing a transaction/event group.
* Merge 10.5 into 10.6Marko Mäkelä2021-04-0818-7/+728
|\
| * Merge 10.4 into 10.5bb-10.5-mergeMarko Mäkelä2021-04-082-0/+89
| |\
| | * MDEV-25334 FTWRL/Backup blocks DDL on temporary tables with binlog enabled, ↵Monty2021-04-072-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | assertion fails in Diagnostics_area::set_error_status Fixed by adding a MDL_BACKUP_COMMIT lock before altering temporary tables whose creation was logged to binary log (in which case the ALTER TABLE must also be logged)
| * | MDEV-22775: Merge 10.4 into 10.5Marko Mäkelä2021-04-082-0/+25
| |\ \ | | |/
| | * MDEV-22775 [HY000][1553] Changing name of primary key column with foreign ↵Alexander Barkov2021-04-072-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | key constraint fails. Problem: The problem happened because of a conceptual flaw in the server code: a. The table level CHARSET/COLLATE clause affected all data types, including numeric and temporal ones: CREATE TABLE t1 (a INT) CHARACTER SET utf8 [COLLATE utf8_general_ci]; In the above example, the Column_definition_attributes (and then the FRM record) for the column "a" erroneously inherited "utf8" as its character set. b. The "ALTER TABLE t1 CONVERT TO CHARACTER SET csname" statement also erroneously affected Column_definition_attributes::charset for numeric and temporal data types and wrote "csname" as their character set into FRM files. So now we have arbitrary non-relevant charset ID values for numeric and temporal data types in all FRM files in the world :) The code in the server and the other engines did not seem to be affected by this flaw. Only InnoDB inplace ALTER was affected. Solution: Fixing the code in the way that only character string data types (CHAR,VARCHAR,TEXT,ENUM,SET): - inherit the table level CHARSET/COLLATE clause - get the charset value according to "CONVERT TO CHARACTER SET csname". Numeric and temporal data types now always get &my_charset_numeric in Column_definition_attributes::charset and always write its ID into FRM files: - no matter what the table level CHARSET/COLLATE clause is, and - no matter what "CONVERT TO CHARACTER SET" says. Details: 1. Adding helper classes to pass small parts of HA_CREATE_INFO into Type_handler methods: - Column_derived_attributes - to pass table level CHARSET/COLLATE, so columns that do not have explicit CHARSET/COLLATE clauses can derive them from the table level, e.g. CREATE TABLE t1 (a VARCHAR(1), b CHAR(1)) CHARACTER SET utf8; - Column_bulk_alter_attributes - to pass bulk attribute changes generated by the ALTER related code. These bulk changes affect multiple columns at the same time: ALTER TABLE ... CONVERT TO CHARACTER SET csname; Note, passing the whole HA_CREATE_INFO directly to Type_handler would not be good: HA_CREATE_INFO is huge and would need not desired dependencies in sql_type.h and sql_type.cc. The Type_handler API should use smallest possible data types! 2. Type_handler::Column_definition_prepare_stage1() is now responsible to set Column_definition::charset properly, according to the data type, for example: - For string data types, Column_definition_attributes::charset is set from the table level CHARSET/COLLATE clause (if not specified explicitly in the column definition). - For numeric and temporal fields, Column_definition_attributes::charset is set to &my_charset_numeric, no matter what the table level CHARSET/COLLATE says. - For GEOMETRY, Column_definition_attributes::charset is set to &my_charset_bin, no matter what the table level CHARSET/COLLATE says. Previously this code (setting `charset`) was outside of of Column_definition_prepare_stage1(), namely in mysql_prepare_create_table(), and was erroneously called for all data types. 3. Adding Type_handler::Column_definition_bulk_alter(), to handle "ALTER TABLE .. CONVERT TO". Previously this code was inside get_sql_field_charset() and was erroneously called for all data types. 4. Removing the Schema_specification_st parameter from Type_handler::Column_definition_redefine_stage1(). Column_definition_attributes::charset is now fully properly initialized by Column_definition_prepare_stage1(). So we don't need access to the table level CHARSET/COLLATE clause in Column_definition_redefine_stage1() any more. 5. Other changes: - Removing global function get_sql_field_charset() - Moving the part of the former get_sql_field_charset(), which was responsible to inherit the table level CHARSET/COLLATE clause to new methods: -- Column_definition_attributes::explicit_or_derived_charset() and -- Column_definition::prepare_charset_for_string(). This code is only needed for string data types. Previously it was erroneously called for all data types. - Moving another part, which was responsible to apply the "CONVERT TO" clause, to Type_handler_general_purpose_string::Column_definition_bulk_alter(). - Replacing the call for get_sql_field_charset() in sql_partition.cc to sql_field->explicit_or_derived_charset() - it is perfectly enough. The old code was redundant: get_sql_field_charset() was called from sql_partition.cc only when there were no a "CONVERT TO CHARACTER SET" clause involved, so its purpose was only to inherit the table level CHARSET/COLLATE clause. - Moving the code handling the BINCMP_FLAG flag from mysql_prepare_create_table() to Column_definition::prepare_charset_for_string(): This code is responsible to resolve the BINARY comparison style into the corresponding _bin collation, to do the following transparent rewrite: CREATE TABLE t1 (a VARCHAR(10) BINARY) CHARSET utf8; -> CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_bin); This code is only needed for string data types. Previously it was erroneously called for all data types. 6. Renaming Table_scope_and_contents_source_pod_st::table_charset to alter_table_convert_to_charset, because the only purpose it's used for is handlering "ALTER .. CONVERT". The new name is much more self-descriptive.
| * | Merge 10.4 into 10.5Marko Mäkelä2021-04-0810-0/+579
| |\ \ | | |/
| | * MDEV-21402 : sql_safe_updates breaks Galera 4bb-10.4-MDEV-21402Jan Lindström2021-04-063-0/+157
| | | | | | | | | | | | | | | Added handling for sql_safe_updated i.e. we disable it while we do wsrep_schema operations.
| | * MDEV-24956: ALTER TABLE not replicated with Galera in MariaDB 10.5.9bb-10.4-MDEV-25226mkaruza2021-04-053-0/+262
| | | | | | | | | | | | | | | | | | | | | | | | `WSREP_CLIENT` is used as condition for starting ALTER/OPTIMIZE/REPAIR TOI. Using this condition async replicated affected DDL's will not be replicated. Fixed by removing this condition. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| | * MDEV-25226 Assertion when wsrep_on set OFF with SR transactionDaniele Sciascia2021-04-054-0/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the following changes around variable wsrep_on: 1) Variable wsrep_on can no longer be updated from a session that has an active transaction running. The original behavior allowed cases like this: BEGIN; INSERT INTO t1 VALUES (1); SET SESSION wsrep_on = OFF; INSERT INTO t1 VALUES (2); COMMIT; With regular transactions this would result in no replication events (not even value 1). With streaming replication it would be unnecessarily complex to achieve the same behavior. In the above example, it would be possible for value 1 to be already replicated if it happened to fill a separate fragment, while value 2 wouldn't. 2) Global variable wsrep_on no longer affects current sessions, only subsequent ones. This is to avoid a similar case to the above, just using just by using global wsrep_on instead session wsrep_on: --connection conn_1 BEGIN; INSERT INTO t1 VALUES(1); --connection conn_2 SET GLOBAL wsrep_on = OFF; --connection conn_1 INSERT INTO t1 VALUES(2); COMMIT; The above example results in the transaction to be replicated, as global wsrep_on will only affect the session wsrep_on of new connections. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| * | MDEV-17913 Encrypted transactional Aria tables remain corrupt after crash ↵Monty2021-04-064-7/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | recovery, automatic repairment does not work This was because of a wrong test in encryption code that wrote random numbers over the LSN for pages for transactional Aria tables during repair. The effect was that after an ALTER TABLE ENABLE KEYS of a encrypted recovery of the tables would not work. Fixed by changing testing of !share->now_transactional to !share->base.born_transactional. Other things: - Extended Aria check_table() to check for wrong (= too big) LSN numbers. - If check_table() failed just because of wrong LSN or TRN numbers, a following repair table will just do a zerofill which is much faster. - Limit number of LSN errors in one check table to MAX_LSN_ERROR (10). - Removed old obsolete test of 'if (error_count & 2)'. Changed error_count and warning_count from bits to numbers of errors/warnings as this is more useful.
* | | GIS skip_locked_nowait test needs fixingbb-10.6-danielblack-MDEV-13115-select-for-update-skip-locked-nowaitDaniel Black2021-04-082-6/+3
| | |
* | | MDEV-13115: Add Oracle SKIP LOCKED tests casesMartin Hansson2021-04-086-0/+1372
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Imported the following tests from Oracle MySQL: * mysql-test/t/locking_clause.test * mysql-test/suite/innodb/t/skip_locked_nowait.test * mysql-test/t/locking_part.test Ported to MariaDB by Daniel Black, changes include: * Removed 'FOR SHARE OF /FOR UPDATE OF' tests that are part of MDEV-17514 (not yet implemented) * mysql-test/t/locking_clause.test removes broken the limit test (outstanding MDEV-25244) bug. * mysql-test/suite/innodb/t/skip_locked_nowait.test - removed high priority transactions * mysql-test/t/locking_part.test imported to mysql-test/suite/innodb/t/partition_locking.test changed ER_LOCK_NOWAIT -> ER_LOCK_WAIT_TIMEOUT consistent with already implemented WAIT/NOWAIT feature. Changed "FOR SHARE SKIP LOCKED" -> "LOCK IN SHARE MODE SKIP LOCKED".
* | | MDEV-13115: Implement SELECT SKIP LOCKEDDaniel Black2021-04-089-2/+293
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds an implementation for SELECT ... FOR UPDATE SKIP LOCKED / SELECT ... LOCK IN SHARED MODE SKIP LOCKED This is implemented only InnoDB at the moment, not in RockDB yet. This adds a new hander flag HA_CAN_SKIP_LOCKED than will be used when the storage engine advertises the flag. When a storage engine indicates this flag it will get TL_WRITE_SKIP_LOCKED and TL_READ_SKIP_LOCKED transaction types. The Lex structure has been updated to store both the FOR UPDATE/LOCK IN SHARE as well as the SKIP LOCKED so the SHOW CREATE VIEW implementation is simplier. "SELECT FOR UPDATE ... SKIP LOCKED" combined with CREATE TABLE AS or INSERT.. SELECT on the result set is not safe for STATEMENT based replication. MIXED replication will replicate this as row based events." Thanks to guidance from Facebook commit https://github.com/facebook/mysql-5.6/commit/193896c466d43fd905a62a60f1d73fd9c551a6e4 This helped verify basic test case, and components that need implementing (even though every part was implemented differently). Thanks Marko for guidance on simplier InnoDB implementation. Reviewers: Marko, Monty
* | | MDEV-25312 Replace fil_space_t::name with fil_space_t::name()bb-10.6-MDEV-25312Marko Mäkelä2021-04-073-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A consistency check for fil_space_t::name is causing recovery failures in MDEV-25180 (Atomic ALTER TABLE). So, we'd better remove that field altogether. fil_space_t::name was more or less a copy of dict_table_t::name (except for some special cases), and it was not being used for anything useful. There used to be a name_hash, but it had been removed already in commit a75dbfd7183cc96680f3e3e684fd36500dac8158 (MDEV-12266). We will also remove os_normalize_path(), OS_PATH_SEPARATOR, OS_PATH_SEPATOR_ALT. On Microsoft Windows, we will treat \ and / roughly in the same way. The intention is that for per-table tablespaces, the filenames will always follow the pattern prefix/databasename/tablename.ibd. (Any \ in the prefix must not be converted.) ut_basename_noext(): Remove (unused function). read_link_file(): Replaces RemoteDatafile::read_link_file(). We will ensure that the last two path component separators are forward slashes (converting up to 2 trailing backslashes on Microsoft Windows), so that everywhere else we can assume that data file names end in "/databasename/tablename.ibd". Note: On Microsoft Windows, path names that start with \\?\ must not contain / as path component separators. Previously, such paths did work in the DATA DIRECTORY argument of InnoDB tables. Reviewed by: Vladislav Vaintroub
* | | Merge 10.5 into 10.6Marko Mäkelä2021-03-3123-37/+299
|\ \ \ | |/ /
| * | Merge 10.4 into 10.5Marko Mäkelä2021-03-3119-37/+295
| |\ \ | | |/
| | * MDEV-15527 fixup for innodb_checksum_algorithm=full_crc32Marko Mäkelä2021-03-312-0/+10
| | |
| | * Merge 10.3 into 10.4Marko Mäkelä2021-03-3117-37/+285
| | |\
| | | * Merge 10.2 into 10.3Marko Mäkelä2021-03-3117-37/+262
| | | |\
| | | | * MDEV-25200 Index count mismatch due to aborted FULLTEXT INDEXThirunarayanan Balathandayuthapani2021-03-302-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Aborting of fulltext index creation fails to remove the index from sys indexes table. When we try to reload the table definition, InnoDB fails with index count mismatch error. InnoDB should remove the index from sys indexes while rollbacking the secondary index creation.
| | | | * Add missing have_perfschema.incMarko Mäkelä2021-03-302-0/+2
| | | | |
| | | | * Add supression for warning.Jan Lindström2021-03-302-0/+3
| | | | |
| | | | * MDEV-25457 CREATE / DROP PROCEDURE not logged with audit plugin.Alexey Botchkov2021-03-292-0/+25
| | | | | | | | | | | | | | | | | | | | CREATE/DROP PROCEDIRE/FUNCTION is now treated as DDL.
| | | | * MDEV-25272: Wrong function name in error messages upon ST_GeomFromGeoJSON callAnel Husakovic2021-03-271-2/+2
| | | | | | | | | | | | | | | | | | | | - Invalid function name during ER_WRONG_VALUE_FOR_TYPE and ER_GIS_INVALID_DATA
| | | | * MDEV-13467: Feature request: Support for ST_Distance_Sphere()Anel Husakovic2021-03-278-36/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Cherry-pick 51e48b9f8981 - vscode gitignore - Thanks Robin Dupret for the review. Reviewed by:daniel@mariadb.org holyfoot@mariadb.com
| | | * | MDEV-25457 CREATE / DROP PROCEDURE not logged with audit plugin.Alexey Botchkov2021-03-272-0/+23
| | | | | | | | | | | | | | | | | | | | CREATE/DROP PROCEDIRE/FUNCTION is now treated as DDL.
* | | | | MDEV-17239 default max_recursive_iterations 4G -> 1000bb-10.6-danielblack-MDEV-17239-default-max_recursive_iterations-1kDaniel Black2021-03-303-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A default 4G max_recursive_iterations allows users to far to easily exhaust CPU, memory and time for a incorrect query. Reduce this value down to 1000 consistent with Oracle MySQL's cte_max_recursion_depth.
* | | | | Merge 10.5 into 10.6Marko Mäkelä2021-03-293-0/+27
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-24302: RESET MASTER hangsMarko Mäkelä2021-03-293-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with MariaDB 10.5, roughly after MDEV-23855 was fixed, we are observing sporadic hangs during the execution of the RESET MASTER statement. We are hoping to fix the hangs with these changes, but due to the rather infrequent occurrence of the hangs and our inability to reliably reproduce the hangs, we cannot be sure of this. What we do know is that innodb_force_recovery=2 (or a larger setting) will prevent srv_master_callback (the former srv_master_thread) from running. In that mode, periodic log flushes would never occur and RESET MASTER could hang indefinitely. That is demonstrated by the new test case that was developed by Andrei Elkin. We fix this case by implementing a special case for it. This also includes some code cleanup and renames of misleadingly named code. The interface has nothing to do with log checkpoints in the storage engine; it is only about requesting log writes to be persistent. handlerton::commit_checkpoint_request, commit_checkpoint_notify_ha(): Remove the unused parameter hton. log_requests.start: Replaces pending_checkpoint_list. log_requests.end: Replaces pending_checkpoint_list_end. log_requests.mutex: Replaces pending_checkpoint_mutex. log_flush_notify_and_unlock(), log_flush_notify(): Replaces innobase_mysql_log_notify(). The new implementation should be functionally equivalent to the old one. innodb_log_flush_request(): Replaces innobase_checkpoint_request(). Implement a fast path for common cases, and reduce the mutex hold time. POSSIBLE FIX OF THE HANG: We will invoke commit_checkpoint_notify_ha() for the current request if it is already satisfied, as well as invoke log_flush_notify_and_unlock() for any satisfied requests. log_write(): Invoke log_flush_notify() when the write is already durable. This was missing WITH_PMEM when the log is in persistent memory. Reviewed by: Vladislav Vaintroub
* | | | | MDEV-24325: Optimizer trace doesn't cover LATERAL DERIVEDSergei Petrunia2021-03-292-0/+165
| | | | | | | | | | | | | | | | | | | | Provide basic coverage in the Optimizer Trace
* | | | | Merge 10.5 into 10.6Marko Mäkelä2021-03-2738-429/+687
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.4 into 10.5Marko Mäkelä2021-03-2738-428/+687
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.3 into 10.4Marko Mäkelä2021-03-2734-428/+523
| | |\ \ \ | | | |/ /
| | | * | Merge 10.2 into 10.3Marko Mäkelä2021-03-2730-423/+230
| | | |\ \ | | | | |/
| | | | * MDEV-25242 Server crashes in check_grant upon invoking function with ↵Sergei Golubchik2021-03-242-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | userstat enabled use check_grant(..., number_of_tables=1, ...) if you only need to check privileges for one table
| | | | * Follow up fixes for making @@wsrep_provider read-onlyDaniele Sciascia2021-03-238-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove usage of wsrep_provider variable in galera_ist_restart_joiner * Rename galera_load_provider.inc and galera_unload_provider.inc to galera_stop_replication.inc and galera_start_replication.inc. Their original names were no longer reflecting what these include files do. followup for ce3a2a688db Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| | | | * MDEV-24767 Wrong result when forced BNLH is used for join supportedIgor Babaev2021-03-222-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by compound index This typo bug may lead to wrong result sets for equi-join queries where the join operation is supported by a compound index such that the order of its components differs from the order of the corresponding columns in the table the index belongs to. The bug manifests itself only when usage of the BNLH algorithm is forced. The fix for the bug was provided by Chu Huaxing.
| | | | * MDEV-23076 Misleading "InnoDB: using atomic writes"Marko Mäkelä2021-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As suggested by Vladislav Vaintroub, let us remove misleading and malformatted startup messages. Even if the global variable srv_use_atomic_writes were set, we would still invoke my_test_if_atomic_write() to check if writes are atomic with a particular page size. When using the default innodb_page_size=16k, page writes should be atomic on NTFS when using ROW_FORMAT=COMPRESSED and KEY_BLOCK_SIZE<=4. Disabling srv_use_atomic_writes when innodb_file_per_table=OFF does not make sense, because that is a dynamic parameter. We also correct the documentation string of innodb_use_atomic_writes and remove the duplicate variable innobase_use_atomic_writes.
| | | | * MDEV-22653: Remove the useless parameter innodb_simulate_comp_failuresMarko Mäkelä2021-03-2210-361/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The debug parameter innodb_simulate_comp_failures injected compression failures for ROW_FORMAT=COMPRESSED tables, breaking the pre-existing logic that I had implemented in the InnoDB Plugin for MySQL 5.1 to prevent compressed page overflows. A much better check is already achieved by defining UNIV_ZIP_COPY at the compilation time. (Only UNIV_ZIP_DEBUG is part of cmake -DWITH_INNODB_EXTRA_DEBUG=ON.)
| | | | * Added missed ' -- ' between the end of the lldb command options and the ↵Dmitry Shulga2021-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | beginning of the arguments.
| | | | * MDEV-22240: don't use pc.splitbrain=true on node2 in ↵Alexey Yurchenko2021-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | galera.galera_gcache_recover
| | | | * MDEV-24903: mariabackup SST fails while adding --log-bin in startup commandJulius Goryavsky2021-03-196-42/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mariabackup SST fails if "--log-bin" option is added with no value to command line parameters at server startup. This is because the SST scripts do not correctly interpret the "--- log-bin" option without a value. This patch adds correct handling of the "--log-bin" parameter without value to the general part of the parameter parsing (for SST scripts) and fixes the problem. Also added a test that checks the correct operation of the server after the fix.
| | | * | MDEV-25128 Wrong result from join with materialized semi-join andIgor Babaev2021-03-232-0/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | splittable derived If one of joined tables of the processed query is a materialized derived table (or view or CTE) with GROUP BY clause then under some conditions it can be subject to split optimization. With this optimization new equalities are injected into the WHERE condition of the SELECT that specifies this derived table. The injected equalities are generated for all join orders with which the split optimization can employed. After the best join order has been chosen only certain of this equalities are really needed. The others can be safely removed. If it's not done and some of injected equalities involve expressions over semi-joins with look-up access then the query may return a wrong result set. This patch effectively removes equalities injected for split optimization that are needed only at the optimization stage and not needed for execution. Approved by serg@mariadb.com
| | | * | MDEV-24796 Assertion `page_has_next... failed in btr_pcur_store_position()Marko Mäkelä2021-03-222-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit eaeb8ec4b87882711ecb8e1c7476a6e410d5d2a9 (MDEV-24653) an incorrect debug assertion was introduced. btr_pcur_store_position(): If the only record in the page is the instant ALTER TABLE metadata record, we cannot expect there to be a successor page. The situation could be improved by MDEV-24673 later.