1. 28 Oct, 2017 1 commit
    • Galina Shalygina's avatar
      Mistakes corrected. · a4ded0a9
      Galina Shalygina authored
      TVC can be used in IN subquery and in PARTITION BY struct now.
      Special variable to control working of optimization added.
      a4ded0a9
  2. 04 Sep, 2017 1 commit
  3. 02 Sep, 2017 1 commit
  4. 01 Sep, 2017 2 commits
  5. 29 Aug, 2017 4 commits
  6. 25 Aug, 2017 1 commit
    • Galina Shalygina's avatar
      Optimization that transforms IN-predicate in IN-subselect made. · 3310076d
      Galina Shalygina authored
      Trasformation goes that way:
      a in (1,2) ->
      a in (select * from (values ((1),(2))) as new_tvc)
      
      Special variable that controlls optimization added.
      Now optimization works only in several cases.
      New tests added.
      
      Old tests corrected. Now with TVC explain can be used. TVC also can be used in recursive CTEs.
      3310076d
  7. 26 Jul, 2017 1 commit
  8. 30 Jun, 2017 1 commit
  9. 29 Jun, 2017 1 commit
  10. 13 Jun, 2017 5 commits
  11. 06 Jun, 2017 1 commit
  12. 02 Jun, 2017 2 commits
    • Marko Mäkelä's avatar
      Remove deprecated InnoDB file format parameters · 0c92794d
      Marko Mäkelä authored
      The following options will be removed:
      
      innodb_file_format
      innodb_file_format_check
      innodb_file_format_max
      innodb_large_prefix
      
      They have been deprecated in MySQL 5.7.7 (and MariaDB 10.2.2) in WL#7703.
      
      The file_format column in two INFORMATION_SCHEMA tables will be removed:
      
      innodb_sys_tablespaces
      innodb_sys_tables
      
      Code to update the file format tag at the end of page 0:5
      (TRX_SYS_PAGE in the InnoDB system tablespace) will be removed.
      When initializing a new database, the bytes will remain 0.
      
      All references to the Barracuda file format will be removed.
      Some references to the Antelope file format (meaning
      ROW_FORMAT=REDUNDANT or ROW_FORMAT=COMPACT) will remain.
      
      This basically ports WL#7704 from MySQL 8.0.0 to MariaDB 10.3.1:
      
      commit 4a69dc2a95995501ed92d59a1de74414a38540c6
      Author: Marko Mäkelä <marko.makela@oracle.com>
      Date:   Wed Mar 11 22:19:49 2015 +0200
      0c92794d
    • Marko Mäkelä's avatar
      Merge branch 'bb-10.2-ext' into 10.3 · 3d615e4b
      Marko Mäkelä authored
      This excludes MDEV-12472 (InnoDB should accept XtraDB parameters,
      warning that they are ignored). In other words, MariaDB 10.3 will not
      recognize any XtraDB-specific parameters.
      3d615e4b
  13. 30 May, 2017 2 commits
    • Monty's avatar
      MDEV-12930 Testing SEQUENCE object · 95989166
      Monty authored
      Fixed the following things from the above MDEV:
      - Ensure the user has INSERT privilege when generating new sequence values
        with NEXT VALUE FOR or SETVAL()
      - Fixed bug in InnoDB when generating several sequence values in one statement
      - Ensure that read_set is up to date before calling ha_sequence::ha_write_row()
        - This is only a potential bug with storage engines that trusts the column maps completely
      95989166
    • Monty's avatar
      Updated test case · d5d8fa6e
      Monty authored
      d5d8fa6e
  14. 29 May, 2017 4 commits
  15. 27 May, 2017 7 commits
  16. 26 May, 2017 2 commits
  17. 25 May, 2017 3 commits
    • Alexander Barkov's avatar
      A cleanup for MDEV-11514, MDEV-11497, MDEV-11554, MDEV-11555 - IN and CASE... · e1f81822
      Alexander Barkov authored
      A cleanup for MDEV-11514, MDEV-11497, MDEV-11554, MDEV-11555 - IN and CASE type aggregation problems
      
      Removing cmp_item::get_comparator() and calling instead
      Type_handler::make_cmp_item(), which was earlier introduced by this patch:
      
      74891ed2
      e1f81822
    • Alexander Barkov's avatar
      Fixing a few data type related problems: MDEV-12875, MDEV-12886, MDEV-12916 · 109bc470
      Alexander Barkov authored
      This is a joint patch fixing the following problems:
      
      MDEV-12875 Wrong VIEW column data type for COALESCE(int_column)
      MDEV-12886 Different default for INT and BIGINT column in a VIEW for a SELECT with ROLLUP
      MDEV-12916 Wrong column data type for an INT field of a cursor-anchored ROW variable
      
      All above problem happened because the global function ::create_tmp_field()
      called the top-level Item::create_tmp_field(), which made some tranformation
      for INT-result data types. For example, INT(11) became BIGINT(11), because 11
      is a corner case and it's not known if it fits or does not fit into INT range,
      so Item::create_tmp_field() converted it to BIGINT(11) for safety.
      
      The main idea of this patch is to avoid such tranformations.
      
      1. Fixing Item::create_tmp_field() not to have a special case for INT_RESULT.
      
         Item::create_tmp_field() is changed not to have a special case
         for INT_RESULT (which earlier made a decision based on Item's max_length).
         It now calls tmp_table_field_from_field_type() for INT_RESULT,
         therefore preserves the original data type (e.g. INT, YEAR) without
         conversion to BIGINT.
      
         This change is valid, because a number of recent fixes
         (e.g. in Item_func_int, Item_hybrid_func, Item_int, Item_splocal)
         guarantee that item->type_handler() now properly returns
         type_handler_long vs type_handler_longlong. So no adjustment by length
         is needed any more for Items returning INT_RESULT.
      
         After this change, Item::create_tmp_field() calls
         tmp_table_field_from_field_type() for all XXX_RESULT, except REAL_RESULT.
      
      2. Fixing Item::create_tmp_field() not to have a special case for REAL_RESULT.
      
         Note, the reason for a special case for REAL_RESULT is to have a special
         constructor for Field_double(), forcing Field_real::not_fixed to be set
         to true.
      
         Taking into account that only Item_sum descendants actually need a special
         constructor call Field_double(not_fixed=true), not too loose precision
         when mixing individual rows to the aggregate result:
         - renaming Item::create_tmp_field() to Item_sum::create_tmp_field().
         - changing Item::create_tmp_field() just to call
           tmp_table_field_from_field_type() for all XXX_RESULT types.
      
         A special case for REAL_RESULT in Item::create_tmp_field() is now gone.
         Item::create_tmp_field() is now symmetric for all XXX_RESULT types,
         and now just calls tmp_table_field_from_field_type().
      
      3. Fixing Item_func::create_field_for_create_select() not to have
         a special case for STRING_RESULT.
      
         After changes #1 and #2, the code in
         Item_func::create_field_for_create_select(), testing result_type(),
         becomes useless, because: now Item::create_tmp_field() and
         tmp_table_field_from_field_type() do exactly the same thing for all
         XXX_RESULT types for Item_func descendants:
         a. It calls tmp_table_field_from_field_type for STRING_RESULT directly.
         b. For other XXX_RESULT, it goes through Item::create_tmp_field(),
            which calls the global function ::create_tmp_field(),
            which calls item->create_tmp_field() for FUNC_ITEM,
            which calls tmp_table_field_from_field_type() again.
      
         So removing the virtual implementation of
         Item_func::create_field_for_create_select().
         The inherited Item::create_field_for_create_select() now perfectly
         does the job, as it also calls tmp_table_field_from_field_type()
         for FUNC_ITEM, independently from XXX_RESULT type.
      
      4. Taking into account #1 and #2, as well as some recent changes,
         removing virtual implementations:
         - Item_hybrid_func::create_tmp_field()
         - Item_hybrid_func::create_field_for_create_select()
         - Item_int_func::create_tmp_field()
         - Item_int_func::create_field_for_create_select()
         - Item_temporal_func::create_field_for_create_select()
         The derived versions from Item now perfectly work.
      
      5. Moving a piece of code from create_tmp_field_from_item()
         to a new function create_tmp_field_from_item_finalize(),
         to reuse it in two places (see #6).
      
      6. Changing the code responsible for BIT->INT/BIGIN tranformation
         (which is called for the cases when the created table, e.g. HEAP,
          does not fully support BIT) not to call create_tmp_field_from_item(),
         because the latter now calls tmp_table_field_from_field_type() instead
         of create_tmp_field() and thefore cannot do BIT transformation.
         So rewriting this code using a sequence of these calls:
         - item->type_handler_long_or_longlong()
         - handler->make_and_init_table_field()
         - create_tmp_field_from_item_finalize()
      
      7. Miscelaneous changes:
         - Moving type_handler_long_or_longlong() from "protected" to "public",
           as it's now needed in the global function create_tmp_field().
      
      8. The above changes fixed MDEV-12875, MDEV-12886, MDEV-12916.
         So adding tests for these bugs.
      109bc470
    • Alexander Barkov's avatar
      Adding tests for MDEV-12917 Wrong data type for CREATE..SELECT year_sp_variable · 54e29712
      Alexander Barkov authored
      The fix for MDEV-12876 fixed this problem as well.
      So adding tests only.
      54e29712
  18. 24 May, 2017 1 commit
    • Monty's avatar
      More tests for SEQUENCE's · a4789f52
      Monty authored
      - Test with LOCK TABLES
      - Test mysqldump
      - Don't update rows for sequence tables if values doesn't change. This is
        needed as InnoDB gives an error for updates where values doesn't change.
      a4789f52