1. 25 Apr, 2022 1 commit
  2. 21 Apr, 2022 14 commits
    • Marko Mäkelä's avatar
      Merge 10.5 into 10.6 · fae0ccad
      Marko Mäkelä authored
      fae0ccad
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 620c55e7
      Marko Mäkelä authored
      620c55e7
    • Vlad Lesin's avatar
      MDEV-27919 mariabackup --log-copy-interval is measured in millisecondss in... · 1b558dd4
      Vlad Lesin authored
      MDEV-27919 mariabackup --log-copy-interval is measured in millisecondss in 10.5 and in microseconds in 10.6
      
      Multiply polling interval by 1000.
      1b558dd4
    • Marko Mäkelä's avatar
      MDEV-28371 Assertion fold == id.fold() failed in buf_flush_check_neighbor() · fdec842f
      Marko Mäkelä authored
      Due to 32-bit arithmetics, SRV_TMP_SPACE_ID page number 0x200002 would be
      folded to 0, which is incompatible with the assumption that was made in
      commit 7cffb5f6 (MDEV-23399).
      
      page_id_t::fold(): Compute in the native word width instead of uint32_t.
      On 64-bit platforms, an alternative would be to return the 64-bit m_id
      directly, but that was measured to cause a performance regression.
      
      fil_space_t::open(): Invoke fil_node_t::find_metadata() when the
      tablespace is being created. In this way, we will actually detect
      that the temporary tablespace resides on SSD. (During database
      creation, also the system tablespace will correctly be detected as
      residing on SSD.)
      fdec842f
    • Daniel Black's avatar
      MDEV-28263: mariadb-tzinfo-to-sql (postfix) · f0c52bfe
      Daniel Black authored
      I missed include/no_protocol.inc already existed.
      f0c52bfe
    • Daniel Black's avatar
      MDEV-28313 InnoDB transactions are not aligned at cache lines (postfix) · c47069ea
      Daniel Black authored
      aarch64 RHEL7 and Centos7 internal compiler error here, so we carry
      another pragma enchantment like buf0lru.cc and row0ins.cc.
      c47069ea
    • Marko Mäkelä's avatar
      WolfSSL v5.2.0-stable · aec85607
      Marko Mäkelä authored
      aec85607
    • Marko Mäkelä's avatar
      Fix clang -Wunused-but-set-variable · f84b5d78
      Marko Mäkelä authored
      f84b5d78
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 39478409
      Marko Mäkelä authored
      39478409
    • Marko Mäkelä's avatar
      MDEV-28369 ibuf_bitmap_mutex is an unnecessary contention point · 4730314a
      Marko Mäkelä authored
      The only purpose of ibuf_bitmap_mutex is to prevent a deadlock between
      two concurrent invocations of ibuf_update_free_bits_for_two_pages_low()
      on the same pair of bitmap pages, but in opposite order.
      The mutex is unnecessarily serializing the execution of the function
      even when it is being invoked on totally different tablespaces.
      To avoid deadlocks, it suffices to ensure that the two page latches
      are being acquired in a deterministic (sorted) order.
      4730314a
    • Daniel Black's avatar
      Merge branch 10.4 into 10.5 · 580cbd18
      Daniel Black authored
      A few of constaint -> constraint
      580cbd18
    • Daniel Black's avatar
      MDEV-21208: mysql_tzinfo_to_sql does not work in strict mode · b8398ee1
      Daniel Black authored
      Remove Warning that occured by doing an ALTER TABLE ... ORDER
      BY on an InnoDB table.
      
      Reviewed by Brandon Nesterenko
      b8398ee1
    • Daniel Black's avatar
      MDEV-28263: mariadb-tzinfo-to-sql improve wsrep and binlog cases · 13e77930
      Daniel Black authored
      The --skip-write-binlog message was confusing that it only had
      an effect if the galera was enabled. There are uses beyond galera
      so we apply SET SESSION SQL_LOG_BIN=0 as implied by the option
      without being conditional on the wsrep status.
      
      We also with --skip-write-binlog actually check the session @@WSREP_ON
      variable rather than the global server variable.
      
      Since 10.6, the wsrep_mode could replicate Aria and MyISAM, in which
      case no change to innodb and back is needed.
      
      By removing the conditions, we can use LOCK TABLES in a general case
      improving the load speed of Aria (MDEV-23326), regardless of the
      skip-write-binlog flag. The only case where we don't use LOCK TABLES is
      when we are replicating via Innodb, because wsrep_on=1 and wsrep_mode
      doesn't contain REPLICATE_ARIA{,MYISAM}. This uses an Innodb transaction
      instead. When replicating via InnoDB we change the table engine type
      back to what it was originally.
      
      By removing the \d and other syntax that requires parsing by
      the mariadb client, we can use the generated SQL more generally, like
      in the embedded server.
      
      We also save and restore the SQL_LOG_BIN and WSREP_ON session server
      variables so this can be included in the same session as other data
      without taking into changes in state.
      
      Remove wsrep.mysql_tzinfo_to_sql_symlink{,_skip} tests as they offered
      no additional coverage beyond main.mysql_tzinfo_to_sql_symlink (no
      server testing was done).
      
      Add galera.mariadb_tzinfo_to_sql to actually test the replication
      of tzinfo data through galera.
      
      The conditional executable comment around /*M!100602 ...
      START TRANSACTION .. LOCK TABLES.. */ is so that we can provide tzinfo
      files (MDEV-27113, MDBF-389) and in the case that a user uses it on a
      pre-10.6 server version it will still work. Both START TRANSACTION and
      LOCK TABLES are not supported in prepared statements in MariaDB versions
      earlier than 10.6.2.
      
      Reviewed by Brandon Nesterenko
      13e77930
    • Haidong Ji's avatar
      MDEV-28227 Error message Chinese translation · d7189fbc
      Haidong Ji authored
      - Simplified Chinese translation added
      - Character encoding is gdk
      -- gdk covers more characters
      -- gdk includes both Simplified and Traditional
      -- best option I think, may need to work along with other locale
      settings
      - Other cleanup
      -- Within each error, messages are sorted according to language code
      -- More consistent formatting (8 spaces proceeding each translation)
      -- jps removed as duplicate of jpn translation
      
      This should be a good starting point. More refinement is appreciated,
      and needed down the road.
      
      English "containt" (sic) spelling fixes on ER_FK_NO_INDEX_{CHILD,PARENT}
      resulting in mtr test case adjustments.
      
      Edited/reviewed by Daniel Black
      d7189fbc
  3. 20 Apr, 2022 4 commits
  4. 19 Apr, 2022 3 commits
  5. 18 Apr, 2022 4 commits
    • Aleksey Midenkov's avatar
      MDEV-24176 Server crashes after insert in the table with virtual · 08c7ab40
      Aleksey Midenkov authored
      column generated using date_format() and if()
      
      vcol_info->expr is allocated on expr_arena at parsing stage. Since
      expr item is allocated on expr_arena all its containee items must be
      allocated on expr_arena too. Otherwise fix_session_expr() will
      encounter prematurely freed item.
      
      When table is reopened from cache vcol_info contains stale
      expression. We refresh expression via TABLE::vcol_fix_exprs() but
      first we must prepare a proper context (Vcol_expr_context) which meets
      some requirements:
      
      1. As noted above expr update must be done on expr_arena as there may
      be new items created. It was a bug in fix_session_expr_for_read() and
      was just not reproduced because of no second refix. Now refix is done
      for more cases so it does reproduce. Tests affected: vcol.binlog
      
      2. Also name resolution context must be narrowed to the single table.
      Tested by: vcol.update main.default vcol.vcol_syntax gcol.gcol_bugfixes
      
      3. sql_mode must be clean and not fail expr update.
      
      sql_mode such as MODE_NO_BACKSLASH_ESCAPES, MODE_NO_ZERO_IN_DATE, etc
      must not affect vcol expression update. If the table was created
      successfully any further evaluation must not fail. Tests affected:
      main.func_like
      
      Reviewed by: Sergei Golubchik <serg@mariadb.org>
      08c7ab40
    • Aleksey Midenkov's avatar
      MDEV-24176 Preparations · c02ebf35
      Aleksey Midenkov authored
      1. moved fix_vcol_exprs() call to open_table()
      
      mysql_alter_table() doesn't do lock_tables() so it cannot win from
      fix_vcol_exprs() from there. Tests affected: main.default_session
      
      2. Vanilla cleanups and comments.
      c02ebf35
    • Oleg Smirnov's avatar
      MDEV-24529 Assertion failed in vers_select_conds_t::print · 39cc2545
      Oleg Smirnov authored
      This commit adds processing of SYSTEM_TIME_BEFORE and SYSTEM_TIME_HISTORY
      to vers_select_conds_t::print().
      39cc2545
    • Oleg Smirnov's avatar
      MDEV-27699 ANALYZE FORMAT=JSON fields are incorrect for UNION ALL queries · 7498978e
      Oleg Smirnov authored
      UNION ALL queries are a subject of optimization introduced in MDEV-334
      when creation of a temporary table is skipped.
      While there is a check for this optimization in Explain_union::print_explain()
      there was no such in Explain_union::print_explain_json(). This resulted in
      printing irrelevant data like:
        "union_result": {
          "table_name": "<union2,3>",
          "access_type": "ALL",
          "r_loops": 0,
          "r_rows": null
      in case when creation of the temporary table was actually optimized out.
      This commits adds a check whether the temporary table was actually created
      during the UNION ALL processing and eliminates printing of the irrelevant data.
      7498978e
  6. 16 Apr, 2022 1 commit
  7. 15 Apr, 2022 3 commits
  8. 14 Apr, 2022 6 commits
  9. 13 Apr, 2022 4 commits
    • Sergei Golubchik's avatar
      cleanup: un-inline dtype_get_mblen() · f7f0bc74
      Sergei Golubchik authored
      per Marko request
      f7f0bc74
    • Sergei Golubchik's avatar
      MDEV-27767 poor scaling with InnoDB and utf8mb3 because of charset stats · fc839644
      Sergei Golubchik authored
      Access the all_charsets[] array directly in a hot loop.
      This avoids get_charset() that increments a shared counter via
      my_collation_statistics_inc_use_count(), causing a scalability issue.
      
      Instead, call get_charset() when a table is opened (and InnoDB
      fills in dtype_t values) - this is enough, as charset is marked
      ready (MY_CS_READY) only once, on the first get_charset() call,
      after that it can be accessed directly.
      
      This also fixes a potential bug in InnoDB. It used to access charsets
      directly when filling dtype_t values. This wasn't preceded by any
      get_charset() call inside InnoDB. Normally the server would call
      get_charset() on reading the frm, but if the table was first opened
      from a purge thread InnoDB could, theoretically, access a not-ready
      charset in innobase_get_cset_width().
      fc839644
    • Oleksandr Byelkin's avatar
      MDEV-28266 Crash in Field_string::type_handler when calling procedures · f130a5ea
      Oleksandr Byelkin authored
      on_table_fill_finished() should always be done at the end of open()
      even if result is not Select_materialize but (for example)
      Select_fetch_into_spvars.
      f130a5ea
    • Oleksandr Byelkin's avatar
      MDEV-28266 Crash in Field_string::type_handler when calling procedures · 5615a78a
      Oleksandr Byelkin authored
      on_table_fill_finished() should always be done at the end of open()
      even if result is not Select_materialize but (for example)
      Select_fetch_into_spvars.
      5615a78a