1. 02 Sep, 2019 1 commit
  2. 01 Sep, 2019 1 commit
  3. 31 Aug, 2019 1 commit
  4. 30 Aug, 2019 10 commits
    • Igor Babaev's avatar
      MDEV-20265 Unknown column in field list · d1ef02e9
      Igor Babaev authored
      This patch corrects the fix of the patch for mdev-19421 that resolved
      the problem of parsing some embedded join expressions such as
        t1 join t2 left join t3 on t2.a=t3.a on t1.a=t2.a.
      Yet the patch contained a bug that prevented proper context analysis
      of the queries where such expressions were used together with comma
      separated table references in from clauses.
      d1ef02e9
    • Vladislav Vaintroub's avatar
    • Marko Mäkelä's avatar
      Enable some RocksDB tests that are enabled on 10.2 · 396da1a7
      Marko Mäkelä authored
      FIXME: rocksdb.drop_table hangs on shutdown, but is not disabled in 10.2
      396da1a7
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · a5472b03
      Marko Mäkelä authored
      a5472b03
    • Marko Mäkelä's avatar
      MDEV-20066 Wrong value on instantly added column after DELETE and UPDATE · 17336f6d
      Marko Mäkelä authored
      row_upd_build_difference_binary(): Correctly handle the
      case where columns (or clustered index fields) have been added
      since the 'entry' was originally created. In this case,
      the update vector must replace any missing columns with the
      default values of the instantly added columns.
      17336f6d
    • Sergei Petrunia's avatar
      MDEV-18384: rocksdb.index_merge_rocksdb2 test fails · 1688a226
      Sergei Petrunia authored
      Merge the changes to include/index_merge*inc from the upstream. The changes
      add this command in many places:
      
       +if ($engine_type == RocksDB)
       +{
       +    set global rocksdb_force_flush_memtable_now=1;
       +}
      
      also add it in one more place to make the test truly stable.
      1688a226
    • Marko Mäkelä's avatar
      MDEV-20425: Fix -Wimplicit-fallthrough · f42a2317
      Marko Mäkelä authored
      With --skip-debug-assert, DBUG_ASSERT(false) will allow execution to
      continue. Hence, we will need /* fall through */ after them.
      
      Some DBUG_ASSERT(0) were replaced by break; when the switch () statement
      was followed by DBUG_ASSERT(0).
      f42a2317
    • Sergei Petrunia's avatar
      MDEV-20109: Optimizer ignores distinct key created for materialized... · a379f151
      Sergei Petrunia authored
      Adjust the testcase according to the review input
      a379f151
    • Sergei Petrunia's avatar
      MDEV-20109: Optimizer ignores distinct key created for materialized... · ef76f81c
      Sergei Petrunia authored
      (Backported to 10.3, addressed review input)
      
      Sj_materialization_picker::check_qep(): fix error in cost/fanout
      calculations:
      - for each join prefix, add #prefix_rows / TIME_FOR_COMPARE to the cost,
        like best_extension_by_limited_search does
      - Remove the fanout produced by the subquery tables.
      - Also take into account join condition selectivity
      
      optimize_wo_join_buffering() (used by LooseScan and FirstMatch)
      - also add #prefix_rows / TIME_FOR_COMPARE to the cost of each prefix.
      - Also take into account join condition selectivity
      ef76f81c
    • Teemu Ollakka's avatar
      MDEV-19826 10.4 seems to crash with "pool-of-threads" (#1370) · 9487e0b2
      Teemu Ollakka authored
      MariaDB 10.4 was crashing when thread-handling was set to
      pool-of-threads and wsrep was enabled.
      
      There were two apparent reasons for the crash:
      - Connection handling in threadpool_common.cc was missing calls to
        control wsrep client state.
      - Thread specific storage which contains thread variables (THR_KEY_mysys)
        was not handled appropriately by wsrep patch when pool-of-threads
        was configured.
      
      This patch addresses the above issues in the following way:
      - Wsrep client state open/close was moved in thd_prepare_connection() and
        end_connection() to have common handling for one-thread-per-connection
        and pool-of-threads.
      - Thread local storage handling in wsrep patch was reworked by introducing
        set of wsrep_xxx_threadvars() calls which replace calls to
        THD store_globals()/reset_globals() and deal with thread handling
        specifics internally.
      
      Wsrep-lib was updated to version which relaxes internal concurrency
      related sanity checks.
      
      Rollback code from wsrep_rollback_process() was extracted to separate calls
      for better readability.
      
      Post rollback thread was removed as it was completely unused.
      9487e0b2
  5. 29 Aug, 2019 6 commits
  6. 28 Aug, 2019 7 commits
    • Marko Mäkelä's avatar
      Remove a bogus comment · 2842ae03
      Marko Mäkelä authored
      Changes of PAGE_MAX_TRX_ID must be redo-logged for correctness.
      That was fixed in the InnoDB Plugin for MySQL 5.1 already.
      2842ae03
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 5f35e103
      Marko Mäkelä authored
      5f35e103
    • Julius Goryavsky's avatar
      Improved handling of subdirectories in the xtrabackup-v2 SST scripts (similar... · 4ba20e0a
      Julius Goryavsky authored
      Improved handling of subdirectories in the xtrabackup-v2 SST scripts (similar to MDEV-18863) for more predictable test results (related to xtrabackup-v2 SST)
      4ba20e0a
    • Oleksandr Byelkin's avatar
      MDEV-16932: ASAN heap-use-after-free in my_charlen_utf8 /... · 9cd6e7ad
      Oleksandr Byelkin authored
      MDEV-16932: ASAN heap-use-after-free in my_charlen_utf8 / my_well_formed_char_length_utf8 on 2nd execution of SP with ALTER trying to add bad CHECK
      
      Make automatic name generation during execution (not prepare).
      
      Check result of memory allocation operation.
      9cd6e7ad
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · e41eb044
      Marko Mäkelä authored
      e41eb044
    • Eugene Kosov's avatar
      fix clang warnings · d4866c7d
      Eugene Kosov authored
      d4866c7d
    • Marko Mäkelä's avatar
      Implement innodb_evict_tables_on_commit_debug · 947b0b57
      Marko Mäkelä authored
      Some bugs are detected only after a table definition has been evicted
      and then reloaded to the InnoDB data dictionary cache.
      
      For debug builds, introduce the settable Boolean configuration parameter
      innodb_evict_tables_on_commit_debug that can be set to request InnoDB
      to attempt to evict table definitions from the data dictionary cache
      whenever a transaction is committed.
      
      This has been tested on 10.3 and 10.4 with the following:
      
      ./mysql-test-run.pl --mysqld=--loose-innodb-evict-tables-on-commit-debug
      
      You can also use the following:
      
      SET GLOBAL innodb_evict_tables_on_commit_debug=ON;
      SET GLOBAL innodb_evict_tables_on_commit_debug=OFF;
      
      The parameter affects the commit (or rollback or abort) of
      transactions that have modified persistent InnoDB tables.
      947b0b57
  7. 27 Aug, 2019 7 commits
    • Vladislav Vaintroub's avatar
    • Marko Mäkelä's avatar
      MDEV-13626: Add innodb.innodb-read-view · 7aac8358
      Marko Mäkelä authored
      7aac8358
    • Marko Mäkelä's avatar
      MDEV-15326/MDEV-16136 dead code removal · 25af2a18
      Marko Mäkelä authored
      Revert part of fa2a74e0.
      
      trx_reference(): Remove, and merge the relevant part to the only caller
      trx_rw_is_active(). If the statements trx = NULL; were ever executed,
      the function would have dereferenced a NULL pointer and crashed in
      trx_mutex_exit(trx). Hence, those statements must have been unreachable,
      and they can be replaced with debug assertions.
      
      trx_rw_is_active(): Avoid unnecessary acquisition and release of trx->mutex
      when do_ref_count=false.
      
      lock_trx_release_locks(): Do not reset trx->id=0. Had the statement been
      necessary, we would have experienced crashes in trx_reference().
      25af2a18
    • Sujatha's avatar
      MDEV-19925: Column ... cannot be converted from type 'varchar(20)' to type 'varchar(20)' · e7b71e0d
      Sujatha authored
      Cherry picking:
      Bug#25135304: RBR: WRONG FIELD LENGTH IN ERROR MESSAGE
      commit 47bd3f7cf3c8518f62b1580ec65af2ba7ac13b95
      
      Description:
      ============
      In row based replication, when replicating from a table with a field with
      character set set to UTF8mb3 to the same table with the same field set to
      character set UTF8mb4 I get a confusing error message:
      
      For VARCHAR: VARCHAR(1) 'utf8mb3' to VARCHAR(1) 'utf8mb4'
      "Column 0 of table 'test.t1' cannot be converted from type 'varchar(3)' to
      type 'varchar(1)'"
      
      Similar issue with CHAR type as well.
      
      Issue with respect to BLOB types:
      
      For BLOB: LONGBLOB to TINYBLOB - Error message displays incorrect blob type.
      "Column 0 of table 'test.t1' cannot be converted from type 'tinyblob' to type
      'tinyblob'"
      
      For BINARY to BINARY - Error message displays incorrect type for master side
      field.
      "Column 0 of table 'test.t' cannot be converted from type 'char(1)' to type
      'binary(10)'"
      Similar issue exists for VARBINARY type. It is displayed as 'VARCHAR'.
      
      Analysis:
      =========
      In Row based replication charset information is not sent as part of metadata
      from master to slave.
      
      For VARCHAR field its character length is converted into equivalent
      octets/bytes and stored internally. At the time of displaying the data to user
      it is converted back to original character length.
      
      For example:
      VARCHAR(2)- utf8mb3 is stored as:2*3 = VARCHAR(6)
      At the time of displaying it to user
      VARCHAR(6)- charset utf8mb3:6/3= VARCHAR(2).
      
      At present the internally converted octect length is sent from master to slave
      with out providing the charset information. On slave side if the type
      conversion fails 'show_sql_type' function is used to get the type specific
      information from metadata. Since there is no charset information is available
      the filed type is displayed as VARCHAR(6).
      
      This results in confused error message.
      
      For CHAR fields
      CHAR(1)- utf8mb3 - CHAR(3)
      CHAR(1)- utf8mb4 - CHAR(4)
      
      'show_sql_type' function which retrieves type information from metadata uses
      (bytes/local charset length) to get actual character length. If slave's chaset
      is 'utf8mb4' then
      
      CHAR(3/4)-->CHAR(0)
      CHAR(4/4)-->CHAR(1).
      
      This results in confused error message.
      
      Analysis for BLOB type issue:
      
      BLOB's length is represented in two forms.
      1. Actual length
      i.e
        (length < 256) type= MYSQL_TYPE_TINY_BLOB;
        (length < 65536) type= MYSQL_TYPE_BLOB; ...
      
      2. packlength - The number of bytes used to represent the length of the blob
        1- tinyblob
        2- blob ...
      
      In row based replication only the packlength is written in the binary log. On
      the slave side this packlength is interpreted as actual length of the blob.
      Hence the length is always < 256 and the type is displayed as tiny blob.
      
      Analysis for BINARY to BINARY type issue:
      The character set information is needed to identify a filed's type as char or
      binary. Since master side character set information is not available on the
      slave side both binary and char fields are displayed as char.
      
      Fix:
      ===
      For CHAR and VARCHAR fields display their length in octets for both source and
      target fields. For target field display the charset information if it is
      relevant.
      
      For blob type changed the code to use the packlength and display appropriate
      blob type in error message.
      
      For binary and varbinary fields use the slave side character set as reference
      to map them to binary or varbinary fields.
      e7b71e0d
    • Jan Lindström's avatar
      f6087137
    • Alexander Barkov's avatar
      MDEV-19699 Server crashes in Item_null_result::field_type upon SELECT with ROLLUP on constant table · 29bbf474
      Alexander Barkov authored
      Also fixes:
      
      MDEV-20431 GREATEST(int_col,date_col) returns wrong results in a view
      29bbf474
    • Varun Gupta's avatar
      MDEV-19705: Assertion `tmp >= 0' failed in best_access_path · 77e44282
      Varun Gupta authored
      The reason for hitting the assert is that rec_per_key estimates have some garbage value.
      So the solution to fix this would be for long unique keys to use use rec_per_key for only 1 keypart,
      that means rec_per_key[0] would have the estimate.
      77e44282
  8. 26 Aug, 2019 7 commits