1. 19 May, 2019 3 commits
  2. 18 May, 2019 7 commits
  3. 17 May, 2019 13 commits
  4. 16 May, 2019 17 commits
    • Sergey Vojtovich's avatar
      Fixed rocksdb.mariadb_plugin on Windows · b546e92a
      Sergey Vojtovich authored
      b546e92a
    • Monty's avatar
      MDEV-19490 show tables fails when selecting the information_schema database · ef04a712
      Monty authored
      The bug was that when using mysql_list_fields, then
      table_list->schema_table_name was not filled in.
      Fixed by using table_list->schema_table instead, which is always
      filled in.
      ef04a712
    • Sergei Petrunia's avatar
      Issue #904: Crash in rocksdb::IOStatsContext::Reset, this=NULL · 5f66c58f
      Sergei Petrunia authored
      Fix both code paths:
      - Change the test source code so it doesn't cause the "Unused variable"
        warning (which -Werror converted into error and caused CMake not to set
        HAVE_THREAD_LOCAL)
      
      - If the system doesn't seem to support HAVE_THREAD_LOCAL, refuse to
        compile (rather than producing a binary that crashes for some tests)
      
      Originally submitted at https://github.com/facebook/mysql-5.6/pull/905
      5f66c58f
    • Sergey Vojtovich's avatar
      MDEV-19090 - Split rocksdb.locking_issues · 76a94a03
      Sergey Vojtovich authored
      This test takes ~6 minutes, split it for better parallelism.
      76a94a03
    • Sujatha's avatar
      MDEV-18970: uninited var can be read in gtid_delete_pending() · cacdcfd0
      Sujatha authored
      Problem:
      ========
      gcc 8 -O2 seems to indicate a real error for this code:
      
      direct_pos= table->file->ha_table_flags() & HA_PRIMARY_KEY_REQUIRED_FOR_POSITION;
      
      the warning: /mariadb/10.4/sql/rpl_gtid.cc:980:7:
      warning: 'direct_pos' may be used uninitialized in this function [-Wmaybe-uninitialized]
      
      Analysis:
      =========
      'direct_pos' is a variable which holds 'table_flags'. If this flag is set it means
      that a record within a table can be directly located by using its position. If
      this flag is set to '0' means there is no direct access is available, hence
      index scan must be initiated to locate the record.  This direct_pos is used to
      locate a row within mysql.gtid_slave_pos table for deletion.
      
      Prior to the initialization of 'direct_pos' following steps take place.
      
      1. mysql.gtid_slave_pos table is opened and 'table_opened' flag is set to true.
      2. State check for mysql.gtid_slave_pos table is initiated.
      
      If there is a failure during step2 code will be redirected to the error handling
      part. This error handling code will access uninitialized value of 'direct_pos'.
      This results in above mentioned warning.
      
      Another issue found during analysis is the error handling code uses '!direct_pos'
      to identify if the index is initialized or not. This is incorrect.
      
      The index initialization code is shown below.
      
        if (!direct_pos && (err= table->file->ha_index_init(0, 0)))
          {
            table->file->print_error(err, MYF(0));
            goto end;
          }
      
      In case there is a failure during ha_index_init code will be redirected to end
      part which tries to close the uninitialized index. It will result in an assert
      
      10.4/sql/handler.h:3186: int handler::ha_index_end(): Assertion `inited==INDEX'
      failed.
      
      Fix:
      ===
      Introduce a new variable named 'index_inited'. Set this variable upon successful
      initialization of index initialization otherwise by default it is false. Use
      this variable during error handling.
      cacdcfd0
    • Sergey Vojtovich's avatar
      Fixed RocksDB to follow THD ha_data protocol · a24dffdb
      Sergey Vojtovich authored
      Use thd_get_ha_data()/thd_set_ha_data() which protect against plugin
      removal until it has THD ha_data.
      
      Do not reset THD ha_data in rocksdb_close_connection(), cleaner approach
      is to let ha_close_connection() do it.
      
      Removed transaction objects cleanup from rocksdb_done_func(). As we lock
      plugin properly, there must be no transaction objects during RocksDB
      shutdown.
      a24dffdb
    • Sergey Vojtovich's avatar
      8a880d69
    • Alexander Barkov's avatar
      A joint patch for MDEV-19284 and MDEV-19285 (INSTANT ALTER) · c59d6395
      Alexander Barkov authored
      This patch fixes:
      
      - MDEV-19284 INSTANT ALTER with ucs2-to-utf16 conversion produces bad data
      - MDEV-19285 INSTANT ALTER from ascii_general_ci to latin1_general_ci produces corrupt data
      
      These regressions were introduced in 10.4.3 by:
      - MDEV-15564 Avoid table rebuild in ALTER TABLE on collation or charset changes
      
      Changes:
      
      1. Cleanup: Adding a helper method
         Field_longstr::csinfo_change_allows_instant_alter(),
         to remove some duplicate code in field.cc.
      
      2. Cleanup: removing Type_handler::Charsets_are_compatible() and static
         function charsets_are_compatible() and
         introducing new methods in the recently added class Charset instead:
         - encoding_allows_reinterpret_as()
         - encoding_and_order_allow_reinterpret_as()
      
      3. Bug fix: Removing the code that allowed instant conversion for
         ascii-to->8bit and ucs2-to->utf16.
         This actually fixes MDEV-19284 and MDEV-19285.
      
      4. Bug fix: Adding a helper method Charset::collation_specific_name().
         The old corresponding code in Type_handler::Charsets_are_compatible()
         was not safe against (badly named) user-defined collations whose
         character set name can be longer than collation name.
      c59d6395
    • Marko Mäkelä's avatar
      MDEV-19485: Crash on purge after ADD SPATIAL INDEX · 9aa80fcf
      Marko Mäkelä authored
      row_build_spatial_index_key(): Return early if the column is missing
      in the table row tuple.
      
      This is a regression that was introduced by
      commit 0e5a4ac2.
      9aa80fcf
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 3d56adbf
      Marko Mäkelä authored
      3d56adbf
    • Marko Mäkelä's avatar
      MDEV-19485: Add a test case · 796486d1
      Marko Mäkelä authored
      The bug was introduced in MariaDB 10.4.0 by
      commit 0e5a4ac2
      but it is good to have a regression test for this scenario
      in all applicable MariaDB versions.
      
      Cover the purge of an undo log record that was written before
      the completion of ADD SPATIAL INDEX.
      796486d1
    • Sergei Petrunia's avatar
      MDEV-19134: EXISTS() slower if ORDER BY is defined · d448cfc9
      Sergei Petrunia authored
      Step #2: "[ORDER BY ...] LIMIT n" should not prevent EXISTS-to-IN
      conversion, as long as
      - the LIMIT clause doesn't have OFFSET
      - the LIMIT is not "LIMIT 0".
      d448cfc9
    • Sergei Petrunia's avatar
      MDEV-19134: EXISTS() slower if ORDER BY is defined · b1f828a8
      Sergei Petrunia authored
      Step 1: Removal of ORDER BY [LIMIT] from the subquery should be done
      earlier and for broader class of subqueries.
      
      The rewrite was done in Item_in_subselect::select_in_like_transformer(),
      but this had problems:
      - It didn't cover EXISTS subqueries
      - It covered IN-subqueries, but was done after the semi-join transformation
        was considered inapplicable, because ORDER BY was present.
      
      Remaining issue:
      - EXISTS->IN transformation happens before
        check_and_do_in_subquery_rewrites() is called, so it is still prevented
        by the present ORDER BY.
      b1f828a8
    • Anel Husakovic's avatar
      Fix echo message · 366bf104
      Anel Husakovic authored
      366bf104
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · c4140721
      Marko Mäkelä authored
      c4140721
    • Varun Gupta's avatar
      Fixed the case when statistics were not getting read because · 70a5fb49
      Varun Gupta authored
      we had the statistics tables in the FROM list of the select.
      The statistics for tables are not read in such cases, so we need
      to check this case separately.
      70a5fb49
    • Alexander Barkov's avatar
      MDEV-16872 Add CAST(expr AS FLOAT) · b7d22a84
      Alexander Barkov authored
      b7d22a84