1. 09 Mar, 2020 4 commits
    • Monty's avatar
      Fixes for previous not-complete-push · 5c6c4b13
      Monty authored
      5c6c4b13
    • Monty's avatar
      Added keyread_time() to HEAP · c037cdad
      Monty authored
      The default keyread_time() was optimized for blocks and not suitable for
      HEAP. The effect was the HEAP prefered table scans over ranges for btree
      indexes.
      Fixed also get_sweep_read_cost() for HEAP tables.
      c037cdad
    • Monty's avatar
      Second stage of optimizer_trace optimizations · a24d0926
      Monty authored
      - Move testing of my_writer to inline functions to avoid calls
      - Made more functions inline. Especially thd->thread_started()
        is now very optimized!
      - Moved Opt_trace_stmt classe to opt_trace_context.h to get critical
        functions inline
      a24d0926
    • Monty's avatar
      Improved speed of optimizer trace · 940fcbe7
      Monty authored
      - Added unlikely() to optimize for not having optimizer trace enabled
      - Made THD::trace_started() inline
      - Added 'if (trace_enabled())' around some potentially expensive code
        (not many found)
      - Added ASSERT's to ensure we don't call expensive optimizer trace calls
        if optimizer trace is not enabled
      - Added length to Json_writer functions to speed up buffer writes
        when optimizer trace is enabled.
      - Changed LEX_CSTRING argument handling to not send full struct to writer
        function on_add_str() functions now trusts length arguments
      940fcbe7
  2. 29 Feb, 2020 1 commit
  3. 28 Feb, 2020 2 commits
  4. 26 Feb, 2020 1 commit
  5. 20 Feb, 2020 1 commit
    • Sergei Petrunia's avatar
      MDEV-21610 Different query results from 10.4.11 to 10.4.12 · e6373551
      Sergei Petrunia authored
      Part#2: cleanup:
      
      In the part 1 of the fix, DS-MRR implementation would peek into
      the JOIN_TAB to get the rowid filter from
      
        table->reginfo.join_tab->rowid_filter
      
      This doesn't look good from code isolation standpoint (why should a
      storage engine assume it is used through a JOIN_TAB?).
      
      Fixed this by storing the 'un-pushed' rowid_filter in the DsMrr_impl
      structure. The filter survives across multi_range_read_init() calls.
      
      It is discarded when somebody calls index_end() or rnd_end() and cleans
      up the DsMrr_impl.
      e6373551
  6. 19 Feb, 2020 2 commits
    • Sergei Petrunia's avatar
      Fix compile failure, compare_key_parts in handler shadowed by MyRocks · adcfea71
      Sergei Petrunia authored
      The two functions have different signature.
      Use "using ..." to prevent shadowing
      adcfea71
    • Igor Babaev's avatar
      MDEV-21610 Different query results from 10.4.11 to 10.4.12 · 2fb881df
      Igor Babaev authored
      This patch fixes the following defects/bugs.
      1. If BKA[H] algorithm was used to join a table for which the optimizer
      had decided to employ a rowid filter the filter actually was not built.
      2. The patch for the bug MDEV-21356 that added the code canceling pushing
      rowid filter into an engine for the table joined with employment of
      BKA[H] and MRR was not quite correct for Innodb engine because this
      cancellation was done after InnoDB code had already bound the the pushed
      filter to internal InnoDB structures.
      2fb881df
  7. 18 Feb, 2020 2 commits
  8. 17 Feb, 2020 1 commit
  9. 16 Feb, 2020 9 commits
  10. 14 Feb, 2020 2 commits
    • Sergei Petrunia's avatar
      MDEV-21628: Index condition pushdown condition ... not used with BKA · 9f718041
      Sergei Petrunia authored
      Partitioning storage now supports MRR but doesn't support Index Condition
      Pushdown (aka ICP). This causes counter-intuitive query plans for queries
      that use BKA and conditions that depend on index fields:
      - If the condition refers to other tables, BKA's variant of ICP is used
         to handle it.
      - If the condition depends on this table only, the optimizer will try to
        use regular ICP for it, which will fail because the storage engine
        doesn't support ICP.
      
      Make the optimizer be smarter in the second case: if we were not able to
      use regular ICP, use BKA's variant of ICP..
      9f718041
    • Daniel Black's avatar
      mysys: remove windac my_security_attr_create (#1391) · 8eb03845
      Daniel Black authored
      No longer used.
      8eb03845
  11. 13 Feb, 2020 2 commits
    • Eugene Kosov's avatar
      micro optimization: avoid std::string copy · c400a73d
      Eugene Kosov authored
      c400a73d
    • Eugene Kosov's avatar
      MDEV-21669 InnoDB: Table ... contains <n> indexes inside InnoDB, which is... · 1394216e
      Eugene Kosov authored
      MDEV-21669 InnoDB: Table ... contains <n> indexes inside InnoDB, which is different from the number of indexes <n> defined in the MariaDB
      
      compare_keys_but_name(): do not use KEY_PART_INFO::field for
      Field::is_equal(). Following the logic of that code we need to
      compare fields of a table. But KEY_PART_INFO::field sometimes
      (when key part is shorter than table field) is a different field.
      In that case Field::is_equal() returns incorrect result and
      problems occur.
      
      KEY_PART_INFO::field may become some strange field in
      open_frm_error open_table_from_share(). I think this is an
      incorrect logic, some tecnhical debt. I'm not fixing it right now,
      because I don't have time. But I'm making Field::field_length
      a const class member. Then, the only fishy code which changed that
      field requires now a const_cast<>. I'm bringing attention to that
      code with it. This change should not affect logic of the
      program in any way.
      1394216e
  12. 12 Feb, 2020 1 commit
    • Sergey Vojtovich's avatar
      MDEV-20867 - Perform careful review of "Server crashes with BACKUP STAGE and... · c5e00fea
      Sergey Vojtovich authored
      MDEV-20867 - Perform careful review of "Server crashes with BACKUP STAGE and FLUSH TABLE table_name"
      
      Reverted original patch (c2e0a0b1).
      
      For consistency with "LOCK TABLE <table_name> READ" and "FLUSH TABLES
      WITH READ LOCK", which are forbidden under "BACKUP STAGE", forbid "FLUSH
      TABLE <table_name> FOR EXPORT" and "FLUSH TABLE <table_name> WITH READ
      LOCK" as well.
      
      It'd allow consistent fixes for problems like MDEV-18643.
      c5e00fea
  13. 11 Feb, 2020 1 commit
  14. 10 Feb, 2020 5 commits
  15. 09 Feb, 2020 4 commits
  16. 08 Feb, 2020 2 commits