- 30 Mar, 2018 3 commits
-
-
Sergei Golubchik authored
reorder items in args[] array. Instead of when1,then1,when2,then2,...[,case][,else] sort them as [case,]when1,when2,...,then1,then2,...[,else] in this case all items used for comparison take a continuous part of the array and can be aggregated directly. and all items that can be returned take a continuous part of the array and can be aggregated directly. Old code had to copy them to a temporary array before aggreation, and then copy back (thd->change_item_tree) everything that was changed. this is a 10.3 version of bf1ca14f
-
Sergei Golubchik authored
-
Marko Mäkelä authored
fil_space_for_table_exists_in_mem(): Fix a regression that was introduced in commit 05863142 when removing fil_system.name_hash. The condition !valid || space == fnamespace was incorrectly replaced with !valid, instead of true. fil_report_missing_tablespace(): Merge to the only caller.
-
- 29 Mar, 2018 37 commits
-
-
Varun Gupta authored
Introduced new status variable for custom aggregate functions.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
InnoDB always keeps all tablespaces in the fil_system cache. The fil_system.LRU is only for closing file handles; the fil_space_t and fil_node_t for all data files will remain in main memory. Between startup to shutdown, they can only be created and removed by DDL statements. Therefore, we can let dict_table_t::space point directly to the fil_space_t. dict_table_t::space_id: A numeric tablespace ID for the corner cases where we do not have a tablespace. The most prominent examples are ALTER TABLE...DISCARD TABLESPACE or a missing or corrupted file. There are a few functional differences; most notably: (1) DROP TABLE will delete matching .ibd and .cfg files, even if they were not attached to the data dictionary. (2) Some error messages will report file names instead of numeric IDs. There still are many functions that use numeric tablespace IDs instead of fil_space_t*, and many functions could be converted to fil_space_t member functions. Also, Tablespace and Datafile should be merged with fil_space_t and fil_node_t. page_id_t and buf_page_get_gen() could use fil_space_t& instead of a numeric ID, and after moving to a single buffer pool (MDEV-15058), buf_pool_t::page_hash could be moved to fil_space_t::page_hash. FilSpace: Remove. Only few calls to fil_space_acquire() will remain, and gradually they should be removed. mtr_t::set_named_space_id(ulint): Renamed from set_named_space(), to prevent accidental calls to this slower function. Very few callers remain. fseg_create(), fsp_reserve_free_extents(): Take fil_space_t* as a parameter instead of a space_id. fil_space_t::rename(): Wrapper for fil_rename_tablespace_check(), fil_name_write_rename(), fil_rename_tablespace(). Mariabackup passes the parameter log=false; InnoDB passes log=true. dict_mem_table_create(): Take fil_space_t* instead of space_id as parameter. dict_process_sys_tables_rec_and_mtr_commit(): Replace the parameter 'status' with 'bool cached'. dict_get_and_save_data_dir_path(): Avoid copying the fil_node_t::name. fil_ibd_open(): Return the tablespace. fil_space_t::set_imported(): Replaces fil_space_set_imported(). truncate_t: Change many member function parameters to fil_space_t*, and remove page_size parameters. row_truncate_prepare(): Merge to its only caller. row_drop_table_from_cache(): Assert that the table is persistent. dict_create_sys_indexes_tuple(): Write SYS_INDEXES.SPACE=FIL_NULL if the tablespace has been discarded. row_import_update_discarded_flag(): Remove a constant parameter.
-
Marko Mäkelä authored
fsp_get_available_space_in_free_extents(): Declare the function static in the only caller, and take const fil_space_t& as a parameter.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
fil_space_get_by_name(): Remove. (Implement differently in mariabackup.) fil_ibd_open(): Check if the tablespace by the same ID already exists. If it is the same name, return success, else failure.
-
Marko Mäkelä authored
trx_rsegf_get(), trx_undo_get_first_rec(): Change the parameter to fil_space_t* so that fewer callers need to be adjusted. trx_undo_free_page(): Remove the redundant parameter 'space'.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Remove the parameter page_size, and pass a dummy page size to buf_page_get_gen() along with BUF_PEEK_IF_IN_POOL.
-
Marko Mäkelä authored
fil_discard_tablespace(): Merge to row_discard_tablespace() which was the only caller.
-
Marko Mäkelä authored
fil_recreate_table(), fil_recreate_tablespace(), fil_reinit_space_header_for_table(): Move the functions to the only calling module and declare static. fil_recreate_table(): Remove the constant parameter space_id=0,flags.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Replace index->table_name with index->table->name.
-
Marko Mäkelä authored
We can rely on the dict_table_t::space. All indexes of a table object are always in the same tablespace. (For fulltext indexes, the data is located in auxiliary tables, and these will continue to have their own table objects, separate from the main table.)
-
Marko Mäkelä authored
This is a non-functional change (pure refactoring).
-
Marko Mäkelä authored
-
Marko Mäkelä authored
fsp_header_init(): Take fil_space_t* as a parameter.
-
Marko Mäkelä authored
Add fil_system_t::sys_space, fil_system_t::temp_space. These will replace lookups for TRX_SYS_SPACE or SRV_TMP_SPACE_ID. mtr_t::m_undo_space, mtr_t::m_sys_space: Remove. mtr_t::set_sys_modified(): Remove. fil_space_get_type(), fil_space_get_n_reserved_extents(): Remove. fsp_header_get_tablespace_size(), fsp_header_inc_size(): Merge to the only caller, innobase_start_or_create_for_mysql().
-
Marko Mäkelä authored
fil_system_t::create(): Replaces fil_init(), fsp_init(). fil_system_t::close(): Replaces fil_close(). fil_system_t::max_n_open: Remove. Use srv_max_n_open_files directly.
-
Marko Mäkelä authored
create_table_info_t::create_table_def(): Assign the innodb_temporary tablespace directly. dict_build_tablespace_for_table(): Merge to the only remaining caller, dict_build_table_def_step().
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
It does not hurt to delete non-existing records from SYS_TABLESPACES and SYS_DATAFILES. Because MariaDB does not support CREATE TABLESPACE, only the system tablespace (space_id=0) can contain multiple tables. But, there are no entries for the system tablespace in these tables (which actually are stored inside the system tablespace).
-
Sergei Petrunia authored
MariaDB differs from the upstream for "DDL-like" command. For these, it sets binlog_format=STATEMENT for the duration of the statement. This doesn't play well with MyRocks, which tries to prevent DML commands with binlog_format!=ROW. Also, if Locked_tables_list::reopen_tables() returned an error, then close_cached_tables should propagate the error condition and not silently consume it (it's difficult to have test coverage for this because this error condition is rare)
-
Monty authored
MDEV-15117 Server crashes in in open_and_process_table or ASAN heap-use-after-free in is_temporary_table upon creating/flushing sequences. Problem was that sequence_insert closed and reopened the like table without proper locking. Fixed by ensuring that the like table is not reopened in sequence_insert
-
Monty authored
Problem was that sequence_insert closed and reopened the like table without proper locking. Fixed by ensuring that the like table is not reopened in sequence_insert
-
Monty authored
SELECT queries on information_schema table will now not store data in the temporary table for columns that are not used in the query. This can drastically reduce memory when there are many rows involved in a query, like using SELECT table_name FROM information_schema.table on a system with many tables. The difference for the above query is about 14K per existing table. The code works this way: - Create a bitmap for all information_schema fields used in the query - For BLOB and VARCHAR fields that are not use, create a Field_null field.
-
Monty authored
-
Monty authored
Remove compiler warnings in sphinx, item_sum.cc and opt_split.cc
-
Michael Widenius authored
This is needed as otherwise a lot of MyISAM tables may be marked as crashed, depending on in which order tests are run
-
Monty authored
-
Michael Widenius authored
Renamed suite/rpl/include/rpl_sync.inc to rpl_sync_test.inc to remove clash with include/rpl_sync.inc
-
Michael Widenius authored
-