- 20 Dec, 2017 1 commit
-
-
Marko Mäkelä authored
InnoDB in MariaDB 10.2 appears to only write MLOG_FILE_RENAME2 redo log records during table-rebuilding ALGORITHM=INPLACE operations. We must write the records for any .ibd file renames, so that the operations are crash-safe. If InnoDB is killed during a RENAME TABLE operation, it can happen that the transaction for updating the data dictionary will be rolled back. But, nothing will roll back the renaming of the .ibd file (the MLOG_FILE_RENAME2 only guarantees roll-forward), or for that matter, the renaming of the dict_table_t::name in the dict_sys cache. We introduce the undo log record TRX_UNDO_RENAME_TABLE to fix this. fil_space_for_table_exists_in_mem(): Remove the parameters adjust_space, table_id and some code that was trying to work around these deficiencies. fil_name_write_rename(): Write a MLOG_FILE_RENAME2 record. dict_table_rename_in_cache(): Invoke fil_name_write_rename(). trx_undo_rec_copy(): Set the first 2 bytes to the length of the copied undo log record. trx_undo_page_report_rename(), trx_undo_report_rename(): Write a TRX_UNDO_RENAME_TABLE record with the old table name. row_rename_table_for_mysql(): Invoke trx_undo_report_rename() before modifying any data dictionary tables. row_undo_ins_parse_undo_rec(): Roll back TRX_UNDO_RENAME_TABLE by invoking dict_table_rename_in_cache(), which will take care of both renaming the table and the file.
-
- 19 Dec, 2017 7 commits
-
-
Marko Mäkelä authored
Follow-up to MDEV-13407 innodb.drop_table_background failed in buildbot with "Tablespace for table exists" The InnoDB background DROP TABLE queue is something that we should really remove, but are unable to until we remove dict_operation_lock so that DDL and DML operations can be combined in a single transaction. Because the queue is not persistent, it is not crash-safe. We should in some way ensure that the deferred-dropped tables will be dropped after server restart. The existence of two separate transactions complicates the error handling of CREATE TABLE...SELECT. We should really not break locks in DROP TABLE. Our solution to these problems is to rename the table to a temporary name, and to drop such-named tables on InnoDB startup. Also, the queue will use table IDs instead of names from now on. check-testcase.test: Ignore #sql-ib*.ibd files, because tables may enter the background DROP TABLE queue shortly before the test finishes. innodb.drop_table_background: Test CREATE...SELECT and the creation of tables whose file name starts with #sql-ib. innodb.alter_crash: Adjust the recovery, now that the #sql-ib tables will be dropped on InnoDB startup. row_mysql_drop_garbage_tables(): New function, to drop all #sql-ib tables on InnoDB startup. row_drop_table_for_mysql_in_background(): Remove an unnecessary and misplaced call to log_buffer_flush_to_disk(). (The call should have been after the transaction commit. We do not care about flushing the redo log here, because the table would be dropped again at server startup.) Remove the entry from the list after the table no longer exists. If server shutdown has been initiated, empty the list without actually dropping any tables. They will be dropped again on startup. row_drop_table_for_mysql(): Do not call lock_remove_all_on_table(). Instead, if locks exist, defer the DROP TABLE until they do not exist. If the table name does not start with #sql-ib, rename it to that prefix before adding it to the background DROP TABLE queue.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Follow-up fix to MDEV-14008: Let Field_double::val_uint() silently return 0 on error
-
Jan Lindström authored
WSREP_TO_ISOLATION_BEGIN() call must be after view name is back on tables list.
-
Galina Shalygina authored
During the user-defined variable defined by the recursive CTE handling procedure check_dependencies_in_with_clauses that checks dependencies between the tables that are defined in the CTE and find recursive definitions wasn't called.
-
Daniel Black authored
-
Daniel Black authored
-
- 18 Dec, 2017 12 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
The InnoDB background DROP TABLE queue is something that we should really remove, but are unable to until we remove dict_operation_lock so that DDL and DML operations can be combined in a single transaction. Because the queue is not persistent, it is not crash-safe. In stable versions of MariaDB, we can only try harder to drop all enqueued tables before server shutdown. row_mysql_drop_t::table_id: Replaces table_name. row_drop_tables_for_mysql_in_background(): Do not remove the entry from the list as long as the table exists. In this way, the table should eventually be dropped.
-
Nirbhay Choubey authored
SST processes should inherit mysqld's process group.
-
sjaakola authored
Moved TOI replication to happen after ACL checking for commands: SQLCOM_CREATE_EVENT SQLCOM_ALTER_EVENT SQLCOM_DROP_EVENT SQLCOM_CREATE_VIEW SQLCOM_CREATE_TRIGGER SQLCOM_DROP_TRIGGER SQLCOM_INSTALL_PLUGIN SQLCOM_UNINSTALL_PLUGIN
-
Sergei Golubchik authored
$WSREP_SST_OPT_CONF already includes --defaults-extra-file= prefix.
-
Martynas Bendorius authored
wrep_sst_common: Setting "-c ''" for my_print_defaults just takes no values from config at all. $MY_PRINT_DEFAULTS is already set at the top of the script to have --defaults-file and --defaults-extra-file. If WSREP_SST_OPT_CONF if set to "--defaults-file=/etc/my.cnf --defaults-extra-file=/etc/my.extra.cnf", then "my_print_defaults -c "" --defaults-file=/etc/my.cnf" succeeds, but if WSREP_SST_OPT_CONF is empty - no default values are taken at all. wsrep_sst_xtrabackup-v2: innobackupex does not support --defaults-extra-file, so ${WSREP_SST_OPT_CONF} cannot be used as an argument, it has been changed to ${WSREP_SST_OPT_DEFAULT}. Removed --defaults-file= from INNOMOVE line, because WSREP_SST_OPT_CONF already includes it (INNOBACKUP was fine, INNOMOVE - not).
-
Vladislav Vaintroub authored
options.
-
Sergei Golubchik authored
MDEV-14641 Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine make sure that mysql_create_frm_image() and fast_alter_partition_table() use the same code to derive HA_OPTION_PACK_RECORD from create_info->row_type.
-
Alexey Botchkov authored
Save the rows_examined counter before it gets emptied.
-
Alexey Botchkov authored
-
Alexander Barkov authored
-
Vesa Pentti authored
* The version of tcmalloc is written to the system variable 'version_malloc_library' if tcmalloc is used, similarly to jemalloc * Extracted method guess_malloc_library()
-
- 17 Dec, 2017 2 commits
-
-
Alexey Botchkov authored
The 'data' field in the XA RECOVER resultset changed to be charset_bin. It seems to me right and also --binary-as-hex starts working. The XA RECOVER FORMAT='SQL' option implemented. It returns the XID string that fits to be an argument for the XA ... statements.
-
Monty authored
rocksdb_sys_vars.rocksdb_update_cf_options_basic.test failed with reports about not freed memory.
-
- 16 Dec, 2017 2 commits
-
-
Sergei Petrunia authored
Set maturity level of all "Sub-plugins" to be the same as the main maturity level.
-
Sergei Petrunia authored
Adjust the fix according to the review input: don't introduce a special error caode, use ER_INTERNAL_ERROR catch-all.
-
- 15 Dec, 2017 1 commit
-
-
Sergei Petrunia authored
The error "Unsupported collation on string indexed column %s Use binary collation (latin1_bin, binary, utf8_bin)." is misleading. Change it: - It is now a warning - It is printed only for collations that do not support index-only access (reversible collations that use unpack_info are ok) - The new warning text is: Indexed column %s.%s uses a collation that does not allow index-only access in secondary key and has reduced disk space efficiency in primary key.
-
- 14 Dec, 2017 5 commits
-
-
Oleksandr Byelkin authored
tokudb needs either F_NOCACHE or O_DIRECT, not both
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 13 Dec, 2017 10 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
trx_rollback_active(): When aborting the rollback, free the query graph.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
MDEV-12323 Rollback progress log messages during crash recovery are intermixed with unrelated log messages trx_roll_must_shutdown(): During the rollback of recovered transactions, report progress and check if the rollback should be interrupted because of a pending shutdown. trx_roll_max_undo_no, trx_roll_progress_printed_pct: Remove, along with the messages that were interleaved with other messages.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
row_undo_step(), trx_rollback_active(): Abort the rollback of a recovered ordinary transaction if fast shutdown has been initiated. trx_rollback_resurrected(): Convert an aborted-rollback transaction into a fake XA PREPARE transaction, so that fast shutdown can proceed.
-
Marko Mäkelä authored
MDEV-13797 InnoDB may hang if shutdown is initiated soon after startup while rolling back recovered incomplete transactions trx_rollback_resurrected(): If shutdown was initiated, fake all remaining active transactions to XA PREPARE state, so that shutdown can proceed. Also, make the parameter "all" an output that will be assigned to FALSE in this case. trx_rollback_or_clean_recovered(): Remove the shutdown check (it was moved to trx_rollback_resurrected()). trx_undo_free_prepared(): Relax assertions.
-
Marko Mäkelä authored
row_quiesce_table_start(), row_quiesce_table_complete(): Use the more appropriate predicate srv_undo_sources for skipping purge control. (This change alone is insufficient; it is possible that this predicate will change during the call to trx_purge_stop() or trx_purge_run().) trx_purge_stop(), trx_purge_run(): Tolerate PURGE_STATE_EXIT. It is very well possible to initiate shutdown soon after the statement FLUSH TABLES FOR EXPORT has been submitted to execution. srv_purge_coordinator_thread(): Ensure that the wait for purge_sys->event in trx_purge_stop() will terminate when the coordinator thread exits.
-