- 15 Feb, 2018 5 commits
-
-
Marko Mäkelä authored
fts_cmp_set_sync_doc_id(), fts_load_stopword(): Start the transaction in read-only mode if innodb_read_only is set. fts_update_sync_doc_id(), fts_commit_table(), fts_sync(), fts_optimize_table(): Return DB_READ_ONLY if innodb_read_only is set. fts_doc_fetch_by_doc_id(), fts_table_fetch_doc_ids(): Remove the code to start an internal transaction or to roll back, because this is a read-only operation.
-
Marko Mäkelä authored
The session object is not really needed for anything. We can directly create and free the dummy purge_sys->query->trx.
-
Marko Mäkelä authored
If CREATE TABLE...FULLTEXT INDEX was initiated right before shutdown, then the function fts_load_stopword() could commit modifications after shutdown was initiated, causing an assertion failure in the function trx_purge_add_update_undo_to_history(). Mark as internal all the read/write transactions that modify fulltext indexes, so that they will be ignored by the assertion that guards against transaction commits after shutdown has been initiated. fts_optimize_free(): Invoke trx_commit_for_mysql() just in case, because in fts_optimize_create() we started the transaction as internal, and fts_free_for_backgruond() would assert that the flag is clear. Transaction commit would clear the flag.
-
Marko Mäkelä authored
MDEV-14648 Restore fix for MySQL BUG#39053 - UNINSTALL PLUGIN does not allow the storage engine to cleanup open connections Also, allow the MariaDB 10.2 server to link InnoDB dynamically against ha_innodb.so (which is what mysql-test-run.pl expects to exist, instead of the default name ha_innobase.so). wsrep_load_data_split(): Instead of referring to innodb_hton_ptr, check the handlerton::db_type. This was recently broken by me in MDEV-11415. innodb_lock_schedule_algorithm: Define as a weak global symbol, so that WITH_WSREP will not depend on InnoDB being linked statically. I tested this manually. Notably, running a test that only does SET GLOBAL wsrep_on=1; with a static or dynamic InnoDB and ./mtr --mysqld=--loose-innodb-lock-schedule-algorithm=fcfs will crash with SIGSEGV at shutdown. With the default VATS combination the wsrep_on is properly refused for both the static and dynamic InnoDB. ha_close_connection(): Do invoke the method also for plugins for which UNINSTALL PLUGIN was deferred due to open connections. Thanks to @svoj for pointing this out. thd_to_trx(): Return a pointer, not a reference to a pointer. check_trx_exists(): Invoke thd_set_ha_data() for assigning a transaction. log_write_checkpoint_info(): Remove an unused DEBUG_SYNC point that would cause an assertion failure on shutdown after deferred UNINSTALL PLUGIN. This was tested as follows: cmake -DWITH_WSREP=1 -DPLUGIN_INNOBASE:STRING=DYNAMIC \ -DWITH_MARIABACKUP:BOOL=OFF ... make cd mysql-test ./mtr innodb.innodb_uninstall
-
Sauron authored
-
- 14 Feb, 2018 2 commits
-
-
Marko Mäkelä authored
-
Alexey Yurchenko authored
GAL-506 breaks galera_defaults MTR test by upping repl.proto_max again. Fix this once and for all by overwriting it with constant string since it makes little sense to check for it in this test.
-
- 13 Feb, 2018 4 commits
-
-
Daniel Bartholomew authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
lock_trx_release_locks(): Relax a debug assertion to allow recovered TRX_STATE_COMMITTED_IN_MEMORY transactions. trx_commit_in_memory(): Add DEBUG_SYNC instrumentation. trx_undo_insert_cleanup(): Skip persistent changes if innodb_read_only is set. This should only happen when a recovered committed transaction would be cleaned up at shutdown.
-
- 12 Feb, 2018 3 commits
-
-
Marko Mäkelä authored
When Mariabackup gets a bad read of the first page of the system tablespace file, it would inappropriately try to apply the doublewrite buffer and write changes back to the data file (to the source file)! This is very wrong and must be prevented. The correct action would be to retry reading the system tablespace as well as any other files whose first page was read incorrectly. Fixing this was not attempted. xb_load_tablespaces(): Shorten a bogus message to be more relevant. The message can be displayed by --backup or --prepare. xtrabackup_backup_func(), os_file_write_func(): Add a missing space to a message. Datafile::restore_from_doublewrite(): Do not even attempt the operation in Mariabackup. recv_init_crash_recovery_spaces(): Do not attempt to restore the doublewrite buffer in Mariabackup (--prepare or --export), because all pages should have been copied correctly in --backup already, and because --backup should ignore the doublewrite buffer. SysTablespace::read_lsn_and_check_flags(): Do not attempt to initialize the doublewrite buffer in Mariabackup. innodb_make_page_dirty(): Correct the bounds check. Datafile::read_first_page(): Correct the name of the parameter.
-
Marko Mäkelä authored
When code from MySQL 5.7.9 was merged to MariaDB 10.2.2 in commit 2e814d47 an assignment validate=true was inadvertently added to the function dict_check_sys_tables(). This causes InnoDB to open every single .ibd file on startup, even when no crash recovery was needed. Simply removing the assignment would make some tests fail. We do the best to retain almost the same level of inconsistency detection. In the test innodb.table_flags, access to one of the tables will not be blocked despite inconsistent flags. dict_check_sys_tables(): Remove the problematic assignment, and skip validation in normal startup. dict_load_table_one(): If the .ibd file cannot be opened, mark the table as corrupted and unreadable. fil_node_open_file(): Validate FSP_SPACE_FLAGS with the expected flags. If reading the tablespace fails, invalidate node->handle instead of letting it remain stale. This bug was caught by a fil_validate() assertion failure. fsp_flags_try_adjust(): If the tablespace file is invalid, do nothing.
-
Elena Stepanova authored
-
- 11 Feb, 2018 1 commit
-
-
Sergei Golubchik authored
-
- 10 Feb, 2018 5 commits
-
-
Alexey Botchkov authored
When table is renamed, the InnoDB's dictionary cache didn't change the ib_table->data_dir_path accordingly. Now it's set to NULL.
-
Alexander Barkov authored
-
Monty authored
-
Monty authored
TokuDB uses USE_VALGRIND while MariaDB uses HAVE_valgrind Fixed by defining USE_VALGRIND in TokuDB if HAVE_valgrind is used
-
Monty authored
Fixed by adding Item::rename_fields_processor Signed-off-by: Monty <monty@mariadb.org>
-
- 09 Feb, 2018 6 commits
-
-
Alexander Barkov authored
-
Alexander Barkov authored
-
Jan Lindström authored
Before that line there is call to buf_page_get_gen that could return block = NULL when decrypting a page fails. However, we should set error to be != DB_SUCCESS also. In error log there was error about decompression but in that code there is one case where error is not set correctly.
-
Sergei Petrunia authored
-
Marko Mäkelä authored
This MySQL 5.5 test innodb_zip.innodb_prefix_index_lifted was renamed in MySQL 5.7. In commit 2e814d47 the test was inadvertently removed, instead of being renamed. The absence of this test caused a regression in MariaDB 10.2: MDEV-15257 Invalid CREATE INDEX fails to report error correctly
-
Marko Mäkelä authored
page_zip_write_rec(): Do not attempt to access a non-existing DB_TRX_ID column when writing a record to a non-leaf page.
-
- 08 Feb, 2018 14 commits
-
-
Sergei Golubchik authored
add a test that restores the data from a binlog
-
Sergei Golubchik authored
Fix reinit_io_cache(WRITE_CACHE) with non-zero seek_offset. Run encryption.tempfiles with and without binlog checksums.
-
Sergei Golubchik authored
-
Vicențiu Ciorbaru authored
The update was lost during merge.
-
Igor Babaev authored
cte_nonrecursive.test with --embedded. This also fixed some problems for embedded CTEs. Adjusted test results accordingly.
-
Jan Lindström authored
Timing problem as sometimes table is marked as encrypted but sometimes we are not sure and table is just marked missing.
-
Vladislav Vaintroub authored
-
Vladislav Vaintroub authored
-
Otto Kekäläinen authored
Add myrocks hotbackup
-
Marko Mäkelä authored
Rollback attempted to dereference DB_ROLL_PTR=0, which cannot possibly be a valid undo log pointer. A safe canonical value would be roll_ptr_t(1) << ROLL_PTR_INSERT_FLAG_POS which is what was chosen in MDEV-12288. This bug was reproduced in 10.3 only. Potentially, the problem could have been introduced by MDEV-11415, which suppresses undo logging for ALGORITHM=COPY operations. In those operations, we should actually have written the safe value of DB_ROLL_PTR instead of writing 0. However, the test in commit 5421e3ae demonstrates that access to the rebuilt table by earlier-started transactions should actually have been refused with ER_TABLE_DEF_CHANGED. btr_cur_ins_lock_and_undo(): When undo logging is disabled, use the safe value of DB_ROLL_PTR. btr_cur_optimistic_insert(): Validate the DB_TRX_ID,DB_ROLL_PTR before inserting into a clustered index leaf page. ins_node_t::sys_buf[]: Replaces row_id_buf and trx_id_buf and some heap usage. row_ins_alloc_sys_fields(): Initialize ins_node_t::sys_buf[]. trx_undo_page_report_modify(): Assert that the DB_ROLL_PTR is not 0. trx_undo_get_undo_rec_low(): Assert that the roll_ptr is valid before trying to dereference it. dict_index_t::is_primary(): Check if the index is the primary key.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Before killing the server, we have to FLUSH TABLES in order to prevent the corruption of any MyISAM system tables.
-
Marko Mäkelä authored
PageConverter::adjust_cluster_record(): Instead of writing the invalid value DB_ROLL_PTR=0, write a value that indicates a fresh insert, that is, prevents the DB_ROLL_PTR from being dereferenced in any circumstances. It can be argued that IMPORT TABLESPACE should actually update the dict_index_t::trx_id to prevent older transactions from accessing the table, similar to what I did on table rebuild in MySQL 5.6.6 in https://github.com/mysql/mysql-server/commit/03f81a55f221095d397c375afe8a10c8038da339
-