- 29 Mar, 2018 40 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
-
Michael Widenius authored
-
Monty authored
This is done to get more free flag bits for alter_info->flags Renamed all ALTER PARTITION defines to start with ALTER_PARTITION_ Renamed ALTER_PARTITION to ALTER_PARTITION_INFO Renamed ALTER_TABLE_REORG to ALTER_PARTITION_TABLE_REORG Other things: - Shifted some ALTER_xxx defines to get empty bits at end
-
Monty authored
Main reason was to make it easier to print the above structures in a debugger. Additional benefits is that I was able to use same defines for both structures, which simplifes some code. Most of the code is just removing Alter_info:: and Alter_inplace_info:: from alter table flags. Following renames was done: HA_ALTER_FLAGS -> alter_table_operations CHANGE_CREATE_OPTION -> ALTER_CHANGE_CREATE_OPTION Alter_info::ADD_INDEX -> ALTER_ADD_INDEX DROP_INDEX -> ALTER_DROP_INDEX ADD_UNIQUE_INDEX -> ALTER_ADD_UNIQUE_INDEX DROP_UNIQUE_INDEx -> ALTER_DROP_UNIQUE_INDEX ADD_PK_INDEX -> ALTER_ADD_PK_INDEX DROP_PK_INDEX -> ALTER_DROP_PK_INDEX Alter_info:ALTER_ADD_COLUMN -> ALTER_PARSE_ADD_COLUMN Alter_info:ALTER_DROP_COLUMN -> ALTER_PARSE_DROP_COLUMN Alter_inplace_info::ADD_INDEX -> ALTER_ADD_NON_UNIQUE_NON_PRIM_INDEX Alter_inplace_info::DROP_INDEX -> ALTER_DROP_NON_UNIQUE_NON_PRIM_INDEX Other things: - Added typedef alter_table_operatons for alter table flags - DROP CHECK CONSTRAINT can now be done online - Added checks for Aria tables in alter_table_online.test - alter_table_flags now takes an ulonglong as argument. - Don't support online operations if checksum option is used. - sql_lex.cc doesn't add ALTER_ADD_INDEX if index is not created
-