Skip to content
Snippets Groups Projects
  1. Jun 29, 2017
    • Kirill Yukhin's avatar
      sql: Remove SQLite's WAL · f3eeb49b
      Kirill Yukhin authored
      This chage removes SQL's WAL support. Most of code
      related to it was removed. OP_Checkpoint op-code was
      commented, but not removed (also PRAGMA wal_mode): this might
      be useful in future if Tarantool's WAL is adopted there.
      f3eeb49b
  2. 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
    • Vladislav Shpilevoy's avatar
      sql: replace column_int with column_int64 · 2420040b
      Vladislav Shpilevoy authored
      Big numvers return from sql to lua as double or as long long depending on it's
      size (wheather it fit into mantisa or not)
      Remember, in tarantool you can create variable of type long long using LL
      postfix (ex: 1235453452343LL)
      
      closes #2469
      2420040b
  3. Jun 22, 2017
  4. 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
    • Roman Tsisyk's avatar
      lua: fix lua_tointeger() usage on 32-bit platforms · 90ef664e
      Roman Tsisyk authored
      lua_tointeger() is equivalent to (ptrdiff_t)lua_tonumber(L),
      which causes precision loss on 32-bit systems when you expect
      to get a proper uint32_t value. LuaJIT stores numbers as doubles,
      so lua_tointeger() makes absolutely no sense.
      
      Replace lua_tointeger() with lua_tonumber() everywhere except
      cases when result is converted to int or lua_Integer.
      
      Fixes box/indices_any_type.test.lua on i386 and armhf
      
      Closes #2459
      90ef664e
    • 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
    • Vladimir Davydov's avatar
      alter: proscribe space truncate in transaction · 50a4a87a
      Vladimir Davydov authored
      Space truncation is implemented as recreation of a space and all its
      indexes. On success the original space is deleted by the commit trigger,
      while on failure the new space is deleted by the rollback trigger. The
      commit/rollback triggers are always called before commit/rollback engine
      methods, which makes space truncation incompatible with transactions:
      engine commit/rollback may access a space that have already been deleted
      by commit/rollback trigger installed by space truncation, resulting in a
      crash. So let's forbid to use space.truncate from a transaction until
      triggers are made transaction-friendly.
      
      Closes #2525
      50a4a87a
  5. Jun 20, 2017
  6. Jun 19, 2017
  7. Jun 16, 2017
    • Roman Tsisyk's avatar
      Add a test case for string.hex() · 73a39ad3
      Roman Tsisyk authored
      Closes #2522
      73a39ad3
    • Veniamin Gvozdikov's avatar
      Add string.hex() method · 0ca6cb87
      Veniamin Gvozdikov authored
      * Add string.hex() method
      * Add hmac.*_hex to crypto.lua
      * Update crypto/digest to use string.hex()
      
      Closes #2510
      0ca6cb87
    • Vladimir Davydov's avatar
      vinyl: report memory and disk totals in index.info · 47c98418
      Vladimir Davydov authored
      Replace the following index.info fields
      
        memory_used           # size of statements in memory
        size                  # size of statements on disk
        count                 # number of statements on disk and in memory
        page_count            # number of pages on disk
      
      with
      
        memory
          rows                # number of statements in memory
          bytes               # size of statements in memory
      
        disk
          rows                # number of statements on disk
          bytes               # size of statements on disk (unpacked)
          bytes_compressed    # size of statements on disk (packed)
          pages               # number of pages on disk
      
        rows                  # total number of all statements
        bytes                 # total size of all statements
      
      To achieve that, this patch introduces new classes that can be used for
      accounting statements on disk and in memory, vy_stmt_disk_counter and
      vy_stmt_counter, and makes vy_slice, vy_run, vy_range, and vy_index use
      them instead of counting rows, bytes, and pages directly. The difference
      between the two classes is that vy_stmt_counter only accounts rows and
      bytes, while vy_stmt_disk_counter also includes bytes_compressed and
      pages. The classes will be reused for accounting reads and writes later.
      
      Needed for #1662
      47c98418
    • Vladimir Davydov's avatar
      vinyl: cleanup run and page info · dd6bd264
      Vladimir Davydov authored
       - Delete unused vy_page_info->min_key_offset.
       - Move vy_run_info->{size,keys,page_infos} to vy_run, because
         they are not a part of run info stored in .index file.
       - Rename vy_run->page_infos to page_info.
       - Rename vy_page_info->count, vy_run->keys, and vy_slice->keys
         to row_count.
       - Update comments.
      dd6bd264
    • Vladimir Davydov's avatar
      box: replace info_append_{u32,u64} with info_append_int · ab4e9e9b
      Vladimir Davydov authored
      It's no use having a separate method for every kind of integer we want
      to append to box info - int64_t should suit everyone.
      ab4e9e9b
    • Roman Tsisyk's avatar
      sql: add support for the new TRUNCATE implementation · c221e7c8
      Roman Tsisyk authored
      Initialize a counter in box.space._truncate() implicitly
      on CREATE TABLE.
      
      See 353bcdc5 "Rework space truncation" for details about
      TRUNCATE re-design.
      c221e7c8
Loading