• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 12804
83%
master: 88%

Build:
Build:
LAST BUILD BRANCH: i_s146
DEFAULT BRANCH: master
Ran 09 Jul 2018 05:45PM UTC
Jobs 1
Files 301
Run time 37s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
12804

push

travis-ci

kostja
alter: fix modification of primary key definition

If pk_def passed to index_def_new() is not NULL, the function will merge
it with the given key_def to create index cmp_def, no matter if the
index is primary or secondary. When an index is altered, we call
index_def_new() to create the new definition, passing the primary key
definition of the altered space for pk_def. If it is the primary index
that is altered, we will pass the definition of the old primary index
and index_def_new() will happily merge it with the new index definition,
resulting in invalid index_def::cmp_def. This doesn't affect memtx, as
memtx doesn't use cmp_def for unique indexes, but it does affect vinyl
in a peculiar way:

  tarantool> _ = box.schema.space.create('test', {engine = 'vinyl'})
  ---
  ...

  tarantool> _ = box.space.test:create_index('pk')
  ---
  ...

  tarantool> _ = box.space.test.index.pk:alter{parts = {2, 'unsigned'}}
  ---
  ...

  tarantool> _ = box.space.test:replace{1, 1}
  ---
  ...

  tarantool> _ = box.space.test:replace{2, 1}
  ---
  ...

  tarantool> box.space.test:select()
  ---
  - - [1, 1]
    - [2, 1]
  ...

(expected: [2, 1])

Fix this by making index_def_new() merge key_def with pk_def only for
secondary indexes.

Closes #3508

1 of 1 new or added line in 1 file covered. (100.0%)

39743 of 48484 relevant lines covered (81.97%)

890272.41 hits per line

Jobs
ID Job ID Ran Files Coverage
3 12804.3 (TARGET=coverage) 09 Jul 2018 05:45PM UTC 0
81.97
Travis Job 12804.3
Source Files on build 12804
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #12804
  • 3f14e319 on github
  • Prev Build on 1.10 (#12803)
  • Next Build on 1.10 (#12807)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc