1. 30 Aug, 2019 3 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
    • 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
  2. 29 Aug, 2019 1 commit
  3. 27 Aug, 2019 2 commits
  4. 26 Aug, 2019 5 commits
  5. 25 Aug, 2019 1 commit
  6. 24 Aug, 2019 1 commit
  7. 23 Aug, 2019 1 commit
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4, except for MDEV-20265 · efb8485d
      Marko Mäkelä authored
      The MDEV-20265 commit e746f451
      introduces DBUG_ASSERT(right_op == r_tbl) in
      st_select_lex::add_cross_joined_table(), and that assertion would
      fail in several tests that exercise joins. That commit was skipped
      in this merge, and a separate fix of MDEV-20265 will be necessary in 10.4.
      efb8485d
  8. 22 Aug, 2019 1 commit
  9. 21 Aug, 2019 8 commits
    • Aleksey Midenkov's avatar
      MDEV-17613 MIN/MAX Optimization (Select tables optimized away) does not work · b96e4424
      Aleksey Midenkov authored
      Current easy fix is not possible, because SELECT clones ha_partition
      and then closes the clone which leads to unclosed transaction in
      partitions we forcely prune out. We cound solve this by closing these
      partitions (and release from transaction) in
      change_partitions_to_open() at versioning conditions stage, but this
      is problematic because table lock is acquired for each partition at
      open stage and therefore must be released when we close partition
      handler in change_partitions_to_open(). More details in MDEV-20376.
      
      This should change after MDEV-20250 where mechanism of opening
      partitions will be improved.
      
      This reverts commit cdbac54d.
      b96e4424
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 32ec5fb9
      Marko Mäkelä authored
      32ec5fb9
    • Aleksey Midenkov's avatar
      MDEV-19740 Debug build of 10.3.15 FTBFS · e8de75db
      Aleksey Midenkov authored
      Fix debug build failing with error:
      
      extended initializer lists only available with -std=c++11 or -std=gnu++11
      e8de75db
    • Marko Mäkelä's avatar
      MDEV-17187 table doesn't exist in engine after ALTER of FOREIGN KEY · 9de2e60d
      Marko Mäkelä authored
      ha_innobase::open(): Always ignore problems with FOREIGN KEY constraints
      (pass DICT_ERR_IGNORE_FK_NOKEY), no matter whether foreign_key_checks
      is enabled. Instead, we must report errors when enforcing the FOREIGN KEY
      constraints. As a result of ignoring these errors, the tables will be
      loaded with dict_foreign_t objects whose foreign_index or referenced_index
      will be NULL.
      
      Also, pass DICT_ERR_IGNORE_FK_NOKEY instead of DICT_ERR_IGNORE_NONE
      to dict_table_open_on_id_low() in many other cases. Notably, on
      CREATE TABLE and ALTER TABLE, we will keep validating the FOREIGN KEY
      constraints as before.
      
      dict_table_open_on_name(): If no other flags than
      DICT_ERR_IGNORE_FK_NOKEY are set, refuse access to unreadable tables.
      Some encryption tests rely on this code path.
      
      For the DML code path, we used to have the problem that when
      one of the indexes was missing in dict_foreign_t, we would ignore
      the FOREIGN KEY constraint altogether. The following changes
      address that.
      
      row_ins_check_foreign_constraints(): Add the parameter pk.
      For the primary key, consider also foreign key constraints for which
      foreign->foreign_index=NULL (no underlying index is available).
      
      row_ins_check_foreign_constraint(): Report errors also for !check_ref.
      Remove a redundant check for srv_read_only_mode.
      
      row_ins_foreign_report_add_err(): Tolerate foreign->foreign_index=NULL.
      9de2e60d
    • Marko Mäkelä's avatar
      MDEV-17187: Code cleanup · e279c007
      Marko Mäkelä authored
      fkerr_t: Errors for the foreign key checks. Replaces ulint,
      which used #define that looked like dberr_t literals.
      
      wsrep_dict_foreign_find_index(): Remove. Use
      dict_foreign_find_index() instead, with default parameters.
      
      dict_foreign_push_index_error(): Do not add redundant quotes
      around quoted table names.
      e279c007
    • Marko Mäkelä's avatar
    • Anel Husakovic's avatar
    • Jan Lindström's avatar
      MDEV-19968: Galera test failure on galera_load_data · 1a3c77e5
      Jan Lindström authored
      Add wait conditions and compare cardinality etc information
      between nodes and print something only if they differ.
      1a3c77e5
  10. 20 Aug, 2019 12 commits
  11. 19 Aug, 2019 5 commits
    • Julius Goryavsky's avatar
      MDEV-20185: Windows: Use of uninitialized value $bpath in string eq · 12e3ac04
      Julius Goryavsky authored
      The execution of mtr in the Windows environment fails due to
      the fact that the new code from MDEV-18565 does not take into
      account the need to add the ".exe" extension to the names of
      executable files when searching for pre-requisites that are
      needed to run SST scripts (especially when using mariabackup)
      and when searching paths to some other Galera utilities.
      This patch fixes this flaw.
      
      Also adding paths to the PATH environment variable is now
      done with the correct delimiter character.
      12e3ac04
    • Julius Goryavsky's avatar
      MDEV-20185: Windows: Use of uninitialized value $bpath in string eq · c93f96e2
      Julius Goryavsky authored
      The execution of mtr in the Windows environment fails due to
      the fact that the new code from MDEV-18565 does not take into
      account the need to add the ".exe" extension to the names of
      executable files when searching for pre-requisites that are
      needed to run SST scripts (especially when using mariabackup)
      and when searching paths to some other Galera utilities.
      This patch fixes this flaw.
      
      Also adding paths to the PATH environment variable is now
      done with the correct delimiter character.
      c93f96e2
    • Julius Goryavsky's avatar
      MDEV-20185: Windows: Use of uninitialized value $bpath in string eq · c5bc0ced
      Julius Goryavsky authored
      The execution of mtr in the Windows environment fails due to
      the fact that the new code from MDEV-18565 does not take into
      account the need to add the ".exe" extension to the names of
      executable files when searching for pre-requisites that are
      needed to run SST scripts (especially when using mariabackup)
      and when searching paths to some other Galera utilities.
      This patch fixes this flaw.
      
      Also adding paths to the PATH environment variable is now
      done with the correct delimiter character.
      c5bc0ced
    • Julius Goryavsky's avatar
      MDEV-18863: Galera SST scripts can't read [mysqldN] option groups · 89fb295b
      Julius Goryavsky authored
      Some users and some scripts (for example, mysqld_multi.sh) use special
      option groups with names like [mysqld1], [mysqld2], ..., [mysqldN].
      
      But SST scripts can't currently fully support these option groups.
      The only option group-related value it gets from the server is
      --defaults-group-suffix, if that option was set for mysqld when
      the server was started.
      
      However, the SST scripts does not get told by the server to read
      these option groups, so this means that the SST script will fail
      to read options like innodb-data-home-dir when it is in a option
      group like [mysqld1]...[mysqldN].
      
      Moreover, SST scripts ignore many parameters that can be passed
      to them explicitly and cannot transfer them further, for example,
      to the input of mariabackup utility. Ideally, we want to transfer
      all the parameters of the original mysqld call to utilities such
      as mariabackup, however the SST script does not receive these
      parameters from the server and therefore cannot transfer them to
      mariabackup.
      
      To correct these shortcomings, we need to transfer to the scripts
      all of the parameters of the original mysqld call, and in the SST
      scripts themselves provide for the transfer all of these parameters
      to utilities such as mariabackup. To prevent these parameters from
      mixing with the script's own parameters, they should be transferred
      to SST script after the special option "--mysqld-args", followed by
      the string argument with the original parameters, as it received by
      the mysqld call at the time of launch (further all these parameters
      will be passed to mariabackup, for example).
      
      In addition, the SST scripts themselves must be refined so that
      they can read the parameters from the user-selected group, not just
      from the global mysqld configuration group. And also so that they
      can receive the parameters (which important for their work) as
      command-line arguments.
      89fb295b
    • Julius Goryavsky's avatar
      MDEV-18863: Galera SST scripts can't read [mysqldN] option groups · 137d8ed3
      Julius Goryavsky authored
      Some users and some scripts (for example, mysqld_multi.sh) use special
      option groups with names like [mysqld1], [mysqld2], ..., [mysqldN].
      
      But SST scripts can't currently fully support these option groups.
      The only option group-related value it gets from the server is
      --defaults-group-suffix, if that option was set for mysqld when
      the server was started.
      
      However, the SST scripts does not get told by the server to read
      these option groups, so this means that the SST script will fail
      to read options like innodb-data-home-dir when it is in a option
      group like [mysqld1]...[mysqldN].
      
      Moreover, SST scripts ignore many parameters that can be passed
      to them explicitly and cannot transfer them further, for example,
      to the input of mariabackup utility. Ideally, we want to transfer
      all the parameters of the original mysqld call to utilities such
      as mariabackup, however the SST script does not receive these
      parameters from the server and therefore cannot transfer them to
      mariabackup.
      
      To correct these shortcomings, we need to transfer to the scripts
      all of the parameters of the original mysqld call, and in the SST
      scripts themselves provide for the transfer all of these parameters
      to utilities such as mariabackup. To prevent these parameters from
      mixing with the script's own parameters, they should be transferred
      to SST script after the special option "--mysqld-args", followed by
      the string argument with the original parameters, as it received by
      the mysqld call at the time of launch (further all these parameters
      will be passed to mariabackup, for example).
      
      In addition, the SST scripts themselves must be refined so that
      they can read the parameters from the user-selected group, not just
      from the global mysqld configuration group. And also so that they
      can receive the parameters (which important for their work) as
      command-line arguments.
      137d8ed3