summaryrefslogtreecommitdiff
path: root/mysql-test
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | MDEV-16266 - New command FLUSH SSL to reload server's SSL ↵Vladislav Vaintroub2018-12-126-1/+177
| | | | | | | | | | | | | | | | | | | | | | | | certificate(private key,CRL,etc)
* | | | | | Merge 10.3 into 10.4Marko Mäkelä2018-12-1218-48/+350
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.2 into 10.3Marko Mäkelä2018-12-128-26/+238
| |\ \ \ \ \ | | |/ / / /
| | * | | | MDEV-17815 Assertion failed in btr_node_ptr_max_size for CHAR(0)Marko Mäkelä2018-12-122-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | btr_node_ptr_max_size(): Treat CHAR(0) from SQL as a special case. The InnoDB internal SQL parser maps the type "CHAR" to DATA_VARCHAR, but MariaDB does allow CHAR(0) with an empty value, and does enforce the length limitation.
| | * | | | Merge 10.1 into 10.2Marko Mäkelä2018-12-126-24/+214
| | |\ \ \ \ | | | |/ / /
| | | * | | Merge 10.0 into 10.1Marko Mäkelä2018-12-124-0/+225
| | | |\ \ \ | | | | |/ /
| | | | * | MDEV-17833 ALTER TABLE is not enforcing prefix index size limitEugene Kosov2018-12-112-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ha_innobase::prepare_inplace_alter_table(): check max column length for every index in a table, not just added in this particular ALTER TABLE with ADD INDEX ones.
| | | | * | MDEV-17032: Estimates are higher for partitions of a table with ↵Varun Gupta2018-12-072-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | @@use_stat_tables= PREFERABLY The problem here is EITS statistics does not calculate statistics for the partitions of the table. So a temporary solution would be to not read EITS statistics for partitioned tables. Also disabling reading of EITS for columns that participate in the partition list of a table.
| * | | | | MDEV-17967 Add a solution of the 8 queens problem to the regression test for CTESergei Golubchik2018-12-122-0/+72
| | | | | |
| * | | | | MDEV-17778: Alter table leads to a truncation warning with ANALYZE commandVarun Gupta2018-12-105-13/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alter statement changed the THD structure by setting the value to FIELD_CHECK_WARN and then not resetting it back. This led ANALYZE to throw a warning which previously it didn't.
* | | | | | MDEV-17763 Assertion `len == 20U' failed in rec_convert_dtuple_to_rec_comp ↵Marko Mäkelä2018-12-122-1/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on DROP COLUMN btr_cur_pessimistic_insert(): Convert the metadata field of the metadata record into BLOB before inserting, just like btr_cur_optimistic_insert() does.
* | | | | | MDEV-17968 Error 174 "Fatal error during initialization of handler" from ↵Alexander Barkov2018-12-122-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | storage engine Aria upon DELETE from partitioned table
* | | | | | --echo #Alexander Barkov2018-12-124-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --echo # MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY --echo #
* | | | | | MDEV-17658 change the structure of mysql.user tableSergei Golubchik2018-12-12166-3066/+1396
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement User_table_json. Fix scripts to use mysql.global_priv. Fix tests.
* | | | | | MDEV-17658 change the structure of mysql.user tableSergei Golubchik2018-12-125-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce User_table_tabular(mysql.user) and User_table_json(mysql.global_priv). The latter is not implemented. Automatic fallback to the old implementation works. Results change because privilege tables are opened in a different order now.
* | | | | | cleanup: refactor grant table classes in sql_acl.ccSergei Golubchik2018-12-122-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | move all backward compatibility related code into User_table, the caller should not know or care anymore. Other tables (Db_table, etc) are *not* refactored. For consistency with other updates, setting a default role no longer errors out when the mysql.user table is too old.
* | | | | | extend the test case to better emulate 5.7 user tableSergei Golubchik2018-12-122-2/+12
| | | | | |
* | | | | | more tests for mysql_install_db.exeSergei Golubchik2018-12-123-8/+19
| | | | | |
* | | | | | MDEV-5313 Improving audit api.Alexey Botchkov2018-12-126-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | Service added to handle json.
* | | | | | MDEV-17901 Crash after instant DROP COLUMN of AUTO_INCREMENT columnMarko Mäkelä2018-12-112-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We failed to reset the dict_table_t::persistent_autoinc after instantly dropping an AUTO_INCREMENT column, causing a bogus call to row_parse_int() on a subsequent insert.
* | | | | | Fixed sporadic main.mdl_sync failureSergey Vojtovich2018-12-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When update finishes, MDL_context::release_transactional_locks() first releases MDL_STATEMENT locks (MDL_BACKUP_DML and MDL_BACKUP_TRANS_DML in this particular cases), which allows FTWRL connection to proceed. Then MDL_TRANSACTION locks get released (MDL_SHARED_WRITE in this case). metadata_lock_info query may sporadically hit this gap and observe these otherwise unexpected locks.
* | | | | | Fixed main.create-big failureSergey Vojtovich2018-12-102-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After MDEV-17772 table existence check is performed much earlier, so create_table_select_before_check_if_exists debug sync point is not reachable when table exists. Moved debug sync point to appropriate place.
* | | | | | MDEV-17946 : Unsorted acl_dbs after RENAME USERVladislav Vaintroub2018-12-102-0/+20
| | | | | |
* | | | | | MDEV-13995 MAX(timestamp) returns a wrong result near DST changeAlexander Barkov2018-12-108-0/+575
| | | | | |
* | | | | | Updated the result for innodb.innodb_mysqlVarun Gupta2018-12-101-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The result is updated here because by changing the defaults for use_stat_tables EITs statistcs are providing more accurate statistics than INNODB statistics.
* | | | | | MDEV-17899 Assertion failures on rollback of instant ADD/DROPMarko Mäkelä2018-12-102-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | row_undo_ins_remove_clust_rec(): When rolling back the insert of a metadata record, also reset the root page state within the same mini-transaction. dict_table_t::rollback_instant(): Do not allow index->n_core_fields to be larger than index->n_fields. This logic exists in the 10.3 branch but was incorrectly removed as part of MDEV-15562 in 10.4.0.
* | | | | | Merge 10.3 into 10.4Marko Mäkelä2018-12-101-0/+1
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Fix another random failure in rpl.rpl_gtid_crashKristian Nielsen2018-12-081-0/+1
| | | | | |
* | | | | | Moved early check for table existance to mysql_execute_command()Sergey Vojtovich2018-12-0910-175/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-17772 - 3 way lock : ALTER, MDL, BACKUP STAGE BLOCK_DDL While waiting for a (potentially long) RO transaction or SELECT, DDL and LOCK TABLES ... WRITE hold protection against FTWRL and BACKUP STAGE. This effectively makes FTWRL/BACKUP STAGE indirectly wait for this RO transaction or SELECT to finish. Which is not great, as otherwise we could do something useful meanwhile. With this patch BACKUP lock is attempted to be acquired after TABLE/SCHEMA locks. If this attempt fails, TABLE/SCHEMA locks gets released and we start waiting for BACKUP lock. When wait finishes, BACKUP lock is released (to avoid deadlocks) and we attempt to acquire all locks once again. Other changes: - Take MDL lock before testing if table exists as part of CREATE TABLE ... IF EXISTS. This change was an effect of changes in lock_table_name and removes an inconsistency where one could get different error messages from CREATE TABLE .. IF EXISTS depending on active mdl locks. One effect of this change is that we don't binary log CREATE TABLE IF EXISTS if the table exists. This was done because old code was sometimes behaving inconsistenly (it was logged some time and not other times) and sending the query to the slave could make the slave even more inconsistent as there is not guarantee that the new table will have the same definition as the old table on the master.
* | | | | | Added syntax and implementation for BACKUP STAGE'sMonty2018-12-0916-6/+3011
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of MDEV-5336 Implement LOCK FOR BACKUP - Changed check of Global_only_lock to also include BACKUP lock. - We store latest MDL_BACKUP_DDL lock in thd->mdl_backup_ticket to be able to downgrade lock during copy_data_between_tables()
* | | | | | Added new MDL_BACKUP locks for all backup stagesMonty2018-12-097-20/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of MDEV-5336 Implement LOCK FOR BACKUP - Added new locks to MDL_BACKUP for all stages of backup locks and a new MDL lock needed for backup stages. - Renamed MDL_BACKUP_STMT to MDL_BACKUP_DDL - flush_tables() takes a new parameter that decides what should be flushed. - InnoDB, Aria (transactional tables with checksums), Blackhole, Federated and Federatedx tables are marked to be safe for online backup. We are using MDL_BACKUP_TRANS_DML instead of MDL_BACKUP_DML locks for these which allows any DML's to proceed for these tables during the whole backup process until BACKUP STAGE COMMIT which will block the final commit.
* | | | | | Acquire global read lock (MDL_BACKUP_STMT) after share is acquiredSergey Vojtovich2018-12-094-5/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of MDEV-5336 Implement LOCK FOR BACKUP FLUSH TABLE table_names have changed slighty as we are now opening tables before taking the MDL lock. The difference is that FLUSH TABLE table_name will now be blocked by a table that is waiting for FTWRL. There should not be any new deadlocks as part of this change. The end result is still better in most cases as FTWRL is now only waiting for write statements to end, not for read only statements and it's not flushing tables in use from the table cache. Share will be needed to be able to determine if table supports online backup. Appropriate metadata lock type in BACKUP namespace will be acquired basing on this information. Also made pending global read lock request to be preferred victim of MDL deadlock detector. This allows us to hide some non-fatal deadlocks and make FTWRL less likely to break concurrent queries.
* | | | | | Combine GLOBAL and COMMIT namespaces into BACKUP namespace.Sergey Vojtovich2018-12-0914-58/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of MDEV-5336 Implement LOCK FOR BACKUP Other things: - Added printing of MDL locks to DBUG.
* | | | | | Changed FLUSH TABLES to not change share versionMonty2018-12-0932-87/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of MDEV-5336 Implement LOCK FOR BACKUP Originally both table metadata lock and global read lock protection were acquired before getting TABLE from table cache. This will be reordered in a future commit with MDL_BACKUP_XXX locks so that we first take table metadata lock, then get TABLE from table cache, then acquire analogue of global read lock. This patch both simplifies FLUSH TABLES code, makes FLUSH TABLES to lock less and also enables FLUSH TABLES code to be used with backup locks. The usage of FLUSH TABLES changes slightly: - FLUSH TABLES without any arguments will now only close not used tables and tables locked by the FLUSH TABLES connection. All not used table shares will be closed. Tables locked by the FLUSH TABLES connection will be reopened and re-locked after all others has stoped using the table (as before). If there was no locked tables, then FLUSH TABLES is instant and will not cause any waits. FLUSH TABLES will not wait for any in use table. - FLUSH TABLES with a table list, will ensure that the tables are closed before statement returns. The code is now only using MDL locks and not table share versions, which simplices the code greatly. One visible change is that the server will wait for the end of the transaction that are using the tables. Before FLUSH TABLES only waited for the statements to end. Signed-off-by: Monty <monty@mariadb.org>
* | | | | | Optimize flush tables with read lock (FTWRL) to not wait for select'sMonty2018-12-0914-39/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of MDEV-5336 Implement LOCK FOR BACKUP The idea is that instead of waiting in close_cached_tables() for all tables to be closed, we instead call flush_tables() that does: - Flush not used objects in table cache to free memory - Collect all tables that are open - Call HA_EXTRA_FLUSH on the objects, to get them into "closed state" - Added HA_EXTRA_FLUSH support to archive and CSV - Added multi-user protection to HA_EXTRA_FLUSH in MyISAM and Aria The benefit compared to old code is: - FTWRL doesn't have to wait for long running read operations or open HANDLER's
* | | | | | Added timing of bootstrap to mtrMonty2018-12-091-0/+6
| | | | | |
* | | | | | Cleaned up some MTR testsMonty2018-12-098-178/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Moved tests depending on utf8 characters from create to create_utf8 - Fixed some tests in create and sp that wrongly tried to create table from non existing table on existing table. In a later patch we may first check if table exists, in which case the error message would change. - Updated results for partition_debug_tokudb
* | | | | | Fixed test case bug in purge_thread_shutdownMonty2018-12-091-1/+3
| | | | | |
* | | | | | Disabled some galera tests that always fails on OpenSuse 10.5Monty2018-12-092-1/+10
| | | | | |
* | | | | | Fixed that mtr --extern works with --include/have_innodb.incMonty2018-12-091-0/+1
| | | | | |
* | | | | | Changed some MySQL names in messages to MariaDBMonty2018-12-094-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove obsolete documentation files - Removed old obsolete information from some documentation files
* | | | | | MDEV-17255: New optimizer defaults and ANALYZE TABLEVarun Gupta2018-12-098-9/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added to new values to the server variable use_stat_tables. The values are COMPLEMENTARY_FOR_QUERIES and PREFERABLY_FOR_QUERIES. Both these values don't allow to collect EITS for queries like analyze table t1; To collect EITS we would need to use the syntax with persistent like analyze table t1 persistent for columns (col1,col2...) index (idx1, idx2...) / ALL Changing the default value from NEVER to PREFERABLY_FOR_QUERIES.
* | | | | | MDEV-15253: Default optimizer setting changes for MariaDB 10.4Varun Gupta2018-12-09203-1734/+3573
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use_stat_tables= PREFERABLY optimizer_use_condition_selectivity= 4
* | | | | | MDEV-17928 Conversion from TIMESTAMP to VARCHAR SP variables does not work ↵Alexander Barkov2018-12-083-3/+73
| | | | | | | | | | | | | | | | | | | | | | | | well on fractional digits
* | | | | | MDEV-17932 : assertion in multi RENAME USER command.Vladislav Vaintroub2018-12-082-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort acl_users inside the mysql_rename_user()'s loop, after every successful iteration. This is needed because on the next loop's iteration find_user_exact() is used, which requires correct sorting by name.
* | | | | | Merge 10.3 into 10.4Marko Mäkelä2018-12-081-0/+1
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Fix an occational test failure in rpl.rpl_gtid_crashKristian Nielsen2018-12-071-0/+1
| | | | | |
* | | | | | Merge 10.3 into 10.4Marko Mäkelä2018-12-0711-21/+120
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.2 into 10.3Marko Mäkelä2018-12-0711-21/+120
| |\ \ \ \ \ | | |/ / / / | | | | | / | | |_|_|/ | |/| | |
| | * | | After-merge fixMarko Mäkelä2018-12-072-2/+2
| | | | |