File: misc.test.lua

package info (click to toggle)
tarantool 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 85,364 kB
  • sloc: ansic: 513,760; cpp: 69,489; sh: 25,650; python: 19,190; perl: 14,973; makefile: 4,173; yacc: 1,329; sql: 1,074; pascal: 620; ruby: 190; awk: 18; lisp: 7
file content (39 lines) | stat: -rw-r--r-- 1,142 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
test_run = require('test_run')
inspector = test_run.new()
engine = inspector:get_cfg('engine')

-- https://github.com/tarantool/tarantool/issues/1109
-- Update via a secondary key breaks recovery
s = box.schema.create_space('test', { engine = engine })
i1 = s:create_index('test1', {parts = {1, 'unsigned'}})
i2 = s:create_index('test2', {parts = {2, 'unsigned'}})
s:insert{1, 2, 3}
s:insert{5, 8, 13}
i2:update({2}, {{'+', 3, 3}})
tmp = i2:delete{8}
inspector:cmd("restart server default")
test_run = require('test_run')
inspector = test_run.new()
engine = inspector:get_cfg('engine')
box.space.test:select{}
box.space.test:drop()

-- https://github.com/tarantool/tarantool/issues/1435
-- Truncate does not work
_ = box.schema.space.create('t5',{engine=engine})
_ = box.space.t5:create_index('primary')
box.space.t5:insert{44}
box.space.t5:truncate()
box.space.t5:insert{55}
box.space.t5:drop()

-- https://github.com/tarantool/tarantool/issues/2257
-- crash somewhere in bsize
s = box.schema.space.create('test',{engine=engine})
_ = s:create_index('primary')
s:replace{1}
box.begin()
_ = s:delete{1}
box.rollback()
_ = s:delete{1}
s:drop()