- 20 Sep, 2018 7 commits
-
-
Marko Mäkelä authored
Until row_build() is taking care of reordering the fields in the clustered index record, we cannot really support anything else than instant DROP COLUMN of the last columns of a table.
-
Marko Mäkelä authored
rec_info_bits_valid(): Remove. The only case when this would fail is when the record is the generic ALTER TABLE metadata record. rec_is_alter_metadata(): Check if a record is the metadata record for instant ALTER TABLE (other than ADD COLUMN). NOTE: This function must not be invoked on node pointer records, because the delete-mark flag in those records may be set (it is garbage), and then a debug assertion could fail because index->is_instant() does not necessarily hold. rec_offs_validate(): FIXME: Temporarily disabled an assertion that does not hold if rec_is_alter_metadata(). Because we do not know here if a ROW_FORMAT=REDUNDANT record is for the leaf page, we cannot invoke rec_is_alter_metadata() here.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Thirunarayanan Balathandayuthapani authored
- Changed the condition for is_instant() for dict_index_t
-
Thirunarayanan Balathandayuthapani authored
- Changed the metadata row format by adding number of null bytes in the record. - Changed the checking condition for instant alter in check_if_supported_inplace_alter() - Fixed the instant_alter test case
-
- 19 Sep, 2018 12 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Allow combination of non-instant, non-rebuilding operations with changes of table options that do not require a rebuild. For example, DROP INDEX or ADD INDEX can be performed with ALGORITHM=NOCOPY together with changing such table options. Changing the table options alone would be allowed with ALGORITHM=INSTANT. INNOBASE_ALTER_NOCREATE: A new set of flags, for operations that are refused for ALGORITHM=INSTANT and do not involve creating index trees. Move ALTER_RENAME_INDEX to the proper place (INNOBASE_ALTER_INSTANT). innobase_need_rebuild(): Do not require a rebuild if INNOBASE_ALTER_NOREBUILD operations are combined with ALTER_OPTIONS. ha_innobase::prepare_inplace_alter_table(), ha_innobase::inplace_alter_table(): Use the fast path if ALTER_OPTIONS is combined with INNOBASE_ALTER_NOCREATE. In this case, the actual changes would be deferred to ha_innobase::commit_inplace_alter_table().
-
Marko Mäkelä authored
-
Marko Mäkelä authored
On instant DROP COLUMN, there is no point in updating indexes that depended on the dropped column. This avoids a memory access violation in innodb.instant_alter.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Also, clarify terminology: alter_metadata instead of new_default_row.
-
Marko Mäkelä authored
This follows up to commit 755187c8. TRX_UNDO_INSERT_METADATA: Renamed from TRX_UNDO_INSERT_DEFAULT trx_undo_metadata: Renamed from trx_undo_default_rec
-
Marko Mäkelä authored
-
Marko Mäkelä authored
For instant ALTER TABLE, we store a hidden metadata record at the start of the clustered index, to indicate how the format of the records differs from the latest table definition. The term 'default row' is too specific, because it applies to instant ADD COLUMN only, and we will be supporting more classes of instant ALTER TABLE later on. For instant ADD COLUMN, we store the initial default values in the metadata record.
-
- 18 Sep, 2018 7 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Remove some code duplication and dead code. If no 'default row' record exists, the root page must be in the conventional format. Should the page type already be FIL_PAGE_TYPE_INSTANT, we would necessarily hit a debug assertion failure in page_set_instant().
-
Jacob Mathew authored
The crash occurs when the Spider node server attempts to create an error message stating that the temporary table is not found. The function to create the error message is called with incorrect parameters. I fixed the crash by correcting the incorrect parameter values. Author: Jacob Mathew. Reviewer: Kentoku Shiba. Cherry-Picked: Commit e3396161 on branch bb-10.3-mdev-17144
-
Jacob Mathew authored
The crash occurs when the Spider node server attempts to create an error message stating that the temporary table is not found. The function to create the error message is called with incorrect parameters. I fixed the crash by correcting the incorrect parameter values. Author: Jacob Mathew. Reviewer: Kentoku Shiba. Merged: Commit e3396161 branch bb-10.3-mdev-17144
-
Igor Babaev authored
The function JOIN_TAB::choose_best_splitting() did not take into account that for some tables whose fields were used in the GROUP BY list of the specification of a splittable materialized derived there might exist no elements in the array ext_keyuses_for_splitting.
-
Jacob Mathew authored
The crash occurs when the Spider node server attempts to create an error message stating that the temporary table is not found. The function to create the error message is called with incorrect parameters. I fixed the crash by correcting the incorrect parameter values. Author: Jacob Mathew. Reviewer: Kentoku Shiba.
-
- 17 Sep, 2018 9 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Now that ha_innobase::prepare_inplace_alter_table() is accessing ha_alter_info->create_info->option_struct, we must initialize it in the Mroonga wrapper for ALTER TABLE based on the parsed table options for the wrap_altered_table.
-
Marko Mäkelä authored
REC_INFO_DEFAULT_ROW_ADD: Renamed from REC_INFO_DEFAULT_ROW. This is for instant ADD COLUMN only. REC_INFO_DEFAULT_ROW_ALTER: The more generic 'default row' record, with additional information other than instant ADD COLUMN. dtuple_t::is_default_row(), upd_t::is_default_row(): Check if info_bits is for the 'default row'.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
The table option page_compression_level is something that only affects future writes, not actually the data format. Therefore, we can allow instant changes of this option. Similarly, the table option page_compressed can be set on a previously uncompressed table without rebuilding the table, because an uncompressed page would be considered valid when reading a page_compressed table. Removing the page_compressed option will continue to require the table to be rebuilt. ha_innobase_inplace_ctx::page_compression_level: The requested page_compression_level at the start of ALTER TABLE, or 0 if page_compressed=OFF. alter_options_need_rebuild(): Renamed from create_option_need_rebuild(). Allow page_compression_level and page_compressed to be changed as above, without rebuilding the table. ha_innobase::check_if_supported_inplace_alter(): Allow ALGORITHM=INSTANT for ALTER_OPTIONS if the table is not to be rebuilt. If rebuild is needed, set ha_alter_info->unsupported_reason. innobase_page_compression_try(): Update SYS_TABLES.TYPE according to the table flags, for an instant change of page_compression_level or page_compressed. commit_cache_norebuild(): Adjust dict_table_t::flags, fil_space_t::flags and (if needed) FSP_SPACE_FLAGS if page_compression_level was specified.
-
Thirunarayanan Balathandayuthapani authored
Instant drop column works for dynamic row format as of now. - Yet to change default row for redundant row format. - Need to find better condition for is_instant() - Need to find better way to store offsets for new default row. - Yet to do rollback for instant alter drop operation.
-
Alexander Barkov authored
-
- 16 Sep, 2018 2 commits
-
-
Alexander Barkov authored
-
Alexander Barkov authored
MDEV-17203 Move fractional second truncation from Item_xxx_typecast::get_date() to Time and Datetime constructors
-
- 15 Sep, 2018 1 commit
-
-
Igor Babaev authored
The optimizer erroneously allowed to use join cache when joining a splittable materialized table together with splitting optimization. As a consequence in some rare cases the server returned wrong result sets for queries with materialized derived. This patch allows to use either join cache without usage of splitting technique for materialization of a splittable derived table or splitting without usage of join cache when joining such table. The costs the these alternatives are compared and the best variant is chosen.
-
- 14 Sep, 2018 2 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
A debug assertion would fail if an instant ADD COLUMN operation involves splitting the leftmost leaf page and storing a default value off-page. Another debug assertion could fail if the default value does not fit in an undo log page. btr_cur_pessimistic_update(): Invoke rec_offs_make_valid() in order to prevent rec_offs_validate() assertion failure. innobase_add_instant_try(): Invoke btr_cur_pessimistic_update() with the BTR_KEEP_POS_FLAG, which is the correct course of action when BLOBs may need to be written. Whenever returning true, ensure that my_error() will have been called.
-