Skip to content
Snippets Groups Projects
  1. Nov 16, 2021
    • Vladislav Shpilevoy's avatar
      error: introduce error_payload · 2a9f0ab0
      Vladislav Shpilevoy authored
      It is a dictionary-like struct which stores keys with binary data
      values. The values are supposed to be arbitrary MessagePack blobs:
      number, string, bool, UUID, array, map, anything.
      
      The payload is an array inside instead of a hash table because
      number of keys will be <= 3 in all cases. And even when it will be
      public, it is very unlikely it will be bigger.
      
      Object of error_payload in a future patch will be stored in struct
      error and will allow to extend it dynamically with more members.
      
      This in turn is needed to extend ER_READONLY error with more
      details about why it happened.
      
      Part of #5568
      Part of #4907
      2a9f0ab0
    • Vladislav Shpilevoy's avatar
      uuid: move into libcore · 1a812213
      Vladislav Shpilevoy authored
      libuuid used to be a separate library since
      de11d68a ("CMake: refactor
      dependencies of internal libraries").
      
      Unclear what was it done for. The commit says "fir unit tests".
      But they perfectly fine can depend on libcore like many of them
      do already.
      
      Because of libuuid being a separate library, libcore can't use
      tt_uuid, because that would be a cyclic dependency. And that won't
      allow to introduce tt_uuid-dependent API in a next patch.
      
      Hence libuuid is merged into libcore.
      
      Needed for #5568
      1a812213
    • Vladislav Shpilevoy's avatar
      diag: return created error from diag_set() · d77232d7
      Vladislav Shpilevoy authored
      And from diag_add(). This will be helpful not to bother with
      box_error_last() and diag_last_error(diag_get()) in the future
      patch. It will change some attributes of a just created
      ER_READONLY error to add more details.
      
      Part of #5568
      d77232d7
  2. Nov 15, 2021
    • Vladislav Shpilevoy's avatar
      test: fix watcher unit test duplicate symbol · 50d5807e
      Vladislav Shpilevoy authored
      Watcher unit test linked with libbox and included
      core_test_utils.c. Both contain cord_on_yield() symbol.
      
      It is defined as a stub in core_test_utils and checks being inside
      of GC in libbox.
      
      Somehow it managed to link all this time just fine. And moreover
      the linker selected the correct symbol - the one from
      core_test_utils.
      
      But while making another patch (not submitted yet), some other
      unit test was changed a bit and the watcher unit test link stage
      started failing with 'cord_on_yield()' duplicate symbol.
      
      The patch drops core_test_utils from the test and makes it work
      with libbox correctly. To support that the test now needs to
      initialize the global Lua state.
      50d5807e
    • Georgy Moiseev's avatar
      rpm: actualize changelog · 0e83f330
      Georgy Moiseev authored
      Actualize changelog based on GitHub release pages changelogs. Some
      entries were skipped since they are not relevant to modern packages.
      Versions 1.8.1 and 2.0.4 changelogs were merged to 2.1.1 changelog.
      
      Closes #6397
      0e83f330
    • Georgy Moiseev's avatar
      debian: actualize changelog · 069ff078
      Georgy Moiseev authored
      Actualize changelog based on GitHub release pages changelogs. Some
      entries were skipped since they are not relevant to modern packages.
      Versions 1.8.1 and 2.0.4 changelogs were merged to 2.1.1 changelog.
      
      Part of #6397
      069ff078
    • Yaroslav Lobankov's avatar
      ci: add integration check for expirationd module · 1ac382f2
      Yaroslav Lobankov authored
      This patch extends the 'integration.yml' workflow and adds a new
      workflow call for running tests to verify integration between tarantool
      and the expiration module.
      
      Part of #5265
      Part of #6056
      Closes #6528
      1ac382f2
  3. Nov 11, 2021
    • Vladimir Davydov's avatar
      test: fix flaky wal_off/snapshot_stress test · e0e6fe10
      Vladimir Davydov authored
      This commit fixes the following failure:
      
      ```
      [028] --- wal_off/snapshot_stress.result	Fri Jun  5 06:49:36 2020
      [028] +++ wal_off/snapshot_stress.reject	Fri Oct 16 13:48:23 2020
      [028] @@ -375,7 +375,7 @@
      [028]  ...
      [028]  snaps_find_status;
      [028]  ---
      [028] -- snaps found
      [028] +- where are my snapshots?
      [028]  ...
      [028]  snapshot_check_failed = false
      [028]  while #snaps > initial_snap_count do
      [028]
      ```
      
      It happens, because the fiber making snapshots is started after worker
      fibers and it works until all worker fibers are done so it might occur
      that it doesn't make any snapshots. Fix this by replacing the while-loop
      with a repeat-loop, thus ensuring that the worker fiber makes at least
      one snapshot.
      
      Closes #5431
      e0e6fe10
    • Vladimir Davydov's avatar
      coio: convert to C · 97457a39
      Vladimir Davydov authored
      Just need to replace scoped guards with labels and add struct keyword to
      the sockaddr types.
      
      While we are at it, replace malloc with xmalloc in coio_fill_addrinfo -
      we don't check if the returned valued is NULL anyway.
      97457a39
    • Vladimir Davydov's avatar
      coio: don't raise in I/O functions · d2f79c3a
      Vladimir Davydov authored
      There are just a few places outside coio.cc and coio_buf.h where these
      functions are used directly (most users use helpers from coio_buf.h or
      xrow_io.h): popen, console, applier.
      
      This is a step towards conversion of coio to C.
      d2f79c3a
    • Vladimir Davydov's avatar
      coio: don't raise in misc functions · f1a6a5a0
      Vladimir Davydov authored
      This commit makes coio_stat_stat_timeout, coio_waitpid, and
      coio_service_start exception-free. None of the functions is used
      anywhere in the code except for tests.
      
      This is a step towards conversion of coio to C.
      f1a6a5a0
    • Vladimir Davydov's avatar
      coio: don't raise in coio_connect and coio_accept · 9491fb83
      Vladimir Davydov authored
      Note, the only place where coio_connect is used is applier_connect,
      while coio_accept isn't used anywhere.
      
      This is needed to convert the net.box state machine to C.
      9491fb83
    • Vladimir Davydov's avatar
      coio: pass host and service instead of uri to coio_connect · 38f0af47
      Vladimir Davydov authored
      So that users that don't have an uri at hand can use it.
      
      This is needed to convert the net.box state machine to C.
      38f0af47
    • Mergen Imeev's avatar
      sql: introduce field type ANY · b8bd3138
      Mergen Imeev authored
      Closes #3174
      
      @TarantoolBot document
      Title: Field type ANY in SQL
      
      Properties of type ANY in SQL:
      1) typeof() with an argument of type ANY returns "any";
      2) any value of any type can be implicitly and explicitly cast to the ANY type;
      3) a value of type ANY cannot be implicitly cast to any other type;
      4) a value of type ANY cannot participate in arithmetic, bitwise, comparison,
         and concationation operations.
      b8bd3138
    • Mergen Imeev's avatar
      sql: use field_type_MAX instead of FIELD_TYPE_ANY · c112d5e8
      Mergen Imeev authored
      After this patch, the built-in SQL function implementation definitions
      will use field_type_MAX to indicate that they accept values of any type,
      instead of FIELD_TYPE_ANY.
      
      Part of #3174
      c112d5e8
    • Mergen Imeev's avatar
      sql: properly set INTEGER type in struct Expr · 6245fb49
      Mergen Imeev authored
      Prior to this patch, in some cases a struct Expr value with an opcode
      TK_INTEGER could have field type ANY. This patch sets such values to the
      INTEGER field type.
      
      Part of #3174
      6245fb49
    • Yaroslav Lobankov's avatar
      ci: add integration check for tarantool-php/queue · 5bcb0dcf
      Yaroslav Lobankov authored
      This patch extends the 'integration.yml' workflow and adds a new
      workflow call for running tests to verify integration between tarantool
      and the tarantool-php/queue connector.
      
      Part of #5265
      Part of #6056
      Closes #6595
      5bcb0dcf
    • Mergen Imeev's avatar
      sql: make arguments to be const · acf17cf9
      Mergen Imeev authored
      This patch forces SQL built-in function implementations to accept
      'const struct Mem *' instead of just 'struct Mem *'.
      
      Needed for #4145
      acf17cf9
    • Mergen Imeev's avatar
      sql: remove MEM_Term flag · 77011650
      Mergen Imeev authored
      This patch removes the MEM_Term flag, because after changes in the SQL
      built-in functions, this flag is no longer used.
      
      Needed for #4145
      77011650
    • Mergen Imeev's avatar
      sql: remove MEM_Dyn flag · 9d8f7426
      Mergen Imeev authored
      This patch removes the MEM_Dyn flag, because after changes in the SQL
      built-in functions, this flag is no longer used.
      
      Needed for #4145
      9d8f7426
    • Mergen Imeev's avatar
      sql: remove unused code · 2e578626
      Mergen Imeev authored
      Some of the code is no longer used after changes in the SQL built-in
      functions. This patch removes part of the unused code.
      
      Needed for #4145
      2e578626
    • Mergen Imeev's avatar
      sql: refactor QUOTE() function · 64d0eca3
      Mergen Imeev authored
      64d0eca3
    • Mergen Imeev's avatar
      sql: refactor REPLACE() function · c4c14886
      Mergen Imeev authored
      Part of #4145
      c4c14886
    • Mergen Imeev's avatar
      sql: refactor SOUNDEX() function · 9d5c18bc
      Mergen Imeev authored
      Part of #4145
      9d5c18bc
    • Mergen Imeev's avatar
      sql: refactor UNICODE() function · 7a39cd74
      Mergen Imeev authored
      Part of #4145
      7a39cd74
    • Mergen Imeev's avatar
      sql: refactor VERSION() function · 6231417b
      Mergen Imeev authored
      Part of #4145
      6231417b
    • Mergen Imeev's avatar
      sql: rework UUID() function · adbafbf6
      Mergen Imeev authored
      This patch refactors UUID() function. Also, UUID(NULL) now returns NULL.
      
      Part of #4145
      adbafbf6
    • Mergen Imeev's avatar
      sql: refactor ROW_COUNT() function · 2e9a687b
      Mergen Imeev authored
      Part of #4145
      2e9a687b
    • Mergen Imeev's avatar
      sql: refactor ROUND() function · 7c7dfa8c
      Mergen Imeev authored
      Part of #4145
      7c7dfa8c
    • Mergen Imeev's avatar
      sql: refactor TYPEOF() function · 58f24643
      Mergen Imeev authored
      Part of #4145
      58f24643
    • Mergen Imeev's avatar
      sql: refactor ZEROBLOB() function · 1fd34910
      Mergen Imeev authored
      Part of #4145
      1fd34910
    • Mergen Imeev's avatar
      sql: rework RANDOMBLOB() function · 6d3af755
      Mergen Imeev authored
      This patch refactors RANDOMBLOB() function. Also, RANDOMBLOB(0) now
      returns empty string.
      
      part of #4145
      6d3af755
    • Mergen Imeev's avatar
      sql: refactor RANDOM() function · bd8dda5d
      Mergen Imeev authored
      Part of #4145
      bd8dda5d
    • Mergen Imeev's avatar
      sql: refactor PRINTF() function · 64ba5f7e
      Mergen Imeev authored
      Part of #4145
      64ba5f7e
    • Mergen Imeev's avatar
      sql: refactor LENGTH() function · 5aaca568
      Mergen Imeev authored
      Part of #4145
      5aaca568
    • Mergen Imeev's avatar
      sql: refactor HEX() function · 738db982
      Mergen Imeev authored
      Part of #4145
      738db982
    • Mergen Imeev's avatar
      sql: refactor GREATEST() and LEAST() functions · ce80ccf4
      Mergen Imeev authored
      Part of #4145
      ce80ccf4
    • Mergen Imeev's avatar
      sql: rework CHAR() function · f57c661d
      Mergen Imeev authored
      The CHAR() function now uses the ICU macro to get characters.
      
      Part of #4145
      f57c661d
    • Mergen Imeev's avatar
      sql: refactor LIKE() function · 02bbaa95
      Mergen Imeev authored
      Part of #4145
      02bbaa95
    • Mergen Imeev's avatar
      sql: rework SUBSTR() function · e01a8ff2
      Mergen Imeev authored
      This patch makes SUBSTR() work according to ANSI rules for SUBSTRING()
      function. Also, SUBSTR() can now work correctly with large INTEGER
      values. The SUBSTR() syntax has not changed.
      
      Part of #4145
      
      @TarantoolBot document
      Title: SUBSTR() function
      
      SUBSTR() now works according to the ANSI rules for SUBSTRING().
      
      Rules for SUBSTR() with 2 arguments:
      1) let the first argument be VALUE, and the second argument be START;
      2) VALUE should be STRING or VARBINARY, START should be INTEGER;
      3) if any of arguments is NULL, NULL is returned;
      4) let POS be MAX(START - 1, 0), END be length of the VALUE;
      5) if POS >= END, the result is empty string;
      6) if POS < END, the result will be substring of VALUE, starting from
         the position POS to the position END.
      
      Rules for SUBSTR() with 3 arguments:
      1) let the first argument be VALUE, the second argument be START, and
         the third argument be LENGTH;
      2) VALUE should be STRING or VARBINARY, START and LENGTH should be
         INTEGERs;
      3) if any of arguments is NULL, NULL is returned;
      4) if LENGTH < 0, an error is thrown;
      5) let POS be MAX(START - 1, 0), END be START + LENGTH - 1;
      6) if POS >= END, the result is empty string;
      7) if POS < END, the result will be substring of VALUE, starting from
         the position POS to the position END.
      e01a8ff2
Loading