1. 28 Feb, 2019 9 commits
  2. 27 Feb, 2019 1 commit
    • Igor Babaev's avatar
      MDEV-18679 Server crashes in JOIN::optimize · 9bd47835
      Igor Babaev authored
      The bug manifested itself when executing a query with materialized
      view/derived/CTE whose specification was a SELECT query contained
      another materialized derived and impossible WHERE/HAVING condition
      was detected for this SELECT.
      As soon as such condition is detected the join structures of all
      derived tables used in the SELECT are destroyed. So optimization
      of the queries specifying these derived tables is impossible. Besides
      it's not needed.
      
      In 10.3 optimization of a materialized derived table is performed before
      detection of impossible WHERE/HAVING condition in the embedding SELECT.
      9bd47835
  3. 26 Feb, 2019 4 commits
  4. 25 Feb, 2019 6 commits
    • Marko Mäkelä's avatar
      MDEV-18719 Assertion (c.prtype ^ o->prtype) & ... failed on ALTER TABLE · bb970dda
      Marko Mäkelä authored
      The prtype & DATA_LONG_TRUE_VARCHAR flag only plays a role when
      converting between InnoDB internal format and the MariaDB SQL layer
      row format. Ideally this flag would never have been persisted in the
      InnoDB data dictionary.
      
      There were bogus assertion failures when an instant ADD, DROP, or
      column reordering was combined with a change of extending a VARCHAR
      from less than 256 bytes to more than 255 bytes. Such changes are
      allowed starting with MDEV-15563 in MariaDB 10.4.3.
      
      dict_table_t::instant_column(), dict_col_t::same_format(): Ignore
      the DATA_LONG_TRUE_VARCHAR flag, because it does not affect the
      persistent storage format.
      bb970dda
    • Daniel Bartholomew's avatar
      bump the VERSION · 201bd21e
      Daniel Bartholomew authored
      201bd21e
    • Alexander Barkov's avatar
      MDEV-18408 Assertion `0' failed in Item::val_native_result /... · b25ad1bc
      Alexander Barkov authored
      MDEV-18408 Assertion `0' failed in Item::val_native_result / Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null upon mysqld_list_fields after crash recovery
      
      The problem happened because Item_ident_for_show did not implement val_native().
      
      Solution:
      
      - Removing class Item_ident_for_show
      - Implementing a new method Protocol::send_list_fields() instead,
        which accepts a List<Field> instead of List<Item> as input.
        Now no any Item creation is done during mysqld_list_fields().
      
      Adding helper methods, to reuse the code easier:
      - Moved a part of Protocol::send_result_set_metadata(),
        responsible for sending an individual field metadata,
        into a new method Protocol_text::store_field_metadata().
        Reusing it in both send_list_fields() and send_result_set_metadata().
      - Adding Protocol_text::store_field_metadata()
      - Adding Protocol_text::store_field_metadata_for_list_fields()
      
      Note, this patch also automatically fixed another bug:
      
      MDEV-18685 mysql_list_fields() returns DEFAULT 0 instead of DEFAULT NULL for view columns
      
      The reason for this bug was that Item_ident_for_show::val_xxx() and get_date()
      did not check field->is_null() before calling field->val_xxx()/get_date().
      Now the default value is correctly sent by Protocol_text::store(Field*).
      b25ad1bc
    • Teemu Ollakka's avatar
      Fixed and recorded galera_sr.galera_sr_rollback_statement · 1ab2e757
      Teemu Ollakka authored
      Disabled GCF-437 which relies on InnoDB redo log size limitation
      which does not seem to exist or is increased in MariaDB 10.4.
      
      Require debug sync for mysql-wsrep#215.
      1ab2e757
    • Teemu Ollakka's avatar
      Simplified Wsrep_client_service::interrupted() · 24be8438
      Teemu Ollakka authored
      Wsrep-lib is now guaranteed to hold the underlying mutex
      which is wrapped in lock object passed to Wsrep_client_service
      interrupted() call. The library part will now take care of
      checking the wsrep::transaction specific state, so it is
      enough to check the thd->killed state for the result.
      24be8438
    • Teemu Ollakka's avatar
      Fixes to streaming replication BF aborts · 6edfeb82
      Teemu Ollakka authored
      The InnoDB DeadlockChecker::check_and_resolve() was missing a
      call to wsrep_handle_SR_rollback() in the case when the
      transaction running deadlock detection was chosen as victim.
      
      Refined wsrep_handle_SR_rollback() to skip store_globals() calls
      if the transaction was BF aborting itself.
      
      Made mysql-wsrep-features#165 more deterministic by waiting until
      the update is in progress before sending next update.
      6edfeb82
  5. 24 Feb, 2019 4 commits
  6. 23 Feb, 2019 2 commits
  7. 22 Feb, 2019 4 commits
  8. 21 Feb, 2019 10 commits
    • Sachin's avatar
      MDEV-371 Unique Index for long columns · d00f19e8
      Sachin authored
      This patch implements engine independent unique hash index.
      
      Usage:- Unique HASH index can be created automatically for blob/varchar/test column whose key
       length > handler->max_key_length()
      or it can be explicitly specified.
      
        Automatic Creation:-
         Create TABLE t1 (a blob unique);
        Explicit Creation:-
         Create TABLE t1 (a int , unique(a) using HASH);
      
      Internal KEY_PART Representations:-
       Long unique key_info will have 2 representations.
       (lets understand this with an example create table t1(a blob, b blob , unique(a, b)); )
      
       1. User Given Representation:- key_info->key_part array will be similar to what user has defined.
       So in case of example it will have 2 key_parts (a, b)
      
       2. Storage Engine Representation:- In this case there will be only one key_part and it will point to
       HASH_FIELD. This key_part will be always after user defined key_parts.
      
       So:- User Given Representation          [a] [b] [hash_key_part]
                        key_info->key_part ----^
        Storage Engine Representation          [a] [b] [hash_key_part]
                        key_info->key_part ------------^
      
       Table->s->key_info will have User Given Representation, While table->key_info will have Storage Engine
       Representation.Representation can be changed into each other by calling re/setup_keyinfo_hash function.
      
      Working:-
      
      1. So when user specifies HASH_INDEX or key_length is > handler->max_key_length(), In mysql_prepare_create_table
      One extra vfield is added (for each long unique key). And key_info->algorithm is set to HA_KEY_ALG_LONG_HASH.
      
      2. In init_from_binary_frm_image values for hash_keypart is set (like fieldnr , field and flags)
      
      3. In parse_vcol_defs, HASH_FIELD->vcol_info is created. Item_func_hash is used with list of Item_fields,
         When Explicit length is given by user then Item_left is used to concatenate Item_field values.
      
      4. In ha_write_row/ha_update_row check_duplicate_long_entry_key is called which will create the hash key from
      table->record[0] and then call ha_index_read_map , if we found duplicated hash , we will compare the result
      field by field.
      d00f19e8
    • Oleksandr Byelkin's avatar
      fix test to pass on embedded serever · 5b4d6595
      Oleksandr Byelkin authored
      5b4d6595
    • Sergei Golubchik's avatar
      mysql_install_db: make sure the variable's value is visible · 33b9f805
      Sergei Golubchik authored
      move the assignment out of a function, so that it wouldn't
      happen in a subshell
      33b9f805
    • Marko Mäkelä's avatar
      MDEV-18677 clang-cl 7 fails to compile innodb · 7c8e17b9
      Marko Mäkelä authored
      ib_counter_element_t: Declare as struct, not union.
      
      Based on patch by Vladislav Vaintroub
      7c8e17b9
    • Sergei Golubchik's avatar
      MDEV-12484 Enable unix socket authentication by default · 7f6d8894
      Sergei Golubchik authored
      Debian part. Do not ask to set a root password,
      do not create debian-sys-maint user (but preserve an existing one
      on upgrades - user scripts might be relying on it).
      
      Just create an empty /etc/mysql/debian.cnf for --defaults-file not to fail
      7f6d8894
    • Sergei Golubchik's avatar
      don't invoke error interceptors for fatal errors · 132216fa
      Sergei Golubchik authored
      and, again, *don't use thd->clear_error()*
      
      this fixed main.sp_notembedded failure on various amd64 platforms
      (where ER_STACK_OVERRUN_NEED_MORE happens to fire in open_stat_tables()
      under Dummy_error_handler)
      132216fa
    • Sergei Golubchik's avatar
      65ffea39
    • Sergei Golubchik's avatar
      MDEV-18297 How to reset a forgotten root password · 4386d935
      Sergei Golubchik authored
      After FLUSH PRIVILEGES remember if the connection started under
      --skip-grant-tables and keep it all-powerful, not a lowly anonymous.
      
      One could use this connection to reset passwords as needed.
      
      Also fix a crash in SHOW CREATE USER
      4386d935
    • Sergei Golubchik's avatar
    • Sergei Golubchik's avatar
      MDEV-7597 Expiration of user passwords · 1e621016
      Sergei Golubchik authored
      post-merge changes:
      * handle password expiration on old tables like everything else -
        make changes in memory, even if they cannot be done on disk
      * merge "debug" tests with non-debug tests, they don't use dbug anyway
      * only run rpl password expiration in MIXED mode, it doesn't replicate
        anything, so no need to repeat it thrice
      * restore update_user_table_password() prototype, it should not change
        ACL_USER, this is done in acl_user_update()
      * don't parse json twice in get_password_lifetime and get_password_expired
      * remove LEX_USER::is_changing_password, see if there was any auth instead
      * avoid overflow in expiration calculations
      * don't initialize Account_options in the constructor, it's bzero-ed later
      * don't create ulong sysvars - they're not portable, prefer uint or ulonglong
      * misc simplifications
      1e621016