1. 10 May, 2018 2 commits
    • Sergei Golubchik's avatar
      MDEV-15746 ASAN heap-use-after-free in... · 92a13148
      Sergei Golubchik authored
      MDEV-15746 ASAN heap-use-after-free in Item_change_list::rollback_item_tree_changes on ALTER executed as PS
      
      don't try to convert a default value string from a user character set
      into a column character set, if this particular default value string did
      not came from the user at all (that is, if it's an ALTER TABLE and the
      default value string is the *old* default value of the unaltered
      column).
      
      This used to crash, because old defaults are allocated on the old
      table's memroot, which is freed mid-ALTER when the old table is closed.
      So thd->rollback_item_tree_changes() at the end of the ALTER was writing
      into the freed memory.
      92a13148
    • Sergei Golubchik's avatar
      MDEV-15626 Assertion on update virtual column in partitioned table · 88a0bb83
      Sergei Golubchik authored
      table.cc:
        virtual columns must be computed for INSERT, if they're part
        of the partitioning expression.
      
      this change broke gcol.gcol_partition_innodb.
      fix CHECK TABLE for partitioned tables and vcols.
      
      sql_partition.cc:
        mark prerequisite base columns in full_part_field_set
      ha_partition.cc
        initialize vcol_set accordingly
      88a0bb83
  2. 09 May, 2018 4 commits
    • Vladislav Vaintroub's avatar
      Fix warning VS2017 15.7 update. · 8ba0eea6
      Vladislav Vaintroub authored
      This previously unreported warning comes from casting size_t to ulong
      in sql_hset.h in Hash_Set::at().
      
      Change my_hash_element to accept size_t index parameter.
      8ba0eea6
    • Jacob Mathew's avatar
      MDEV-15697: Remote user used by Spider needs SUPER privilege · df420cbb
      Jacob Mathew authored
      The remote users need the SUPER privilege because by default Spider sends a
      'SET SQL_LOG_OFF' statement to the data nodes.  This is controlled by the
      spider_internal_sql_log_off configuration setting on the Spider node, which
      can only be set to 0 or 1, with a default value of 1.
      
      I have fixed the problem by changing this configuration setting so that if it
      is NOT SET, which is the most likely case, the Spider node DOES NOT SEND the
      'SET SQL_LOG_OFF' statement to the data nodes.  However if the
      spider_internal_sql_log_off setting IS EXPLICITLY SET to either 0 or 1, then
      the Spider node DOES SEND the 'SET SQL_LOG_OFF' statement, requiring a remote
      user with the SUPER privilege.  The Spider documentation will be updated to
      reflect this change.
      
      Author:
        Jacob Mathew.
      
      Reviewer:
        Kentoku Shiba.
      
      Cherry-Picked:
        Commit 72f0efac on branch bb-10.3-MDEV-15697
      df420cbb
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-16125 Shutdown crash when innodb_force_recovery >= 2 · fe95cb2e
      Thirunarayanan Balathandayuthapani authored
      Problem:
      =======
      InnoDB master thread encounters the shutdown state as SRV_SHUTDOWN_FLUSH_PHASE
      when innodb_force_recovery >=2 and slow scheduling of master thread during
      shutdown.
      
      Fix:
      ====
      There is no need for master thread itself if innodb_force_recovery >=2.
      Don't create the master thread if innodb_force_recovery >= 2
      fe95cb2e
    • Marko Mäkelä's avatar
      MDEV-15916 Change buffer crash during TRUNCATE or DROP TABLE · 0ea625b3
      Marko Mäkelä authored
      ibuf_restore_pos(): Do not issue any messages if the tablespace
      is being dropped or truncated. In MariaDB 10.2, TRUNCATE TABLE
      would not change the tablespace ID, and therefore the tablespace
      would be found, even though TRUNCATE is in progress.
      
      Furthermore, do not commit suicide if restoring the change buffer
      cursor fails. The worst that could happen is that a secondary index
      becomes corrupted due to incomplete change buffer merge.
      0ea625b3
  3. 08 May, 2018 1 commit
  4. 07 May, 2018 2 commits
    • Igor Babaev's avatar
    • Marko Mäkelä's avatar
      MDEV-14825 Assertion `col->ord_part' in row_build_index_entry_low upon... · e44ca6cc
      Marko Mäkelä authored
      MDEV-14825 Assertion `col->ord_part' in row_build_index_entry_low upon ROLLBACK or DELETE with concurrent ALTER on partitioned table
      
      If creating a secondary index fails (typically, ADD UNIQUE INDEX fails
      due to duplicate key), it is possible that concurrently running UPDATE
      or DELETE will access the index stub and hit the debug assertion.
      
      It does not make any sense to keep updating an uncommitted index whose
      creation has failed.
      
      dict_index_t::is_corrupted(): Replaces dict_index_is_corrupted().
      Also take online_status into account.
      
      Replace some calls to dict_index_is_clust() with calls to
      dict_index_t::is_primary().
      e44ca6cc
  5. 04 May, 2018 1 commit
  6. 02 May, 2018 1 commit
    • Jacob Mathew's avatar
      MDEV-15698: Spider ignores syntax errors in connection string in COMMENT field · da3c5c3c
      Jacob Mathew authored
      When a comma separator is missing between COMMENT fields, Spider ignores the
      parameter values that are beyond the last expected parameter value.  There are
      also some error messages that Spider does generate on COMMENT fields that are
      incorrectly formed.
      
      I have introduced additional infrastructure in Spider to fix these problems.
      
      Author:
        Jacob Mathew.
      
      Reviewer:
        Kentoku Shiba.
      
      Cherry-Picked:
        Commit c10da98b on branch bb-10.3-MDEV-15698
      da3c5c3c
  7. 01 May, 2018 1 commit
    • Jacob Mathew's avatar
      MDEV-15712: If remote server used by Spider table is unavailable, some... · 8fdeb079
      Jacob Mathew authored
      MDEV-15712: If remote server used by Spider table is unavailable, some operations hang for a long time
      
      When an attempt to connect to the remote server fails, Spider retries to
      connect to the remote server 1000 times or until the connection attempt
      succeeds.  This is perceived as a hang if the remote server remains
      unavailable.
      
      I have introduced changes in Spider's table status handler to fix this problem.
      
      Author:
        Jacob Mathew.
      
      Reviewer:
        Kentoku Shiba.
      
      Cherry-Picked:
        Commit 6ee6933a on branch bb-10.3-MDEV-15712
      8fdeb079
  8. 28 Apr, 2018 1 commit
  9. 26 Apr, 2018 5 commits
    • Marko Mäkelä's avatar
      Follow-up fix to MDEV-14705: Flush log at shutdown · b4c5e4a7
      Marko Mäkelä authored
      In the merge of commit e7f4e61f
      the call fil_flush_file_spaces(FIL_TYPE_LOG) is necessary.
      Tablespaces will be flushed as part of the redo log
      checkpoint, but the redo log will not necessarily
      be flushed, depending on innodb_flush_method.
      b4c5e4a7
    • Marko Mäkelä's avatar
      MDEV-16041 Do not write for null update (properly fix MySQL Bug#29157) · 5569b3eb
      Marko Mäkelä authored
      InnoDB takes a lot of time to perform null updates. The reason is that
      even though an empty update vector was created, InnoDB will go on to
      write undo log records and update the system columns
      DB_TRX_ID and DB_ROLL_PTR in the clustered index, and of course write
      redo log for all this.
      
      This could have been fixed properly in
      commit 54a492ec more than 10 years ago.
      5569b3eb
    • Marko Mäkelä's avatar
      innobase_init(): Remove some dead code · c5ea43fc
      Marko Mäkelä authored
      Remove the local variable srv_buf_pool_size_org, which was always 0.
      In MySQL 5.7, InnoDB was made a mandatory storage engine, which would
      force InnoDB to start up when executing
      	mysqld --verbose --help
      which is what mysql-test-run.pl is doing as a first step. With a
      large innodb_buffer_pool_size, this would take a long time.
      So, MySQL 5.7 includes a hack that starts up InnoDB with a smaller
      buffer pool when the option --verbose is present.
      c5ea43fc
    • Marko Mäkelä's avatar
      Remove dead code HAVE_LZO1X · 6e04af1b
      Marko Mäkelä authored
      MariaDB uses HAVE_LZO, not HAVE_LZO1X (which was never defined).
      Also, the variable srv_lzo_disabled was never defined or read
      (only declared and assigned to, in unreachable code).
      6e04af1b
    • Marko Mäkelä's avatar
      MDEV-15507 Assertion failed in dict_check_sys_tables on upgrade from 5.5 · c026e2c0
      Marko Mäkelä authored
      The InnoDB system table column SYS_TABLES.MIX_LEN was repurposed
      in InnoDB Plugin for MySQL 5.1, in
      commit 91111174 (MySQL 5.1.46).
      Until MySQL 5.6, it only contained a flag DICT_TF2_TEMPORARY.
      
      MySQL 5.6 introduced a number of flags that were transient
      in nature. One of these was introduced in 5.6.5, originally
      called DICT_TF2_USE_TABLESPACE and later renamed to
      DICT_TF2_USE_FILE_PER_TABLE. MySQL 5.7.6 introduced logic
      that insists that the flag be set for any table that does not
      reside in a shared tablespace, breaking upgrade from MySQL 5.5.
      
      MariaDB does not support shared tablespaces other than the
      InnoDB system tablespace. Also, some dependencies on
      SYS_TABLES.MIX_LEN were removed in an earlier fix:
      MDEV-13084 MariaDB 10.2 crashes on corrupted SYS_TABLES.MIX_LEN field
      (commit e813fe86).
      
      dict_check_sys_tables(): Remove a bogus debug assertion, and add a
      comment that explains how DICT_TF2_USE_FILE_PER_TABLE is used.
      
      dict_table_is_file_per_table(): Remove a bogus debug assertion.
      c026e2c0
  10. 24 Apr, 2018 10 commits
  11. 23 Apr, 2018 9 commits
  12. 21 Apr, 2018 3 commits