summaryrefslogtreecommitdiff
path: root/mysql-test/suite
Commit message (Collapse)AuthorAgeFilesLines
* Fixed warning from innodb.create_isl_with_direct if have_symlink is disabledbb-10.3-montyMonty2022-11-291-6/+5
|
* Enable valgrind for replication testMonty2022-11-292-0/+2
| | | | | | | The following tests are disabled when running --valgrding without --big: - rpl.rpl_ssl - rpl.rpl_semi_sync_event - All encryption test (which includes have_file_key_management.inc)
* MDEV-29169 Using MATCH returns NULL for Virtual ColumnNikita Malyavin2022-11-232-0/+33
| | | | | | | Virtual column values are updated in handler in reading commands, like ha_index_next, etc. This was missing for ha_ft_read. handler::ha_ft_read: add table->update_virtual_fields() call
* MDEV-29977 Memory leak in row_log_table_apply_updateThirunarayanan Balathandayuthapani2022-11-152-4/+37
| | | | | | - InnoDB fails to free the persistent cursor for the clustered index when InnoDB replays the update operation on the table that is being rebuilt.
* Clean up file load.in in a testMarko Mäkelä2022-11-141-0/+1
| | | | | | | | This fixes the following test invocation: ./mtr --no-reorder parts.partition_special_myisam parts.partition_debug This was broken ever since afd4b25d8a0ab1447d37033a377ee05a03314d44 a.k.a. mysql/mysql-server@bde21e58108a1f311d15088c50414bb43ab45d62
* MDEV-27882 Innodb - recognise MySQL-8.0 innodb flags and give a specific ↵Daniel Black2022-11-118-13/+127
| | | | | | | | | | | | | | | | | | | | | | | error message Per fsp0types.h, SDI is on tablespace flags position 14 where MariaDB stores its pagesize. Flag at position 13, also in MariaDB pagesize flags, is a MySQL encryption flag. These are checked only if fsp_flags_is_valid fails, so valid MariaDB pages sizes don't become errors. The error message "Cannot reset LSNs in table" was rather specific and not always true to replaced with more generic error. ALTER TABLE tbl IMPORT TABLESPACE now reports Unsupported on MySQL tablespace (rather than index corrupted) along with a server error message. MySQL innodb Errors are with with UNSUPPORTED rather than CORRUPTED to avoid user anxiety. Reviewer: Marko Mäkelä
* MDEV-10087 mysqld_update()/mysql_delete() continues execution even after ↵Vlad Lesin2022-11-092-0/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subquery with JOIN gets error from storage engine The issue is that record_should_be_deleted() returns true in mysql_delete() even if sub-select with join gets error from storage engine when DELETE FROM ... WHERE ... IN (SELECT ...) statement is executed. The same is true for mysql_update() where select->skip_record() returns true even if sub-select with join gets error from storage engine. In the test case if sub-select is chosen as deadlock victim the whole transaction is rolled back during sub-select execution, but mysql_delete()/mysql_update() continues transaction execution and invokes table->delete_row() as record_should_be_deleted() wrongly returns true in mysql_delete() and table->update_row() as select->skip_record(thd) wrongly returns 1 for mysql_update(). record_should_be_deleted() wrogly returns true because thd->is_error() returns false SQL_SELECT::skip_record() invoked from record_should_be_deleted(). It's supposed that THD error should be set in rr_handle_error() called from rr_sequential() during sub-select JOIN::exec_inner() execution. But rr_handle_error() does not set THD error because READ_RECORD::print_error is not set in JOIN_TAB::read_record. READ_RECORD::print_error should be initialized in init_read_record()/init_read_record_idx(). But make_join_readinfo() does not invoke init_read_record()/init_read_record_idx() for JOIN_TAB::read_record. The fix is to set JOIN_TAB::read_record.print_error in make_join_readinfo(), i.e. in the same place where JOIN_TAB::read_record.table is set. Reviewed by Sergey Petrunya.
* MDEV 28970: Add RESET MASTER to clear possible remaining binlog from ↵asklavou2022-11-098-4/+8
| | | | previous test
* MDEV-29856 heap-use-after-poison in row_merge_spatial_rows() w/ column prefixMarko Mäkelä2022-11-082-0/+22
| | | | | | | | | | spatial_index_info: Replaces index_tuple_info_t. Always take a memory heap as a parameter to the member functions. Remove pointer indirection for m_dtuple_vec. spatial_index_info::add(): Duplicate any PRIMARY KEY fields that would point to within ext->buf because that buffer will be allocated in a shorter-lifetime memory heap.
* MDEV-22512: Disable frequently failing testsMarko Mäkelä2022-11-082-1/+2
| | | | | | | | | InnoDB crash recovery can run out of memory before commit 50324ce62448f284522ee1e3be24d8f5ba3bf904 in MariaDB Server 10.5. Let us disable some frequently failing recovery tests in earlier versions.
* MDEV-27121 mariabackup incompatible with disabled dedicated undo log ↵Thirunarayanan Balathandayuthapani2022-11-073-0/+39
| | | | | | | tablespaces - mariabackup fails to assign srv_undo_space_id_start when the dedicated undo tablespaces are disabled
* MDEV-29490 Renaming internally used client API to avoid name conflictsLawrin Novitsky2022-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | with C/C. The patch introduces mariadb_capi_rename.h which is included into mysql.h. The hew header contains macro definitions for the names being renamed. In versions 10.6+(i.e. where sql service exists) the renaming condition in the mariadb_capi_rename.h should be added with && !defined(MYSQL_DYNAMIC_PLUGIN) and look like The patch also contains removal of mysql.h from the api check. Disabling false_duper-6543 test for embedded. ha_federated.so uses C API. C API functions are being renamed in the server, but not renamed in embedded, since embedded server library should have proper C API, as expected by programs using it. Thus the same ha_federated.so cannot work both for server and embedded server library. As all federated tests are already disabled for embedded, federated isn't supposed to work for embedded anyway, and thus the test is being disabled.
* MDEV-29851 Cached role privileges are not invalidated when neededSergei Golubchik2022-10-222-0/+55
| | | | GRANT ROLE can update db-level privileges -> must invalidate acl_cache
* cleanup: rename test fileSergei Golubchik2022-10-222-0/+14
|
* MDEV-29778 Having Unique index interference with MATCH from a FULLTEXTThirunarayanan Balathandayuthapani2022-10-212-0/+21
| | | | | | InnoDB fails to fetch FTS_DOC_ID if the select query uses secondary index. So always do extra lookup on clustered index in case of fts query
* MDEV-25343 Error log message not helpful when filekey is too longkurt2022-10-219-0/+59
| | | | | | | | Add a test related to the Encrypted Key File by following instructions in kb example https://mariadb.com/kb/en/file-key-management-encryption-plugin/#creating-the-key-file Reviewed by Daniel Black (with minor formatting and re-org of duplicate close(f) calls).
* MDEV-19569 Assertion `table_list->table' failed in find_field_in_table_ref.Alexey Botchkov2022-10-192-0/+175
| | | | | | Disallow subqueries in The PARTITIN BY INTERVAL syntax. Fix various interval types that now fail as they break syntax in the par file.
* Revert "MDEV-25343 add read secret size in file key plugin"Daniel Black2022-10-194-21/+0
| | | | This reverts commit cee7175b79a22c29a82ef328aba208f90afcea86.
* MDEV-25343 add read secret size in file key pluginkurt2022-10-194-0/+21
|
* MDEV-29540 Incorrect sequence values in INSERT SELECTDaniel Black2022-10-192-0/+182
| | | | | | | | | | | | | | The population of default values in INSERT SELECT was being performed twice. With sequences, this resulted in every second sequence value being used. With SELECT INSERT we remove the second invokation of table->update_default_fields(). This was already performed in store_values() invoking fill_record_n_invoke_before_triggers() which invoked update_default_fields() previously. We do need to return an error on duplicate values, so the ::store_values is extended to take the ignore option.
* MDEV-29750 triggers can modify historySergei Golubchik2022-10-162-0/+47
| | | | | | should be the same behavior as for virtual columns: * a warning on every inserted row * silently ignored in a trigger
* MDEV-29753 An error is wrongly reported during INSERT with vcol indexNikita Malyavin2022-10-122-2/+53
| | | | | | | | | | | | See also commits aa8a31da and 64678c for a Bug #22990029 fix. In this scenario INSERT chose to check if delete unmarking is available for a just deleted record. To build an update vector, it needed to calculate the vcols as well. Since this INSERT was not IGNORE-flagged, recalculation failed. Solutiuon: temporarily set abort_on_warning=true, while calculating the column for delete-unmarked insert.
* MDEV-29299 SELECT from table with vcol index reports warningNikita Malyavin2022-10-122-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of now innodb does not store trx_id for each record in secondary index. The idea behind is following: let us store only per-page max_trx_id, and delete-mark the records when they are deleted/updated. If the read starts, it rememders the lowest id of currently active transaction. Innodb refers to it as trx->read_view->m_up_limit_id. See also ReadView::open. When the page is fetched, its max_trx_id is compared to m_up_limit_id. If the value is lower, and the secondary index record is not delete-marked, then this page is just safe to read as is. Else, a clustered index could be needed ato access. See page_get_max_trx_id call in row_search_mvcc, and the corresponding switch (row_search_idx_cond_check(...)) below. Virtual columns are required to be updated in case if the record was delete-marked. The motivation behind it is documented in Row_sel_get_clust_rec_for_mysql::operator() near row_sel_sec_rec_is_for_clust_rec call. This was basically a description why virtual column computation can normally happen during SELECT, and, generally, a vcol index access. Sometimes stats tables are updated by innodb. This starts a new transaction, and it can happen that it didn't finish to the moment of SELECT execution, forcing virtual columns recomputation. If the result was a something that normally outputs a warning, like division by zero, then it could be outputted in a racy manner. The solution is to suppress the warnings when a column is computed for the described purpose. ignore_wrnings argument is added innobase_get_computed_value. Currently, it is only true for a call from row_sel_sec_rec_is_for_clust_rec.
* MDEV-19455/MDEV-29342 fixup: Avoid DEBUG_DBUG=-d,...Marko Mäkelä2022-10-114-8/+8
|
* MDEV-29742 heap number overflowMarko Mäkelä2022-10-102-2/+7
| | | | | | | A previous fix in commit efd8af535a4fa4aa3dd89a325340b6eb648e1bc8 failed to cover ALTER TABLE. PageBulk::isSpaceAvailable(): Check for record heap number overflow.
* Test results updated.Jan Lindström2022-10-064-8/+8
|
* MDEV-29706 : SIGSEGV in wsrep_TOI_begin on non-Galera buildsJan Lindström2022-10-063-45/+14
| | | | Do not allow setting wsrep_on=ON if no provider is set.
* MDEV-29710: Valgrind tests massively fail due to silently killing server on ↵Marko Mäkelä2022-10-059-0/+10
| | | | | | | | | shutdown timeout Let us disable Valgrind on tests that would fail because a server shutdown or a STOP SLAVE command would take longer, causing the test harness to forcibly and silently kill the server due to an exceeded timeout.
* MDEV-29710: Disable sys_vars.innodb_flush_method_func under ValgrindMarko Mäkelä2022-10-051-0/+2
| | | | The test could emit some I/O error when run under Valgrind.
* MDEV-29710: Disable innodb.table_flags under ValgrindMarko Mäkelä2022-10-051-0/+6
|
* MDEV-29666 InnoDB fails to purge secondary index records when indexed ↵Marko Mäkelä2022-10-054-6/+47
| | | | | | | | | | | | virtual columns exist row_purge_get_partial(): Replaces trx_undo_rec_get_partial_row(). Also copy the purge_node_t::ref to the purge_node_t::row. In this way, the clustered index key fields will always be available, even if thanks to commit d384ead0f024995787b1f29bc672c33b0d3d40a8 (MDEV-14799) they would no longer be repeated in the remaining part of the undo log record.
* MDEV-27682: bundled wsrep_notify.sh causes mariadbd to freeze during startJulius Goryavsky2022-10-044-0/+52
| | | | | | | | | | | | | | This commit adds automation that will reduce the possibility of user errors when customizing wsrep_notify.sh (in particular caused by user-specified parameters). Now all leading and trailing spaces are removed from the user-specified parameters and automatic port and host address substitution has been added to scripts, as well as automatic password substitution to the client command line, only if it is specified in the wsrep_notify.sh and not as empty strings. Also added support for automatic substitution of the all SSL-related parameters and improved parsing for ipv6 addresses (to allow "[...]" notation for ipv6 addresses). Also added a test to check if the wsrep notify script will works with SSL.
* MDEV-28548: ER_TABLEACCESS_DENIED_ERROR is missing information about DBAnel Husakovic2022-09-30102-704/+704
| | | | | | | - Added missing information about database of corresponding table for various types of commands - Update some typos - Reviewed by: <vicentiu@mariadb.org>
* sporadic failures of main.bootstrapSergei Golubchik2022-09-261-1/+1
| | | | | give every bootstrap server its own tmpdir, by default it's var/tmp, which is shared in --parallel
* MDEV-29600 Memory leak in row_log_table_apply_update()Marko Mäkelä2022-09-222-2/+41
| | | | | | | | | | | row_log_table_apply_update(): Free the pcur.old_rec_buf before returning. It may be allocated by btr_pcur_store_position() inside btr_blob_log_check_t::check() and btr_store_big_rec_extern_fields(). This memory leak was introduced in commit 2e814d4702d71a04388386a9f591d14a35980bfe (MariaDB Server 10.2.2) via mysql/mysql-server@ce0a1e85e24e48b8171f767b44330da635a6ea0a (MySQL 5.7.5).
* Cleanup: Remove redundant output from a testMarko Mäkelä2022-09-222-68/+0
|
* MDEV-28986: rpl tests sometimes failing on freebsd buildersBrandon Nesterenko2022-09-2010-2311/+2509
| | | | | | | | The rpl_row_img_sequence test can fail on resource constrained buildbot machines due to its high space consumption. To reduce this footprint, the test is split into three parts, one for each value of the binlog_row_img variable.
* MDEV-29509 execute granted indirectly (via roles) doesn't always workVicențiu Ciorbaru2022-09-142-2/+0
| | | | | | | | | | | | | | | | | | | The issue manifests due to a bug in mysql_routine_grant. This was a side effect of e46eea8660fb which fixed the problem of not giving appropriate error message (ER_NONEXISTING_PROC_GRANT) when a routine grant existed due to role inheritance. When granting a routine privilege, it is possible to have a GRANT_NAME entry already created from an inherited role, but with it's init_privs set to 0. In this case we must not create a *new* grant entry, but we must edit this grant entry to set its init_privs. Note that this case was already covered by MDEV-29458, however due to a forgotten "flush privileges;" the actual code path never got hit. Remove the flush privilege command as it was never intended to be there in the first place.
* MDEV-29458: Role grant commands do not propagate all grantsVicențiu Ciorbaru2022-09-143-88/+389
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was an issue in updating in-memory role datastructures when propagating role grants. The issue is that changing a particular role's privilege (on any privilege level, global, database, etc.) was done such that it overwrote the entire set of bits for that particular level of privileges. For example: grant select on *.* to r1 -> sets the access bits to r1 to select, regardless of what bits were present for role r1 (inherited from any other roles). Before this fix, the rights of role r1 were propagated to any roles r1 was granted to, however the propagated rights did *not* include the complete rights r1 inherited from its own grants. For example: grant r2 to r1; grant select on *.* to r2; grant insert on *.* to r1; # This command completely disregards the # select privilege from r2. In order to correct this, ensure that before rights are propagated onwards, that the current's role rights have been updated from its grants. Additionally, the patch exposed a flaw in the DROP ROLE code. When deleting a role we removed all its previous grants, but what remained was the actual links of roles granted to the dropped role. Having these links present when propagating grants meant that we would have leftover ACL_xxx entries. Ensure that the links are removed before propagating grants.
* MDEV-29465: Inherited columns privs for roles wrongly set mysql.tables_priv ↵Vicențiu Ciorbaru2022-09-142-0/+76
| | | | | | | | | | | | | | | | | | column There was a bug in the ACL internal data structures GRANT_TABLE and GRANT_COLUMN. The semantics are: GRANT_TABLE::init_cols and GRANT_COLUMN::init_privs represent the bits that correspond to the privilege bits stored in the physical tables. The other struct members GRANT_TABLE::cols and GRANT_COLUMN::privs represent the actual access bits, as they may be modified through role grants. The error in logic was mixing the two fields and thus we ended up storing the logical access bits in the physical tables, instead of the physical (init_xxx) bits. This caused subsequent DBUG_ASSERT failures when dropping the involved roles.
* MDEV-29479 I_S.INNODB_SYS_TABLESPACES doesn't have temporary tablespace ↵Thirunarayanan Balathandayuthapani2022-09-142-0/+13
| | | | | | | information - innodb_sys_tablespaces view in information schema displays temporary tablespace information too.
* MDEV-23801 Assertion failed in btr_pcur_store_position()Marko Mäkelä2022-09-132-0/+73
| | | | | | | btr_lift_page_up(): If the leaf page only contains a hidden metadata record for MDEV-11369 instant ADD COLUMN, convert the table to the canonical format like we are supposed to do whenever the table becomes empty.
* MDEV-29520 heap-use-after-poison in row_merge_spatial_rows()Marko Mäkelä2022-09-132-0/+24
| | | | | row_merge_read_clustered_index(): Do not call mem_heap_empty(row_heap) before row_merge_spatial_rows() has been able to read the data.
* MDEV-29446 Change SHOW CREATE TABLE to display default collationAlexander Barkov2022-09-12562-20674/+20674
|
* MDEV-29507 InnoDB: Failing assertion: table->n_rec_locks == 0Marko Mäkelä2022-09-122-0/+23
| | | | | | lock_place_prdt_page_lock(): Do not place locks on temporary tables. Temporary tables can only be accessed from one connection, so it does not make any sense to acquire any transactional locks on them.
* MDEV-29433 innodb.lock_delete_updated is unstableVlad Lesin2022-09-082-8/+8
| | | | | | | | | Use suspend thread syncpoint instead of include/wait_condition.inc to make sure DELETE created waiting lock before the next UPDATE begins locking. This is backport of commit 0fa4dd0747bb12479662952e7fe6ae2fffff737b from 10.6.
* MDEV-29342 Assertion failure in file que0que.cc line 728Thirunarayanan Balathandayuthapani2022-09-062-0/+28
| | | | | | | | - During shutdown, InnoDB fts fails to update synced doc id when there is only one doc id about to sync. While starting the server, InnoDB fetches the already synced doc id from config table. In the subsequent sync operation, InnoDB fails with DB_DUPLICATE_KEY error.
* MDEV-28530: Revoking privileges from a non-existing user on a master breaks ↵Brandon Nesterenko2022-09-032-0/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | replication on the slave in the presence of replication filters Problem: ======== Replication can break while applying a query log event if its respective command errors on the primary, but is ignored by the replication filter within Grant_tables on the replica. The bug reported by MDEV-28530 shows this with REVOKE ALL PRIVILEGES using a non-existent user. The primary will binlog the REVOKE command with an error code, and the replica will think the command executed with success because the replication filter will ignore the command while accessing the Grant_tables classes. When the replica performs an error check, it sees the difference between the error codes, and replication breaks. Solution: ======== If the replication filter check done by Grant_tables logic ignores the tables, reset thd->slave_expected_error to 0 so that Query_log_event::do_apply_event() can be made aware that the underlying query was ignored when it compares errors. Note that this bug also effects DROP USER if not all users exist in the provided list, and the patch fixes and tests this case. Reviewed By: ============ andrei.elkin@mariadb.com
* MDEV-13668 fixup: Remove test work-aroundsMarko Mäkelä2022-08-312-11/+4
|
* MDEV-13888: innodb_fts.innodb_fts_plugin failedMarko Mäkelä2022-08-302-25/+35
| | | | | | | | Add ORDER BY to make the test deterministic. Add FLUSH TABLES to avoid crash recovery warnings about the table mysql.plugin. This tends to occur on Valgrind, where the server shutdown could presumably time out, resulting in a forced kill.