Skip to content
Snippets Groups Projects
  1. Jul 11, 2017
  2. Jul 10, 2017
    • Georgy Kirichenko's avatar
      Add iconv support · aff6235c
      Georgy Kirichenko authored
      Iconv is a library to convert a sequence of characters in one
      character encoding to a sequence of characters in another character
      encoding. Example below converts utf-16 big endian string into utf-8
      string:
      
          convertor = require('iconv').new('UTF-16BE', 'UTF-8')
          converted_string = convertor(source_string)
      
      Closes #2587
      aff6235c
  3. Jul 09, 2017
  4. Jul 08, 2017
    • Georgy Kirichenko's avatar
      Altering a space takes effect immediately. · 8631ffb2
      Georgy Kirichenko authored
      Before this patch, the new space, created by alter specification,
      would be put into space cache only after successful WAL write.
      
      This behaviour is not linearizable: on a replica, the WAL is
      played sequentially, and the order of events could differ from the
      master.
      
      Besides, it could crash, as demonstrated in gh-2074 test case.
      
      Since we use a cascading rollback for all transactions on WAL
      write error, it's OK to put a space into space cache
      before WAL write, so that the new transactions apply to the new
      space.
      
      This patch does exactly that.
      
      All subsequent requests are executed against the new space.
      
      This patch also removes on_replace trigger in the old space, since
      all checks against the new tuple format are performed using the new
      space.
      
      Fixes #2074.
      8631ffb2
  5. Jul 07, 2017
  6. Jul 06, 2017
    • Konstantin Osipov's avatar
      alter: MoveIndex review fixes · 7b1028a4
      Konstantin Osipov authored
      * update comments
      * add a test case for altering a primary key on the fly
      * rename AddIndex to CreateIndex
      * factor out common code into a function
      7b1028a4
    • Georgy Kirichenko's avatar
      Add swap_index_def function · 8ec3e3ed
      Georgy Kirichenko authored
      Non destructive swap_index_def function sould be used because memtx_tree
      stores a pointer to an index_def used while tree creation. Fixed #2570
      8ec3e3ed
    • Kirill Yukhin's avatar
      sql: Fix test · 35052b97
      Kirill Yukhin authored
      Use `net.box` instead of `console`.
      35052b97
    • Kirill Yukhin's avatar
      sql: Reduce maximal trigger call chain · 0bf0a00c
      Kirill Yukhin authored
      LLVM is more eager for frame size than GCC
      Current maximal call chain length may corrupt stack then.
      Reduce maximal call chain length to 30.
      
      Related to #2550
      0bf0a00c
    • Kirill Yukhin's avatar
      sql: Intialize SQL subsystem after config is over · 1f04f5d5
      Kirill Yukhin authored
      If after recovery first client to invoke SQL differs from
      ADMIN, then initialization of SQL subsystem will fail due to
      insufficient access rights. Problem is that SQL invokes
      create_from_tuple() to fill space_def structure, which in turn
      verifies access right.
      As far as SQL is a static part of Tarantool, there's no sense
      to initialize the system by demand. Change performs data dictionary
      initialization upon config completion.
      Regression test added as well.
      
      Closes #2483
      1f04f5d5
  7. Jul 04, 2017
  8. Jul 03, 2017
    • Kirill Yukhin's avatar
      sql: Limit number of simultaneously compiling triggers · d00e70b2
      Kirill Yukhin authored
      * Right now Tarantool runs compilation of a query on top of fiber's stack
        so, so number of triggeres compilation of which was triggered by chain
        should be limited. Introduce dedicated global variable which decreases
        each time new compilation in back track is initiated. Error if zero is
        reached. Set it to limit @ parser
      * Add test for verious cases
      * Fix out of order build for maintainer mode
      * Regenerate parser
      
      Closes #2550
      d00e70b2
    • Kirill Yukhin's avatar
      sql: Limit number of terms in SELECT compoind stmts · 974bce9a
      Kirill Yukhin authored
      Right now SQL query compiler is run on top of fiber's stack,
      which is limited to 64KB by default, so maximum
      number of entities in compound SELECT statement should be less than
      50 (verified by experiment) or stack guard will be triggered.
      
      In future we'll introduce heuristic which should understand that
      query is 'complex' and run compilation in separate thread with larger
      stack. This will also allow us not to block Tarantool while compiling
      the query.
      
      Closes #2548
      974bce9a
    • khatskevich's avatar
      sql: Add feature: call lua from sql; enable tests · 44ba745d
      khatskevich authored
      This is a first implentation of box.internal.sql_create_function
      It works properly on limited set of cases.
      The main purpose for this feature by now is tests.
      
      Some test cases relaying on this feature were enabled.
      
      Part of #2233
      44ba745d
  9. Jun 29, 2017
    • Vladimir Davydov's avatar
      vinyl: copy key_def and range boundaries to vylog buffer · 08590def
      Vladimir Davydov authored
      If a vylog record doesn't get flushed to disk due to an error, objects
      it refers to (index->key_def, range->begin and range->end) may get
      destroyed, resulting in a crash. To avoid that, we must copy those
      objects to vylog buffer.
      
      Closes #2532
      08590def
    • Vladimir Davydov's avatar
      vinyl: remove meaningless global stat counters · 513b45d6
      Vladimir Davydov authored
       - Remove tx and cursor latencies as they are useless - they actually
         account how long a tx/cursor was open, not latencies.
       - Remove vy_stat->get_latency as it doesn't account latency of select,
         besides we now have per index read latency.
       - Remove vy_stat->dumped_statements and dump_total as these statistics
         are reported per index as well.
       - VY_STAT_TX_OPS is currently unused (always 0). Let's use it for
         accounting the total number of statements committed in tx instead of
         vy_stat->write_count.
      513b45d6
    • Vladimir Davydov's avatar
      vinyl: move index options from index.info to index.options · 18e3463d
      Vladimir Davydov authored
      index.info() is supposed to show index stats, not options.
      box.space.<space_name>.index.<index_name>.options looks like
      a better place for reporting index options.
      
      Needed for #1662
      18e3463d
    • Vladimir Davydov's avatar
      vinyl: account squashed upserts per index · 3ba2779e
      Vladimir Davydov authored
      Replace box.info.vinyl().performance.upsert_{squashed,applied} with per
      index index.info().upsert.{squashed,applied}.
      
      Needed for #1662
      3ba2779e
    • Eugine Blikh's avatar
      logging: crash if fmt is not string · 8368fb21
      Eugine Blikh authored
      closes gh-2516
      8368fb21
  10. Jun 28, 2017
    • khatskevich's avatar
      sql: Convert 34 tests, add features to sqltester · 6d1d8b49
      khatskevich authored
      * Changes to sqltester:
        - Change lsearch to be closer to tcl implementation:
            return index of first match or return -1
        - Make execsql2 work with multistatements
      * Converted tests include cases for large (64b) integers
      
      Part of #2381
      6d1d8b49
  11. Jun 27, 2017
    • Konstantin Osipov's avatar
    • Vladimir Davydov's avatar
      vinyl: add per-index mem and run iterator stat · 8105cec7
      Vladimir Davydov authored
      Replace box.info.vinyl().performance.iterator.{run,mem} global counters
      with the following per index counters:
      
        memory
          iterator
            lookup            # number of lookups in the memory tree
            get               # number of statements returned by mem iterator
              rows
              bytes
      
        disk
          iterator
            lookup            # number of lookups in the page index
            get               # number of statements returned by run iterator
              rows
              bytes
      
            bloom             # number of times bloom filter
              hit             #   allowed to avoid a disk read
              miss            #   failed to prevent a disk read
      
            read              # number of statements actually read from disk
              rows
              bytes
              bytes_compressed
              pages
      
      Needed for #1662
      8105cec7
    • Vladimir Davydov's avatar
      Remove vinyl/info test · a1d7be12
      Vladimir Davydov authored
      It's useless - it only checks that certain counters are present, but
      doesn't give a damn about what they show. At the same time, I have to
      update its output every time I modify vinyl statistics, which I'm doing
      pretty often these days. So let's ditch it - I'll rewrite it from
      scratch after I'm done reworking vinyl statistics.
      a1d7be12
    • Konstantin Osipov's avatar
      test: add comments to vinyl/upsert.test, remove an extra box.snapshot() · 60c72e78
      Konstantin Osipov authored
      gh-2520: add comments explaining the test case for gh-2520 (upsert
      caching).
      60c72e78
    • Vladislav Shpilevoy's avatar
      vinyl: make UPSERT prepare use of a cache as a hint · d3a2e815
      Vladislav Shpilevoy authored
      Use a tuple cache to turn an UPSERT in the PREPARE, if the cache
      contains a tuple with the exact same key. The UPSERT can be applied
      to the cached tuples, because
      1. The cache always contains only REPLACE statements;
      2. The cache always contains only newest statements.
      
      Closes #2520
      d3a2e815
    • Vladislav Shpilevoy's avatar
      test: add test on upserts not used cache · da3d067b
      Vladislav Shpilevoy authored
      When an UPSERT is prepared, it can use a cached statement to be
      turned into REPLACE. But now it doesn't use the cache.
      
      Test for #2520
      da3d067b
  12. Jun 26, 2017
  13. Jun 23, 2017
  14. Jun 22, 2017
  15. Jun 21, 2017
    • Roman Tsisyk's avatar
      lua: remove unsupported tonumber64() test cases · 84e8acdb
      Roman Tsisyk authored
      Follow up 15a9af26
      84e8acdb
    • Roman Tsisyk's avatar
      lua: fix lua_tofield() for 2**64 value · 3a13be1d
      Roman Tsisyk authored
      exp2(64) <= UINT64_MAX is true due to type conversion.
      Use exp2(64) instead of UINT64_MAX (optimized out even on -O0).
      
      Fixes buggy box/indices_any_type.test.lua on x86_64
      
      Closes #2472
      3a13be1d
    • Roman Tsisyk's avatar
      lua: remove unsupported tonumber64() test cases · 15a9af26
      Roman Tsisyk authored
      ffi.new('long', x) and ffi.new('unsigned long', x) uses arbitratry
      user-defined ctypeid instead of built-in CTID_INT32 and CTID_UINT32.
      Our tonumber64() implementation is not ready for that. Remove these
      two test cases and move forward. Nobody cares.
      
      Fixes box/misc.test.lua on i386 and armhf
      
      Follow up #2459
      15a9af26
    • Vladimir Davydov's avatar
      alter: disallow truncation of system spaces · 3e1b734b
      Vladimir Davydov authored
      It is unsafe, because system spaces use triggers to keep records in sync
      with internal objects while space truncation doesn't invoke triggers.
      
      Closes #2523
      3e1b734b
    • Vladimir Davydov's avatar
      alter: initialize truncate system space lazily · 1f0b74e4
      Vladimir Davydov authored
      Currently, space.create must insert an entry into 'truncate' system
      space - if it does not, space.truncate won't work. This is incontinent,
      as it makes it impossible to create spaces by simply inserting a tuple
      into the 'space' system space via iproto API. So let's insert entries
      into truncate space lazily, on the first space truncation.
      
      Closes #2524
      1f0b74e4
Loading