Skip to content
Snippets Groups Projects
  1. Aug 19, 2021
    • Mergen Imeev's avatar
      sql: check argument types of sum(), avg(), total() · 6060958c
      Mergen Imeev authored
      This patch enables static and dynamic type check for aggregate functions
      SUM(), AVG() and TOTAL().
      
      Part of #6105
      6060958c
    • Mergen Imeev's avatar
      sql: fix result type of min() and max() functions · 0f144350
      Mergen Imeev authored
      Prior to this, the patch functions MIN(), MAX(), LEAST() and GREATEST()
      showed SCALAR as result types in metadata. However, in reality, the type
      of the result could be any scalar type. After this patch, the type of
      the result will always be the same as the type in the metadata. Also,
      for MIN() and MAX() functions, the type of the result will be the same
      as the type of the argument. For the LEAST() and GREATEST() functions,
      the result type will be the same as the type of the arguments if all
      arguments are of the same type, or it will be NUMBER if all arguments
      are of numeric types, or it will be SCALAR.
      
      Part of #6105
      0f144350
    • Mergen Imeev's avatar
      sql: enable types checking for some functions · 33d80c8c
      Mergen Imeev authored
      This patch enables static and dynamic type checks for functions that do
      not need any rework.
      
      Part of #6105
      33d80c8c
    • Mergen Imeev's avatar
      sql: runtime type check for SQL built-in functions · c7ceda03
      Mergen Imeev authored
      This patch introduces a runtime type checking mechanism for SQL built-in
      functions. However, it is currently disabled as the functions themselves
      need to be prepared for such changes.
      
      Part of #6105
      c7ceda03
    • Mergen Imeev's avatar
      sql: static type check for SQL built-in functions · 8f66f6b0
      Mergen Imeev authored
      This patch introduces a static type checking mechanism for SQL built-in
      functions. However, it is currently disabled as the functions themselves
      need to be prepared for such changes.
      
      Part of #6105
      8f66f6b0
    • Mergen Imeev's avatar
      sql: check number of arguments during parsing · 969c3ba5
      Mergen Imeev authored
      Prior to this patch, the number of arguments for functions with a
      variable number of arguments was checked at runtime. After this patch,
      it will be checked during parsing. For functions with a constant number
      of arguments, it is always checked during parsing.
      
      Part of #6105
      969c3ba5
    • Mergen Imeev's avatar
      sql: rework SQL built-in functions hash table · bcbbb6e6
      Mergen Imeev authored
      Currently, the SQL built-in hash table contains one already defined
      implementation for each SQL built-in function. This is rather
      inconvenient because some built-in SQL functions can accept arguments of
      more than one type, and the type of the result can depend on the types
      of the arguments. In addition, the number of arguments can be variable
      for some built-in SQL functions. For these reasons, we are forced to
      check the number of arguments and their type at runtime. To make it
      possible to check types of arguments and their number during parsing,
      the hash table has been modified so that functions can now have more
      than one implementation.
      
      Part of #6105
      bcbbb6e6
    • Mergen Imeev's avatar
      sql: modify signature of TRIM() · d47204a1
      Mergen Imeev authored
      This patch changes the signature of SQL built-in function TRIM(). This
      gives us an easier way to check the types of the arguments to this
      function. Additionally, these changes fix a bug where using TRIM with
      the BOTH, LEADING, or TRAILING keywords would result in a loss of a
      collation.
      
      Needed for #6105
      Closes #6299
      d47204a1
    • VitaliyaIoffe's avatar
      github-ci: hotfix for updating S3 in CI · ffec0de3
      VitaliyaIoffe authored
      Follow-up #6185
      ffec0de3
    • Mergen Imeev's avatar
      sql: add changelog for introducing DECIMAL · bd938bb9
      Mergen Imeev authored
      bd938bb9
    • Mergen Imeev's avatar
      sql: fix quote() function · 62d622f8
      Mergen Imeev authored
      After this patch SQL built-in function QUOTE() will return the argument
      in case DOUBLE value is given. If the argument is not number, string
      representation of the argument will be returned.
      
      Closes #6239
      
      @TarantoolBot document
      Title: QUOTE() and DOUBLE argument
      
      After this patch function QUOTE() will return argument in case it
      receives DOUBLE value as an argument. The same for all other numeric
      types. In case it was given value of non-numeric type, it will return
      string representation of the argument.
      62d622f8
    • VitaliyaIoffe's avatar
      github-ci: enable publish pre-release tags · 73bf6a66
      VitaliyaIoffe authored
      New release policy defines pre-release tags: *-alpha*, *-beta*, *-rc*.
      Packages with these tags must be published to pre-release folder in
      the S3 repo. Was added PRERELEASE_REPO_S3_DIR path to all workflows with
      packaging *.rpm and *.deb and fixed conditions for updating the S3 repo.
      
      Needs for: #6185
      73bf6a66
    • VitaliyaIoffe's avatar
      github-ci: publishing packages to series repo · db1b854e
      VitaliyaIoffe authored
      New release policy provides new rules for publishing packages.
      Now, only major version is defining bucket repo, for more convenience
      use next naming series-<MAJOR_VERSION>.
      
      Needs for: #6185
      db1b854e
    • VitaliyaIoffe's avatar
      github-ci: LIVE packages is no longer supported · c4ab1cf4
      VitaliyaIoffe authored
      According to the new release policy live packages are not allowed.
      Only releases and pre-releases would be published to the S3.
      
      Needs for: #6185
      c4ab1cf4
    • Igor Munkin's avatar
      test: enable all LuaJIT tests for M1 · 202a7f63
      Igor Munkin authored
      
      This patch enables all tests in tarantool/luajit to be run in CI, since
      all issues found with them are finally resolved in scope of the commit
      847b096e ('luajit: bump new version').
      
      Follows up #6098
      Follows up tarantool/tarantool-qa#120
      
      Reviewed-by: default avatarSergey Kaplun <skaplun@tarantool.org>
      Reviewed-by: default avatarVitaliia Ioffe <v.ioffe@tarantool.org>
      Signed-off-by: default avatarIgor Munkin <imun@tarantool.org>
      202a7f63
    • Igor Munkin's avatar
      luajit: bump new version · 847b096e
      Igor Munkin authored
      * ARM64: Fix exit stub patching.
      * arm64: fix cur_L restoration on error throw
      
      Closes #6098
      Closes #6189
      Part of #5629
      Relates to #6323
      Follows up #1516
      847b096e
    • Igor Munkin's avatar
      Add changelog entries for gh-4617 and gh-6248 · 1fe5a2e6
      Igor Munkin authored
      
      This patch adds changelog entry for commit
      027775ff ('lua: refactor
      port_lua_do_dump and encode_lua_call').
      
      Follows up #6248
      Follows up #4617
      
      Signed-off-by: default avatarIgor Munkin <imun@tarantool.org>
      1fe5a2e6
    • Igor Munkin's avatar
      Add changelog entries for gh-6224 and gh-6227 · d204e9d3
      Igor Munkin authored
      
      This patch adds changelog entry for commit
      ba5398c7 ('luajit: bump new version').
      
      Follows up #6224
      Follows up #6227
      
      Signed-off-by: default avatarIgor Munkin <imun@tarantool.org>
      d204e9d3
    • Mergen Imeev's avatar
      sql: introduce decimal to arithmetic · 482c016e
      Mergen Imeev authored
      This patch introduces arithmetic for DECIMAL in SQL. After this patch,
      DECIMAL values can participate in arithmetic along with INTEGER,
      UNSIGNED, DOUBLE, and other DECIMAL values.
      
      Part of #4415
      482c016e
    • Mergen Imeev's avatar
      sql: introduce cast for decimal · e93769f5
      Mergen Imeev authored
      This patch introduces implicit and explicit cast of the DECIMAL field in
      SQL. Implicit cast to and from DECIMAL is precise. Explicit conversion
      to decimal and back could lead to loss of precision.
      
      Part of #4415
      e93769f5
    • Mergen Imeev's avatar
      sql: introduce field type decimal · ada186d6
      Mergen Imeev authored
      This patch introduces a decimal field type. However, implicit and
      explicit casts and arithmetic operations for this type will be presented
      in next few patches. Literals also will be introduced later.
      
      Part of #4415
      ada186d6
    • Mergen Imeev's avatar
      decimal: introduce decimal_is_neg() · f9ff3b1f
      Mergen Imeev authored
      This patch introduces function decimal_is_neg() which checks that
      decimal is less than zero.
      
      Needed for #4415
      f9ff3b1f
  2. Aug 18, 2021
    • Egor Elchinov's avatar
      txm: rebind read trackers of rollbacked txns · 6c990a7b
      Egor Elchinov authored
      RW transactions used to commit without problems after rollback
      of transactions holding stories responsible to track their reads.
      That behaviour led to unserializable results.
      This patch fixes this problem.
      
      Closes #6325
      6c990a7b
    • mechanik20051988's avatar
      lua: fix several possibility crashes in lua triggers implementation. · f2f91129
      mechanik20051988 authored
      There are two cases in lua trigger implementation, which leads
      to access to freed memory: if trigger removes itself and if
      trigger yields and someone destroy it. These problems was fixed
      by remembering the necessary fields from the trigger structure
      in local variables before calling trigger function.
      
      Closes #6266
      f2f91129
    • Mergen Imeev's avatar
      sql: fix comparison with SCALAR value · bd320d3d
      Mergen Imeev authored
      After this patch, SCALAR values will be able to be compared with values
      of any other scalar type. The comparison will be done according to the
      SCALAR rules, which means boolean values < numeric values < string
      values < binary values < uuid values.
      
      Closes #6221
      
      @TarantoolBot document
      Title: SCALAR and NUMBER values in SQL
      
      SCALAR values can now be compared with values of any other scalar type,
      but cannot be implicitly cast to any other scalar type. This means that
      SCALAR values cannot participate in arithmetic, bitwise operations,
      concatenation, or functions that, by definition, do not accept SCALAR
      values.
      
      NUMBER values now also cannot be implicitly cast to any other numeric
      type, which means that NUMBER values cannot participate in arithmetic
      and bitwise operations, or in functions that, by definition, do not
      accept NUMBER values.
      bd320d3d
    • Mergen Imeev's avatar
      sql: disallow concatination for SCALAR · bb5183fe
      Mergen Imeev authored
      Part of #6221
      bb5183fe
    • Mergen Imeev's avatar
      sql: disallow bitwise for NUMBER and SCALAR · 6458b475
      Mergen Imeev authored
      Part of #6221
      6458b475
    • Mergen Imeev's avatar
      sql: disallow arithmetic for NUMBER and SCALAR · 16a61457
      Mergen Imeev authored
      This patch disallows arithmetic operations for SCALAR and NUMBER values.
      It also corrects the description of the error that is generated when an
      inappropriate value participates in an arithmetic operation.
      
      Part of #6221
      16a61457
    • Mergen Imeev's avatar
      sql: disallow implicit cast from NUMBER and SCALAR · 2d8f10fc
      Mergen Imeev authored
      This patch disallows implicit cast during INSERT and UPDATE from SCALAR
      to any other scalar types and from NUMBER to any other numeric types.
      
      Part of #6221
      2d8f10fc
    • Mergen Imeev's avatar
      sql: re-introduce NUMBER and SCALAR meta-types · 666cbe5d
      Mergen Imeev authored
      This patch re-introduces the NUMBER and SCALAR meta-types. They were
      introduced some time ago, however there were some problems with how they
      worked and some properties of these meta-types were not implemented.
      
      New properties of meta-type SCALAR in SQL:
      1) typeof() with SCALAR argument returns "scalar";
      2) Any value of any scalar type can be implicitly cast to SCALAR;
      3) SCALAR values can be compared with any value of any other scalar
         type;
      4) SCALAR values cannot be implicitly cast to any other scalar type;
      5) SCALAR values cannot participate in arithmetic or bitwise
         operations;
      6) SCALAR values cannot be concatenated with other values.
      
      New properties of meta-type NUMBER in SQL:
      1) typeof() with NUMBER argument returns "number";
      2) Any value of a numeric type can be implicitly cast to NUMBER;
      3) NUMBER values can be implicitly cast to SCALAR;
      4) NUMBER cannot be implicitly cast to any other numeric type;
      5) NUMBER values cannot participate in arithmetic or bitwise
         operations;
      
      This patch only applies 1) and 2) for both meta-types. All other
      properties will be presented in the next patches.
      
      Part of #6221
      666cbe5d
    • Mergen Imeev's avatar
      sql: remove enum field_type from struct Mem · 35e36b92
      Mergen Imeev authored
      This patch removes the enum field_type from the struct MEM since the
      only place where this field was used is in the typeof() function. After
      this patch, typeof() will return "NULL" if it receives NULL. Prior to
      this patch, the field type was returned if it was set, otherwise it was
      returned "boolean". Another reason for the removal was that field_type
      was quite volatile and could change in unexpected places.
      
      Also, this patch made another change: values of the field type NUMBER
      will now be processed by the typeof() as INTEGER or DOUBLE, depending
      on the storage type. However, this will be fixed in the next patch.
      
      Part of #5956
      Needed for #6221
      35e36b92
    • Mergen Imeev's avatar
      sql: define ephemeral space fields · d61f39a0
      Mergen Imeev authored
      Prior to this patch, most ephemeral space fields were defined using the
      SCALAR type. After this patch, almost all fields will be properly
      defined. However, there are still cases where SCALAR will be set by
      default. For example, in IN, where rules is still not defined (#4692).
      Another example is when a field is not resolved because of a too complex
      query.
      
      Part of #6213
      d61f39a0
    • Mergen Imeev's avatar
      sql: rename some sql_ephemeral_space_* functions · 6c181b60
      Mergen Imeev authored
      This patch renames sql_ephemeral_space_new() to sql_template_space_new()
      and sql_ephemeral_space_def_new() to sql_template_space_def_new(). The
      objects created by these functions are not really ephemeral space or
      space_def and have a single purpose - to create a "template" space that
      will be used later when creating real space.
      
      Needed for #6213
      6c181b60
    • Yaroslav Dynnikov's avatar
      lua: return back table.new() method · 8272a6c7
      Yaroslav Dynnikov authored
      Import of `table.new` module was removed as a part of net.box
      refactoring in commit 954194a1.
      The `table.new` method became unavailable in Tarantool.
      
      This commit returns it back and adds a corresponding regression test.
      
      Closes #6330
      8272a6c7
    • Aleksandr Lyapunov's avatar
      test: fix a typo in test · 09474a94
      Aleksandr Lyapunov authored
      Fix option argument in user.grant function
      09474a94
    • Nikita Pettik's avatar
      txm: abort only alive transactions on DDL preparation · 39f0c31f
      Nikita Pettik authored
      It makes sense to abort only in-progress transactions while we are going
      to abort all transactions on DDL TX preparation step. Already prepared,
      committed or aborted transactions turn out to be uninteresting for us.
      
      Follow-up #5998
      39f0c31f
    • Mons Anderson's avatar
      luarocks: Set FORCE_CONFIG=false in hardcoded config · 5bbe88cd
      Mons Anderson authored
      FORCE_CONFIG=true is preventing local .rocks/config-5.1.lua from loading.
      Local config is often used to populate rocks_servers with own rocks servers and with original luarocks
      
      This patch changes FORCE_CONFIG to true in generated luarocks.core.hardcoded to allow using
      project-side config-5.1.lua for luarocks configuration to avoid dirty and ugly hacks
      5bbe88cd
    • Egor Elchinov's avatar
      test: fix test for fiber.top under arm · 366ab263
      Egor Elchinov authored
      fiber.top testing used to be broken under arm platforms because of the
      assumption that fiber.top functionality must be enabled at build time.
      This patch modifies the test for this case.
      
      Follow-up #6272
      366ab263
    • Egor Elchinov's avatar
      build: disable backtraces on arm · 94925b53
      Egor Elchinov authored
      MacOS has its own libunwind which works not good with fibers
      under M1. Backtraces need to be enabled again after #6060 is fixed.
      Other arm backtraces are temporarily disabled too for #6222.
      
      Closes #6272
      94925b53
    • EvgenyMekhanik's avatar
      test: disable checking the complete requests processing. · 7eac5d20
      EvgenyMekhanik authored
      Currently, when calling 'close' method for connection,
      unsent requests are lost. Disable appropriate check until
      corresponding (#6338) issue will be resolved.
      7eac5d20
Loading