1. 01 Feb, 2019 2 commits
  2. 31 Jan, 2019 2 commits
  3. 30 Jan, 2019 1 commit
  4. 28 Jan, 2019 1 commit
  5. 26 Jan, 2019 1 commit
    • Julius Goryavsky's avatar
      MDEV-18379: Unification of check for IPv6 · 4aea6b3e
      Julius Goryavsky authored
      This patch contains the port of the MDEV-18379 patch
      for 10.1 branch, but also includes a number of changes
      made within MDEV-17835, which are necessary for the
      normal operation of tests that use IPv6:
      
      1) Fixed flaws in the galera_3nodes mtr suite control scripts,
      because of which they could not work with mariabackup.
      
      2) Fixed numerous bugs in the SST scripts and in the mtr test
      files (galera_3nodes mtr suite) that prevented the use of Galera
      with IPv6 addresses.
      
      3) Fixed flaws in tests for rsync and mysqldump (for galera_3nodes
      mtr tests suite). These tests were not performed successfully
      without these fixes.
      
      4) Currently, the three-node mtr suite for Galera (galera_3nodes)
      uses a separate IPv6 availability check using the "have_ipv6.inc"
      file. This check duplicates a more accurate check at suite.pm
      level, which can be used by including the file "check_ipv6.inc".
      This patch removes this discrepancy between suites.
      
      5) GAL-501 test in the galera_3nodes suite does not contain the
      option "--bind-address=::" which is needed for the test to work
      correctly with IPv6 (at least on some systems), since without
      it the server will not wait for connections on the IPv6 interface.
      
      https://jira.mariadb.org/browse/MDEV-18379
      and partially https://jira.mariadb.org/browse/MDEV-17835
      4aea6b3e
  6. 25 Jan, 2019 1 commit
  7. 24 Jan, 2019 8 commits
    • Andrei Elkin's avatar
      MDEV-10963 Fragmented BINLOG query · 5d48ea7d
      Andrei Elkin authored
      The problem was originally stated in
        http://bugs.mysql.com/bug.php?id=82212
      The size of an base64-encoded Rows_log_event exceeds its
      vanilla byte representation in 4/3 times.
      When a binlogged event size is about 1GB mysqlbinlog generates
      a BINLOG query that can't be send out due to its size.
      
      It is fixed with fragmenting the BINLOG argument C-string into
      (approximate) halves when the base64 encoded event is over 1GB size.
      The mysqlbinlog in such case puts out
      
          SET @binlog_fragment_0='base64-encoded-fragment_0';
          SET @binlog_fragment_1='base64-encoded-fragment_1';
          BINLOG @binlog_fragment_0, @binlog_fragment_1;
      
      to represent a big BINLOG.
      For prompt memory release BINLOG handler is made to reset the BINLOG argument
      user variables in the middle of processing, as if @binlog_fragment_{0,1} = NULL
      is assigned.
      
      Notice the 2 fragments are enough, though the client and server still may
      need to tweak their @@max_allowed_packet to satisfy to the fragment
      size (which they would have to do anyway with greater number of
      fragments, should that be desired).
      
      On the lower level the following changes are made:
      
      Log_event::print_base64()
        remains to call encoder and store the encoded data into a cache but
        now *without* doing any formatting. The latter is left for time
        when the cache is copied to an output file (e.g mysqlbinlog output).
        No formatting behavior is also reflected by the change in the meaning
        of the last argument which specifies whether to cache the encoded data.
      
      Rows_log_event::print_helper()
        is made to invoke a specialized fragmented cache-to-file copying function
        which is
      
      copy_cache_to_file_wrapped()
        that takes care of fragmenting also optionally wraps encoded
        strings (fragments) into SQL stanzas.
      
      my_b_copy_to_file()
        is refactored to into my_b_copy_all_to_file(). The former function
        is generalized
        to accepts more a limit argument to constraint the copying and does
        not reinitialize anymore the cache into reading mode.
        The limit does not do any effect on the fully read cache.
      5d48ea7d
    • Andrei Elkin's avatar
      MDEV-14605 Changes to "ON UPDATE CURRENT_TIMESTAMP" fields are not · f9ac7032
      Andrei Elkin authored
                 always logged properly with binlog_row_image=MINIMAL
      
      There are two issues fixed in this commit.
      The first is an observation of a multi-table UPDATE binlogged
      in row-format in binlog_row_image=MINIMAL mode. While the UPDATE aims
      at a table with an ON-UPDATE attribute its binlog after-image misses
      to record also installed default value.
      The reason for that turns out missed marking of default-capable fields
      in TABLE::write_set.
      
      This is fixed to mark such fields similarly to 10.2's MDEV-10134 patch (db7edfed)
      that introduced it. The marking follows up 93d1e5ce's idea
      to exploit TABLE:rpl_write_set introduced there though,
      and thus does not mess (in 10.1) with the actual MDEV-10134 agenda.
      The patch makes formerly arg-less TABLE::mark_default_fields_for_write()
      to accept an argument which would be TABLE:rpl_write_set.
      
      The 2nd issue is extra columns in in binlog_row_image=MINIMAL before-image
      while merely a packed primary key is enough. The test main.mysqlbinlog_row_minimal
      always had a wrong result recorded.
      This is fixed to invoke a function that intended for read_set
      possible filtering and which is called (supposed to) in all type of MDL, UPDATE
      including; the test results have gotten corrected.
      
      At *merging* from 10.1->10.2 the 1st "main" part of the patch is unnecessary
      since the bug is not observed in 10.2, so only hunks from
      
        sql/sql_class.cc
      
      are required.
      f9ac7032
    • Alexander Barkov's avatar
      MDEV-18195 ASAN use-after-poison in my_strcasecmp_utf8 / Item::eq upon... · 17c75bd2
      Alexander Barkov authored
      MDEV-18195 ASAN use-after-poison in my_strcasecmp_utf8 / Item::eq upon prepared statement with ORDER BY NAME_CONST
      
      ASAN noticed a freed memory access during EXECUTE in this script:
        PREPARE stmt FROM "SELECT 'x' ORDER BY NAME_CONST( 'f', 'foo' )";
        EXECUTE stmt;
      
      In case of a PREPARE statement, all Items, including Item_name_const,
      are created on Prepared_statement::main_mem_root.
      Item_name_const::fix_fields() did not take this into account
      and could allocate the value of Item::name on a wrong memory root,
      in this code:
      
        if (is_autogenerated_name)
        {
          set_name(thd, item_name->c_ptr(), (uint) item_name->length(),
                   system_charset_info);
        }
      
      When fix_fields() is called in the reported SQL script, THD's arena already
      points to THD::main_mem_root rather than to Prepared_statement::main_mem_root,
      so Item::name was allocated on THD::main_mem_root.
      Then, at the end of the dispatch_command() for the PREPARE statement,
      THD::main_mem_root got cleared. So during EXECUTE, Item::name
      pointed to an already freed memory.
      
      This patch changes the code to set the implicit name for Item_name_const
      at the constructor time rather than at fix_fields time. This guarantees
      that Item_name_const and its Item::name always reside on the same memory root.
      
      Note, this change makes the code for Item_name_const symmetric with other
      constant-alike items that set their default implicit names at the constructor
      call time rather than at fix_fields() time:
      - Item_string
      - Item_int
      - Item_real
      - Item_decimal
      - Item_null
      - Item_param
      17c75bd2
    • Geoff Montee's avatar
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · 65350042
      Marko Mäkelä authored
      65350042
    • Andrei Elkin's avatar
    • Sergei Golubchik's avatar
      MDEV-17868 mysqltest fails to link with system PCRE libraries · edeba0c8
      Sergei Golubchik authored
      pcre needs symbols from pcreposix
      (but this is only an issue when linking with system static libraries)
      edeba0c8
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-17376 Server fails to set ADD_PK_INDEX, DROP_PK_INDEX if unique index nominated as PK · a0f3b9f9
      Thirunarayanan Balathandayuthapani authored
      Problem:
      ========
      Server fails to notify the engine by not setting the ADD_PK_INDEX and
      DROP_PK_INDEX When there is a
       i) Change in candidate for primary key.
       ii) New candidate for primary key.
      
      Fix:
      ====
      Server sets the ADD_PK_INDEX and DROP_PK_INDEX while doing alter for the
      above problematic case.
      a0f3b9f9
  8. 23 Jan, 2019 10 commits
  9. 21 Jan, 2019 3 commits
  10. 18 Jan, 2019 2 commits
    • Varun Gupta's avatar
      MDEV-14440: Assertion `inited==RND' failed in handler::ha_rnd_end · 2061e00c
      Varun Gupta authored
      In the function QUICK_RANGE_SELECT::init_ror_merged_scan we create a seperate handler if the handler in
      head->file cannot be reused. The flag free_file tells us if we have a seperate handler or not.
      There are cases where you might create a handler and then there might be a failure(running ALTER)
      and then we have to revert the handler back to the original one. The code does that
      but it does not reset the flag 'free_file' in this case.
      Also backported f2c41807.
      2061e00c
    • Marko Mäkelä's avatar
      MDEV-18237 InnoDB: Unable to drop FTS index aux table and further errors (possibly bogus) · 1d72db45
      Marko Mäkelä authored
      row_drop_table_for_mysql(): Fix a regression introduced in MDEV-16515.
      Similar to the follow-up fixes MDEV-16647 and MDEV-17470, we must make
      the internal tables of FULLTEXT INDEX immune to kills, to avoid noise
      and resource leakage on DROP TABLE or ALTER TABLE. (Orphan internal tables
      would be dropped at the next InnoDB startup only.)
      1d72db45
  11. 17 Jan, 2019 4 commits
  12. 16 Jan, 2019 3 commits
  13. 15 Jan, 2019 2 commits