- 21 Sep, 2017 12 commits
-
-
Marko Mäkelä authored
The column SYS_INDEXES.MERGE_THRESHOLD was added in MySQL 5.7. This makes the system table the very first one where instant ADD COLUMN has been used.
-
Marko Mäkelä authored
rec_get_nth_cfield(): Remove the heap parameter. Copying the default value of a field into a heap is only needed in row_build_low(type=ROW_COPY_DATA). rec_get_nth_field(): Use the original definition. There are very few rec_get_nth_cfield() calls compared to rec_get_nth_field().
-
Marko Mäkelä authored
Assert that the flags EXTERNAL, DEFAULT, and NULL are mutually exclusive.
-
Marko Mäkelä authored
Store dict_col_t::def_val inline, using an anonymous struct. dict_mem_table_fake_nth_col_default(), dict_col_set_added_column_default(): Remove. dict_mem_fill_column_struct(): Initialize def_val.
-
Marko Mäkelä authored
rec_get_offsets(): Use the 'leaf' parameter for non-debug purposes. Initialize all fields for ROW_FORMAT=REDUNDANT records that precede an instant ADD COLUMN. rec_offs_make_valid(): Add the parameter 'leaf'. rec_copy_prefix_to_dtuple(): Assert that the tuple is only built on the core fields. Instant ADD COLUMN only applies to the clustered index, and we should never build a search key that has more than the PRIMARY KEY and possibly DB_TRX_ID,DB_ROLL_PTR. All these columns are always present. dict_index_build_data_tuple(): Remove assertions that would be duplicated in rec_copy_prefix_to_dtuple(). rec_get_n_nullable(): Get the number of nullable columns. rec_init_offsets(): Support ROW_FORMAT=REDUNDANT records that were written before instant ADD COLUMN. cmp_rec_rec_with_match(): Implement comparison of MIN_REC_FLAG records.
-
Marko Mäkelä authored
Create each table with a SPATIAL INDEX, because when MySQL 5.7 (and MariaDB 10.2.2) introduced SPATIAL INDEX for InnoDB tables, a table-rebuilding LOCK=NONE would be refused if the table contains any SPATIAL INDEX. With instant ADD COLUMN, the operations must be allowed, and must report '0 rows affected' for everything else except ROW_FORMAT=COMPRESSED tables. FIXME: When instant ADD COLUMN is enabled, the ALGORITHM=INPLACE will have to be changed to LOCK=NONE.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 20 Sep, 2017 19 commits
-
-
Sergei Golubchik authored
followup for b5ead3a6 libmariadb3 does not replace 10.1's libmariadbclient18 anymore, but it still conflicts with it, both install dialog.so
-
Marko Mäkelä authored
-
Marko Mäkelä authored
This fixes a regression that only affects debug builds, caused by commit 48192f96 which is necessary preparation for MDEV-11369 instant ADD COLUMN. (Although that is a 10.3 task, to ease merges between 10.2 and 10.3, this change that improves debug checks was pushed to 10.2 already.) Unlike btr_pcur_restore_position(), rtr_cur_restore_position() can create a search tuple out of a non-leaf page record. So, we must pass 'bool leaf' parameter to dict_index_build_data_tuple(). dict_index_build_data_tuple(): Add a debug-only parameter 'bool leaf'. rec_copy_prefix_to_dtuple(): Make the parameter debug-only. row_sel_get_clust_rec_for_mysql(): In the debug code for spatial index, remove an unnecessary call to buf_page_get_gen(), and use the already latched block directly.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
MDEV-13851 Always check table options in ALTER TABLE…ALGORITHM=INPLACE In the merge of MySQL 5.7.9 to MariaDB 10.2.2, some code was included that prevents ADD SPATIAL INDEX from being executed with ALGORITHM=INPLACE. Also, the constant ADD_SPATIAL_INDEX was introduced as an alias to ADD_INDEX. We will remove that alias now, and properly implement the same ADD SPATIAL INDEX restrictions as MySQL 5.7 does: 1. table-rebuilding operations are not allowed if SPATIAL INDEX survive it 2. ALTER TABLE…ADD SPATIAL INDEX…LOCK=NONE is not allowed ha_innobase::prepare_inplace_alter_table(): If the ALTER TABLE requires actions within InnoDB, enforce the table options (MDEV-13851). In this way, we will keep denying ADD SPATIAL INDEX for tables that use encryption (MDEV-11974), even if ALGORITHM=INPLACE is used.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
This should affect debug builds only. Debug builds will check that the status bits of ROW_FORMAT!=REDUNDANT records match the is_leaf parameter. The only observable change to non-debug should be the addition of the is_leaf parameter to the function rec_copy_prefix_to_dtuple(), and the removal of some calls to update the adaptive hash index (it is only built for the leaf pages). This change should have been made in MySQL 5.0.3, instead of introducing the status flags in the ROW_FORMAT=COMPACT record header.
-
Eugene Kosov authored
* remove dead code * rename method to reduce confusion
-
Vicențiu Ciorbaru authored
-
Vicențiu Ciorbaru authored
-
Vicențiu Ciorbaru authored
-
Vicențiu Ciorbaru authored
-
Vicențiu Ciorbaru authored
-
Jan Lindström authored
-
Marko Mäkelä authored
The only universal index in InnoDB was the change buffer. It suffices to keep the DICT_IBUF flag (which, like DICT_UNIVERSAL, is not written to any persistent data structure).
-
Marko Mäkelä authored
The function check_mdl_lock_works() is for debug builds only.
-
Marko Mäkelä authored
Define some page accessor functions inline in page0page.h, reducing code duplication in page0page.ic. Use page_rec_is_leaf() instead of page_is_leaf() where possible.
-
- 19 Sep, 2017 9 commits
-
-
Vicențiu Ciorbaru authored
-
Vicențiu Ciorbaru authored
-
Vicențiu Ciorbaru authored
It is only valid for 10.1
-
Marko Mäkelä authored
-
Eugene Kosov authored
-
Oleksandr Byelkin authored
MDEV-13290: Assertion Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' or `! is_set()' failed Check error status which can be set by conversion procedures.
-
Vicențiu Ciorbaru authored
When creating an Item_direct_view_ref we were setting the Name_resolution_context based on TABLE_LIST::view member variable. However, for derived tables this member is NULL. To not set a wrong context, if TABLE_LIST::view is empty, use THD::lex instead.
-
Vicențiu Ciorbaru authored
Window functions can not be used as arguments to aggregate functions, as the aggregation happens before window function computation. Disallow such constructs by returning an error. In order to detect this case a change was needed in the base Item_sum_xxx::fix_fields to propagate the with_window_func flag. Item_func_group_concat requires the same change.
-
Vicențiu Ciorbaru authored
Item_cond did not correctly propagate with_window_func flag in the Item tree. Without it, we would not call Item::split_sum_func correctly and the window function's result_field would remain NULL.
-