Skip to content
Snippets Groups Projects
  1. Jul 03, 2018
    • Kirill Shcherbatov's avatar
      sql: fix SQL Count for vinyl engine · 5735fc36
      Kirill Shcherbatov authored
      As index_size does not match row count for vinyl engine,
      it was replaced with index_count that working for
      ITER_ALL in memtx same way.
      
      Part of #2199.
      5735fc36
    • Kirill Shcherbatov's avatar
      sql: introduce pragma sql_default_engine · b17d8fc2
      Kirill Shcherbatov authored
      Part of #2199.
      
      @TarantoolBot document
      Title: new pragma sql_default_engine
      Now it is allowed to create vinyl spaces using special pragma
      setting default engine for SQL requests.
      This config is stored in user_session() and affect *only*
      tables been created with SQL.
      Example:
      \set language sql
      pragma sql_default_engine='vinyl';
      CREATE TABLE t3(a primary key,b,c);
      b17d8fc2
    • Kirill Shcherbatov's avatar
      sql: disallow returning many rows from subselect · 2a720d11
      Kirill Shcherbatov authored
      To follow ANSI SQL standard we should dissallow returning
      multiple rows from subselects after = and in braces ().
      To achieve this goal we have introduced Select SF_SingleRow
      flag that indicates the case of subselect having no
      client-defined LIMIT 1 to patch system implicit LIMIT 1 to
      be LIMIT 2 and generate extra bytecode to HALT execution on
      reaching this restrict.
      
      Resolves #2366.
      2a720d11
  2. Jul 02, 2018
  3. Jun 29, 2018
  4. Jun 28, 2018
    • Ilya Markov's avatar
      http: Fix parse long headers names · 3d121dd4
      Ilya Markov authored
      Bug: During parsing http headers, long headers names are truncated
      to zero length, but values are not ignored.
      
      Fix this with adding parameter  max_header_name_length to http request.
      If header name is bigger than this value, header name is truncated to
      this length. Default value of max_header_name_length is 32.
      
      Do some refactoring with renaming long names in http_parser.
      
      Closes #3451
      3d121dd4
    • Ilya Markov's avatar
      http: Remove parsed status line from headers · 139aa814
      Ilya Markov authored
      Bug: Header parser validates http status line and besides saving http
      status, saves valid characters to header name, which is wrong.
      
      Fix this with skipping status line after validation without saving it as
      a header.
      
      In scope of #3451
      139aa814
    • Vladimir Davydov's avatar
      xdir: remove inprogress files after restart · f41aac61
      Vladimir Davydov authored
      If tarantool is stopped while writing a snapshot or a vinyl run file,
      inprogress files will never be removed. Fix this by collecting those
      files on recovery completion.
      
      Original patch by @IlyaMarkovMipt. Reworked by @locker.
      
      Closes #3406
      f41aac61
    • Ilya Markov's avatar
      xdir: change log messages in gc functions · 93a50580
      Ilya Markov authored
      In order to log only about files that were actually removed change log
      messages from "removing <name of file>" to "removed <name of file>" in
      vy_run_remove_files and xdir_collect_garbage functions.
      
      Needed for #3406
      93a50580
    • LapaevPavel's avatar
      cdc454b8
    • Kirill Yukhin's avatar
      sql: enable basic SELECTs for Lua created tables · 78efac86
      Kirill Yukhin authored
      Update expander of SELECT statement to search for space if
      corresponding table wasn't found in table hash. Create dummy
      table if so and fill def field only.
      
      Also fix a leak in VIEW creation.
      
      Part of #3369
      78efac86
    • Konstantin Osipov's avatar
      test: update test results · aaa9bdbe
      Konstantin Osipov authored
      A minor follow up on the fix for gh-3452 (http.client timeout bug)
      aaa9bdbe
    • Ilya Markov's avatar
      http.client: Fix waiting after received result · 7dcc8b42
      Ilya Markov authored
      Current implementation of http.client relies on fiber_cond which is set
      after the request was registered and doesn't consider the fact that
      response may be handled before the set of fiber_cond.
      
      So we may have the following situation:
      1. Register request in libcurl(curl_multi_add_handle in curl_execute).
      2. Receive and process response, fiber_cond_signal on cond_var which no
      one waits.
      3. fiber_cond_wait on cond which is already signaled. Wait until timeout
      is fired.
      
      In this case user have to wait timeout, though data was received
      earlier.
      
      Fix this with adding extra flag in_progress to curl_request struct.
      Set this flag true before registering request in libcurl and set it
      false when request is finished before fiber_cond_signal.
      When in_progress flag is false, don't wait on cond variable.
      
      Add 1 error injection.
      
      Closes #3452
      7dcc8b42
  5. Jun 27, 2018
    • Konstantin Osipov's avatar
      Merge branch '1.9' into 1.10 · 2821872e
      Konstantin Osipov authored
      2821872e
    • Konstantin Osipov's avatar
      net.box: update a test case after cherry-pick · e04b5b23
      Konstantin Osipov authored
      schema_version must be passed to perform_request in 1.9
      e04b5b23
    • Vladislav Shpilevoy's avatar
      iproto: on input discard do nothing for closed con · a60c8dff
      Vladislav Shpilevoy authored
      When a connection is closed, some of long-poll requests still may
      by in TX thread with non-discarded input. If a connection is
      closed, and then an input is discarded, then connection must not
      try to read new data.
      
      The bug was introduced here:
      f4d66dae by me.
      
      Closes #3400
      a60c8dff
    • Vladimir Davydov's avatar
      iproto: fix IPROTO_SERVER_IS_RO key code · e5e8ef4f
      Vladimir Davydov authored
      IPROTO_SERVER_IS_RO currently has code 0x07 and is defined in the header
      key section, which is wrong, because this key is only used in request
      body. Let's move it to the body section, where it belongs, and set its
      code to 0x29. This shouldn't break anything even if 0x07 is reused in
      future, because the two codes belong to different sections and hence are
      never parsed in the same function. Worst that can happen is we fail to
      bootstrap a node in the cluster if it is running a newer tarantool
      version.
      
      While we are at it, let's also add the key name and change its type from
      MP_UINT to MP_BOOL.
      
      Fixes commit a8ecd1e1 ("replication: fix bug with read-only replica
      as a bootstrap leader").
      e5e8ef4f
    • Vladimir Davydov's avatar
      xrow: fix ret code on decode failure · 56c6f533
      Vladimir Davydov authored
      Throughout the code, we return -1 on error, but decode methods return 1
      for some reason, although according to comments they are supposed to
      return -1. This doesn't result in any errors, because we use != 0 to
      check for errors. Nevertheless, let's fix it to avoid confusion.
      56c6f533
    • Vladimir Davydov's avatar
      txn: remove unused C++ wrappers · 1a6432d3
      Vladimir Davydov authored
      1a6432d3
    • Vladimir Davydov's avatar
      xlog: erase eof marker when reopening existing file for writing · ce44a9e0
      Vladimir Davydov authored
      When reopening an existing xlog file (as in case of vylog), we do not
      erase the eof marker immediately. Instead we reposition file offset
      to (file_size - sizeof eof_marker), assuming the eof marker will be
      overwritten on the first write.
      
      However, it isn't enough if we want to reuse this function for reopening
      WAL files, because when scanning the WAL directory we close a file if we
      read eof marker and never reopen it again, see recover_remaining_wals().
      So to avoid skipping rows written to a once closed WAL, we have to erase
      the eof marker when reopening an xlog file. Let's do it with truncate().
      ce44a9e0
    • Vladimir Davydov's avatar
      Merge branch '1.10' into 2.0 · c4c3aaf9
      Vladimir Davydov authored
      c4c3aaf9
  6. Jun 26, 2018
    • Vladimir Davydov's avatar
      vinyl: fix read iterator skips source after reading cache · 13f4355c
      Vladimir Davydov authored
      If a source is used on a read iteration (i.e. the key at which it is
      positioned is the next best match or, in terms of the read iterator
      implementation, its front_id matches the read iterator front_id), its
      history is cleaned up, see vy_read_iterator_apply_history(). This breaks
      the logic behind vy_read_src_is_behind(), which assumes that the history
      always points to the last used key. As a result, a source may be
      mistakenly skipped, as illustrated below:
      
        Fiber 1                               Fiber 2
        -------                               -------
        1. Opens read iterator.
        2. Advances it to the next key.
           The returned key was read from
           a mem or run (not from cache).
           The source's history is emptied.
                                              Adds a chain containing
                                              the key read by fiber 1
                                              to the cache.
        3. Continues iteration, reads
           next few keys from the cache
           until the chain ends. The source
           used at step 2 is skipped.
        4. Calls vy_read_src_is_behind()
           on the source used at step 2 and
           skipped at step 3. It returns
           false, because its history is
           empty, thus skipping keys stored
           in it.
      
      Fix this bug by moving the code that checks whether a source iterator
      needs to be advanced from vy_read_src_is_behind() to source iterator
      'skip' method, because there we always know the last key returned by
      the iterator.
      
      Basically, this returns the code we had before commit b4d57284
      ("vinyl: consolidate skip optimization checks in read iterator").
      
      Closes #3477
      13f4355c
    • Georgy Kirichenko's avatar
      Introduce privileges for object groups · af35de96
      Georgy Kirichenko authored
      Allow define access privileges for all spaces, functions and sequences.
      Read and write privileges are supported for spaces, execute privilege
      for sequences. Privilege granting and revoking might be done through old api
      without object identification:
        box.schema.user.grant("guest", "read", "space")
      
      Prerequisite #945
      af35de96
    • Vladislav Shpilevoy's avatar
      Fix multiline lua console · 3dd0db6b
      Vladislav Shpilevoy authored
      3dd0db6b
Loading