1. 15 Jan, 2018 7 commits
  2. 14 Jan, 2018 1 commit
    • Oleksandr Byelkin's avatar
      MDEV-14526: MariaDB keeps crashing under load when query_cache_type is changed · 5fe1d7d0
      Oleksandr Byelkin authored
      The problem was in such scenario:
      T1 - starts registering query and locked QC
      T2 - starts disabling QC and wait for UNLOCK
      T1 - unlock QC
      T2 - disable QC and destroy signals without waiting for query unlock
      T1 a) - not yet unlocked query in qc and crash on attempt to unlock because
              QC signals are destroyed
         b) if above was done before destruction, it execute end_of results first
            time at exit on after try_lock which see QC disables and return TRUE.
            But it do not reset query_cache_tls->first_query_block which lead to
            second call of end_of_result when diagnostic arena has already
            inappropriate status (not is_eof()).
      
      Fix is:
        1) wait for all queries unlocked before destroying them by locking and
           unlocking
        2) remove query_cache_tls->first_query_block if QC disabled
      5fe1d7d0
  3. 13 Jan, 2018 1 commit
  4. 12 Jan, 2018 3 commits
  5. 11 Jan, 2018 4 commits
    • Oleksandr Byelkin's avatar
      Fixed misleading voariable names. · a5285a8f
      Oleksandr Byelkin authored
      a5285a8f
    • Oleksandr Byelkin's avatar
      MDEV-14690: Assertion `page_link == &fake_link' failed in pagecache_write_part · abb9e703
      Oleksandr Byelkin authored
      Fix the call to correspond protocoll of pagecache call.
      Fix of misleading variables names.
      abb9e703
    • Monty's avatar
      MDEV-8200 aria bug with insert select and lock tables · 1f18bd63
      Monty authored
      This bug happens when locking the same Aria "transactional" table
      (page format) more then once with LOCK TABLES and inserting into one
      of them with INSERT ... SELECT when the table is empty.
      
      Fixed by ensuring we don't use fast bulk insert if table is opened
      twice with LOCK TABLES (as this changes table->s->state)
      
      Code changes:
      - Added use_count to MARIA_USED_TABLES to be able to check if
        table is opened twice for a statement/lock table
      - Don't clear history or reset info->start_state if we
        don't have versioning. One reason for the bug was
        was that info->start_state was set to point to different
        states for the two tables.  If there is no versioning
        info->start_state should always point to info->s->state.common.
      
      Other things:
      - Fixed also some typos that was noticed while scanning the code
      - More DBUG_PRINT
      1f18bd63
    • Marko Mäkelä's avatar
      MDEV-14916 InnoDB reports warning for "Purge reached the head of the history list" · bdcd7f79
      Marko Mäkelä authored
      The warning was originally added in
      commit c6766305
      (MySQL 4.1.12, 5.0.3) to trace claimed undo log corruption that
      was analyzed in https://lists.mysql.com/mysql/176250
      on November 9, 2004.
      
      Originally, the limit was 20,000 undo log headers or transactions,
      but in commit 9d6d1902
      in MySQL 5.5.11 it was increased to 2,000,000.
      
      The message can be triggered when the progress of purge is prevented
      by a long-running transaction (or just an idle transaction whose
      read view was started a long time ago), by running many transactions
      that UPDATE or DELETE some records, then starting another transaction
      with a read view, and finally by executing more than 2,000,000
      transactions that UPDATE or DELETE records in InnoDB tables. Finally,
      when the oldest long-running transaction is completed, purge would
      run up to the next-oldest transaction, and there would still be more
      than 2,000,000 transactions to purge.
      
      Because the message can be triggered when the database is obviously
      not corrupted, it should be removed. Heavy users of InnoDB should be
      monitoring the "History list length" in SHOW ENGINE INNODB STATUS;
      there is no need to spam the error log.
      bdcd7f79
  6. 10 Jan, 2018 3 commits
  7. 03 Jan, 2018 1 commit
  8. 02 Jan, 2018 2 commits
    • Marko Mäkelä's avatar
      Follow-up to MDEV-14799: Remove bogus debug assertions · 20fab71b
      Marko Mäkelä authored
      trx_undo_rec_get_partial_row(): When the PRIMARY KEY includes a
      column prefix of an externally stored column, the already parsed
      part of the undo log record may contain a reference to
      an off-page column. This is the case in the bug58912 test in
      innodb.innodb.
      20fab71b
    • Marko Mäkelä's avatar
      MDEV-14799 After UPDATE of indexed columns, old values will not be purged from secondary indexes · d384ead0
      Marko Mäkelä authored
      This is a regression caused by MDEV-14051 'Undo log record is too big.'
      
      Purge in the secondary index is wrongly skipped in
      row_purge_upd_exist_or_extern() because node->row only does not contain all
      indexed columns.
      
      trx_undo_rec_get_partial_row(): Add the parameter for node->update
      so that the updated columns will be copied from the initial part
      of the undo log record.
      d384ead0
  9. 27 Dec, 2017 2 commits
  10. 20 Dec, 2017 1 commit
    • Varun Gupta's avatar
      MDEV-12350: Heap corruption, overrun buffer, ASAN errors, server crash in my_fill_8bit / filesort · 924db8b4
      Varun Gupta authored
      In the function make_sortkey a tmp buffer was defined and in the absence of
      param->tmp_buffer, tmp buffer used the sort_keys buffer. sort_keys buffer
      has a length defined in sort_field->length, while param->tmp_buffer is
      stored in param->rec_length. Make sure to use the appropriate length
      based on which buffer we are using otherwise we'll overflow.
      
      Also added a type cast to size_t during the calculation of the sort keys
      buffer size to avoid an oveflow if the buffer size exceeds 32 bits.
      924db8b4
  11. 19 Dec, 2017 1 commit
  12. 16 Dec, 2017 1 commit
  13. 08 Dec, 2017 1 commit
  14. 06 Dec, 2017 1 commit
  15. 05 Dec, 2017 1 commit
  16. 30 Nov, 2017 1 commit
  17. 20 Nov, 2017 1 commit
  18. 16 Nov, 2017 2 commits
  19. 11 Nov, 2017 1 commit
    • Igor Babaev's avatar
      Fixed bug MDEV-14368 Improper error for a grouping query that · b5cb4ae4
      Igor Babaev authored
      uses alias in HAVING when sql_mode = 'ONLY_FULL_GROUP_BY'
      
      This patch corrects the patch for bug#18739: non-standard
      HAVING extension was allowed in strict ANSI sql mode
      added in 2006 by commit 4b7c4cd2.
      As a result of incompleteness of the fix in the above commit
      if a query with GROUP BY contained an aggregate function with an
      alias and this alias was used in the HAVING clause of the query
      the server reported an error when sql_mode was set to
      'ONLY_FULL_GROUP_BY'.
      b5cb4ae4
  20. 10 Nov, 2017 1 commit
  21. 03 Nov, 2017 2 commits
  22. 26 Oct, 2017 1 commit
  23. 24 Oct, 2017 1 commit
    • 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