summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into HEAD10.4-MDEV-17520Marko Mäkelä2018-11-30138-2076/+69
|\
| * Merge 10.3 into 10.4Marko Mäkelä2018-11-301-9/+13
| |\
| | * MDEV-17881 Assertion failure in cmp_dtuple_rec_with_match_bytes after ↵Marko Mäkelä2018-11-301-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instant ADD COLUMN The special flag REC_INFO_MIN_REC_FLAG used to be only set on the first record in the leftmost node pointer page of each level of the tree. It was never set on leaf pages. MDEV-11369 Instant ADD COLUMN in MariaDB Server 10.3 repurposed the flag to identify a hidden metadata record, which is stored in the first record on the leftmost leaf page. If the adaptive hash index points to records in the leftmost leaf page after instant ALTER TABLE, we would have such a metadata record in the table, an assertion could fail when trying to validate the index record. In a release build, we might wrongly qualify the hidden metadata record and thus return garbage results. cmp_dtuple_rec_with_match_bytes(): If the REC_INFO_MIN_REC_FLAG is set on the record, assert that this is the first record on the leftmost page and that the record is a metadata record, and finally return 1, because by definition, anything is greater than the minimum record.
| * | Merge 10.3 into 10.4Marko Mäkelä2018-11-30139-2069/+56
| |\ \ | | |/
| | * Merge 10.2 into 10.3Marko Mäkelä2018-11-30143-2092/+59
| | |\ | | | | | | | | | | | | | | | | | | | | Also, related to MDEV-15522, MDEV-17304, MDEV-17835, remove the Galera xtrabackup tests, because xtrabackup never worked with MariaDB Server 10.3 due to InnoDB redo log format changes.
| | | * Fix xtrabackup SST tests by using innodb-safe-truncate=OFF.Jan Lindström2018-11-2911-10/+62
| | | | | | | | | | | | | | | | Disable tests that do not yet pass.
| | | * Remove some unnecessary InnoDB #includeMarko Mäkelä2018-11-29119-275/+34
| | | |
| | | * MDEV-17859: Clean up the FOREIGN KEY handlingMarko Mäkelä2018-11-294-147/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dict_create_add_foreigns_to_dictionary(): Do not commit the transaction. The operation can still fail in dict_load_foreigns(), and we want to be able to roll back the transaction. create_table_info_t::create_table(): Never reset m_drop_before_rollback, and never commit the transaction. We use a single point of rollback in ha_innobase::create(). Merge the logic from row_table_add_foreign_constraints().
* | | | Adjust btr_assert_not_corrupted()Marko Mäkelä2018-11-302-6/+8
| | | |
* | | | Define rec_copy_prefix_to_buf() in a less hacky wayMarko Mäkelä2018-11-304-48/+41
| | | |
* | | | Fix btr_pcur store and restoreMarko Mäkelä2018-11-294-82/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rec_copy_prefix_to_buf(): If the page is in the flexible format, convert the record to the original format, so that btr_pcur_restore_position() will only have to deal with one format. Merge the code from rec_copy_prefix_to_buf_old(). btr_pcur_restore_position_func(): Interpret a special value of btr_cur_t::old_rec that points to the metadata record.
* | | | Fix the insert of the metadata recordMarko Mäkelä2018-11-291-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | btr_cur_optimistic_insert(): Only insert the metadata record in the newest format. btr_cur_pessimistic_insert(): Allow the insertion of the metadata record.
* | | | Minor fixesMarko Mäkelä2018-11-292-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | page_copy_rec_list_end_to_created_page(): Reposition the cursor when converting the page. page_delete_rec_list_start(): Relax a too strict assertion.
* | | | Introduce dict_index_t::was_not_null()Marko Mäkelä2018-11-284-98/+91
| | | | | | | | | | | | | | | | | | | | The dict_col_t::was_not_null() only matters for the clustered index, not secondary indexes.
* | | | Introduce dict_col_t::was_not_null()Marko Mäkelä2018-11-2811-61/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For dual-format pages, we must know whether columns were originally NOT NULL, so that we can correctly interpret records in the old leaf pages of the dual-format primary key index. dict_table_t::init_instant(): Set the new DATA_WAS_NOT_NULL flags and index->n_nullable based on it.
* | | | Initial step at fixing read of old NOT NULL columnsMarko Mäkelä2018-11-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want dict_index_t::n_nullable to reflect the original NOT NULL state of the columns. dict_table_t::init_instant(): Remove an assertion that would fail when the InnoDB data dictionary is out of sync with the MariaDB data dictionary. Correctly compute n_nullable. (With this, the assertion ut_ad(index.n_nullable == n_nullable) at the end of the function will fail.)
* | | | Merge 10.4 into HEADMarko Mäkelä2018-11-28161-1237/+8199
|\ \ \ \ | |/ / /
| * | | Merge dict_index_copy_rec_order_prefix() to its only callerMarko Mäkelä2018-11-283-58/+18
| | | | | | | | | | | | | | | | | | | | btr_pcur_store_position(): Merge the code from dict_index_copy_rec_order_prefix().
| * | | Merge 10.3 into 10.4Marko Mäkelä2018-11-287-14/+123
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2018-11-287-14/+123
| | |\ \ | | | |/
| | | * MDEV-17859 Operating system errors in file operations after failed CREATEMarko Mäkelä2018-11-284-14/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression due to MDEV-17816. When creating a table fails, we must roll back the dictionary transaction. Because the rollback may rename tables, and because InnoDB lacks proper undo logging for CREATE operations, we must drop the incompletely created table before rolling back the transaction, which could include a RENAME operation. But, we must not blindly drop the table by name; after all, the operation could have failed because another table by the same name already existed. create_table_info_t::m_drop_before_rollback: A flag that is set if the table needs to be dropped before transaction rollback. create_table_info_t::create_table(): Remove some duplicated error handling. ha_innobase::create(): On error, only drop the table if it was actually created.
| | | * MDEV-13155: XA recovery not supported for RocksDBSergei Petrunia2018-11-283-0/+71
| | | | | | | | | | | | | | | | Added a testcase
| * | | Making the test for MDEV-17854 independent from the host time zoneAlexander Barkov2018-11-282-1/+5
| | | |
| * | | MDEV-17854 Assertion `decimals <= 6' failed in my_time_fraction_remainder on ↵Alexander Barkov2018-11-283-1/+19
| | | | | | | | | | | | | | | | SELECT with NULLIF and FROM_UNIXTIME on incorrect time
| * | | Merge 10.3 into 10.4Marko Mäkelä2018-11-2816-500/+267
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2018-11-2813-502/+264
| | |\ \ | | | |/
| | | * Remove unused mem_heap_allocatorMarko Mäkelä2018-11-281-99/+0
| | | | | | | | | | | | | | | | The code became unused in commit 10590dd39cc1e742bbf395c3285201a6a31c5284.
| | | * MDEV-17849 Undo tablespace truncation recovery fails to shrink fileMarko Mäkelä2018-11-277-388/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fil_space_t::add(): Replaces fil_node_create(), fil_node_create_low(). Let the caller pass fil_node_t::handle, to avoid having to close and re-open files. fil_node_t::read_page0(): Refactored from fil_node_open_file(). Read the first page of a data file. fil_node_open_file(): Open the file only once. srv_undo_tablespace_open(): Set the file handle for the opened undo tablespace. This should ensure that ut_ad(file->is_open()) no longer fails in recv_add_trim(). xtrabackup_backup_func(): Remove some dead code. xb_fil_cur_open(): Open files only if needed. Undo tablespaces should already have been opened.
| | | * Remove the redundant variable fil_n_file_openedMarko Mäkelä2018-11-276-13/+3
| | | |
| | | * MDEV-17851 Assertion failure srv_undo_tablespaces > 1Marko Mäkelä2018-11-271-5/+3
| | | | | | | | | | | | | | | | | | | | trx_assign_rseg_low(): Skip dedicated undo tablespaces if innodb_undo_tablespaces=0 has been set after the database was created.
| | | * MDEV-17816: Follow-up fixMarko Mäkelä2018-11-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When dropping a partially created table due to failure, use SQLCOM_TRUNCATE instead of SQLCOM_DROP_DB, so that no foreign key constraints will be touched. If any constraints were added as part of the creation, they would be reverted as part of the transaction rollback. We need an explicit call to row_drop_table_for_mysql(), because InnoDB does not do proper undo logging for CREATE TABLE, but would only drop the table at the end of the rollback. This would not work if the transaction combines both RENAME and CREATE, like TRUNCATE now does.
| | * | MDEV-17771: Add Galera ist and sst tests using mariabackupJan Lindström2018-11-274-1/+6
| | | | | | | | | | | | | | | | Add check that file key management plugin is found.
| * | | MDEV-15073: Generic UDAF parser code in server for windows functionsOleksandr Byelkin2018-11-2710-0/+386
| | | | | | | | | | | | | | | | | | | | | | | | Added support for usual agreggate UDF (UDAF) Added remove() call support for more efficient window function processing Added example of aggregate UDF with efficient windows function support
| * | | MDEV-16715 Add accessors for Item_sum and Item_func_group_concat classesAlexander Barkov2018-11-271-1/+11
| | | |
| * | | MDEV-16705 Add two accessors for multi_delete classAlexander Barkov2018-11-271-0/+4
| | | |
| * | | MDEV-16725 Add accessor methods for classes in item_timefunc.hAlexander Barkov2018-11-271-0/+9
| | | |
| * | | Fixing embedded tests for MDEV-16991Alexander Barkov2018-11-272-5/+5
| | | |
| * | | Merge 10.3 into 10.4Marko Mäkelä2018-11-2668-274/+2589
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2018-11-263-0/+19
| | |\ \ | | | |/
| | | * MDEV-17831 TRUNCATE TABLE removes ROW_FORMAT=COMPRESSEDMarko Mäkelä2018-11-263-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a table had a KEY_BLOCK_SIZE attribute, but no ROW_FORMAT, it would be created as ROW_FORMAT=COMPRESSED in InnoDB. However, TRUNCATE TABLE would lose the KEY_BLOCK_SIZE attribute and create the table with the innodb_default_row_format (DYNAMIC). This is a regression that was introduced by MDEV-13564. update_create_info_from_table(): Copy also KEY_BLOCK_SIZE.
| | * | Merge 10.2 into 10.3Marko Mäkelä2018-11-2643-185/+2465
| | |\ \ | | | |/ | | | | | | | | | | | | The test galera_sst_mariabackup_table_options was disabled, because the server refuses to start up due to wrong parameters.
| | | * MDEV-17811: Add deprecation information for xtrabackupJan Lindström2018-11-261-0/+18
| | | |
| | | * MDEV-17816 Crash in TRUNCATE TABLE when table creation failsMarko Mäkelä2018-11-266-34/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error handling in the MDEV-13564 TRUNCATE TABLE was broken when an error occurred during table creation. row_create_index_for_mysql(): Do not drop the table on error. fts_create_one_common_table(), fts_create_one_index_table(): Do drop the table on error. create_index(), create_table_info_t::create_table(): Let the caller handle the index creation errors. ha_innobase::create(): If create_table_info_t::create_table() fails, drop the incomplete table, roll back the transaction, and finally return an error to the caller.
| | | * MDEV-14409 Assertion `page_rec_is_leaf(rec)' failed in lock_rec_validate_pageMarko Mäkelä2018-11-261-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lock_rec_queue_validate(): Assert page_rec_is_leaf(rec), except when the record is a page infimum or supremum. lock_rec_validate_page(): Relax the assertion that failed. The assertion was reachable when the record lock bitmap was empty. lock_rec_insert_check_and_lock(): Assert page_is_leaf().
| | | * MDEV-17804: Galera tests cause mysql_socket.h:738: inline_mysql_socket_send: ↵Jan Lindström2018-11-222-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Assertion `mysql_socket.fd != -1' failed. Do not do end of statement logic if thd is already killed as socket is already closed.
| | | * MDEV-17801: Galera test failure on galera_var_reject_queriesJan Lindström2018-11-225-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that controlling connection i.e. connection that executed the query SET GLOBAL wsrep_reject_queries = ALL_KILL; was also killed but server would try to send result from that query to controlling connection resulting a assertion mysqld: /home/jan/mysql/10.2-sst/include/mysql/psi/mysql_socket.h:738: inline_mysql_socket_send: Assertion `mysql_socket.fd != -1' failed. as socket was closed when controlling connection was closed. wsrep_close_client_connections() Do not close controlling connection and instead of wsrep_close_thread() we do now soft kill by THD::awake wsrep_reject_queries_update() Call wsrep_close_client_connections using current thd.
| | | * MDEV-15522: Change galera suite MTR tests to use mariabackup instead of ↵Jan Lindström2018-11-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | xtrabackup Disable galera_3nodes tests using xtrabackup.
| | | * MDEV-15522: Change galera suite MTR tests to use mariabackup instead of ↵Jan Lindström2018-11-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | xtrabackup Disable galera tests using xtrabackup.
| | | * MDEV-17771: Add Galera ist and sst tests using mariabackupJan Lindström2018-11-228-8/+97
| | | | | | | | | | | | | | | | Record result files for 10.2.
| | | * Merge remote-tracking branch 'origin/10.1' into 10.2Jan Lindström2018-11-2126-110/+2250
| | | |\