1. 04 Oct, 2018 1 commit
  2. 03 Oct, 2018 4 commits
    • Marko Mäkelä's avatar
      innobase_instant_try(): Put back the parameter ctx · b894457c
      Marko Mäkelä authored
      For partitioned tables, we must adjust each partition separately.
      b894457c
    • Marko Mäkelä's avatar
      Simplify the metadata BLOB parsing on startup · 9c49d617
      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.
      9c49d617
    • Marko Mäkelä's avatar
      a5c2dd5e
    • Marko Mäkelä's avatar
      Introduce btr_set_instant() and a new root page format · 80aefe16
      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.
      80aefe16
  3. 02 Oct, 2018 9 commits
  4. 01 Oct, 2018 6 commits
  5. 29 Sep, 2018 1 commit
  6. 28 Sep, 2018 8 commits
  7. 27 Sep, 2018 2 commits
    • Marko Mäkelä's avatar
      Remove dict_col_t::dropped · 93634462
      Marko Mäkelä authored
      dict_col_t::DROPPED: Magic value for dict_col_t::ind
      93634462
    • Marko Mäkelä's avatar
      Include dropped columns in ctx->instant_table and dict_index_t · 16278657
      Marko Mäkelä authored
      row_metadata_to_tuple(): Convert a metadata record to a data tuple,
      based on the new info_bits of the metadata record.
      
      btr_cur_pessimistic_update(): Invoke row_metadata_to_tuple() if needed.
      
      dict_index_t::instant_add_field(): Append fields at the end, if any.
      The fields for dropped columns are preserved.
      
      dict_table_t::instant_column(): Renamed from instant_add_column().
      Add the parameter col_map so that columns can be reordered.
      FIXME: Also support ADD/DROP/reorder/rename of VIRTUAL COLUMN.
      
      ha_innobase_inplace_ctx::prepare_instant(): Preserve any instantly
      dropped columns in instant_table and its first index.
      FIXME: Support instant ALTER TABLE even if hidden FTS_DOC_ID exists.
      
      innobase_instant_try(): Simplify the logic for detecting dropped
      or reordered columns. If any drop or reorder is needed, construct
      an update vector with the metadata blob.
      
      dtype_t::metadata_blob_init(): Initialize the metadata BLOB data type.
      
      dict_table_t::find(): Find an old column based on a new column number.
      
      rec_convert_dtuple_to_metadata_comp(): Convert an alter metadata tuple
      into a record.
      
      row_rec_to_index_entry_impl(): Add the template parameter mblob
      and the optional parameter info_bits for specifying the desired new
      info bits. For the metadata tuple, allow conversion between the original
      format (ADD COLUMN only) and the generic format (with hidden BLOB).
      
      row_upd_index_replace_metadata(): Apply an update vector to an
      alter_metadata tuple.
      16278657
  8. 26 Sep, 2018 4 commits
  9. 25 Sep, 2018 4 commits
  10. 24 Sep, 2018 1 commit