1. 30 May, 2020 1 commit
  2. 29 May, 2020 9 commits
    • Monty's avatar
      Fixed wrong length in my_default.c · 043828bd
      Monty authored
      This couldn't cause any bugs as ptr was zero terminated, but still better
      to have the length correct.
      043828bd
    • Monty's avatar
      SHOW TABLE STATUS now shows if an Aria table is transactional or not · df4ab26a
      Monty authored
      This change also affects information_schema.tables
      
      The create table option "transactional=0 | 1" is now always shown for
      storage engines that supports both transactional/crash safe tables and
      non transactional tables.
      
      Before this patch the transactional=... option was only shown if the user
      specified transactional=... in the CREATE TABLE or ALTER TABLE statement.
      The reason for the change was to be able to make it easy to know if an Aria
      table is transactional or not.
      df4ab26a
    • Marko Mäkelä's avatar
      MDEV-22751 Uninitialized tbl_len in dict_acquire_mdl_shared() · 39dc4616
      Marko Mäkelä authored
      A crash was observed where dict_acquire_mdl_shared<trylock=false>
      would invoke memcpy() with an apparently uninitialized tbl_len.
      
      dict_table_t::parse_name(): Remove an unnecessary tbl_len--
      operation. (This should be mostly non-functional cleanup.)
      
      dict_acquire_mdl_shared(): If the second dict_table_t::parse_name()
      returns false, terminate the loop just like we would do on the
      first invocation.
      39dc4616
    • Oleksandr Byelkin's avatar
      MDEV-22746: Assertion `(&(&pagecache->cache_lock)->m_mutex)->count > 0 &&... · 58f3f692
      Oleksandr Byelkin authored
      MDEV-22746: Assertion `(&(&pagecache->cache_lock)->m_mutex)->count > 0 && pthread_equal(pthread_self(), (&(&pagecache->cache_lock)->m_mutex)->thread)' failed in dec_counter_for_resize_op
      
      Removed second attempt to decrease counter
      58f3f692
    • Vladislav Vaintroub's avatar
    • Vladislav Vaintroub's avatar
      Remove some trailing whitespaces. · 21326513
      Vladislav Vaintroub authored
      21326513
    • Marko Mäkelä's avatar
      MDEV-22206 Assertion "heap_no == ULINT_UNDEFINED" in trx0i_s.cc · 5bf9e0f8
      Marko Mäkelä authored
      commit d09aec7a (MDEV-19940)
      caused a regression. We made wait_lock_get_heap_no() return
      uint16_t instead of ulint, and we mostly replaced the previous
      magic value ULINT_UNDEFINED with 0. But, we failed to adjust
      some assertions. Furthermore, 0 is a valid although rare value
      for record locks. (Record locks can be temporarily stored on
      page infimum in some operations that involve multiple leaf pages.)
      
      Let us use 0xFFFF as the magic value. Valid heap numbers
      are limited to less than 9362 = innodb_page_size/(5+1+1)
      when using a minimal 1-byte PRIMARY KEY and a
      secondary index on a NULL or '' column.
      5bf9e0f8
    • Aleksey Midenkov's avatar
      MDEV-21127 Assertion failed in key_text::key_text · f76a1df0
      Aleksey Midenkov authored
      Wrong condition for corner values.
      f76a1df0
    • Alexander Barkov's avatar
      MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds) · cdc2508e
      Alexander Barkov authored
      The constructor of Lex_ident_sys returns LEX_CSTRING(NULL,0) if character set
      conversion goes wrong, and raises the "wrong character string" error in
      the diagnostics area.
      
      The code in sql_yacc.yy did not check Lex_ident_sys::ptr against NULL,
      so the execution entered functions that did not expect NULL (and crashed).
      
      Fixing the code to do MYSQL_YYABORT if Lex_ident_sys::ptr is NULL
      after constructing.
      cdc2508e
  3. 27 May, 2020 7 commits
  4. 26 May, 2020 2 commits
    • Sergey Vojtovich's avatar
      MDEV-22697 - InnoDB: remove trx->no · 03dcdad2
      Sergey Vojtovich authored
      trx->no is duplicated by trx->rw_trx_hash_element->no for no good reason.
      The latter is preferred for performance reasons: allows to avoid taking
      trx->rw_trx_hash_element->mutex when snapshotting.
      03dcdad2
    • Sergey Vojtovich's avatar
      MDEV-22593 - InnoDB: don't take trx_sys.mutex in ReadView::open() · 50b0ce44
      Sergey Vojtovich authored
      This was the last abuse of trx_sys.mutex, which is now exclusively
      protecting trx_sys.trx_list.
      
      This global acquisition was also potential scalability bottleneck for
      oltp_read_write benchmark. Although it didn't expose itself as such due
      to larger scalability issues.
      
      Replaced trx_sys.mutex based synchronisation between ReadView creator
      thread and purge coordinator thread performing latest view clone with
      ReadView::m_mutex.
      
      It also allowed to simplify tri-state view m_state down to boolean
      m_open flag.
      
      For performance reasons trx->read_view.close() is left as atomic relaxed
      store, so that we don't have to waste resources for otherwise meaningless
      mutex acquisition.
      50b0ce44
  5. 25 May, 2020 5 commits
  6. 24 May, 2020 1 commit
  7. 23 May, 2020 15 commits
    • Monty's avatar
      Fixed failure in sysvars_server_embedded,32bit · 6532b100
      Monty authored
      Updated the corresponding rdiff file
      6532b100
    • Monty's avatar
      Fixed failure in flush_read_lock.test · fc8359f0
      Monty authored
      The failure was:
      mysqltest: At line 1737: query 'reap' failed: 1397: XAER_NOTA: Unknown XID
      
      The bug was in the test case int that it executed REAP XA COMMIT before
      the connection had truly disconnected
      fc8359f0
    • Monty's avatar
      Fixed error in galera_vote_rejoin_ddl · c779ef26
      Monty authored
      The bug was that sometimes one get check errors like:
      -AUTO_INCREMENT_OFFSET  4
      +AUTO_INCREMENT_OFFSET  3
      c779ef26
    • Monty's avatar
      Only apply wsrep_trx_fragment_size to InnoDB tables · f4ddde06
      Monty authored
      MDEV-22617 Galera node crashes when trying to log to slow_log table in
      streaming replication mode
      
      Other things:
      - Changed name of wsrep_after_row(two arguments) to
        wsrep_after_row_internal(one argument) to not depended on the
        function signature with unused arguments.
      f4ddde06
    • Monty's avatar
      Fixed access to undefined memory found by valgrind and MSAN · c4bf4b7a
      Monty authored
      When my_vsnprintf() is patched, the code protected disabled with
      'WAITING_FOR_BUGFIX_TO_VSPRINTF' should be enabled again. Also all %b
      formats in this patch should be revert to %s again
      c4bf4b7a
    • Monty's avatar
      Don't print "Trying to delete tablespace several 10x times per second" · dcc0baf5
      Monty authored
      Now this InnoDB message is printed after one second of stalled operations
      and then every 10 seconds
      dcc0baf5
    • Monty's avatar
      Fixed compiler warnings from gcc and clang 5.0.1 · 4ea171ff
      Monty authored
      4ea171ff
    • Monty's avatar
      9bf479b0
    • Monty's avatar
      Aria will now register it's transactions · 4102f158
      Monty authored
      MDEV-22531 Remove maria::implicit_commit()
      MDEV-22607 Assertion `ha_info->ht() != binlog_hton' failed in
                 MYSQL_BIN_LOG::unlog_xa_prepare
      
      From the handler point of view, Aria now looks like a transactional
      engine. One effect of this is that we don't need to call
      maria::implicit_commit() anymore.
      
      This change also forces the server to call trans_commit_stmt() after doing
      any read or writes to system tables.  This work will also make it easier
      to later allow users to have system tables in other engines than Aria.
      
      To handle the case that Aria doesn't support rollback, a new
      handlerton flag, HTON_NO_ROLLBACK, was added to engines that has
      transactions without rollback (for the moment only binlog and Aria).
      
      Other things
      - Moved freeing of MARIA_SHARE to a separate function as the MARIA_SHARE
        can be still part of a transaction even if the table has closed.
      - Changed Aria checkpoint to use the new MARIA_SHARE free function. This
        fixes a possible memory leak when using S3 tables
      - Changed testing of binlog_hton to instead test for HTON_NO_ROLLBACK
      - Removed checking of has_transaction_manager() in handler.cc as we can
        assume that as the transaction was started by the engine, it does
        support transactions.
      - Added new class 'start_new_trans' that can be used to start indepdendent
        sub transactions, for example while reading mysql.proc, using help or
        status tables etc.
      - open_system_tables...() and open_proc_table_for_Read() doesn't anymore
        take a Open_tables_backup list. This is now handled by 'start_new_trans'.
      - Split thd::has_transactions() to thd::has_transactions() and
        thd::has_transactions_and_rollback()
      - Added handlerton code to free cached transactions objects.
        Needed by InnoDB.
      
      squash! 2ed35999f2a2d84f1c786a21ade5db716b6f1bbc
      4102f158
    • Monty's avatar
      Change THD->transaction to a pointer to enable multiple transactions · d1d47264
      Monty authored
      All changes (except one) is of type
      thd->transaction.  -> thd->transaction->
      
      thd->transaction points by default to 'thd->default_transaction'
      This allows us to 'easily' have multiple active transactions for a
      THD object, like when reading data from the mysql.proc table
      d1d47264
    • Monty's avatar
      Fix that BACKUP STAGE BLOCK_COMMIT blocks commit to the Aria engine · 7ae812cf
      Monty authored
      MDEV-22468 BACKUP STAGE BLOCK_COMMIT should block commit in the Aria engine
      
      This is needed to ensure that mariabackup works properly with Aria tables
      
      This code ads new calls to ha_maria::implicit_commit(). These will be
      deleted by MDEV-22531 Remove maria::implicit_commit().
      7ae812cf
    • Monty's avatar
      MDEV-18286 Assertion `pagecache->cnt_for_resize_op ... · b1561563
      Monty authored
      This patch is also pushed in 10.4. It's pushed separately in 10.5 as there
      are some additional cases in 10.5 to take care of.
      
      When merging if there is conflicts, use this code, not the 10.4 code.
      b1561563
    • Monty's avatar
      7cb16096
    • Monty's avatar
      Remove unneeded this-> usage from sql_lex.cc · 82d2dc90
      Monty authored
      82d2dc90
    • Monty's avatar
      Proper fix of User_variables_tracker::store · 36019df3
      Monty authored
      - Don't use 'auto' to declare variables (lazy and makes code harder to read)
      - Fixed length to use correct type
      36019df3