- 05 Oct, 2018 5 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 04 Oct, 2018 7 commits
-
-
Marko Mäkelä authored
btr_cur_instant_root_init(): Check the "infimum" and "supremum" record strings already here, and not later in btr_cur_instant_root_init(). In this way, we can properly reject files from later versions where instant ALTER TABLE could support further operations that change the format of InnoDB clustered indexes.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
For dropped columns, store the NOT NULL flag, the fixed length, and for variable-length columns, whether the maximum length exceeded 255 bytes.
-
- 03 Oct, 2018 6 commits
-
-
Marko Mäkelä authored
For partitioned tables, we must adjust each partition separately.
-
Marko Mäkelä authored
FIXME: For dropped columns, store the nullability and the fixed_len in the BLOB array. Also, add a version discriminator field. btr_cur_instant_init_low(): Read and validate the metadata BLOB page before reconstructing the dictionary information based on it. dict_col_t::clear_instant(): Renamed from remove_instant(). Do not assert that the column was instantly added, because we sometimes call this unconditionally for all columns. dict_table_t::reconstruct_columns(): Take the metadata BLOB and length as a parameter. Invoke dict_index_t::reconstruct_fields() upon successful completion.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
For instant DROP COLUMN and ROW_FORMAT=COMPACT or ROW_FORMAT=REDUNDANT, we must store the n_core_null_bytes in the root page, so that the chain of node pointer records can be followed in order to reach the leftmost leaf page where the metadata record is located. If the PRIMARY KEY contains any variable-length column and some nullable columns were instantly dropped, the dict_index_t::n_nullable in the data dictionary could be smaller than it actually is in the non-leaf pages. Because of this, the non-leaf pages could use more bytes for the null flags than the data dictionary expects, and we could be reading the lengths of the variable-length columns from the wrong offset, and thus reading the child page number from wrong place. This is the result of two design mistakes that involve unnecessary storage of data: First, it is nonsense to store any data fields for the leftmost node pointer records, because the comparisons would be resolved by the MIN_REC_FLAG alone. Second, there cannot be any null fields in the clustered index node pointer fields, but we nevertheless reserve space for all the null flags. btr_set_instant(): Convert a root page into "instant ALTER TABLE" format. This replaces page_set_instant(). btr_cur_instant_init_metadata(): Do not read any lengths from the metadata record header before reading the BLOB. At this point, we would not actually know how many nullable fields the metadata record contains. btr_cur_instant_init_low(): Minimize differences from the 10.3 version. btr_cur_instant_root_init(): Initialize n_core_null_bytes in one of two possible ways. FIXME: innobase_instant_try(): When needed, convert the root page from the ADD COLUMN format to the generic instant ALTER TABLE format.
-
Marko Mäkelä authored
Because changes of the FIL_PAGE_TYPE or PAGE_INSTANT in the root page are not undo-logged, it is possible that the fields suggest that instant ADD COLUMN is in effect, even though no metadata record exists. If the fields are set, proceed to fetch the metadata record. If the metadata record does not exist, return success if !index->is_instant(). Also, check that the "infimum" and "supremum" records carry the strings in the root page. In a later format that supports instant DROP COLUMN, we will have to store more information in the root page, so that index->n_core_null_bytes can be determined accurately.
-
Marko Mäkelä authored
btr_cur_instant_init_low(): If columns were instantly added and dropped, then index->is_instant() might not hold even though the root page type was FIL_PAGE_TYPE_INSTANT. MariaDB 10.3 must refuse to open such files, because instant DROP COLUMN is not supported. Also, refuse to open the table if the metadata record has wrong info OR status bits. Previously, we only refused to open if both bits were wrong.
-
- 02 Oct, 2018 12 commits
-
-
Marko Mäkelä authored
Apparently, the first fields of a clustered index may be updated in an update_undo vector when the index is ID_IND of SYS_FOREIGN, as part of renaming the table during ALTER TABLE. Normally, updates of the PRIMARY KEY should be logged as delete-mark and an insert.
-
Marko Mäkelä authored
The function had only one caller.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
trx_undo_update_rec_get_update(): Handle the metadata BLOB correctly.
-
Marko Mäkelä authored
Correctly calculate the size of mblob when some last fields are missing.
-
Marko Mäkelä authored
-
Jan Lindström authored
MDEV-16211 Contents of transaction_registry should not be replicated by Galera
-
Elena Stepanova authored
Addition based on Travis results
-
Sergey Vojtovich authored
truncating a temporary table TRUNCATE expects only one TABLE instance (which is used by TRUNCATE itself) to be open. However this requirement wasn't enforced after "MDEV-5535: Cannot reopen temporary table". Fixed by closing unused table instances before performing TRUNCATE.
-
Marko Mäkelä authored
-
- 01 Oct, 2018 10 commits
-
-
Elena Stepanova authored
-
Eugene Kosov authored
Patch fixes two bugs: 1) BEGIN_TIMESTAMP of MYSQL.TRANSACTION_REGISTY is '0-0-0' on replication record insertion 2) BEGIN_TIMESTAMP equals COMMMIT_TIMESTAMP in MYSQL.TRANSACTION_REGISTRY Fixed by calling THD::set_time() at appropriate places
-
Marko Mäkelä authored
For other than the clustered index, ignore table->instant.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
ha_innobase::check_if_supported_inplace_alter(): Do not allow adding a FTS_DOC_ID column if a hidden FTS_DOC_ID column exists due to FULLTEXT INDEX. (This always required ALGORITHM=COPY.) ha_innobase_inplace_ctx::first_alter_pos: The first column whose position is affected by instant ADD, DROP, or changing the order of columns. innobase_instant_try(): Fill in a zero default value for the hidden column FTS_DOC_ID. Before this, it was not possible to instantly add columns if a hidden FTS_DOC_ID column existed (at the end of the InnoDB table definition).
-
Alexander Barkov authored
-
Alexander Barkov authored
A cleanup for MDEV-17317 Add THD* parameter into Item::get_date() and stricter data type control to "fuzzydate" Fixing C++ function check_date() to get the "fuzzydate" as date_mode_t rather than ulonglong, so conversion from date_time_t to ulonglong is now done inside C++ check_date(), and no conversion is needed in the callers' code. As an additional safety, modified the code not to pass TIME_FUZZY_DATE to the low level C functions: - check_date() - str_to_datetime() - str_to_time() - number_to_datetime() because TIME_FUZZY_DATE is known only on the C++ level, C functions do not know it. Soon we'll be adding more flags into the C++ level (i.e. to date_time_t), e.g. for rounding. It's a good idea to prevent passing C++ specific flags into pure C routines before this change. Asserts were added into the affected C functions to verify that the caller passed only known C level flags.
-
Sergei Golubchik authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-