1. 10 Aug, 2018 2 commits
  2. 09 Aug, 2018 4 commits
    • Alexander Barkov's avatar
      MDEV-16928 Move MYSQL_TIME initialization from Field_xxx::store_time_dec() to... · d2bba4ce
      Alexander Barkov authored
      MDEV-16928 Move MYSQL_TIME initialization from Field_xxx::store_time_dec() to new constructors Time() and Datetime()
      d2bba4ce
    • Alexander Barkov's avatar
    • Monty's avatar
      Updated compress_qpress.result · 3f01c4fb
      Monty authored
      3f01c4fb
    • Alexander Barkov's avatar
      MDEV-14032 SEC_TO_TIME executes side effect two times · 8524bb68
      Alexander Barkov authored
      - Adding a helper class Sec6 to store (neg,seconds,microseconds)
      - Adding a helper class VSec6 (Sec6  with a flag for "IS NULL")
      - Wrapping related functions as methods of Sec6;
        * number_to_datetime()
        * number_to_time()
        * my_decimal2seconds()
        * Item::get_seconds()
        * A big piece of code in Item_func_sec_to_time::get_date()
      
      - Using the new classes in places where second-to-temporal
        conversion takes place:
        * Field_timestamp::store(double)
        * Field_timestamp::store(longlong)
        * Field_timestamp_with_dec::store_decimal(my_decimal)
        * Field_temporal_with_date::store(double)
        * Field_temporal_with_date::store(longlong)
        * Field_time::store(double)
        * Field_time::store(longlong)
        * Field_time::store_decimal(my_decimal)
        * Field_temporal_with_date::store_decimal(my_decimal)
        * get_interval_value()
        * Item_func_sec_to_time::get_date()
        * Item_func_from_unixtime::get_date()
        * Item_func_maketime::get_date()
        This change simplifies these methods and functions a lot.
      
      - Warnings are now sent at VSec6 initialization time, when the source
        data is available in its original data type representation.
      
        If Sec6::to_time() or Sec6::to_datetime() truncate data again during
        conversion to MYSQL_TIME, they send warnings, but only if no warnings
        were sent during VSec6 initialization. This helps prevents double warnings.
      
        The call for val_str() in Item_func_sec_to_time::get_date() is not
        needed any more, so it's removed. This change actually fixes the problem.
      
        As a good effect, FROM_UNIXTIME() and MAKETIME() now also send warnings
        in case if the seconds arguments is out of range. Previously these
        functions returned NULL silently.
      
      - Splitting the code in the global function make_truncated_value_warning()
        into a number of methods THD::raise_warning_xxxx().
        This was needed to reuse the logic that chooses between:
        * ER_TRUNCATED_WRONG_VALUE
        * ER_WRONG_VALUE
        * ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
        for non-temporal data types (Sec6).
      
      - Removing:
        * Item::get_seconds()
        * number_to_time_with_warn()
        as this code now resides inside methods of Sec6.
      
      - Cleanup (changes that are not directly related to the fix):
        * Removing calls for field_name_or_null() and passing NULL instead
          in Item_func_hybrid_field_type::get_date_from_{int|real}_op,
          because Item_func_hybrid_field_type::field_name_or_null()
          always returns NULL
        * Replacing a number of calls for make_truncated_value_warning()
          to calls for THD::raise_warning_xxx(). In these places
          we know that the execution went through a certain
          branch of make_truncated_value_warning(),
          (e.g. the exact error code is known, or field name is always NULL,
           or field name is always not-NULL). So calls for the entire
          make_truncated_value_warning() after splitting are not necessary.
      8524bb68
  3. 07 Aug, 2018 5 commits
    • Otto Kekäläinen's avatar
      Deb: Don't define libzstd1 or other libraries as install dependencies manually · a12e6c5b
      Otto Kekäläinen authored
      If something was built using a build dependency, it will automatically
      be a install dependency via ${shlibs:Depends}, so no need to define it
      manually.
      
      This also fixes a bug related to a over autobake-deb.sh mangling
      the control file architecture field on Trusty and Jessie.
      a12e6c5b
    • Monty's avatar
      Fixed compile error on windows · 5d59a7b6
      Monty authored
      5d59a7b6
    • Alexander Barkov's avatar
      A cleanup for MDEV-16852 · 385ee993
      Alexander Barkov authored
      Changing data types for:
      - seconds from longlong to ulonglong
      - microseconds from long to ulong
      in:
      - parameters of calc_time_diff()
      - parameters of calc_time_from_sec()
      - Members of Sec6_add
      
      This will help to reuse the code easier:
      all other functions use ulonglong+long
      for seconds/microsecond, e.g.:
      
      - number_to_time()
      - number_to_datetime()
      - number_to_datetime_with_warn()
      - Field_temporal_with_date::store_decimal()
      - my_decimal2seconds()
      - Item::get_seconds()
      385ee993
    • Monty's avatar
      9da706fa
    • Alexander Barkov's avatar
      MDEV-16910 Add class VDec · cb7b5fbf
      Alexander Barkov authored
      Adding classes VDec and VDec2_lazy, according to the task description.
      This patch removes around 250 duplicate code lines.
      cb7b5fbf
  4. 05 Aug, 2018 6 commits
  5. 04 Aug, 2018 1 commit
  6. 03 Aug, 2018 1 commit
  7. 02 Aug, 2018 3 commits
  8. 01 Aug, 2018 2 commits
  9. 31 Jul, 2018 2 commits
  10. 30 Jul, 2018 1 commit
  11. 29 Jul, 2018 1 commit
    • Galina Shalygina's avatar
      MDEV-16730: Server crashes in Bitmap<64u>::merge · aee3d162
      Galina Shalygina authored
      The problem appears because of the pushdown of a non-pushable condition 'cond'
      into the materialized derived table/view. To prevent pushdown a map of
      tables that are used in 'cond' should be updated. This call is missing
      because of the MDEV-12387 changes. The call is added in the
      setup_jtbm_semi_joins() method.
      aee3d162
  12. 27 Jul, 2018 1 commit
    • Galina Shalygina's avatar
      MDEV-16721: Assertion `ctx.compare_type_handler()->cmp_type() != STRING_RESULT' · 2a3d3e05
      Galina Shalygina authored
      failed
      
      The bug appeared as in MDEV-12387 setup_jtbm_semi_joins() procedure had been
      devided into two functions, one called before optimization of WHERE clause
      and another after this optimization. When the second function was called for
      a degenerated jtbm semi join equalities connecting the subselect and
      the parent select were created but invocation of fix_fields() for these
      equalities was missing.
      2a3d3e05
  13. 25 Jul, 2018 2 commits
  14. 24 Jul, 2018 5 commits
  15. 23 Jul, 2018 4 commits
    • Jacob Mathew's avatar
      MDEV-15786: ERROR 1062 (23000) at line 365: Duplicate entry 'spider' for key 'PRIMARY' · 45ab00f0
      Jacob Mathew authored
      The problem occurs on Ubuntu where a Spider package is installed on the system
      separately from the MariaDB package.  MariaDB and Spider upgrades leave the
      Spider plugin improperly installed.  Spider is present in the mysql.plugin
      table but is not present in information_schema.
      
      The problem has been corrected in Spider's installation script.  Logic has
      been added to check for Spider entries in both information_schema and
      mysql.plugin.  If Spider is present in mysql.plugin but is not present in
      information_schema, then Spider is first removed from mysql.plugin.  The
      subsequent plugin install of Spider will insert entries in both mysql.plugin
      and information_schema.
      
      Author:
        Jacob Mathew.
      
      Reviewer:
        Kentoku Shiba.
      
      Cherry-Picked:
        Commit 0897d81 on branch bb-10.3-MDEV-15786
      45ab00f0
    • Jacob Mathew's avatar
      MDEV-15786: ERROR 1062 (23000) at line 365: Duplicate entry 'spider' for key 'PRIMARY' · a86a02a8
      Jacob Mathew authored
      The problem occurs on Ubuntu where a Spider package is installed on the system
      separately from the MariaDB package.  MariaDB and Spider upgrades leave the
      Spider plugin improperly installed.  Spider is present in the mysql.plugin
      table but is not present in information_schema.
      
      The problem has been corrected in Spider's installation script.  Logic has
      been added to check for Spider entries in both information_schema and
      mysql.plugin.  If Spider is present in mysql.plugin but is not present in
      information_schema, then Spider is first removed from mysql.plugin.  The
      subsequent plugin install of Spider will insert entries in both mysql.plugin
      and information_schema.
      
      Author:
        Jacob Mathew.
      
      Reviewer:
        Kentoku Shiba.
      
      Cherry-Picked:
        Commit 0897d81 on branch bb-10.3-MDEV-15786
      a86a02a8
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · f418661e
      Marko Mäkelä authored
      f418661e
    • Marko Mäkelä's avatar
      row_purge_poss_sec(): Add debug instrumentation · 9d1f3bf2
      Marko Mäkelä authored
      This helped fix MDEV-16779.
      9d1f3bf2