An error occurred fetching the project authors.
  1. 03 Jun, 2018 1 commit
    • Eugene Kosov's avatar
      MDEV-15991 Server crashes in setup_on_expr upon calling SP or function... · 748ef3ec
      Eugene Kosov authored
      MDEV-15991 Server crashes in setup_on_expr upon calling SP or function executing DML on versioned tables
      
      Do not try to set versioning conditions on every SP call. It may work
      incorrectly, but it's a general bug described in MDEV-774.
      This patch makes system versioning stuff consistent with other code and
      also fixes a use-after-free bug.
      
      Closes #756
      748ef3ec
  2. 15 May, 2018 1 commit
    • Alexander Barkov's avatar
      MDEV-16094 Crash when using AS OF with a stored function · 46be3198
      Alexander Barkov authored
      MDEV-16100 FOR SYSTEM_TIME erroneously resolves string user variables as transaction IDs
      
      Problem:
      
      Vers_history_point::resolve_unit() tested item->result_type() before
      item->fix_fields() was called.
      
      - Item_func_get_user_var::result_type() returned REAL_RESULT by default.
        This caused MDEV-16100.
      - Item_func_sp::result_type() crashed on assert.
        This caused MDEV-16094
      
      Changes:
      1. Adding item->fix_fields() into Vers_history_point::resolve_unit()
         before using data type specific properties of the history point
         expression.
      
      2. Adding a new virtual method Type_handler::Vers_history_point_resolve_unit()
      
      3. Implementing type-specific
         Type_handler_xxx::Type_handler::Vers_history_point_resolve_unit()
          in the way to:
          a. resolve temporal and general purpose string types to TIMESTAMP
          b. resolve BIT and general purpose INT types to TRANSACTION
          c. disallow use of non-relevant data type expressions in FOR SYSTEM_TIME
      
          Note, DOUBLE and DECIMAL data types are disallowed intentionally.
          - DOUBLE does not have enough precision to hold huge BIGINT UNSIGNED values
          - DECIMAL rounds on conversion to INT
          Both lack of precision and rounding might potentionally lead to
          very unpredictable results when a wrong transaction ID would be chosen.
          If one really wants dangerous use of DOUBLE and DECIMAL, explicit CAST
          can be used:
      
            FOR SYSTEM_TIME AS OF CAST(double_or_decimal AS UNSIGNED)
      
          QQ: perhaps DECIMAL(N,0) could still be allowed.
      
      4. Adding a new virtual method Item::type_handler_for_system_time(),
         to make HEX hybrids and bit literals work as TRANSACTION rather
         than TIMESTAMP.
      
      5. sql_yacc.yy: replacing the rule temporal_literal to "TIMESTAMP TEXT_STRING".
         Other temporal literals now resolve to TIMESTAMP through the new
         Type_handler methods. No special grammar needed. This removed
         a few shift/resolve conflicts.
         (TIMESTAMP related conflicts in "history_point:" will be removed separately)
      
      6. Removing the "timestamp_only" parameter from
         vers_select_conds_t::resolve_units() and Vers_history_point::resolve_unit().
         It was a hint telling that a table did not have any TRANSACTION-aware
         system time columns, so it's OK to resolve to TIMESTAMP in case of uncertainty.
         In the new reduction it works as follows:
         - the decision between TIMESTAMP and TRANSACTION is first made
           based only on the expression data type only
         - then, in case if the expression resolved to TRANSACTION, the table
           is checked if TRANSACTION-aware columns really exist.
         This way is safer against possible ALTER TABLE statements changing
         ROW START and ROW END columns from "BIGINT UNSIGNED" to "TIMESTAMP(x)"
         or the other way around.
      46be3198
  3. 12 May, 2018 2 commits
  4. 10 Apr, 2018 1 commit
    • Sergei Golubchik's avatar
      MDEV-15391 Server crashes in JOIN::fix_all_splittings_in_plan or Assertion... · a4251d6f
      Sergei Golubchik authored
      MDEV-15391 Server crashes in JOIN::fix_all_splittings_in_plan or Assertion `join->best_read < double(1.79...e+308L)' failed
      
      vers_setup_conds() used to AND all conditions on row_start/row_end
      columns and store it either in the WHERE clause or in the ON
      clause for some table. In some cases this caused ON clause
      to have conditions for tables that aren't part of that ON's join.
      
      Fixed to put a table's condition always in the ON clause of the
      corresponding table.
      
      Removed unnecessary ... `OR row_end IS NULL` clause, it's not needed
      in the ON clause.
      
      Simplified handling on PS and SP.
      a4251d6f
  5. 23 Feb, 2018 3 commits
  6. 12 Jan, 2018 1 commit
  7. 09 Jan, 2018 3 commits
    • Sergei Golubchik's avatar
      rename system_time columns · b85efdc3
      Sergei Golubchik authored
      sys_trx_start -> row_start
      sys_trx_end -> row_end
      b85efdc3
    • Sergei Golubchik's avatar
      SQL: error messages · 35b679b9
      Sergei Golubchik authored
      remove unused error messages
      reword ER_VERS_SYS_FIELD_NOT_HIDDEN->ER_VERS_SYS_FIELD_EXISTS
      35b679b9
    • Sergei Golubchik's avatar
      SQL: derived, hiding, error messages · e6a74576
      Sergei Golubchik authored
      Many related changes.
      
      Note that AS OF condition must always be pushed down to physical tables,
      it cannot be applied to a derived or a view. Thus:
      
      * no versioning for internal temporary tables, they can never store
        historical data.
      * remove special versioning code from mysql_derived_prepare and
        remove ER_VERS_DERIVED_PROHIBITED - derived can have no historical
        data and cannot be prohibited for system versioning related reasons.
      * do not expand select list for derived/views with sys vers fields,
        derived/views can never have historical data.
      * remove special invisiblity rules for sys vers fields, they are no
        longer needed after the previous change
      * remove system_versioning_hide, it lost the meaning after the
        previous change.
      * remove ER_VERS_SYSTEM_TIME_CLASH, it's no "clash", the inner
        AS OF clause always wins.
      * non-versioned fields in a historical query
      
      reword the warning text, downgrade to note, don't
      replace values with NULLs
      e6a74576
  8. 19 Dec, 2017 2 commits
  9. 18 Dec, 2017 1 commit
    • Aleksey Midenkov's avatar
      Timestamp-based versioning for InnoDB [closes #209] · b55a1491
      Aleksey Midenkov authored
      * Removed integer_fields check
      * Reworked Vers_parse_info::check_sys_fields()
      * Misc renames
      * versioned as vers_sys_type_t
      
      * Removed versioned_by_sql(), versioned_by_engine()
      
      versioned() works as before;
      versioned(VERS_TIMESTAMP) is versioned_by_sql();
      versioned(VERS_TRX_ID) is versioned_by_engine().
      
      * create_tmp_table() fix
      * Foreign constraints for timestamp-based
      * Range auto-specifier fix
      * SQL: 1-row partition rotation fix [fixes #260]
      * Fix 'drop system versioning, algorithm=inplace'
      b55a1491
  10. 15 Dec, 2017 1 commit
  11. 14 Dec, 2017 3 commits
  12. 13 Dec, 2017 1 commit
  13. 08 Dec, 2017 2 commits
  14. 05 Dec, 2017 3 commits
  15. 03 Dec, 2017 1 commit
  16. 30 Nov, 2017 2 commits
  17. 18 Aug, 2017 1 commit
  18. 08 Aug, 2017 1 commit
  19. 03 Aug, 2017 1 commit
  20. 12 Jul, 2017 1 commit
  21. 03 Jul, 2017 1 commit
  22. 05 May, 2017 7 commits