1. 06 Apr, 2018 1 commit
    • Monty's avatar
      Added CHECK_FIELD_EXPRESSION · 82305d7a
      Monty authored
      This is needed for MDEV 13679 Enabled sequences to be used in DEFAULT
      
      Added new option for count_cuted_fields: CHECK_FIELD_EXPRESSION
      which is used to check if a DEFAULT expression is correct before
      ALTER TABLE starts
      
      Changed also all test:
        if (thd->count_cuted_fields)
        to
        if (thd->count_cuted_fields > CHECK_FIELD_EXPRESSION)
      82305d7a
  2. 06 Mar, 2018 1 commit
  3. 28 Feb, 2018 1 commit
  4. 27 Feb, 2018 1 commit
    • Alexander Barkov's avatar
      MDEV-11952 Oracle-style packages: stage#5 · 5f7c764f
      Alexander Barkov authored
      Backporting from bb-10.2-compatibility to bb-10.2-ext
      
      Version: 2018-01-26
      
      - CREATE PACKAGE [BODY] statements are now
        entirely written to mysql.proc with type='PACKAGE' and type='PACKAGE BODY'.
      - CREATE PACKAGE BODY now supports IF NOT EXISTS
      - DROP PACKAGE BODY now supports IF EXISTS
      - CREATE OR REPLACE PACKAGE [BODY] is now supported
      - CREATE PACKAGE [BODY] now support the DEFINER clause:
      
          CREATE DEFINER user@host PACKAGE pkg ... END;
          CREATE DEFINER user@host PACKAGE BODY pkg ... END;
      
      - CREATE PACKAGE [BODY] now supports SQL SECURITY and COMMENT clauses, e.g.:
      
          CREATE PACKAGE p1 SQL SECURITY INVOKER COMMENT "comment" AS ... END;
      
      - Package routines are now created from the package CREATE PACKAGE BODY
        statement and don't produce individual records in mysql.proc.
      
      - CREATE PACKAGE BODY now supports package-wide variables.
        Package variables can be read and set inside package routines.
        Package variables are stored in a separate sp_rcontext,
        which is cached in THD on the first packate routine call.
      
      - CREATE PACKAGE BODY now supports the initialization section.
      
      - All public routines (i.e. declared in CREATE PACKAGE)
        must have implementations in CREATE PACKAGE BODY
      
      - Only public package routines are available outside of the package
      
      - {CREATE|DROP} PACKAGE [BODY] now respects CREATE ROUTINE and ALTER ROUTINE
        privileges
      
      - "GRANT EXECUTE ON PACKAGE BODY pkg" is now supported
      
      - SHOW CREATE PACKAGE [BODY] is now supported
      
      - SHOW PACKAGE [BODY] STATUS is now supported
      
      - CREATE and DROP for PACKAGE [BODY] now works for non-current databases
      
      - mysqldump now supports packages
      
      - "SHOW {PROCEDURE|FUNCTION) CODE pkg.routine" now works for package routines
      
      - "SHOW PACKAGE BODY CODE pkg" now works (the package initialization section)
      
      - A new package body level MDL was added
      
      - Recursive calls for package procedures are now possible
      
      - Routine forward declarations in CREATE PACKATE BODY are now supported.
      
      - Package body variables now work as SP OUT parameters
      
      - Package body variables now work as SELECT INTO targets
      
      - Package body variables now support ROW, %ROWTYPE, %TYPE
      5f7c764f
  5. 22 Feb, 2018 8 commits
  6. 21 Feb, 2018 12 commits
  7. 20 Feb, 2018 3 commits
  8. 19 Feb, 2018 13 commits
    • Galina Shalygina's avatar
      MDEV-14297: Lost name of a explicitly named CTE column used in · a128fe43
      Galina Shalygina authored
                  the non-recursive CTE via prepared statement
      
      The problem appears as the column names of the CTE were allocated on the
      wrong MEMROOT and after the preparation of the statement they disappear.
      
      To fix it in the procedure With_element::rename_columns_of_derived_unit
      the CTE column names are now allocated in the permanent MEMROOT for the
      prepared statements and stored procedures.
      a128fe43
    • Alexander Barkov's avatar
      MDEV-15340 Wrong result HOUR(case_expression_with_time_and_datetime) · aef530bb
      Alexander Barkov authored
      The problem was that Item_func_hybrid_field_type::get_date() did not
      convert the result to the correct data type, so MYSQL_TIME::time_type
      of the get_date() result could be not in sync with field_type().
      
      Changes:
      1. Adding two new classes Datetime and Date to store MYSQL_TIMESTAMP_DATETIME
         and MYSQL_TIMESTAMP_DATE values respectively
         (in addition to earlier added class Time, for MYSQL_TIMESTAMP_TIME values).
      2. Adding Item_func_hybrid_field_type::time_op().
         It performs the operation using TIME representation,
         and always returns a MYSQL_TIME value with time_type=MYSQL_TIMESTAMP_TIME.
         Implementing time_op() for all affected children classes.
      3. Fixing all implementations of date_op() to perform the operation
         using strictly DATETIME representation. Now they always return a MYSQL_TIME
         value with time_type=MYSQL_TIMESTAMP_{DATE|DATETIME},
         according to the result data type.
      4. Removing assignment of ltime.time_type to mysql_timestamp_type()
         from all val_xxx_from_date_op(), because now date_op() makes sure
         to return a proper MYSQL_TIME value with a good time_type (and other member)
      5. Adding Item_func_hybrid_field_type::val_xxx_from_time_op().
      6. Overriding Type_handler_time_common::Item_func_hybrid_field_type_val_xxx()
         to call val_xxx_from_time_op() instead of val_xxx_from_date_op().
      7. Modified Item_func::get_arg0_date() to return strictly a TIME value
         if TIME_TIME_ONLY is passed, or return strictly a DATETIME value otherwise.
         If args[0] returned a value of a different temporal type,
         (for example a TIME value when TIME_TIME_ONLY was not passed,
          or a DATETIME value when TIME_TIME_ONLY was passed), the conversion
         is automatically applied.
         Earlier, get_arg0_date() did not guarantee a result in
         accordance to TIME_TIME_ONLY flag.
      aef530bb
    • Hartmut Holzgraefe's avatar
    • Vladislav Vaintroub's avatar
      Revert "Fix 2 more VS2015 warnings" · 84e8e07e
      Vladislav Vaintroub authored
      This reverts commit 0ea45725,
      since it breaks clang
      84e8e07e
    • Vladislav Vaintroub's avatar
      Fix 2 more VS2015 warnings · 0ea45725
      Vladislav Vaintroub authored
      0ea45725
    • Marko Mäkelä's avatar
      MDEV-11581 follow-up fix: Correct a condition · 852c35f5
      Marko Mäkelä authored
      fsp_fill_free_list(): Correctly determine whether the temporary
      tablespace file should be extended in order to respond to a
      page allocation request. The inverted condition was noticed
      by Thiru when he analyzed MDEV-13013.
      852c35f5
    • Sergey Vojtovich's avatar
      MDEV-14318 - cmake updates to build on arm64 · 83b47134
      Sergey Vojtovich authored
      Added more files affected by GCC ICE:
      https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67143
      83b47134
    • Sergey Vojtovich's avatar
      MDEV-14541 - Workaround GCC ICE on ARM64 · b697f213
      Sergey Vojtovich authored
      Added missing include.
      b697f213
    • Monty's avatar
      Fix for MDEV-15105 (memory loss with LOCK sequence) · ef3147b1
      Monty authored
      MDEV 15105 "Bytes lost and Assertion `global_status_var.global_memory_used == 0' fails on shutdown after attempts
      to LOCK/RENAME sequence"
      ef3147b1
    • Monty's avatar
      Test case for MDEV-12887 (bug fixed long ago) · 06ba07c2
      Monty authored
      MDEV-12887 UT_LIST_GET_LEN(trx->lock.trx_locks) == 0 when mysqldump
      sequence
      06ba07c2
    • Marko Mäkelä's avatar
      Merge 10.2 into bb-10.2-ext · 278c0362
      Marko Mäkelä authored
      278c0362
    • Marko Mäkelä's avatar
      112cb561
    • Marko Mäkelä's avatar
      Cleanup after commit ac8e3c85 · 3c419fde
      Marko Mäkelä authored
      srv_conc_t::n_active: Correct the comment, and remove an
      assertion that trivially holds now that the type is unsigned.
      3c419fde