Skip to content
Snippets Groups Projects
  1. Jan 13, 2023
    • Vladimir Davydov's avatar
      net.box: add info about sequence to remote space object · 457b293c
      Vladimir Davydov authored
      A remote space object presented by a net.box connection mimics the API
      of a local space object presented by box.space. Currently, it misses
      information about sequences. Let's add it.
      
      Note, we have to handle the case when the recently introduced
      _vspace_sequence system space view is missing on the remote host.
      To check that this works correctly, we reuse the 2.10.4 test data
      created by commit 1c33484d ("box: add auth_history and
      last_modified fields to _user space"). We also add the 'gen.lua'
      that can be used to regenerated the data.
      
      Closes #7858
      
      NO_DOC=bug fix
      457b293c
    • Vladimir Davydov's avatar
      schema: create _vspace_sequence system space view · 06ee1134
      Vladimir Davydov authored
      Note, this patch will be backported to 2.10 so we add upgrade function
      for 2.10.5, not for 2.11.0.
      
      Needed for #7858
      
      @TarantoolBot document
      Title: Document `_space_sequence` and `_vspace_sequence` system spaces
      
      The `_space_sequence` system space was added long time ago (in 1.7.5)
      along with the `_sequence` and `_sequence_data` system spaces, but it
      was never documented. The space is used to attach sequences to spaces
      and has the following fields:
       1. 'id', type 'unsigned'. Space id.
       2. 'sequence_id', type 'unsigned'. Id of the attached sequence.
       3. 'is_generated', type 'boolean'. True if the sequence was created
          automatically (`space:create_index('pk', {sequence = true})`)
       4. 'field', type 'unsigned'. Id of the space field that is set using
          the attached sequence.
       5. 'path', type 'string'. Path to the data within the field that is set
          using the attached sequence.
      
      The `_vspace_sequence` is a system space view of the `_space_sequence`
      space that, like any other system space view, shows only rows accessible
      by the current user. It will be introduced in Tarantool 2.10.5.
      06ee1134
    • Vladimir Davydov's avatar
      box: fix collation strength upgrade · f1f8bc17
      Vladimir Davydov authored
      Since commit 85ebbcc0 ("box: reset system space formats for
      bootstrap"), it's illegal to use field names in the upgrade script.
      The commit missed one place: upgrade of collation strength. Fix it.
      
      NO_DOC=unreleased
      NO_CHANGELOG=unreleased
      NO_TEST=checked by upgrade script tests
      f1f8bc17
    • Aleksandr Lyapunov's avatar
      box: introduce options in box.atomic · 9d1cbda5
      Aleksandr Lyapunov authored
      If the first argument of box.atomic is a non-callable table then
      consider it as options table for box.begin{}.
      
      For test and debug purposes introduce internal getter of current
      transaction isolation level as box.internal.txn_isolation().
      
      Closes #7202
      
      @TarantoolBot document
      Title: Options in box.atomic
      
      Now it's allowed to pass transaction options in the first argument
      of box.atomic(..) call. The options must be a table, exactly as
      in box.begin(..). If options are passed as the first arguments,
      the second and the rest arguments are expected to be a functions
      and its arguments, like in usual box.atomic.
      9d1cbda5
    • Aleksandr Lyapunov's avatar
      txm: carefully handle conflict · 91d6d70f
      Aleksandr Lyapunov authored
      When a transaction is in read-confirmed state it must ignore all
      prepared changes, and if it actually ignores something - it must
      fall to read-view state.
      
      By a mistake the check relied not on actual skipping of a prepared
      statement, but on the fact that there is a deleting statement. That
      leads to excess conflicts for transactions with read-committed
      isolation level.
      
      Fix it by raising a conflict only if a deleting statement is skipped.
      
      Closes #8122
      Needed for #7202
      
      NO_DOC=bugfix
      91d6d70f
    • Aleksandr Lyapunov's avatar
      txm: free read lists of a transaction when it's prepared · ba8e00c0
      Aleksandr Lyapunov authored
      Read lists (read set and other similar lists) are used only for
      detecting a conflict when another transaction is committed.
      Once a transaction is prepared (no matter with success or not)
      those lists are no more needed. Moreover, in some part of code it
      is expected that there can be no read set of already prepared tx.
      
      So let's clean those lists once a transaction is prepared.
      
      Closes #7945
      
      NO_DOC=bugfix
      ba8e00c0
    • Aleksandr Lyapunov's avatar
      memtx: simplify check_dup function · a5dd48ed
      Aleksandr Lyapunov authored
      There ware two functions - check_dup_clean and check_dup_dirty.
      Merge them to one.
      
      Also extract phantom checks from check_dup and call them explicitly.
      That will additionally simplify check_dup and will allow to get rid
      of temporary conflict trackers - memtx_tx_conflict. Note that this
      kind of object will remain in memory monitoring by now. It will be
      removed later.
      
      No logical changes.
      
      Part of #8122
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      a5dd48ed
    • Aleksandr Lyapunov's avatar
      memtx: don't set unnecessary conflict · e6f5090c
      Aleksandr Lyapunov authored
      If a transaction writes to a gap that is tracked by some another
      transaction, the interval must be (usually) broken into parts,
      while new story must be explicitly added to the read set of
      reading transaction.
      
      Now both read tracker and conflict trackers are set in this case.
      But read tracker is enough in this case - when the writing tx
      is prepared it will conflict reading transaction, that's all we
      need.
      
      Let's leave only read tracker.
      
      Part of #8122
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      e6f5090c
    • Aleksandr Lyapunov's avatar
      memtx: split and simplify memtx_tx_story_is_visible · b6ef41ef
      Aleksandr Lyapunov authored
      Each story has two ends: the beginning and the end. For each
      transaction both ends of a story could be visible or not.
      
      Now there's a function that checks visibility of both ends of
      a story. It can distinguish three cases: both ends are visible,
      both ends are invisible, and the beginning is visible while the
      end is not. The function returns true in the first and the last
      cases; the actual case is clarified with an additional function
      argument - visible_tuple, which is set to null in one of the
      cases..
      
      Let's make two different functions for checking visibility of
      the beginning and the end of a story. Actually that is simple
      split of function into two parts. The visible_tuple argument
      will no longer be needed.
      
      No logical changes.
      
      Part of #8122
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      b6ef41ef
    • Aleksandr Lyapunov's avatar
      memtx: don't track read of own change · 8a565144
      Aleksandr Lyapunov authored
      There's no harm but also no sense in it.
      
      Part of #8122
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      8a565144
    • Aleksandr Lyapunov's avatar
      memtx: move memtx_tx logic to memtx_tx.c · 4cc04ca9
      Aleksandr Lyapunov authored
      Hide structures and functions that are not required for API.
      
      No logical changes.
      
      Part of #8122
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      4cc04ca9
    • Aleksandr Lyapunov's avatar
      memtx: always check for memtx_tx_manager_use_mvcc_engine flag · f4c56892
      Aleksandr Lyapunov authored
      Option memtx_tx_manager_use_mvcc_engine changes the behavior of
      transaction execution workflow. Usually that is implemented as
      direct check of memtx_tx_manager_use_mvcc_engine. But there are
      places in the code that rely on the fact that some pointers are
      set to not null if the engine is enabled. That's a bit confusing.
      
      Let's always check for memtx_tx_manager_use_mvcc_engine option
      when it's needed to determine which workflow must be executed.
      
      Note that checking of memtx_tx_manager_use_mvcc_engine option is
      more correct: in case of delete of nothing (delete statement when
      a tuple was not found by given key) all the pointers including
      old_tuple and new_tuple are null, while logically we still need
      to use mvcc execution workflow. Note also that in this case the
      mvcc engine does (and must do) almost nothing, so there was no
      bug in the previous behaviour.
      
      Part of #8122
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      f4c56892
    • Aleksandr Lyapunov's avatar
      memtx: fix comments and function names · 69479c89
      Aleksandr Lyapunov authored
      No logical changes.
      
      Part of #8122
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      69479c89
  2. Jan 12, 2023
    • Georgiy Lebedev's avatar
      coro: fix dereferencing of `void *` pointer warning · 97a3af1b
      Georgiy Lebedev authored
      Since the fiber function is not expected to return (i.e., the inline
      assembly is not expected to return), remove the dummy memory operand used
      to indicate that the memory pointed to by the inline assembly pointer
      operand is clobbered.
      
      Closes #8125
      
      NO_DOC=build diagnostic
      NO_CHANGELOG=build diagnostic
      NO_TEST=build diagnostic
      97a3af1b
    • Igor Munkin's avatar
      ci: change runner dispatch for LuaJIT testing · 1eb0a696
      Igor Munkin authored
      
      Before the patch the LuaJIT integration workflow was dispatched to the
      runner with the name given via <inputs.host> parameter. Unfortunately,
      as a result of runners renaming we can't continue to dispatch the
      workflow this way.
      
      As a result of the patch there are two new workflow parameters:
      <inputs.arch> to pass the host architecture name (i.e. x86_64 or ARM64)
      and <inputs.os> to pass the OS family name (either Linux or macOS).
      Considering two values we can choose the proper runner in LuaJIT
      integration workflow. Besides, this change bring LuaJIT CI closer to
      matrix usage for its integration workflow.
      
      All three workflow parameters are not obligatory for now to avoid
      tarantool/luajit CI break on both long-term and working branches. When
      all branches are rebased on the new approach, <inputs.host> parameter
      will be removed and both <inputs.arch> and <inputs.os> will become
      obligatory.
      
      Moreover, the new 'regular' label is also added to <runs-on> list, since
      the new "lightweight" runners have been introduced to ghacts-shared-*
      pool. There are a couple of LuaJIT tests that requires more memory than
      provided by "lightweight" runners, so only "regular" ones need to be
      chosen for LuaJIT integration testing.
      
      Last but not least: attentive reader might notice there are strange
      values used as a default for <inputs.host> as well as <inputs.arch> and
      <inputs.os>. This is ugly hack required for the transition period, since
      one can't use empty string or unknown label name within <runs-on> label
      list. Hence 'self-hosted' looks like the most robust option for both old
      and new behaviours.
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      Reviewed-by: default avatarYaroslav Lobankov <y.lobankov@tarantool.org>
      Signed-off-by: default avatarIgor Munkin <imun@tarantool.org>
      1eb0a696
    • Vladimir Davydov's avatar
      txn: drop TXN_CONFLICTED transaction status · 16f8969f
      Vladimir Davydov authored
      The status isn't used anywhere - to set the proper error when an aborted
      transaction is attempted to be used, we check out transaction flags
      (TXN_IS_CONFLICTED, TXN_IS_ABORTED_BY_YIELD, TXN_IS_ABORTED_BY_TIMEOUT).
      Let's use TXN_ABORTED instead.
      
      While we are at it, also set the transaction status to TXN_ABORTED when
      a transaction is aborted by yield or timeout and use it instead of
      checking flags where appropriate, since it's more convenient.
      
      Follow-up #8123
      
      NO_DOC=code cleanup
      NO_TEST=code cleanup
      NO_CHANGELOG=code cleanup
      16f8969f
    • Vladimir Davydov's avatar
      txn: fail ro stmt if transaction is aborted · 5f1500f4
      Vladimir Davydov authored
      We fail write statements if the current transaction was aborted by yield
      or timeout. We should fail read-only statements in this case, as well.
      Note, we already fail read-only statements if the current transaction
      was aborted by conflict.
      
      Closes #8123
      
      NO_DOC=bug fix
      5f1500f4
    • Alexander Turenko's avatar
      build: fix build fail on clang 15 · 1c6b6f85
      Alexander Turenko authored
      Fixed pthread-related CMake checks. The checks code is built with
      `-pedantic-errors` and it leads to errors of the following kind on
      clang 15:
      
      ```
      <...>/CMakeFiles/CMakeScratch/TryCompile-78KaOK/src.c:4:17: error: a
          function declaration without a prototype is deprecated in all
          versions of C [-Werror,-Wstrict-prototypes]
              int main() { pthread_setname_np(pthread_self(), ""); }
                      ^
                       void
      ```
      
      Fixed a warning in the SQL code (it's an error in Debug build):
      
      ```
      <...>/src/box/sql/vdbeaux.c:170:13: error: variable 'n' set but not used
          [-Werror,-Wunused-but-set-variable]
              static int n = 0;
      ```
      
      Fixed several warnings from lemon.c of the following kind:
      
      ```
      <...>/extra/lemon.c:173:6: warning: a function declaration without a
          prototype is deprecated in all versions of C and is treated as a
          zero-parameter prototype in C2x, conflicting with a subsequent
          definition [-Wdeprecated-non-prototype]
      void FindRulePrecedences();
           ^
      <...>/extra/lemon.c:766:6: note: conflicting prototype is here
      void FindRulePrecedences(struct lemon *xp)
      ```
      
      See also https://github.com/tarantool/small/issues/57
      
      Fixes #8110
      
      NO_DOC=build fix
      NO_TEST=build fix
      1c6b6f85
  3. Jan 11, 2023
  4. Jan 10, 2023
    • Alexander Turenko's avatar
      lua: speedup uri.unescape() · 6336dfa1
      Alexander Turenko authored
      Use an array to convert a hex digit into a number instead of
      `isdigit()` and `tolower()`.
      
      Eliminate the `isxdigit()` check by reusing the same array lookup.
      
      Results on perf/lua/uri_escape_unescape.lua show 2.4x average boost
      (from 2.1x to 2.5x).
      
      Noise in the results: 4% in baseline, 11% in the new version (the
      maximal difference between min and max results). The average
      linear/standard deviation is within 3%.
      
      Measured on i7-10510U, acpi-cpufreq driver (no intel_pstate),
      no TurboBoost, userspace governor, 1.80GHz, HyperThreading. The workload
      is bound to a single logical core using `taskset`.
      
      NO_DOC=no behavior change
      NO_TEST=no behavior change
      NO_CHANGELOG=the function is new and not yet released
      6336dfa1
    • Anna Balaeva's avatar
      ci: change macos runners labels · f991f7c0
      Anna Balaeva authored
      Change runner label 'macos-11' to 'macos-11-self-hosted' and 'macos-12'
      to 'macos-12-self-hosted' to distinguish between self-hosted and
      GitHub-hosted runners.
      We want to use only self-hosted macOS runners because of test-run problems
      with python3.11 on GitHub-hosted macOS runners.
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      f991f7c0
    • Vladimir Davydov's avatar
      xrow: fix crash in xrow_decode_error if msg contains printf specifiers · 19dcdd34
      Vladimir Davydov authored
      Closes #8043
      
      NO_DOC=bug fix
      19dcdd34
  5. Dec 29, 2022
    • Yaroslav Lobankov's avatar
      ci: fix pull_request trigger for coverage workflow · 182034dc
      Yaroslav Lobankov authored
      The coverage workflow is a part of the default testing, so there is no
      sense to run this workflow when the 'full-ci' label is set. Moreover, it
      cancelled the run of the default testing and started the run of the full
      testing due to workflow `concurrency`.
      
      By default, a workflow only runs when a `pull_request` event's activity
      type is `opened`, `synchronize`, or `reopened`. That's why there is no
      sense in the following construction:
      
        pull_request:
          types: [ opened, reopened, synchronize ]
      
      So just removed the line related to event's activity type.
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      182034dc
    • viacheslav.kirichenko's avatar
      ci: add integration testing for ddl and crud · 53f41130
      viacheslav.kirichenko authored
      Add workflow for integration testing of ddl
      and crud modules.
      
      Resolves tarantool/tarantool#6619
      Resolves tarantool/tarantool#6620
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      53f41130
  6. Dec 28, 2022
    • Mergen Imeev's avatar
      sql: remove unused variables · 533146b2
      Mergen Imeev authored
      This patch removes unused variables that were not caught by the compiler
      due to MAYBE_UNUSED or conversion to void.
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      533146b2
    • Mikhail Elhimov's avatar
      gdb: add command 'tt-tuple' to print tuple · 9491fac7
      Mikhail Elhimov authored
      Also pretty printer was introduced for struct tuple, so it can be
      printed with 'p' command as well. 'tt-tuple' command allows to specify
      some additional options (see 'help tt-tuple')
      
      Closes #7729
      
      NO_DOC=gdb extension
      NO_CHANGELOG=gdb extension
      NO_TEST=gdb extension
      9491fac7
    • Mikhail Elhimov's avatar
      gdb: add command 'tt-mp' to print MsgPack (with tt extensions) · 656d9c2f
      Mikhail Elhimov authored
      Supported extensions:
      - decimal
      - uuid
      - datetime
      - error
      - compression (only shows compression type and raw/compressed data size)
      - interval
      
      This functionality is similar to 'mp_str' function, but 'mp_str' can be
      invoked from gdb only when a process is alive, so to be able to print
      MsgPack during post-mortem analysis of core dump, 'mp_str' and all
      subsequent functions that decode and convert MsgPack into human-readable
      string were adapted to Python and put into the extension.
      
      In order to simplify implementation and maintenance of the gdb-extension
      implementation of the most of functions is kept as close to possible to
      their 'C'-counterparts (original 'C'-name can be found as a comment at
      the end of 'def' string)
      
      Part of #7729
      
      NO_DOC=gdb extension
      NO_CHANGELOG=gdb extension
      NO_TEST=gdb extension
      656d9c2f
  7. Dec 27, 2022
    • Mergen Imeev's avatar
      sql: introduce SEQSCAN to SELECT · 77648827
      Mergen Imeev authored
      This patch introduces new keyword SEQSCAN and new restrictions on
      SELECTs. These restrictions are disabled by default.
      
      Closes #7747
      
      @TarantoolBot document
      Title: SEQSCAN
      
      Now scanning SELECT will not run and will throw an error if the new
      SEQSCAN keyword is not used for scanned spaces. This change only affects
      SELECT and does not affect UPDATE and DELETE. A SELECT is recognized as
      a scanning SELECT if `EXPLAIN QUERY PLAN SELECT ...` indicates that the
      SELECT `scans` rather than `searches`.
      
      For example, if we have spaces created with these queries:
      ```
      CREATE TABLE t(i INT PRIMARY KEY, a INT);
      CREATE TABLE s(i INT PRIMARY KEY, a INT);
      ```
      
      Then these queries will throw an error:
      ```
      SELECT * FROM t;
      SELECT * FROM t WHERE a > 1;
      SELECT * FROM t WHERE i + 1 = 5;
      SELECT * FROM t, s;
      SELECT * FROM t JOIN s;
      ```
      
      And these will not:
      ```
      SELECT * FROM t WHERE i > 1;
      SELECT * FROM SEQSCAN t;
      SELECT * FROM SEQSCAN t WHERE i + 1 = 5;
      SELECT * FROM SEQSCAN t, SEQSCAN s;
      SELECT * FROM SEQSCAN t JOIN SEQSCAN s;
      ```
      
      Scanning can be allowed or disallowed by default. To do this, a new
      session setting is introduced: `sql_seq_scan`. The default value for
      setting is `true`, i.e. scanning is allowed. When set to `false`, the
      scanning SELECTs will throw a `scanning is not allowed` error.
      77648827
    • Vladimir Davydov's avatar
      box: add stubs for extra authentication checks · 9422ca70
      Vladimir Davydov authored
      This commit adds a few configuration options, function stubs, and error
      codes that will be used to perform extra security checks in EE:
      
       * box.cfg.auth_delay. Type: double. Default: 0. Unit: seconds.
      
         Description: If authentication of a user fails, the next
         authentication attempt for the same user will fail with
         ER_AUTH_DELAY error if called before box.cfg.auth_delay passes.
      
         Implementation: Error will be raised by security_check_auth_pre()
         called by authenticate() right before checking the challenged
         password. Authentication failures will be accounted per user in
         session_on_auth trigger.
      
       - box.cfg.disable_guest. Type: boolean. Default: false.
      
         Description: If set, an attempt to perform any request except
         'auth', 'ping', 'id', or 'vote' over iproto without authentication
         or authenticated as guest will raise ER_AUTH_REQUIRED error.
      
         Implementation: Error will be raised by security_check_session()
         called by tx_check_msg(), which in turn is called before starting
         to process any message received over iproto.
      
       - box.cfg.password_lifetime_days. Type: number. Default: 0. Unit: days.
      
         Description: If > 0, an attempt to authenticate as a user that hasn't
         reset the password for more than box.cfg.password_lifetime_days will
         fail with ER_PASSWORD_EXPIRED error.
      
         Implementation: Error will be raised by security_check_auth_post()
         called by authenticate() right after successfully authenticating
         the user. Note, we can't raise the error in security_check_auth_pre()
         because that would enable user enumeration.
      
      All the new options are dynamic. The option values will be stored and
      used in C code so we'll have to define a configuration callback for them
      in EE: box.internal.cfg_set_security. Also note that since the new
      options configure authentication behavior, they should be set before
      the box port is opened: we'll do that in security_cfg() called by
      box_storage_init().
      
      Needed for https://github.com/tarantool/tarantool-ee/issues/299
      Needed for https://github.com/tarantool/tarantool-ee/issues/300
      Needed for https://github.com/tarantool/tarantool-ee/issues/301
      
      NO_DOC=ee
      NO_TEST=ee
      NO_CHANGELOG=ee
      9422ca70
    • Vladimir Davydov's avatar
      iproto: call tx_check_msg before processing replication requests · eb9c957a
      Vladimir Davydov authored
      In contrast to all other request handlers, replication request handlers
      don't check the schema version. Strictly speaking, this is incorrect -
      if it's specified it must always be checked. It was fine, because we
      don't set the schema version in replication requests. However, in the
      future we're planning to add more checks in tx_check_msg, which will
      have to be performed for all requests, including replication. So let's
      call tx_check_msg before processing replication requests - it shouldn't
      hurt to check the schema version if available.
      
      Needed for https://github.com/tarantool/tarantool-ee/issues/301
      
      NO_DOC=ee
      NO_TEST=ee
      NO_CHANGELOG=ee
      eb9c957a
    • Vladimir Davydov's avatar
      iproto: replace tx_check_schema with tx_check_msg · e53a8d16
      Vladimir Davydov authored
      After accepting an iproto message in tx, we call tx_check_schema to
      check if the schema version supplied by the user matches the actual
      one. If it doesn't, we bail out early with ER_WRONG_SCHEMA_VERSION.
      
      We need to add more checks that should be done before continuing with
      processing a message in tx. tx_check_schema looks like a perfect place
      for it. Let's rename it to tx_check_msg and pass an accepted message
      instead of the schema version to it.
      
      Needed for https://github.com/tarantool/tarantool-ee/issues/301
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      e53a8d16
    • Sergey Bronnikov's avatar
      http: escape encoded params before sending request · 438a78a9
      Sergey Bronnikov authored
      Closes #7931
      
      @TarantoolBot document
      Title: Document a percent-encoding of params passed to http client
      
      The HTTP client has `params` option, where a user may provide a table of
      query parameters (added in #6832). Those parameters are encoded into a
      `?foo=bar&tweedledoo=tweedledee` string verbatim. If a name or a value of
      a query parameter contains `&`, `=` (or any another symbol with specific
      meaning in the URI query component), the query may be interpreted
      incorrectly by a server. Now key and values passed in a table as
      `params` option are percent-encoded and then encoded to a query string.
      This will be made automatically. Percent-encoding depends on used HTTP
      method: with `GET`, `HEAD` and `DELETE` parameters `uri.QUERY_PART`
      are used and with other HTTP method `uri.FORM_URLENCODED` is used.
      438a78a9
    • Sergey Bronnikov's avatar
      uri: escape params · a3b2056b
      Sergey Bronnikov authored
      Commit "uri: encode table with http params to a string" (b31aec89)
      introduced two functions `params()` and `encode_kv()` that encodes a
      table with http key-value parameters to a http query string. However,
      keys and values could be interpreted wrong by http server if they
      contains reserved symbols that have special meaning for http server.
      
      Patch adds escaping for key-values before encoding params to query
      string.
      
      Needed for #7931
      
      NO_CHANGELOG=internal
      NO_DOC=internal
      a3b2056b
    • Sergey Bronnikov's avatar
      uri: speedup encode and decode functions · dcd46244
      Sergey Bronnikov authored
      
      Patch replaces encoding and decoding functions written in Lua with
      functions implemented in C.
      
      Performance of Lua implementation (before the patch):
      
      ```
      uri.escape   152.37  runs/sec
      uri.unescape 263.44  runs/sec
      ```
      
      Performance of C implementation (after the patch):
      
      ```
      uri.escape   4983.03  runs/sec
      uri.unescape 4197.19  runs/sec
      ```
      
      Follows up #3682
      
      NO_CHANGELOG=see previous commit
      NO_DOC=see previous commit
      
      Co-authored-by: default avatarAlexander Turenko <alexander.turenko@tarantool.org>
      dcd46244
    • Sergey Bronnikov's avatar
      perf: add uri.escape/unescape test · 3cc0b3cf
      Sergey Bronnikov authored
      Added a simple benchmark for URI escape/unescape.
      
      Part of #3682
      
      NO_DOC=documentation is not required for performance test
      NO_CHANGELOG=performance test
      NO_TEST=performance test
      3cc0b3cf
Loading