1. 24 Oct, 2017 2 commits
    • Marko Mäkelä's avatar
      Merge 5.5 into 10.0 · 44ed2435
      Marko Mäkelä authored
      44ed2435
    • Marko Mäkelä's avatar
      MDEV-14051 'Undo log record is too big.' error occurring in very narrow range of string lengths · 439a7c99
      Marko Mäkelä authored
      InnoDB was writing unnecessary information to the
      update undo log records. Most notably, if an indexed column is updated,
      the old value of the column would be logged twice: first as part of
      the update vector, and then another time because it is an indexed column.
      
      Because the InnoDB undo log record must fit in a single page,
      this would cause unnecessary failure of certain updates.
      
      Even after this fix, InnoDB still seems to be unnecessarily logging
      indexed column values for non-updated columns. It seems that non-updated
      secondary index columns only need to be logged when a PRIMARY KEY
      column is updated. To reduce risk, we are not fixing this remaining flaw
      in GA versions.
      
      trx_undo_page_report_modify(): Log updated indexed columns only once.
      439a7c99
  2. 23 Oct, 2017 2 commits
  3. 18 Oct, 2017 7 commits
  4. 17 Oct, 2017 9 commits
    • Vicențiu Ciorbaru's avatar
      4090ef82
    • Sergei Golubchik's avatar
      Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) · b000e169
      Sergei Golubchik authored
      based on:
      
      commit f7316aa0
      Author: Ajo Robert <ajo.robert@oracle.com>
      Date:   Thu Aug 24 17:03:21 2017 +0530
      
          Bug#26361149  MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
                                 COL), NAME_CONST('NAME', NULL))
      
          Backport of Bug#19143243 fix.
      
          NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
          NULL_ITEM has special processing in Item_func_in function.
          In Item_func_in::fix_length_and_dec an array of possible comparators is
          created. Since NAME_CONST function has NULL_ITEM type, corresponding
          array element is empty. Then NAME_CONST is wrapped to ITEM_CACHE.
          ITEM_CACHE can not return proper type(NULL_ITEM) in Item_func_in::val_int(),
          so the NULL_ITEM is attempted compared with an empty comparator.
          The fix is to disable the caching of Item_name_const item.
      b000e169
    • Sergei Golubchik's avatar
      Merge branch 'mysql/5.5' into 5.5 · df5f25fa
      Sergei Golubchik authored
      df5f25fa
    • Sergei Golubchik's avatar
      MDEV-13937 Aria engine: Internal Error 160 after partition handling · b036b6b5
      Sergei Golubchik authored
      Partition wasn't setting HA_OPTION_PACK_RECORD on ALTER TABLE
      if the row format was PAGE.
      
      (so one bit in the null bitmap was reserved for a deleted bit -
      see make_empty_rec - and all actual null bits were one off)
      b036b6b5
    • Sergei Golubchik's avatar
      MDEV-14056 DROP TEMPORARY TABLE IF EXISTS causes error 1290 with read_only option · 19a702a8
      Sergei Golubchik authored
      if it's a DROP TABLE, we cannot detect whether a table is
      temporary by looking in thd->temporary_tables - because the
      table might simply not exist at all.
      19a702a8
    • Sergei Golubchik's avatar
      MDEV-13912 Can't refer the same column twice in one ALTER TABLE · 42171639
      Sergei Golubchik authored
      backport ce6c0e58
      
      MDEV-8960: Can't refer the same column twice in one ALTER TABLE
      
      Problem was that if column was created in alter table when
      it was refered again it was not tried to find from list
      of current columns.
      
      mysql_prepare_alter_table:
        There is two cases
          (1) If alter table adds a new column and then later alter
              changes the field definition, there was no check from
      	list of new columns, instead an incorrect error was given.
          (2) If alter table adds a new column and then later alter
              changes the default, there was no check from list of
      	new columns, instead an incorrect error was given.
      42171639
    • Sergei Golubchik's avatar
      MDEV-13440 mysql_install_db fails with hard-coded langdir · 93144b9e
      Sergei Golubchik authored
      always search in compile-time specified paths
      INSTALL_BINDIR, INSTALL_SBINDIR, INSTALL_MYSQLSHAREDIR. User
      can set them to arbitrary values, it's not enough to search only
      in their usual values of bin, sbin and libexec, share and share/mysql.
      93144b9e
    • Sergei Golubchik's avatar
      cleanup mysql_install_db · 52516706
      Sergei Golubchik authored
      1. detect resolveip location, don' assume it's in $basedir/bin
      2. don't guess $scriptdir to (incorrectly) construct the $0 path
      3. rename find_in_basedir -> find_in_dirs, don't prepend $basedir
         automatically. This allows to use identical path lists in
         find_in_dirs and in cannot_find_file.
      4. move search path lists to CMakeLists.txt to avoid specifying the
         same path list twice (in find_in_dirs and in cannot_find_file).
      52516706
    • Sergei Golubchik's avatar
      MDEV-13459 Warnings, when compiling with gcc-7.x · d76f5774
      Sergei Golubchik authored
      mostly caused by -Wimplicit-fallthrough
      d76f5774
  5. 16 Oct, 2017 2 commits
    • Marko Mäkelä's avatar
      MDEV-12676 MySQL#78423 InnoDB FTS duplicate key error · 9a791c9c
      Marko Mäkelä authored
      fts_get_next_doc_id(): Assign the first and subsequent FTS_DOC_ID
      in the same way: by post-incrementing the cached value.
      If there is a user-specified FTS_DOC_ID, do not touch the internal
      sequence.
      9a791c9c
    • Marko Mäkelä's avatar
      MDEV-13051 MySQL#86607 InnoDB crash after failed ADD INDEX and table_definition_cache eviction · 1eee3a3f
      Marko Mäkelä authored
      There are two bugs related to failed ADD INDEX and
      the InnoDB table cache eviction.
      
      dict_table_close(): Try dropping failed ADD INDEX when releasing
      the last table handle, not when releasing the last-but-one.
      
      dict_table_remove_from_cache_low(): Do not invoke
      row_merge_drop_indexes() after freeing all index metadata.
      Instead, directly invoke row_merge_drop_indexes_dict() to
      remove the metadata from the persistent data dictionary
      and to free the index pages.
      1eee3a3f
  6. 13 Oct, 2017 6 commits
  7. 11 Oct, 2017 1 commit
    • Vicențiu Ciorbaru's avatar
      MDEV-13676: Field "create Procedure" is NULL, even if the the user has role... · b9418ed3
      Vicențiu Ciorbaru authored
      MDEV-13676: Field "create Procedure" is NULL, even if the the user has role which is the definer. (SHOW CREATE PROCEDURE)
      
      During show create procedure we ommited to check the current role, if it
      is the actual definer of the procedure. In addition, we should support
      indirectly granted roles to the current role. Implemented a recursive
      lookup to search the tree of grants if the rolename is present.
      
      SQL Standard 2016, Part 5 Section 53 View I_S.ROUTINES selects
      ROUTINE_BODY and its WHERE clause says that the GRANTEE must be
      either PUBLIC, or CURRENT_USER or in the ENABLED_ROLES.
      b9418ed3
  8. 10 Oct, 2017 4 commits
    • Jan Lindström's avatar
      MDEV-13838: Wrong result after altering a partitioned table · fc9ff695
      Jan Lindström authored
      Reverted incorrect changes done on MDEV-7367 and MDEV-9469. Fixes properly
      also related bugs:
      
      MDEV-13668: InnoDB unnecessarily rebuilds table when renaming a column and adding index
      MDEV-9469: 'Incorrect key file' on ALTER TABLE
      MDEV-9548: Alter table (renaming and adding index) fails with "Incorrect key file for table"
      MDEV-10535: ALTER TABLE causes standalone/wsrep cluster crash
      MDEV-13640: ALTER TABLE CHANGE and ADD INDEX on auto_increment column fails with "Incorrect key file for table..."
      
      Root cause for all these bugs is the fact that MariaDB .frm file
      can contain virtual columns but InnoDB dictionary does not and
      previous fixes were incorrect or unnecessarily forced table
      rebuilt. In index creation key_part->fieldnr can be bigger than
      number of columns in InnoDB data dictionary. We need to skip not
      stored fields when calculating correct column number for InnoDB
      data dictionary.
      
      dict_table_get_col_name_for_mysql
              Remove
      
      innobase_match_index_columns
              Revert incorrect change done on MDEV-7367
      
      innobase_need_rebuild
              Remove unnecessary rebuild force when column is renamed.
      
      innobase_create_index_field_def
              Calculate InnoDB column number correctly and remove
              unnecessary column name set.
      
      innobase_create_index_def, innobase_create_key_defs
              Remove unneeded fields parameter. Revert unneeded memset.
      
      prepare_inplace_alter_table_dict
              Remove unneeded col_names parameter
      
      index_field_t
              Remove unneeded col_name member.
      
      row_merge_create_index
              Remove unneeded col_names parameter and resolution.
      
      Effected tests:
               innodb-alter-table : Add test case for MDEV-13668
               innodb-alter : Remove MDEV-13668, MDEV-9469 FIXMEs
                              and restore original tests
               innodb-wl5980-alter : Remove MDEV-13668,  MDEV-9469 FIXMEs
                              and restore original tests
      fc9ff695
    • Vesa Pentti's avatar
    • Sergei Golubchik's avatar
      smaller stack size on quantal-x86 and wheezy-x86 · 2db5e4d1
      Sergei Golubchik authored
      fixes failures of func_regexp_pcre
      2db5e4d1
    • Alexander Barkov's avatar
      c2509a15
  9. 09 Oct, 2017 4 commits
  10. 08 Oct, 2017 2 commits
  11. 07 Oct, 2017 1 commit