diff --git a/doc/user/connectors.xml b/doc/user/connectors.xml
index 1cbdd17808398521943715be5289c55189e2b425..ba43c2fb2be6e225c981da54990705ecd55491ee 100644
--- a/doc/user/connectors.xml
+++ b/doc/user/connectors.xml
@@ -70,43 +70,29 @@ is in file <link xlink:href="http://tarantool.org/doc/box-protocol.html" xlink:t
                 </thead>
                       <tbody>
                         <row>
-                          <entry>type</entry>
-                          <entry>13</entry>
-                          <entry>0</entry>
-                          <entry>0</entry>
-                          <entry>0</entry>
-                        </row>
-                        <row>
-                          <entry>body_length</entry>
-                          <entry>17</entry>
-                          <entry>0</entry>
-                          <entry>0</entry>
-                          <entry>0</entry>
-                        </row>
-                        <row>
-                          <entry>request_id</entry>
-                          <entry>1</entry>
-                          <entry>0</entry>
-                          <entry>0</entry>
-                          <entry>0</entry>
-                        </row>
-                        <row>
-                          <entry>flags</entry>
+                          <entry>code for insert</entry>
                           <entry>2</entry>
-                          <entry>0</entry>
-                          <entry>0</entry>
-                          <entry>0</entry>
                         </row>
                         <row>
-                          <entry>map-element count</entry>
-                          <entry>82</entry>
-                          <entry>10</entry>
+                          <entry>rest of header</entry>
+                          <entry>...</entry>
+                          <entry>...</entry>
+                          <entry>...</entry>
+                          <entry>...</entry>
                         </row>
                         <row>
                           <entry>2-digit number: space id</entry>
                           <entry>cd</entry>
                           <entry>02</entry>
-                          <entry>03</entry>
+                          <entry>01</entry>
+                        </row>
+                        <row>
+                          <entry>code for tuple</entry>
+                          <entry>21</entry>
+                        </row>
+                        <row>
+                          <entry>1-digit number: field count = 2</entry>
+                          <entry>92</entry>
                         </row>
                         <row>
                           <entry>1-character string: field[1]</entry>
@@ -129,92 +115,10 @@ of the packet format for responses as well as requests).
 But it would be easier, and less error-prone, if one could
 invoke a routine that formats the packet according to typed
 parameters. Something like <code>response=tarantool_routine("insert",0,"A","B");</code>.
-And that is why APIs exist for drivers for C, Perl, Python, PHP, Ruby, and so on.
+And that is why APIs exist for drivers for Perl, Python, PHP, and so on.
 </para>
   </section>
 
-  <section xml:id="connector-c">
-    <title>C</title>
-    <para>
-    Here is a complete C program that inserts [99999,'BB'] into space[513] via the C API for the
-    binary protocol. To compile, paste the code into a file named example.c and say <code>
-    gcc -o example example.c -I/<replaceable>tarantool-directory</replaceable>/connector/c/include</code>
-    where tarantool-directory = the directory that contains
-    the necessary file <filename>tp.h</filename>, and the default library path contains
-    the directory where Tarantool library files were placed at installation time.
-    Before trying to run, check that the server
-    (tarantool) is running on localhost (127.0.0.1) and its listen address is the default
-    (local host, port 3301) and
-    space[513]'s primary key type is numeric (space[513].index[0].key_field[1].type = "NUM").
-    To run, say <code>./example</code>.
-    The program will open a socket connection with the tarantool server at localhost:3301,
-    then format a buffer for sending an INSERT request, then send the request, then check if the
-    server returned an error, then &mdash; if all is well &mdash; print "Insert succeeded". If the
-    row already exists, the program will print <quote>Duplicate key exists in unique index 0</quote>.
-    </para>
-<programlisting language="cpp">
-#include &lt;arpa/inet.h&gt;
-#include &lt;stdio.h&gt;
-#define MP_SOURCE 1   
-#include &lt;tp.h&gt;                                                /* the usual Tarantool include */
-
-int main()
-{
-  struct tp request;                                           /* area for sending to server */
-  struct tpgreeting greet;                                     /* area for the server's greeting */
-  struct tpresponse response;                                  /* area for translation of reply */
-  int fd;                                                      /* file descriptor for socket */
-  struct sockaddr_in sock;                                     /* the usual socket address info */
-  if ((fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) &lt;= 0)   /* open the socket. abort if failure */
-    exit(1);
-  memset(&amp;sock, 0, sizeof(sock));                              /* connect to localhost:3301 */
-  sock.sin_family = AF_INET;
-  sock.sin_addr.s_addr = inet_addr("127.0.0.1");
-  sock.sin_port = htons(3301);
-  if (connect(fd, (struct sockaddr *)&amp;sock, sizeof(sock)) &lt; 0) /* connect, abort if failure */
-    exit(1);
-  const int greeting_buffer_size = 128;                        /* handle the server's greeting */
-  char greeting_buffer[greeting_buffer_size];
-  if (read(fd, greeting_buffer, greeting_buffer_size) != 128)  /* greeting must be 128 bytes long */
-    exit(1);
-  tp_greeting(&amp;greet, greeting_buffer, 128);                   /* 
-  char request_buffer[1024];                                   /* initialize request buffer */
-  tp_init(&amp;request, request_buffer, 1024, 0, 0);
-  tp_insert(&amp;request, 513);                                    /* append INSERT header. space_no=513 */
-  tp_tuple(&amp;request, 2);                                       /* begin appending body, field count = 2 */
-  tp_encode_uint(&amp;request, 99999);                             /* append field[1] */
-  tp_sz(&amp;request, "BB");                                       /* append field[2] */
-  int rc = write(fd, tp_buf(&amp;request), tp_used(&amp;request));     /* send the INSERT request */
-  if (rc != tp_used(&amp;request))                                 /* abort if send failed */
-    exit(1);
-  char reply_buffer[1024];
-  int rres = read(fd, reply_buffer, 1024);                     /* get reply */
-  if (rres &lt;= 0) exit(1);
-  if (tp_reply(&amp;response, reply_buffer, rres) &lt; 0) exit(1);
-  if (response.error != 0) {                                   /* display+abort if error e.g. duplicate key */
-    printf("Error: %*s\n",
-    (int) (response.error_end-response.error),response.error);
-    exit(1);
-  }
-  close(fd);                                                   /* clean up */
-  printf("Insert succeeded\n");                                /* congratulate self */
-  exit(0);
-}
-</programlisting>
-    <para>
-       The example program only shows one command and does not show all that's necessary for
-       good practice. For that, please see the <link
-       xlink:href="https://github.com/tarantool/tarantool-c"><filename>connector/c</filename></link> source tree.
-    </para>
-  </section>
-
-  <section xml:id="connector-erlang">
-    <title>Erlang</title>
-    <para>
-       Please see <link xlink:href="https://github.com/tarantool/tarantool-erlang"><filename>https://github.com/tarantool/tarantool-erlang</filename></link>.
-    </para>
-  </section>
-
   <section xml:id="connector-java">
     <title>Java</title>
     <para>
@@ -222,13 +126,6 @@ int main()
     </para>
   </section>
 
-  <section xml:id="connector-node.js">
-    <title>node.js</title>
-    <para>
-       Please see <link xlink:href="https://github.com/devgru/node-tarantool"><filename>http://github.com/devgru/node-tarantool</filename></link>.
-    </para>
-  </section>
-
   <section xml:id="connector-perl">
     <title>Perl</title>
     <para>
@@ -252,7 +149,7 @@ sudo cpan install DR::Tarantool
     Before trying to run, check that the server
     (tarantool) is running on localhost (127.0.0.1) and its listen address is the default
     (local host, port 3301) and
-    space[0]'s primary key type is numeric (space[0].index[0].key_field[1].type = "NUM").
+    space[0]'s primary key type is numeric (box.space[0].index[0].parts[1].type = "NUM").
     To run, paste the code into a file named example.pl and say <code>perl example.pl</code>.
     The program will connect using an application-specific definition of the space.
     The program will open a socket connection
@@ -309,7 +206,7 @@ cd tarantool-php
 phpize
 ./configure
 make
-make install
+#make install is optional
     </programlisting>
     </para>    
     <para>
@@ -321,15 +218,15 @@ make install
     <programlisting>
 cd ~
 cp ./tarantool-php/modules/tarantool.so .
-export PHP_INI_SCAN_DIR=~/tarantool-php/test/share
+export PHP_INI_SCAN_DIR=~/tarantool-php/tests/shared
    </programlisting>
     </para>
     <para>
-    Here is a complete PHP program that inserts [99999,'BB'] into space[0] via the PHP API.
+    Here is a complete PHP program that inserts [99999,'BB'] into a space named 'tester' via the PHP API.
     Before trying to run, check that the server
     (tarantool) is running on localhost (127.0.0.1) and its listen address is the default
     (local host, port 3301) and
-    space[0]'s primary key type is numeric (space[0].index[0].key_field[1].type = "NUM").
+    tester's primary key type is numeric (box.space.tester.index[0].parts[1].type = "NUM").
     To run, paste the code into a file named example.php and say <code>php example.php</code>.
     The program will open a socket connection
     with the tarantool server at localhost:3301, then send an INSERT request,
@@ -339,9 +236,9 @@ export PHP_INI_SCAN_DIR=~/tarantool-php/test/share
     <para>
     <programlisting>
 &lt;?php
-$tarantool = new Tarantool("localhost", 3301, 3313);
+$tarantool = new Tarantool("localhost", 3301);
 try {
-  $tarantool-&gt;insert(0, array(99999, "BB"), TARANTOOL_FLAGS_ADD);
+  $tarantool-&gt;insert("tester", array(99999, "BB"));
   print "Insert succeeded\n";
   }
 catch (Exception $e) {
@@ -362,12 +259,22 @@ catch (Exception $e) {
     <title>Python</title>
     <para>
     Here is a complete Python program that inserts ['First Tuple','Value','Value'] into space99 via the high-level Python API.
+    </para>
+<programlisting language="python">
+#!/usr/bin/python
+from tarantool import Connection
+
+c = Connection("127.0.0.1", 3301)
+result = c.insert("space99",('First Tuple','Value', 'Value'))
+print result
+</programlisting>
+    <para>
     To prepare, paste the code into a file named example.py and install tarantool-python with either
-    <userinput><code>pip install tarantool</code></userinput> to install in <filename>/usr</filename> (requires root privilege)
+    <userinput><code>pip install tarantool\>0.4</code></userinput> to install in <filename>/usr</filename> (requires root privilege)
     or
-    <userinput><code>pip install tarantool --user</code></userinput> to install in <filename>~</filename> i.e. user's default directory.
+    <userinput><code>pip install tarantool\>0.4 --user</code></userinput> to install in <filename>~</filename> i.e. user's default directory.
     The program is assuming that the server (tarantool) is running on localhost (127.0.0.1) and its listen address is
-    the default (local host, port 3301) and space99's primary key type is string (box.space.space99.index['primary'].key_field[1].type = "STR")
+    the default (local host, port 3301) and space99's primary key type is string (box.space.space99.index[0].parts[1].type = "STR")
     and user 'guest' has permission to read and write on space99. An administrator could fulfill all those conditions by
     starting the tarantool server and executing these requests:<programlisting>
 box.cfg{listen = 3301}
@@ -379,32 +286,16 @@ box.schema.user.grant('guest', 'read,write', 'space', 'space99')</programlisting
     The program will connect to the server, will send the request, and will not throw an exception if all went well.
     If the tuple already exists, the program will throw DatabaseException(“Duplicate key exists in unique index”).
     </para>
-<programlisting language="python">
-#!/usr/bin/python
-from tarantool import Connection
 
-c = Connection("127.0.0.1", 3301)
-result = c.insert("space99",('First Tuple','Value', 'Value'))
-print result
-</programlisting>
     <para>
        The example program only shows one request and does not show all that's necessary for
-       good practice. For that, please see
-       <link xlink:href="http://tarantool-python.readthedocs.org/en/latest/"><filename>http://tarantool-python.readthedocs.org/en/latest/</filename></link>.
+       good practice. For that, see
+       <link xlink:href="http://github.com/tarantool/tarantool-python"><filename>http://github.com/tarantool/tarantool-python</filename></link>.
        For an example of a Python API for <link xlink:href="https://github.com/tarantool/queue">Queue managers on Tarantool</link>, see 
        <link xlink:href="https://github.com/tarantool/tarantool-queue-python"><filename>https://github.com/tarantool/tarantool-queue-python</filename></link>.
     </para>
   </section>
-
-  <section xml:id="connector-ruby">
-    <title>Ruby</title>
-    <para>
-       You need <emphasis role="strong">Ruby 1.9</emphasis> or later
-       to use this connector. Connector sources are located in <link
-       xlink:href="https://github.com/mailru/tarantool-ruby"><filename>http://github.com/mailru/tarantool-ruby</filename></link>.
-    </para>
-  </section>
-
+  
 </chapter>
 
 <!--
diff --git a/doc/user/data-model.xml b/doc/user/data-model.xml
index e885a88a9563cc5d5dc6e01abb5652ff8c5cefa0..70d955979401e3c0c8b2edf0b83b4ea474c7fdfa 100644
--- a/doc/user/data-model.xml
+++ b/doc/user/data-model.xml
@@ -329,7 +329,7 @@ server on the same processor without ill effects.
   Since not all Tarantool operations can be expressed with the
   data-manipulation functions, or with Lua, to gain
   complete access to data manipulation functionality one must use
-  a <olink targetptr="connectors">Perl, Python, Ruby or other
+  a <olink targetptr="connectors">Perl, PHP, Python or other
   programming language connector</olink>.  The client/server
   protocol is open and documented: an annotated BNF can be found
   in the source tree, file <filename
diff --git a/doc/user/databases.xml b/doc/user/databases.xml
index 01bd3426338b9b6c386e21747d43644aa3ac1b08..bf55c132d3aefb2b080ad370fef13ce77847bda3 100644
--- a/doc/user/databases.xml
+++ b/doc/user/databases.xml
@@ -1296,7 +1296,7 @@ console.delimiter('')!
 
     <varlistentry>
         <term>
-            <emphasis role="lua">box.space.<replaceable>space-name</replaceable>.index.<replaceable>index-name</replaceable>.key_field</emphasis>
+            <emphasis role="lua">box.space.<replaceable>space-name</replaceable>.index.<replaceable>index-name</replaceable>.parts</emphasis>
         </term>
         <listitem>
             <para>
diff --git a/doc/user/server-administration.xml b/doc/user/server-administration.xml
index 9a11329f1d48b50b9883635cb4a13d319d28003b..e3c279dbb66b80e5421d736606ff1d3b9de9ea85 100644
--- a/doc/user/server-administration.xml
+++ b/doc/user/server-administration.xml
@@ -207,6 +207,208 @@ Explanatory notes about what tarantool displayed in the above example:
 
 </section>
 
+<section xml:id="dist.lua">
+<title>Utility <code>dist.lua</code></title>
+<para>
+With dist.lua one can say: "start an instance of the
+Tarantool server which runs a single user-written Lua
+program, allocating disk resources specifically for
+that program, via a standardized deployment method."
+If Tarantool was downloaded from source, then the script
+is in ~/extra/dist/dist.lua. If Tarantool was installed
+with debian or Red Hat installation packages, the script
+is renamed <code>tarantoolctl</code> and is in
+/usr/bin/tarantoolctl. The script handles such things as:
+starting, stopping, rotating logs, logging in to the
+application's console, and checking status.
+</para>
+
+<bridgehead renderas="sect4">configuring for dist.lua</bridgehead>
+<para>
+The dist.lua script will read a configuration file
+named /etc/sysconfig/tarantool, or /etc/default/tarantool.
+Most of the settings are similar to the settings
+used by <code>box.cfg{...}</code>; however, dist.lua
+adjusts some of them by adding an application name.
+A copy of /etc/sysconfig/tarantool, with defaults for
+all settings, would look like this:<programlisting>
+default_cfg = {
+     pid_file = "/var/run/tarantool",
+     wal_dir = "/var/ lib / tarantool",
+     snap_dir = "/var/lib/tarantool",
+     sophia_dir = "/var/lib/tarantool",
+     logger = "/var/log/tarantool",
+     username = "tarantool",
+}
+instance_dir = "/etc/tarantool/instances.enabled"</programlisting>
+</para>
+<para>
+The settings in the above script are:
+</para>
+<para>
+pid_file = The directory for the pid file and control-socket file.
+The script will add "/<replaceable>instance-name</replaceable>" to the directory name.
+</para>
+<para>
+wal_dir = The directory for the write-ahead *.xlog files.
+The script will add "/<replaceable>instance-name</replaceable>" to the directory-name.
+</para>
+<para>
+snap_dir = The directory for the snapshot *.snap files.
+The script will add "/<replaceable>instance-name</replaceable>" to the directory-name.
+</para>
+<para>
+sophia_dir = The directory for the Sophia-storage-engine files.
+The script will add "/sophia/<replaceable>instance-name</replaceable>" to the directory-name.
+</para>
+<para>
+logger = The place where the application log will go.
+The script will add /<replaceable>instance-name</replaceable>.log" to the name.
+</para>
+<para>
+username = the user that runs the tarantool server.
+</para>
+<para>
+instance_dir = the directory where all applications for this host are stored.
+The user who writes an application for dist.lua must put the application's
+source code in this directory, or a symbolic link. For examples in this section the application
+name <code>my_app</code> will be used, and its source will have to be in
+<code><replaceable>instance_dir</replaceable>/my_app.lua</code>.
+</para>
+
+<bridgehead renderas="sect4">commands for dist.lua</bridgehead>
+<para>
+The command format is <code>dist.lua <replaceable>operation</replaceable> application-name</code>,
+where <replaceable>operation</replaceable> is one of: <code>start</code>, <code>stop</code>,
+<code>status</code>, <code>logrotate</code>, <code>enter</code>. Thus ...<programlisting>
+dist.lua start my_app          -- starts application my_app
+dist.lua stop my_app           -- stops my_app
+dist.lua enter my_app          -- show my_app's admin console, if it has one
+dist.lua logrotate my_app      -- rotate my_app's log files (make new, remove old)
+dist.lua status my_app         -- check my_app's status</programlisting>
+</para>
+
+<bridgehead renderas="sect4">typical code snippets for dist.lua</bridgehead>
+<para>
+A user can check whether my_app is running with these lines:<programlisting>
+  if dist.lua status my_app; then
+        ...
+  fi</programlisting>
+A user can initiate, for boot time, an init.d set of instructions:<programlisting>
+  for (each file mentioned in the instance_dir directory):
+   dist.lua start `basename $ file .lua`</programlisting>
+A user can set up a further configuration file for log rotation, like this:<programlisting>
+/path/to/tarantool/*.log {
+     daily
+     size 512k
+     missingok
+     rotate 10
+     compress
+     delaycompress
+     create 0640 tarantool adm
+     postrotate
+         /path/to/dist.lua logrotate `basename $ 1 .log`
+     endscript
+}</programlisting>
+</para>
+
+<bridgehead renderas="sect4">A detailed example for dist.lua</bridgehead>
+<para>
+The example's objective is: make a temporary directory
+where dist.lua can start a long-running application
+and monitor it.
+</para>
+<para>
+The assumptions are: the root password is known,
+the computer is only being used for tests,
+the Tarantool server is ready to run but is
+not currently running, and
+there currently is no directory named tarantool_test.
+</para>
+<para>
+Create a directory named /tarantool_test:<programlisting>
+sudo mkdir /tarantool_test</programlisting>
+</para>
+<para>
+Copy dist.lua to /tarantool_test.
+If you made a source download to ~/tarantool-master, then<programlisting>
+sudo cp ~/tarantool-master/extra/dist/dist.lua /tarantool_test/dist.lua</programlisting>
+If the file was named tarantoolctl and placed on /usr/bin/tarantoolctl, then<programlisting>
+sudo cp /usr/bin/tarantoolctl /tarantool_test/dist.lua</programlisting>
+</para>
+<para>
+Check and possibly change the first line of /tarantool_test/dist.lua.
+Initially it says<programlisting>
+#!/usr/bin/env tarantool</programlisting>
+If that is not correct, edit dist.lua and change the line.
+For example, if the Tarantool server is actually on
+/home/user/tarantool-master/src/tarantool, change the line to<programlisting>
+#!/usr/bin/env /home/user/tarantool-master/src/tarantool</programlisting>
+</para>
+<para>
+Save a copy of /etc/sysconfig/tarantool, if it exists.
+</para>
+<para>
+Edit /etc/sysconfig/tarantool.
+It might be necessary to say sudo mkdir /etc/sysconfig first.
+Let the new file contents be:<programlisting>
+default_cfg = {
+     pid_file = "/tarantool_test/my_app.pid",
+     wal_dir = "/tarantool_test",
+     snap_dir = "/tarantool_test",
+     sophia_dir = "/tarantool_test",
+     logger = "/tarantool_test/log",
+     username = "tarantool",
+}
+instance_dir = "/tarantool_test"</programlisting>
+</para>
+<para>
+Make the my_app application file, that is, /tarantool_test/my_app.lua.
+Let the file contents be:<programlisting>
+box.cfg{listen = 3301}
+box.schema.user.passwd('Gx5!')
+box.schema.user.grant('guest','read,write,execute','universe')
+fiber = require('fiber')
+box.schema.create_space('tester')
+box.space.tester:create_index('primary',{})
+i = 0
+while 0 == 0 do
+ fiber.sleep(5)
+ i = i + 1
+ print('insert ' .. i)
+ box.space.tester:insert{i, 'my_app tuple'}
+end</programlisting>
+</para>
+<para>
+Tell dist.lua to start the application ...<programlisting>
+cd /tarantool_test
+sudo ./dist.lua start my_app</programlisting>
+... expect to see messages indicating that the instance has started. Then ...<programlisting>
+ls -l /tarantool_test/my_app</programlisting>
+... expect to see the .snap file, .xlog file, and sophia directory. Then ...<programlisting>
+less /tarantool_test/log/my_app.log</programlisting>
+... expect to see the contents of my_app's log, including error messages, if any. Then ...<programlisting>
+cd /tarantool_test
+#assume that 'tarantool' invokes the tarantool server
+sudo tarantool
+box.cfg{}
+console = require('console')
+console.connect('localhost:3301')
+box.space.tester:select({0},{iterator='GE'})</programlisting>
+... expect to see several tuples that my_app has created.
+</para>
+<para>
+Stop. The only clean way to stop my_app is with dist_lua, thus:<programlisting>
+sudo ./dist.lua stop my_app</programlisting>
+</para>
+<para>
+Clean up. Restore the original contents of /etc/sysconfig/tarantool, and ...<programlisting>
+cd /
+sudo rm -R tarantool_test</programlisting>
+</para>
+
+</section>
+
 <section xml:id="os-install-notes">
 <title>System-specific administration notes</title>
 <blockquote><para>
diff --git a/src/box/lua/schema.lua b/src/box/lua/schema.lua
index 66a27d287009a1d21229780fda83c70fa9f9c6f4..212946343b35073452109f2a83a90c8b8ee6161b 100644
--- a/src/box/lua/schema.lua
+++ b/src/box/lua/schema.lua
@@ -340,6 +340,7 @@ box.schema.index.create = function(space_id, name, options)
     end
     _index:insert{space_id, iid, name, options.type,
                   unique, part_count, unpack(options.parts)}
+    return box.space[space_id].index[name]
 end
 
 box.schema.index.drop = function(space_id, index_id)
@@ -520,7 +521,7 @@ function box.schema.space.bless(space)
     local index_mt = {}
     -- __len and __index
     index_mt.len = function(index)
-        local ret = builtin.boxffi_index_len(index.space.id, index.id)
+        local ret = builtin.boxffi_index_len(index.space_id, index.id)
         if ret == -1 then
             box.error()
         end
@@ -555,7 +556,7 @@ function box.schema.space.bless(space)
     end
     index_mt.random = function(index, rnd)
         rnd = rnd or math.random()
-        local tuple = builtin.boxffi_index_random(index.space.id, index.id, rnd)
+        local tuple = builtin.boxffi_index_random(index.space_id, index.id, rnd)
         if tuple == ffi.cast('void *', -1) then
             box.error() -- error
         elseif tuple ~= nil then
@@ -584,7 +585,7 @@ function box.schema.space.bless(space)
         end
 
         local keybuf = ffi.string(pkey, pkey_end - pkey)
-        local cdata = builtin.boxffi_index_iterator(index.space.id, index.id,
+        local cdata = builtin.boxffi_index_iterator(index.space_id, index.id,
             itype, keybuf);
         if cdata == nil then
             box.error()
@@ -625,7 +626,7 @@ function box.schema.space.bless(space)
     index_mt.get = function(index, key)
         local key, key_end = msgpackffi.encode_tuple(key)
         port.size = 0;
-        if builtin.boxffi_select(ffi.cast(port_t, port), index.space.id,
+        if builtin.boxffi_select(ffi.cast(port_t, port), index.space_id,
            index.id, box.index.EQ, 0, 2, key, key_end) ~=0 then
             return box.error()
         end
@@ -668,7 +669,7 @@ function box.schema.space.bless(space)
         end
 
         port.size = 0;
-        if builtin.boxffi_select(ffi.cast(port_t, port), index.space.id,
+        if builtin.boxffi_select(ffi.cast(port_t, port), index.space_id,
             index.id, iterator, offset, limit, key, key_end) ~=0 then
             return box.error()
         end
@@ -681,22 +682,22 @@ function box.schema.space.bless(space)
     end
     index_mt.update = function(index, key, ops)
         ops = normalize_update_ops(ops)
-        return internal.update(index.space.id, index.id, keify(key), ops);
+        return internal.update(index.space_id, index.id, keify(key), ops);
     end
     index_mt.delete = function(index, key)
-        return internal.delete(index.space.id, index.id, keify(key));
+        return internal.delete(index.space_id, index.id, keify(key));
     end
     index_mt.drop = function(index)
-        return box.schema.index.drop(index.space.id, index.id)
+        return box.schema.index.drop(index.space_id, index.id)
     end
     index_mt.rename = function(index, name)
-        return box.schema.index.rename(index.space.id, index.id, name)
+        return box.schema.index.rename(index.space_id, index.id, name)
     end
     index_mt.alter= function(index, options)
-        if index.id == nil or index.space == nil then
+        if index.id == nil or index.space_id == nil then
             box.error(box.error.PROC_LUA, "Usage: index:alter{opts}")
         end
-        return box.schema.index.alter(index.space.id, index.id, options)
+        return box.schema.index.alter(index.space_id, index.id, options)
     end
     --
     local space_mt = {}
diff --git a/src/box/lua/space.cc b/src/box/lua/space.cc
index 3ba4207d3a1bf25baa6db07e38b1acffe53cd585..baa15f906b2522961c60fb913831d53efb2e2c04 100644
--- a/src/box/lua/space.cc
+++ b/src/box/lua/space.cc
@@ -168,8 +168,8 @@ lbox_fillspace(struct lua_State *L, struct space *space, int i)
 		lua_pushnumber(L, key_def->iid);
 		lua_setfield(L, -2, "id");
 
-		lua_pushvalue(L, i);
-		lua_setfield(L, -2, "space");
+		lua_pushnumber(L, space->def.id);
+		lua_setfield(L, -2, "space_id");
 
 		lua_pushstring(L, key_def->name);
 		lua_setfield(L, -2, "name");
diff --git a/test/big/hash.result b/test/big/hash.result
index 5aa1a1b836e78bb3304477045112d8757cc252c2..b9a4de03136477f1712588a3d9709b5b8aaa4b21 100644
--- a/test/big/hash.result
+++ b/test/big/hash.result
@@ -10,7 +10,7 @@ dofile('utils.lua')
 hash = box.schema.create_space('tweedledum')
 ---
 ...
-hash:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
+tmp = hash:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
 ---
 ...
 -- Insert valid fields
@@ -350,7 +350,7 @@ hash:truncate()
 hash.index['primary']:drop()
 ---
 ...
-hash:create_index('primary', { type = 'hash', parts = {1, 'str'}, unique = true })
+tmp = hash:create_index('primary', { type = 'hash', parts = {1, 'str'}, unique = true })
 ---
 ...
 -- Insert valid fields
@@ -457,16 +457,16 @@ hash:truncate()
 hash.index['primary']:drop()
 ---
 ...
-hash:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
+tmp = hash:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
 ---
 ...
-hash:create_index('field1', { type = 'hash', parts = {2, 'num'}, unique = true })
+tmp = hash:create_index('field1', { type = 'hash', parts = {2, 'num'}, unique = true })
 ---
 ...
-hash:create_index('field2', { type = 'hash', parts = {3, 'num'}, unique = true })
+tmp = hash:create_index('field2', { type = 'hash', parts = {3, 'num'}, unique = true })
 ---
 ...
-hash:create_index('field3', { type = 'hash', parts = {4, 'num'}, unique = true })
+tmp = hash:create_index('field3', { type = 'hash', parts = {4, 'num'}, unique = true })
 ---
 ...
 hash:insert{0, 0, 0, 0}
diff --git a/test/big/hash.test.lua b/test/big/hash.test.lua
index b110045ce58cc67585fd5451d901639f3939b41b..7abc2a8436fc5e71c0ae99fad75a84d48b68dc19 100644
--- a/test/big/hash.test.lua
+++ b/test/big/hash.test.lua
@@ -7,7 +7,7 @@ dofile('utils.lua')
 -- 32-bit hash insert fields tests
 -------------------------------------------------------------------------------
 hash = box.schema.create_space('tweedledum')
-hash:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
+tmp = hash:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
 
 -- Insert valid fields
 hash:insert{0, 'value1 v1.0', 'value2 v1.0'}
@@ -160,7 +160,7 @@ hash:truncate()
 -- String hash inset fields tests
 -------------------------------------------------------------------------------
 hash.index['primary']:drop()
-hash:create_index('primary', { type = 'hash', parts = {1, 'str'}, unique = true })
+tmp = hash:create_index('primary', { type = 'hash', parts = {1, 'str'}, unique = true })
 
 -- Insert valid fields
 hash:insert{'key 0', 'value1 v1.0', 'value2 v1.0'}
@@ -212,10 +212,10 @@ hash:truncate()
 -- hash::replace tests
 ------------------------
 hash.index['primary']:drop()
-hash:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
-hash:create_index('field1', { type = 'hash', parts = {2, 'num'}, unique = true })
-hash:create_index('field2', { type = 'hash', parts = {3, 'num'}, unique = true })
-hash:create_index('field3', { type = 'hash', parts = {4, 'num'}, unique = true })
+tmp = hash:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
+tmp = hash:create_index('field1', { type = 'hash', parts = {2, 'num'}, unique = true })
+tmp = hash:create_index('field2', { type = 'hash', parts = {3, 'num'}, unique = true })
+tmp = hash:create_index('field3', { type = 'hash', parts = {4, 'num'}, unique = true })
 
 hash:insert{0, 0, 0, 0}
 hash:insert{1, 1, 1, 1}
diff --git a/test/big/hash_multipart.result b/test/big/hash_multipart.result
index be020f8b0fa3fc9c2e018a662082ed74d572f846..7d6bd7cbe5317b9837246ad7c24df489e1e681c0 100644
--- a/test/big/hash_multipart.result
+++ b/test/big/hash_multipart.result
@@ -4,10 +4,10 @@ dofile('utils.lua')
 hash = box.schema.create_space('tweedledum')
 ---
 ...
-hash:create_index('primary', { type = 'hash', parts = {1, 'num', 2, 'str', 3, 'num'}, unique = true })
+tmp = hash:create_index('primary', { type = 'hash', parts = {1, 'num', 2, 'str', 3, 'num'}, unique = true })
 ---
 ...
-hash:create_index('unique', { type = 'hash', parts = {3, 'num', 5, 'num'}, unique = true })
+tmp = hash:create_index('unique', { type = 'hash', parts = {3, 'num', 5, 'num'}, unique = true })
 ---
 ...
 -- insert rows
diff --git a/test/big/hash_multipart.test.lua b/test/big/hash_multipart.test.lua
index 5b782608530a48ab6a3259f6d12b207b14f24a7b..707b7ecca50d9ca9093aaf96d2b7aa800e775a1b 100644
--- a/test/big/hash_multipart.test.lua
+++ b/test/big/hash_multipart.test.lua
@@ -1,8 +1,8 @@
 dofile('utils.lua')
 
 hash = box.schema.create_space('tweedledum')
-hash:create_index('primary', { type = 'hash', parts = {1, 'num', 2, 'str', 3, 'num'}, unique = true })
-hash:create_index('unique', { type = 'hash', parts = {3, 'num', 5, 'num'}, unique = true })
+tmp = hash:create_index('primary', { type = 'hash', parts = {1, 'num', 2, 'str', 3, 'num'}, unique = true })
+tmp = hash:create_index('unique', { type = 'hash', parts = {3, 'num', 5, 'num'}, unique = true })
 
 -- insert rows
 hash:insert{0, 'foo', 0, '', 1}
diff --git a/test/big/iterator.result b/test/big/iterator.result
index 02ea5419e30bb4f98393fa0ea3b919d9b8bb3319..5d9369dd741369f8d512d4196cc7be6993e23c15 100644
--- a/test/big/iterator.result
+++ b/test/big/iterator.result
@@ -7,27 +7,27 @@ dofile('utils.lua')
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true})
+idx1 = space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true})
 ---
 ...
 -- Tree single-part non-unique
-space:create_index('i1', { type = 'tree', parts = {2, 'str'}, unique = false})
+idx2 = space:create_index('i1', { type = 'tree', parts = {2, 'str'}, unique = false})
 ---
 ...
 -- Tree multi-part unique
-space:create_index('i2', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = true})
+idx3 = space:create_index('i2', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = true})
 ---
 ...
 -- Tree multi-part non-unique
-space:create_index('i3', { type = 'tree', parts = {3, 'str', 4, 'str'}, unique = false })
+idx4 = space:create_index('i3', { type = 'tree', parts = {3, 'str', 4, 'str'}, unique = false })
 ---
 ...
 -- Hash single-part unique
-space:create_index('i4', { type = 'hash', parts = {1, 'str'}, unique = true})
+idx5 = space:create_index('i4', { type = 'hash', parts = {1, 'str'}, unique = true})
 ---
 ...
 -- Hash multi-part unique
-space:create_index('i5', { type = 'hash', parts = {2, 'str', 3, 'str'}, unique = true})
+idx6 = space:create_index('i5', { type = 'hash', parts = {2, 'str', 3, 'str'}, unique = true})
 ---
 ...
 space:insert{'pid_001', 'sid_001', 'tid_998', 'a'}
@@ -918,13 +918,13 @@ space:drop()
 space = box.schema.create_space('test', {temporary=true})
 ---
 ...
-space:create_index('primary', {type='HASH',unique=true})
+idx1 = space:create_index('primary', {type='HASH',unique=true})
 ---
 ...
-space:create_index('t1', {type='TREE',unique=true})
+idx2 = space:create_index('t1', {type='TREE',unique=true})
 ---
 ...
-space:create_index('t2', {type='TREE',unique=true})
+idx3 = space:create_index('t2', {type='TREE',unique=true})
 ---
 ...
 box.space.test:insert{0}
@@ -966,7 +966,7 @@ space:drop()
 space = box.schema.create_space('test', {temporary=true})
 ---
 ...
-space:create_index('primary', {type='TREE',unique=true})
+idx1 = space:create_index('primary', {type='TREE',unique=true})
 ---
 ...
 space:insert{0}
diff --git a/test/big/iterator.test.lua b/test/big/iterator.test.lua
index 494173c067d1616e772f5fc05a3cacc68ca15879..f54914b6edd3428510172b70af989dc9ac70dc22 100644
--- a/test/big/iterator.test.lua
+++ b/test/big/iterator.test.lua
@@ -3,17 +3,17 @@ dofile('utils.lua')
 # Tree single-part unique
 
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true})
+idx1 = space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true})
 -- Tree single-part non-unique
-space:create_index('i1', { type = 'tree', parts = {2, 'str'}, unique = false})
+idx2 = space:create_index('i1', { type = 'tree', parts = {2, 'str'}, unique = false})
 -- Tree multi-part unique
-space:create_index('i2', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = true})
+idx3 = space:create_index('i2', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = true})
 -- Tree multi-part non-unique
-space:create_index('i3', { type = 'tree', parts = {3, 'str', 4, 'str'}, unique = false })
+idx4 = space:create_index('i3', { type = 'tree', parts = {3, 'str', 4, 'str'}, unique = false })
 -- Hash single-part unique
-space:create_index('i4', { type = 'hash', parts = {1, 'str'}, unique = true})
+idx5 = space:create_index('i4', { type = 'hash', parts = {1, 'str'}, unique = true})
 -- Hash multi-part unique
-space:create_index('i5', { type = 'hash', parts = {2, 'str', 3, 'str'}, unique = true})
+idx6 = space:create_index('i5', { type = 'hash', parts = {2, 'str', 3, 'str'}, unique = true})
 
 space:insert{'pid_001', 'sid_001', 'tid_998', 'a'}
 space:insert{'pid_002', 'sid_001', 'tid_997', 'a'}
@@ -176,9 +176,9 @@ space:drop()
 -------------------------------------------------------------------------------
 
 space = box.schema.create_space('test', {temporary=true})
-space:create_index('primary', {type='HASH',unique=true})
-space:create_index('t1', {type='TREE',unique=true})
-space:create_index('t2', {type='TREE',unique=true})
+idx1 = space:create_index('primary', {type='HASH',unique=true})
+idx2 = space:create_index('t1', {type='TREE',unique=true})
+idx3 = space:create_index('t2', {type='TREE',unique=true})
 
 box.space.test:insert{0}
 box.space.test:insert{1}
@@ -200,7 +200,7 @@ space:drop()
 -------------------------------------------------------------------------------
 
 space = box.schema.create_space('test', {temporary=true})
-space:create_index('primary', {type='TREE',unique=true})
+idx1 = space:create_index('primary', {type='TREE',unique=true})
 space:insert{0}
 space:insert{1}
 
diff --git a/test/big/lua.result b/test/big/lua.result
index f460a36fb00831d5afa9a7c4c6ee4a50b48acfda..4543a8f80531d18ead98466aca4594f4e0af1810 100644
--- a/test/big/lua.result
+++ b/test/big/lua.result
@@ -1,10 +1,10 @@
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'hash', parts = {1, 'str'}, unique = true })
+tmp = space:create_index('primary', { type = 'hash', parts = {1, 'str'}, unique = true })
 ---
 ...
-space:create_index('minmax', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
+tmp = space:create_index('minmax', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
 ---
 ...
 space:insert{'brave', 'new', 'world'}
@@ -117,10 +117,10 @@ space:drop()
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
+tmp = space:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
 ---
 ...
-space:create_index('minmax', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = false })
+tmp = space:create_index('minmax', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = false })
 ---
 ...
 space:insert{1234567, 'new', 'world'}
@@ -168,7 +168,7 @@ space:drop()
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type  = 'tree', parts = {1, 'num'}, unique = true })
+tmp = space:create_index('primary', { type  = 'tree', parts = {1, 'num'}, unique = true })
 ---
 ...
 space:insert{tonumber64('18446744073709551615'), 'magic'}
@@ -275,10 +275,10 @@ space:drop()
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
+tmp = space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
 ---
 ...
-space:create_index('range', { type = 'tree', parts = {2, 'num', 1, 'num'}, unique = true })
+tmp = space:create_index('range', { type = 'tree', parts = {2, 'num', 1, 'num'}, unique = true })
 ---
 ...
 space:insert{0, 0}
@@ -363,10 +363,10 @@ space:drop()
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
+tmp = space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
 ---
 ...
-space:create_index('i1', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
+tmp = space:create_index('i1', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
 ---
 ...
 pid = 1
@@ -487,10 +487,10 @@ space:drop()
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
+tmp = space:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
 ---
 ...
-space:create_index('i1', { type = 'tree', parts = {2, 'num', 3, 'num'}, unique = false })
+tmp = space:create_index('i1', { type = 'tree', parts = {2, 'num', 3, 'num'}, unique = false })
 ---
 ...
 space:insert{1, 1, 1}
@@ -585,7 +585,7 @@ space:drop()
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'hash', parts = {1, 'str'}, unique = true })
+tmp = space:create_index('primary', { type = 'hash', parts = {1, 'str'}, unique = true })
 ---
 ...
 t = space:insert{'1', '2', '3', '4', '5', '6', '7'}
@@ -768,7 +768,7 @@ space:drop()
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
+tmp = space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
 ---
 ...
 dofile('push.lua')
@@ -852,7 +852,7 @@ space:drop()
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'tree', parts = {3, 'num', 2, 'num'}, unique = true })
+tmp = space:create_index('primary', { type = 'tree', parts = {3, 'num', 2, 'num'}, unique = true })
 ---
 ...
 -- Print key fields in pk
@@ -902,10 +902,10 @@ dofile('index_random_test.lua')
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
+tmp = space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
 ---
 ...
-space:create_index('secondary', { type = 'hash', parts = {1, 'num'}, unique = true })
+tmp = space:create_index('secondary', { type = 'hash', parts = {1, 'num'}, unique = true })
 ---
 ...
 -------------------------------------------------------------------------------
diff --git a/test/big/lua.test.lua b/test/big/lua.test.lua
index 1a2531d4d123f8446f3b8253f56b5195fe8c7e1e..400d403d53e48fc66148a17e3629b8f501713c5a 100644
--- a/test/big/lua.test.lua
+++ b/test/big/lua.test.lua
@@ -1,6 +1,6 @@
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'hash', parts = {1, 'str'}, unique = true })
-space:create_index('minmax', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
+tmp = space:create_index('primary', { type = 'hash', parts = {1, 'str'}, unique = true })
+tmp = space:create_index('minmax', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
 
 space:insert{'brave', 'new', 'world'}
 space:insert{'hello', 'old', 'world'}
@@ -46,8 +46,8 @@ space:drop()
 -- Check range scan over multipart keys
 --
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
-space:create_index('minmax', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = false })
+tmp = space:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
+tmp = space:create_index('minmax', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = false })
 
 space:insert{1234567, 'new', 'world'}
 space:insert{0, 'of', 'puppets'}
@@ -68,7 +68,7 @@ space:drop()
 -- Lua 64bit numbers support
 --
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type  = 'tree', parts = {1, 'num'}, unique = true })
+tmp = space:create_index('primary', { type  = 'tree', parts = {1, 'num'}, unique = true })
 
 space:insert{tonumber64('18446744073709551615'), 'magic'}
 tuple = space.index['primary']:get{tonumber64('18446744073709551615')}
@@ -108,8 +108,8 @@ space:drop()
 -- lua select_reverse_range() testing
 -- https://blueprints.launchpad.net/tarantool/+spec/backward-tree-index-iterator
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
-space:create_index('range', { type = 'tree', parts = {2, 'num', 1, 'num'}, unique = true })
+tmp = space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
+tmp = space:create_index('range', { type = 'tree', parts = {2, 'num', 1, 'num'}, unique = true })
 
 space:insert{0, 0}
 space:insert{1, 0}
@@ -130,8 +130,8 @@ space:drop()
 -- Tests for box.index iterators
 --
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
-space:create_index('i1', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
+tmp = space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
+tmp = space:create_index('i1', { type = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
 
 pid = 1
 tid = 999
@@ -178,8 +178,8 @@ space:drop()
 --
 -- https://blueprints.launchpad.net/tarantool/+spec/lua-builtin-size-of-subtree
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
-space:create_index('i1', { type = 'tree', parts = {2, 'num', 3, 'num'}, unique = false })
+tmp = space:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
+tmp = space:create_index('i1', { type = 'tree', parts = {2, 'num', 3, 'num'}, unique = false })
 space:insert{1, 1, 1}
 space:insert{2, 2, 0}
 space:insert{3, 2, 1}
@@ -210,7 +210,7 @@ space:drop()
 -- Tests for lua tuple:transform()
 --
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'hash', parts = {1, 'str'}, unique = true })
+tmp = space:create_index('primary', { type = 'hash', parts = {1, 'str'}, unique = true })
 t = space:insert{'1', '2', '3', '4', '5', '6', '7'}
 t:transform(8, 0, '8', '9', '100')
 t:transform(1, 1)
@@ -276,7 +276,7 @@ space:drop()
 --  lua box.auto_increment() testing
 
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
+tmp = space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
 dofile('push.lua')
 
 push_collection(space, 0, 1038784, 'hello')
@@ -310,7 +310,7 @@ space:drop()
 -- https://bugs.launchpad.net/tarantool/+bug/1042798
 --
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'tree', parts = {3, 'num', 2, 'num'}, unique = true })
+tmp = space:create_index('primary', { type = 'tree', parts = {3, 'num', 2, 'num'}, unique = true })
 
 -- Print key fields in pk
 space.index['primary'].parts
@@ -331,8 +331,8 @@ space:drop()
 -- 
 dofile('index_random_test.lua')
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
-space:create_index('secondary', { type = 'hash', parts = {1, 'num'}, unique = true })
+tmp = space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
+tmp = space:create_index('secondary', { type = 'hash', parts = {1, 'num'}, unique = true })
 -------------------------------------------------------------------------------
 -- TreeIndex::random()
 -------------------------------------------------------------------------------
diff --git a/test/big/sql.result b/test/big/sql.result
index 26ca867c0c7a5498a394f05dcbee24a61d299a90..3124b009549d29b2c5b25672897ccbc166b9f475 100644
--- a/test/big/sql.result
+++ b/test/big/sql.result
@@ -7,10 +7,10 @@ box.schema.user.grant('test', 'execute,read,write', 'universe')
 s = box.schema.create_space('tweedledum', { id = 0 })
 ---
 ...
-s:create_index('primary', { type = 'tree', parts = { 1, 'str'} })
+index1 = s:create_index('primary', { type = 'tree', parts = { 1, 'str'} })
 ---
 ...
-s:create_index('secondary', { type = 'tree', unique = false, parts = {2, 'str'}})
+index2 = s:create_index('secondary', { type = 'tree', unique = false, parts = {2, 'str'}})
 ---
 ...
 #
diff --git a/test/big/sql.test.py b/test/big/sql.test.py
index e814258ddb11e0842a731a080848d385c4cf5ff6..f462216a91251a1a32e322152eddc158117be1db 100644
--- a/test/big/sql.test.py
+++ b/test/big/sql.test.py
@@ -6,8 +6,8 @@ sql.sort = True
 admin("box.schema.user.create('test', { password = 'test' })")
 admin("box.schema.user.grant('test', 'execute,read,write', 'universe')")
 admin("s = box.schema.create_space('tweedledum', { id = 0 })")
-admin("s:create_index('primary', { type = 'tree', parts = { 1, 'str'} })")
-admin("s:create_index('secondary', { type = 'tree', unique = false, parts = {2, 'str'}})")
+admin("index1 = s:create_index('primary', { type = 'tree', parts = { 1, 'str'} })")
+admin("index2 = s:create_index('secondary', { type = 'tree', unique = false, parts = {2, 'str'}})")
 
 print """#
 # A test case for Bug#729758
diff --git a/test/big/tree_pk.result b/test/big/tree_pk.result
index bb1911df7f449e3bc95e0143b4240b61f40f2158..da77322828d523a217567e9084adc1cdcd7a23b7 100644
--- a/test/big/tree_pk.result
+++ b/test/big/tree_pk.result
@@ -4,7 +4,7 @@ dofile('utils.lua')
 s0 = box.schema.create_space('tweedledum')
 ---
 ...
-s0:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
+i0 = s0:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
 ---
 ...
 -- integer keys
@@ -70,13 +70,13 @@ s0:insert{'12'}
 s1 = box.schema.create_space('tweedledee')
 ---
 ...
-s1:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
+i1 = s1:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
 ---
 ...
 s2 = box.schema.create_space('alice')
 ---
 ...
-s2:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
+i2 = s2:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
 ---
 ...
 -- string keys
@@ -272,13 +272,13 @@ s2 = nil
 s0:truncate()
 ---
 ...
-s0:create_index('i1', { type = 'tree', parts = {2, 'num'}, unique = true })
+i1 = s0:create_index('i1', { type = 'tree', parts = {2, 'num'}, unique = true })
 ---
 ...
-s0:create_index('i2', { type = 'tree', parts = {3, 'num'}, unique = false })
+i2 = s0:create_index('i2', { type = 'tree', parts = {3, 'num'}, unique = false })
 ---
 ...
-s0:create_index('i3', { type = 'tree', parts = {4, 'num'}, unique = true })
+i3 = s0:create_index('i3', { type = 'tree', parts = {4, 'num'}, unique = true })
 ---
 ...
 s0:insert{0, 0, 0, 0}
diff --git a/test/big/tree_pk.test.lua b/test/big/tree_pk.test.lua
index 46519bf27e5f04eb9121b9eb0e4c1faee8bde5be..1afdcf3886037f796b029c7345af95268478d699 100644
--- a/test/big/tree_pk.test.lua
+++ b/test/big/tree_pk.test.lua
@@ -1,7 +1,7 @@
 dofile('utils.lua')
 
 s0 = box.schema.create_space('tweedledum')
-s0:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
+i0 = s0:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
 
 -- integer keys
 s0:insert{1, 'tuple'}
@@ -26,10 +26,10 @@ s0:insert{''}
 s0:insert{'12'}
 
 s1 = box.schema.create_space('tweedledee')
-s1:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
+i1 = s1:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
 
 s2 = box.schema.create_space('alice')
-s2:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
+i2 = s2:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
 
 -- string keys
 s1:insert{'identifier', 'tuple'}
@@ -107,9 +107,9 @@ s2 = nil
 --
 s0:truncate()
 
-s0:create_index('i1', { type = 'tree', parts = {2, 'num'}, unique = true })
-s0:create_index('i2', { type = 'tree', parts = {3, 'num'}, unique = false })
-s0:create_index('i3', { type = 'tree', parts = {4, 'num'}, unique = true })
+i1 = s0:create_index('i1', { type = 'tree', parts = {2, 'num'}, unique = true })
+i2 = s0:create_index('i2', { type = 'tree', parts = {3, 'num'}, unique = false })
+i3 = s0:create_index('i3', { type = 'tree', parts = {4, 'num'}, unique = true })
 
 s0:insert{0, 0, 0, 0}
 s0:insert{1, 1, 1, 1}
diff --git a/test/big/tree_pk_multipart.result b/test/big/tree_pk_multipart.result
index 9c93f8694d533b3dd2b23d7cdf1cdf7beaea7f17..09d612e4e97b1833c814211017ba768a1aadd0dc 100644
--- a/test/big/tree_pk_multipart.result
+++ b/test/big/tree_pk_multipart.result
@@ -5,7 +5,7 @@ space = box.schema.create_space('tweedledum')
 ---
 ...
 -- Multipart primary key (sender nickname, receiver nickname, message id)
-space:create_index('primary', { type = 'tree', parts = {1, 'str', 2, 'str', 3, 'num'}, unique = true })
+i1 = space:create_index('primary', { type = 'tree', parts = {1, 'str', 2, 'str', 3, 'num'}, unique = true })
 ---
 ...
 space:insert{'Vincent', 'Jules', 0, 'Do you know what they call a - a - a Quarter Pounder with cheese in Paris?'}
@@ -365,10 +365,10 @@ space:len()
 space.index['primary']:drop()
 ---
 ...
-space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
+i1 = space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
 ---
 ...
-space:create_index('second', { type  = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
+i2 = space:create_index('second', { type  = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
 ---
 ...
 space:insert{'a', 'a', 'a'}
@@ -467,7 +467,7 @@ space = box.schema.create_space('tweedledum')
 ---
 ...
 -- Multipart primary key (sender nickname, receiver nickname, message id)
-space:create_index('primary', { type = 'tree', parts = {1, 'num', 3, 'num'}, unique = true })
+i1 = space:create_index('primary', { type = 'tree', parts = {1, 'num', 3, 'num'}, unique = true })
 ---
 ...
 space:insert{1, 1}
@@ -485,10 +485,10 @@ space:drop()
 space = box.schema.space.create('test')
 ---
 ...
-space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
+i1 = space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
 ---
 ...
-space:create_index('second', { type  = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
+i2 = space:create_index('second', { type  = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
 ---
 ...
 --# setopt delimiter ';'
diff --git a/test/big/tree_pk_multipart.test.lua b/test/big/tree_pk_multipart.test.lua
index c38d023d63ca3c9ec1141ce459d4598464ba10e2..3caae7512a700db87e641b484138ed37fba790c3 100644
--- a/test/big/tree_pk_multipart.test.lua
+++ b/test/big/tree_pk_multipart.test.lua
@@ -3,7 +3,7 @@
 --
 space = box.schema.create_space('tweedledum')
 -- Multipart primary key (sender nickname, receiver nickname, message id)
-space:create_index('primary', { type = 'tree', parts = {1, 'str', 2, 'str', 3, 'num'}, unique = true })
+i1 = space:create_index('primary', { type = 'tree', parts = {1, 'str', 2, 'str', 3, 'num'}, unique = true })
 
 space:insert{'Vincent', 'Jules', 0, 'Do you know what they call a - a - a Quarter Pounder with cheese in Paris?'}
 space:insert{'Jules', 'Vincent', 0, 'They don`t call it a Quarter Pounder with cheese?'}
@@ -117,8 +117,8 @@ space:len()
 --if an index is modified between calls
 --
 space.index['primary']:drop()
-space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
-space:create_index('second', { type  = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
+i1 = space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
+i2 = space:create_index('second', { type  = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
 
 space:insert{'a', 'a', 'a'}
 space:insert{'d', 'd', 'd'}
@@ -161,7 +161,7 @@ space = nil
 
 space = box.schema.create_space('tweedledum')
 -- Multipart primary key (sender nickname, receiver nickname, message id)
-space:create_index('primary', { type = 'tree', parts = {1, 'num', 3, 'num'}, unique = true })
+i1 = space:create_index('primary', { type = 'tree', parts = {1, 'num', 3, 'num'}, unique = true })
 
 space:insert{1, 1}
 space:replace{1, 1}
@@ -170,8 +170,8 @@ space:drop()
 
 -- test deletion of data one by one
 space = box.schema.space.create('test')
-space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
-space:create_index('second', { type  = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
+i1 = space:create_index('primary', { type = 'tree', parts = {1, 'str'}, unique = true })
+i2 = space:create_index('second', { type  = 'tree', parts = {2, 'str', 3, 'str'}, unique = true })
 --# setopt delimiter ';'
 for i = 1, 100 do
     v = tostring(i)
diff --git a/test/big/tree_variants.result b/test/big/tree_variants.result
index 5f5aaa65794d7ef455407c200a02cfe6ba703890..6d6c8f8d87048b7c8d49e88c1f0d0f1de5e50c31 100644
--- a/test/big/tree_variants.result
+++ b/test/big/tree_variants.result
@@ -1,25 +1,25 @@
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
+i0 = space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
 ---
 ...
-space:create_index('i1', { type = 'tree', parts = {2, 'num'}, unique = false })
+i1 = space:create_index('i1', { type = 'tree', parts = {2, 'num'}, unique = false })
 ---
 ...
-space:create_index('i2', { type = 'tree', parts = {3, 'num'}, unique = false })
+i2 = space:create_index('i2', { type = 'tree', parts = {3, 'num'}, unique = false })
 ---
 ...
-space:create_index('i3', { type = 'tree', parts = {4, 'str', 5, 'str'}, unique = false })
+i3 = space:create_index('i3', { type = 'tree', parts = {4, 'str', 5, 'str'}, unique = false })
 ---
 ...
-space:create_index('i4', { type = 'tree', parts = {7, 'str', 6, 'str'}, unique = false })
+i4 = space:create_index('i4', { type = 'tree', parts = {7, 'str', 6, 'str'}, unique = false })
 ---
 ...
-space:create_index('i5', { type = 'tree', parts = {9, 'num'}, unique = false })
+i5 = space:create_index('i5', { type = 'tree', parts = {9, 'num'}, unique = false })
 ---
 ...
-space:create_index('i6', { type = 'tree', parts = {7, 'str', 6, 'str', 4, 'str', 5, 'str', 9, 'num'}, unique = true })
+i6 = space:create_index('i6', { type = 'tree', parts = {7, 'str', 6, 'str', 4, 'str', 5, 'str', 9, 'num'}, unique = true })
 ---
 ...
 space:insert{0, 0, 100, 'Joe', 'Sixpack', 'Drinks', 'Amstel', 'bar', 2000}
diff --git a/test/big/tree_variants.test.lua b/test/big/tree_variants.test.lua
index ff0996440e7bfe392fbcd32069b9232c625279cb..94e98d955ca6f10c20def2d5de3aad1f7114827a 100644
--- a/test/big/tree_variants.test.lua
+++ b/test/big/tree_variants.test.lua
@@ -1,11 +1,11 @@
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
-space:create_index('i1', { type = 'tree', parts = {2, 'num'}, unique = false })
-space:create_index('i2', { type = 'tree', parts = {3, 'num'}, unique = false })
-space:create_index('i3', { type = 'tree', parts = {4, 'str', 5, 'str'}, unique = false })
-space:create_index('i4', { type = 'tree', parts = {7, 'str', 6, 'str'}, unique = false })
-space:create_index('i5', { type = 'tree', parts = {9, 'num'}, unique = false })
-space:create_index('i6', { type = 'tree', parts = {7, 'str', 6, 'str', 4, 'str', 5, 'str', 9, 'num'}, unique = true })
+i0 = space:create_index('primary', { type = 'tree', parts = {1, 'num'}, unique = true })
+i1 = space:create_index('i1', { type = 'tree', parts = {2, 'num'}, unique = false })
+i2 = space:create_index('i2', { type = 'tree', parts = {3, 'num'}, unique = false })
+i3 = space:create_index('i3', { type = 'tree', parts = {4, 'str', 5, 'str'}, unique = false })
+i4 = space:create_index('i4', { type = 'tree', parts = {7, 'str', 6, 'str'}, unique = false })
+i5 = space:create_index('i5', { type = 'tree', parts = {9, 'num'}, unique = false })
+i6 = space:create_index('i6', { type = 'tree', parts = {7, 'str', 6, 'str', 4, 'str', 5, 'str', 9, 'num'}, unique = true })
 
 space:insert{0, 0, 100, 'Joe', 'Sixpack', 'Drinks', 'Amstel', 'bar', 2000}
 space:insert{1, 1, 200, 'Joe', 'Sixpack', 'Drinks', 'Heineken', 'bar', 2001}
diff --git a/test/box/access.result b/test/box/access.result
index 7ad11d39e9fed0a5ee2de6ac5226c74d2e5d3dc8..77be60714f3331a90ed28ce88173dc4476a747ee 100644
--- a/test/box/access.result
+++ b/test/box/access.result
@@ -195,7 +195,7 @@ box.schema.user.create('testus')
 s = box.schema.create_space('admin_space')
 ---
 ...
-s:create_index('primary', {type = 'hash', parts = {1, 'NUM'}})
+index = s:create_index('primary', {type = 'hash', parts = {1, 'NUM'}})
 ---
 ...
 box.schema.user.grant('testus', 'write', 'space', 'admin_space')
@@ -435,7 +435,7 @@ box.session.su('twostep')
 twostep = box.schema.create_space('twostep')
 ---
 ...
-twostep:create_index('primary')
+index2 = twostep:create_index('primary')
 ---
 ...
 box.schema.func.create('test')
diff --git a/test/box/access.test.lua b/test/box/access.test.lua
index 8569e0ec32e5093cffe4a40b75c1dc6541e17ccf..6372776ca909db75228caefc7fde5632b9d5b763 100644
--- a/test/box/access.test.lua
+++ b/test/box/access.test.lua
@@ -88,7 +88,7 @@ c:close()
 -- restore from a snapshot
 box.schema.user.create('testus')
 s = box.schema.create_space('admin_space')
-s:create_index('primary', {type = 'hash', parts = {1, 'NUM'}})
+index = s:create_index('primary', {type = 'hash', parts = {1, 'NUM'}})
 box.schema.user.grant('testus', 'write', 'space', 'admin_space')
 s:drop()
 box.snapshot()
@@ -184,7 +184,7 @@ box.schema.user.create('twostep')
 box.schema.user.grant('twostep', 'read,write,execute', 'universe')
 box.session.su('twostep')
 twostep = box.schema.create_space('twostep')
-twostep:create_index('primary')
+index2 = twostep:create_index('primary')
 box.schema.func.create('test')
 box.session.su('admin')
 box.schema.user.revoke('twostep', 'execute,read,write', 'universe')
diff --git a/test/box/access_bin.result b/test/box/access_bin.result
index e9f6c586f8e8277036ac79b9356e7add9c755b2a..c3591c28ffd0f81f0e19dd8156dd60da9b8bd193 100644
--- a/test/box/access_bin.result
+++ b/test/box/access_bin.result
@@ -40,7 +40,7 @@ box.schema.user.revoke('guest', 'read,write,execute', 'universe')
 setuid_space = box.schema.space.create('setuid_space')
 ---
 ...
-setuid_space:create_index('primary')
+index = setuid_space:create_index('primary')
 ---
 ...
 setuid_func = function() return box.space.setuid_space:auto_increment{} end
@@ -109,7 +109,7 @@ setuid_space:drop()
 test = box.schema.space.create('test')
 ---
 ...
-test:create_index('primary')
+index = test:create_index('primary')
 ---
 ...
 box.schema.user.create('test', {password='test'})
diff --git a/test/box/access_bin.test.lua b/test/box/access_bin.test.lua
index 7ff79d2bb53c448ae0f5df8cfdfe8b95481af5b1..febc73b92610fe738b1b7978b0cb6d9902b9315b 100644
--- a/test/box/access_bin.test.lua
+++ b/test/box/access_bin.test.lua
@@ -16,7 +16,7 @@ box.schema.user.revoke('guest', 'read,write,execute', 'universe')
 -- gh-488 suid functions
 --
 setuid_space = box.schema.space.create('setuid_space')
-setuid_space:create_index('primary')
+index = setuid_space:create_index('primary')
 setuid_func = function() return box.space.setuid_space:auto_increment{} end
 box.schema.func.create('setuid_func')
 box.schema.user.grant('guest', 'execute', 'function', 'setuid_func')
@@ -41,7 +41,7 @@ setuid_space:drop()
 -- any more
 --
 test = box.schema.space.create('test')
-test:create_index('primary')
+index = test:create_index('primary')
 box.schema.user.create('test', {password='test'})
 box.schema.user.grant('test', 'read,write', 'space','test')
 box.schema.user.grant('test', 'read', 'space', '_space')
diff --git a/test/box/access_misc.result b/test/box/access_misc.result
index 8f16512d6b234ef0adadf63427b7076aff317bef..fedbfeb0f1702f37efcc2b2790482cfbd832b776 100644
--- a/test/box/access_misc.result
+++ b/test/box/access_misc.result
@@ -34,7 +34,7 @@ box.schema.user.create('testus')
 s = box.schema.create_space('admin_space')
 ---
 ...
-s:create_index('primary', {type = 'hash', parts = {1, 'NUM'}})
+index = s:create_index('primary', {type = 'hash', parts = {1, 'NUM'}})
 ---
 ...
 s:insert({1})
@@ -412,7 +412,7 @@ s = box.schema.create_space('glade')
 box.schema.user.grant('testuser', 'read', 'space', 'glade')
 ---
 ...
-s:create_index('primary', {unique = true, parts = {1, 'NUM', 2, 'STR'}})
+index = s:create_index('primary', {unique = true, parts = {1, 'NUM', 2, 'STR'}})
 ---
 ...
 s:insert({1, 'A'})
diff --git a/test/box/access_misc.test.lua b/test/box/access_misc.test.lua
index 33fcac39909548dc29f02950384b3b008b0a07bb..afe6d7be4ba750ce9f5a5afbe5e17063a5c1281f 100644
--- a/test/box/access_misc.test.lua
+++ b/test/box/access_misc.test.lua
@@ -16,7 +16,7 @@ box.schema.user.create('testus')
 box.schema.user.create('testus')
 
 s = box.schema.create_space('admin_space')
-s:create_index('primary', {type = 'hash', parts = {1, 'NUM'}})
+index = s:create_index('primary', {type = 'hash', parts = {1, 'NUM'}})
 s:insert({1})
 s:insert({2})
 --
@@ -174,7 +174,7 @@ box.schema.user.revoke('testuser', 'read, write, execute', 'universe')
 --
 s = box.schema.create_space('glade') 
 box.schema.user.grant('testuser', 'read', 'space', 'glade')
-s:create_index('primary', {unique = true, parts = {1, 'NUM', 2, 'STR'}})
+index = s:create_index('primary', {unique = true, parts = {1, 'NUM', 2, 'STR'}})
 s:insert({1, 'A'})
 s:insert({2, 'B'})
 s:insert({3, 'C'})
diff --git a/test/box/admin.result b/test/box/admin.result
index 82da4e86bf979f63ca17ab5c6b2ea3b94ec767f7..3208964bc6e622906ab1a035d68f5edf9217972b 100644
--- a/test/box/admin.result
+++ b/test/box/admin.result
@@ -3,7 +3,7 @@
 space = box.schema.create_space('tweedledum', { id = 0 })
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 --# push filter 'listen: .*' to 'listen: <uri>'
diff --git a/test/box/admin.test.lua b/test/box/admin.test.lua
index cf56cb87a00151305bd7d986dd04a96b1e832149..be6ba82033af65f526db9df65fa0ee7be302ff4f 100644
--- a/test/box/admin.test.lua
+++ b/test/box/admin.test.lua
@@ -2,7 +2,7 @@
 --# start server default
 
 space = box.schema.create_space('tweedledum', { id = 0 })
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 
 --# push filter 'listen: .*' to 'listen: <uri>'
 help()
diff --git a/test/box/alter.result b/test/box/alter.result
index 2a8dee1478e6580871159c213b2d6e9689649f47..93d4866c93a82ea89cd8763bfcafe004dc825e16 100644
--- a/test/box/alter.result
+++ b/test/box/alter.result
@@ -346,7 +346,7 @@ auto:drop()
 s = box.schema.create_space('space')
 ---
 ...
-s:create_index('primary', {unique = true, parts = {1, 'NUM', 2, 'STR'}})
+index = s:create_index('primary', {unique = true, parts = {1, 'NUM', 2, 'STR'}})
 ---
 ...
 s:insert{1, 'a'}
@@ -389,16 +389,16 @@ s = box.schema.create_space("test", {unknown = 'param'})
 s = box.schema.create_space("test")
 ---
 ...
-s:create_index('primary', {unique = true, parts = {0, 'NUM', 1, 'STR'}})
+index = s:create_index('primary', {unique = true, parts = {0, 'NUM', 1, 'STR'}})
 ---
 - error: 'Illegal parameters, invalid index parts: field_no must be one-based'
 ...
-s:create_index('primary', {unique = true, parts = {'NUM', 1, 'STR', 2}})
+index = s:create_index('primary', {unique = true, parts = {'NUM', 1, 'STR', 2}})
 ---
 - error: 'Illegal parameters, options.parts: expected filed_no (number), type (string)
     pairs'
 ...
-s:create_index('primary', {unique = true, parts = 'bug'})
+index = s:create_index('primary', {unique = true, parts = 'bug'})
 ---
 - error: Illegal parameters, options parameter 'parts' should be of type table
 ...
diff --git a/test/box/alter.test.lua b/test/box/alter.test.lua
index 7c2c45d36e70d5470bbfd9ae94bd3466637a0e1c..3cf6025b2f5b95f5d7c737fc67c1ac1daab42143 100644
--- a/test/box/alter.test.lua
+++ b/test/box/alter.test.lua
@@ -132,7 +132,7 @@ auto:drop()
 -- gh-281 Crash after rename + replace + delete with multi-part index
 -- ------------------------------------------------------------------
 s = box.schema.create_space('space')
-s:create_index('primary', {unique = true, parts = {1, 'NUM', 2, 'STR'}})
+index = s:create_index('primary', {unique = true, parts = {1, 'NUM', 2, 'STR'}})
 s:insert{1, 'a'}
 box.space.space.index.primary:rename('secondary')
 box.space.space:replace{1,'The rain in Spain'}
@@ -147,7 +147,7 @@ s = box.schema.create_space(42)
 s = box.schema.create_space("test", "bug")
 s = box.schema.create_space("test", {unknown = 'param'})
 s = box.schema.create_space("test")
-s:create_index('primary', {unique = true, parts = {0, 'NUM', 1, 'STR'}})
-s:create_index('primary', {unique = true, parts = {'NUM', 1, 'STR', 2}})
-s:create_index('primary', {unique = true, parts = 'bug'})
+index = s:create_index('primary', {unique = true, parts = {0, 'NUM', 1, 'STR'}})
+index = s:create_index('primary', {unique = true, parts = {'NUM', 1, 'STR', 2}})
+index = s:create_index('primary', {unique = true, parts = 'bug'})
 s:drop()
diff --git a/test/box/alter_limits.result b/test/box/alter_limits.result
index 10bf75b93b1f2adddb6b2fb14ffec0a384f0bba1..be2884b36cff06e39de1cdfbb8afff875b6a6569 100644
--- a/test/box/alter_limits.result
+++ b/test/box/alter_limits.result
@@ -165,7 +165,7 @@ s.enabled
 - false
 ...
 -- enabled/disabled transition
-s:create_index('primary', { type = 'hash' })
+index = s:create_index('primary', { type = 'hash' })
 ---
 ...
 s.enabled
@@ -233,7 +233,7 @@ s.field_count
 ---
 - 2
 ...
-s:create_index('primary')
+index = s:create_index('primary')
 ---
 ...
 -- field_count actually works
@@ -353,7 +353,7 @@ s = box.schema.create_space('test')
 ...
 --# setopt delimiter ';'
 for k=1, box.schema.INDEX_MAX, 1 do
-    s:create_index('i'..k, { type = 'hash' })
+    index = s:create_index('i'..k, { type = 'hash' })
 end;
 ---
 ...
@@ -364,68 +364,68 @@ for k, v in pairs (s.index) do if v.id ~= 0 then v:drop() end end
 ...
 -- test limits enforced in key_def_check:
 -- unknown index type
-s:create_index('test', { type = 'nosuchtype' })
+index = s:create_index('test', { type = 'nosuchtype' })
 ---
 - error: Unsupported index type supplied for index 1 in space 512
 ...
 -- hash index is not unique
-s:create_index('test', { type = 'hash', unique = false })
+index = s:create_index('test', { type = 'hash', unique = false })
 ---
 - error: 'Can''t create or modify index 1 in space 512: HASH index must be unique'
 ...
 -- bitset index is unique
-s:create_index('test', { type = 'bitset', unique = true })
+index = s:create_index('test', { type = 'bitset', unique = true })
 ---
 - error: 'Can''t create or modify index 1 in space 512: BITSET can not be unique'
 ...
 -- bitset index is multipart
-s:create_index('test', { type = 'bitset', parts = {1, 'num', 2, 'num'}})
+index = s:create_index('test', { type = 'bitset', parts = {1, 'num', 2, 'num'}})
 ---
 - error: 'Can''t create or modify index 1 in space 512: BITSET index key can not be
     multipart'
 ...
 -- part count must be positive
-s:create_index('test', { type = 'hash', parts = {}})
+index = s:create_index('test', { type = 'hash', parts = {}})
 ---
 - error: 'Can''t create or modify index 1 in space 512: part count must be positive'
 ...
 -- part count must be positive
-s:create_index('test', { type = 'hash', parts = { 1 }})
+index = s:create_index('test', { type = 'hash', parts = { 1 }})
 ---
 - error: 'Illegal parameters, options.parts: expected filed_no (number), type (string)
     pairs'
 ...
 -- unknown field type
-s:create_index('test', { type = 'hash', parts = { 1, 'nosuchtype' }})
+index = s:create_index('test', { type = 'hash', parts = { 1, 'nosuchtype' }})
 ---
 - error: 'Can''t create or modify index 1 in space 512: unknown field type'
 ...
 -- bad field no
-s:create_index('test', { type = 'hash', parts = { 'qq', 'nosuchtype' }})
+index = s:create_index('test', { type = 'hash', parts = { 'qq', 'nosuchtype' }})
 ---
 - error: 'Illegal parameters, options.parts: expected filed_no (number), type (string)
     pairs'
 ...
 -- big field no
-s:create_index('test', { type = 'hash', parts = { box.schema.FIELD_MAX, 'num' }})
+index = s:create_index('test', { type = 'hash', parts = { box.schema.FIELD_MAX, 'num' }})
 ---
 - error: 'Can''t create or modify index 1 in space 512: field no is too big'
 ...
-s:create_index('test', { type = 'hash', parts = { box.schema.FIELD_MAX - 1, 'num' }})
+index = s:create_index('test', { type = 'hash', parts = { box.schema.FIELD_MAX - 1, 'num' }})
 ---
 - error: 'Can''t create or modify index 1 in space 512: field no is too big'
 ...
-s:create_index('test', { type = 'hash', parts = { box.schema.FIELD_MAX + 90, 'num' }})
+index = s:create_index('test', { type = 'hash', parts = { box.schema.FIELD_MAX + 90, 'num' }})
 ---
 - error: 'Can''t create or modify index 1 in space 512: field no is too big'
 ...
-s:create_index('test', { type = 'hash', parts = { box.schema.INDEX_FIELD_MAX + 1, 'num' }})
+index = s:create_index('test', { type = 'hash', parts = { box.schema.INDEX_FIELD_MAX + 1, 'num' }})
 ---
 ...
-s:create_index('t1', { type = 'hash', parts = { box.schema.INDEX_FIELD_MAX, 'num' }})
+index = s:create_index('t1', { type = 'hash', parts = { box.schema.INDEX_FIELD_MAX, 'num' }})
 ---
 ...
-s:create_index('t2', { type = 'hash', parts = { box.schema.INDEX_FIELD_MAX - 1, 'num' }})
+index = s:create_index('t2', { type = 'hash', parts = { box.schema.INDEX_FIELD_MAX - 1, 'num' }})
 ---
 ...
 -- cleanup
@@ -436,7 +436,7 @@ s = box.schema.create_space('test')
 ---
 ...
 -- same part can't be indexed twice
-s:create_index('t1', { type = 'hash', parts = { 1, 'num', 1, 'str' }})
+index = s:create_index('t1', { type = 'hash', parts = { 1, 'num', 1, 'str' }})
 ---
 - error: 'Can''t create or modify index 0 in space 512: same key part is indexed twice'
 ...
@@ -455,7 +455,7 @@ end;
 ---
 - 512
 ...
-s:create_index('t1', { type = 'hash', parts = parts});
+index = s:create_index('t1', { type = 'hash', parts = parts});
 ---
 - error: 'Can''t create or modify index 0 in space 512: too many key parts'
 ...
@@ -472,7 +472,7 @@ end;
 ---
 - 510
 ...
-s:create_index('t1', { type = 'hash', parts = parts});
+index = s:create_index('t1', { type = 'hash', parts = parts});
 ---
 ...
 --# setopt delimiter ''
@@ -490,17 +490,17 @@ s:drop()
 s = box.schema.create_space('test')
 ---
 ...
-s:create_index('t1', { type = 'hash' })
+index = s:create_index('t1', { type = 'hash' })
 ---
 ...
 -- field type contradicts field type of another index
-s:create_index('t2', { type = 'hash', parts = { 1, 'str' }})
+index = s:create_index('t2', { type = 'hash', parts = { 1, 'str' }})
 ---
 - error: Ambiguous field type in index 1, key part 0. Requested type is STR but the
     field has previously been defined as NUM
 ...
 -- ok
-s:create_index('t2', { type = 'hash', parts = { 2, 'str' }})
+index = s:create_index('t2', { type = 'hash', parts = { 2, 'str' }})
 ---
 ...
 -- don't allow drop of the primary key in presence of other keys
@@ -516,7 +516,7 @@ s:drop()
 s = box.schema.create_space('test')
 ---
 ...
-s:create_index('primary', { type = 'hash' })
+index = s:create_index('primary', { type = 'hash' })
 ---
 ...
 -- space cache is updated correctly
@@ -614,7 +614,7 @@ s:drop()
 s = box.schema.create_space('test')
 ---
 ...
-s:create_index('primary', { type = 'hash' })
+index = s:create_index('primary', { type = 'hash' })
 ---
 ...
 -- correct error on misuse of alter
@@ -634,25 +634,14 @@ s.index.primary:alter({type='tree', unique=false, name='pk'})
 --# push filter 'function: .*' to 'function <pointer>'
 s.index.primary
 ---
-- &0
-  unique: true
+- unique: true
   parts:
   - type: NUM
     fieldno: 1
   id: 0
-  type: HASH
-  space:
-    index:
-      0: *0
-      primary: *0
-    on_replace: 'function <pointer>
-    temporary: false
-    id: 512
-    engine: memtx
-    enabled: true
-    name: test
-    field_count: 0
+  space_id: 512
   name: primary
+  type: HASH
 ...
 --# clear filter
 s.index.pk.type
@@ -670,14 +659,14 @@ s.index.pk:rename('primary')
 - error: '[string "return s.index.pk:rename(''primary'') "]:1: attempt to index field
     ''pk'' (a nil value)'
 ...
-s:create_index('second', { type = 'tree', parts = {  2, 'str' } })
+index = s:create_index('second', { type = 'tree', parts = {  2, 'str' } })
 ---
 ...
 s.index.second.id
 ---
 - 1
 ...
-s:create_index('third', { type = 'hash', parts = {  3, 'num' } })
+index = s:create_index('third', { type = 'hash', parts = {  3, 'num' } })
 ---
 ...
 s.index.third:rename('second')
@@ -715,7 +704,7 @@ s:drop()
 s = box.schema.create_space('full')
 ---
 ...
-s:create_index('primary', { type = 'tree', parts =  { 1, 'str' }})
+index = s:create_index('primary', { type = 'tree', parts =  { 1, 'str' }})
 ---
 ...
 s:insert{'No such movie', 999}
@@ -747,7 +736,7 @@ s:insert{'Die Fremde', 2010}
 - ['Die Fremde', 2010]
 ...
 -- create index with data
-s:create_index('year', { type = 'tree', unique=false, parts = { 2, 'num'} })
+index = s:create_index('year', { type = 'tree', unique=false, parts = { 2, 'num'} })
 ---
 ...
 s.index.primary:select{}
@@ -761,7 +750,7 @@ s.index.primary:select{}
   - ['No such movie', 999]
 ...
 -- a duplicate in the created index
-s:create_index('nodups', { type = 'tree', unique=true, parts = { 2, 'num'} })
+index = s:create_index('nodups', { type = 'tree', unique=true, parts = { 2, 'num'} })
 ---
 - error: Duplicate key exists in unique index 2
 ...
@@ -785,13 +774,13 @@ box.space['_index']:update({s.id, s.index.year.id}, {{"=", 8, 'num'}})
 - [512, 1, 'year', 'tree', 0, 1, 1, 'num']
 ...
 -- ambiguous field type
-s:create_index('str', { type = 'tree', unique =  false, parts = { 2, 'str'}})
+index = s:create_index('str', { type = 'tree', unique =  false, parts = { 2, 'str'}})
 ---
 - error: Ambiguous field type in index 2, key part 0. Requested type is STR but the
     field has previously been defined as NUM
 ...
 -- create index on a non-existing field
-s:create_index('nosuchfield', { type = 'tree', unique = true, parts = { 3, 'str'}})
+index = s:create_index('nosuchfield', { type = 'tree', unique = true, parts = { 3, 'str'}})
 ---
 - error: Tuple field count 2 is less than required by a defined index (expected 3)
 ...
@@ -803,7 +792,7 @@ s:insert{'Der Baader Meinhof Komplex', '2009 '}
 - ['Der Baader Meinhof Komplex', '2009 ']
 ...
 -- create an index on a field with a wrong type
-s:create_index('year', { type = 'tree', unique = false, parts = { 2, 'num'}})
+index = s:create_index('year', { type = 'tree', unique = false, parts = { 2, 'num'}})
 ---
 - error: 'Tuple field 1 type does not match one required by operation: expected NUM'
 ...
@@ -812,7 +801,7 @@ s:replace{'Der Baader Meinhof Komplex'}
 ---
 - ['Der Baader Meinhof Komplex']
 ...
-s:create_index('year', { type = 'tree', unique = false, parts = { 2, 'num'}})
+index = s:create_index('year', { type = 'tree', unique = false, parts = { 2, 'num'}})
 ---
 - error: Tuple field count 1 is less than required by a defined index (expected 2)
 ...
@@ -824,19 +813,19 @@ s = box.schema.create_space('test')
 ---
 ...
 -- primary key must be unique
-s:create_index('primary', { unique = false })
+index = s:create_index('primary', { unique = false })
 ---
 - error: 'Can''t create or modify index 0 in space 512: primary key must be unique'
 ...
 -- create primary key
-s:create_index('primary', { type = 'hash' })
+index = s:create_index('primary', { type = 'hash' })
 ---
 ...
 s:insert{1, 1}
 ---
 - [1, 1]
 ...
-s:create_index('secondary', { type = 'tree', unique = false, parts = {2, 'num'}})
+index = s:create_index('secondary', { type = 'tree', unique = false, parts = {2, 'num'}})
 ---
 ...
 s:insert{2, 1}
@@ -881,7 +870,7 @@ s = box.schema.create_space('test')
 s1 = s
 ---
 ...
-s:create_index('primary')
+index = s:create_index('primary')
 ---
 ...
 s1.index.primary.id
@@ -916,19 +905,19 @@ s:drop()
 s_empty = box.schema.create_space('s_empty')
 ---
 ...
-s_empty:create_index('primary')
+indexe1 = s_empty:create_index('primary')
 ---
 ...
-s_empty:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
+indexe2 = s_empty:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
 ---
 ...
 s_full = box.schema.create_space('s_full')
 ---
 ...
-s_full:create_index('primary')
+indexf1 = s_full:create_index('primary')
 ---
 ...
-s_full:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
+indexf2 = s_full:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
 ---
 ...
 s_full:insert{1, 1, 'a'}
@@ -964,7 +953,7 @@ box.snapshot()
 s_drop:drop()
 ---
 ...
-s_nil:create_index('primary', { type = 'hash'})
+indexn1 = s_nil:create_index('primary', { type = 'hash'})
 ---
 ...
 s_nil:insert{1,2,3,4,5,6}
@@ -975,7 +964,7 @@ s_nil:insert{7, 8, 9, 10, 11,12}
 ---
 - [7, 8, 9, 10, 11, 12]
 ...
-s_nil:create_index('secondary', { type = 'tree', unique=false, parts = {2, 'num', 3, 'num', 4, 'num'}})
+indexn2 = s_nil:create_index('secondary', { type = 'tree', unique=false, parts = {2, 'num', 3, 'num', 4, 'num'}})
 ---
 ...
 s_nil:insert{13, 14, 15, 16, 17}
@@ -985,19 +974,19 @@ s_nil:insert{13, 14, 15, 16, 17}
 r_empty = box.schema.create_space('r_empty')
 ---
 ...
-r_empty:create_index('primary')
+indexe1 = r_empty:create_index('primary')
 ---
 ...
-r_empty:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
+indexe2 = r_empty:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
 ---
 ...
 r_full = box.schema.create_space('r_full')
 ---
 ...
-r_full:create_index('primary', { type = 'tree', unique = true, parts = {1, 'num'}})
+indexf1 = r_full:create_index('primary', { type = 'tree', unique = true, parts = {1, 'num'}})
 ---
 ...
-r_full:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
+indexf2 = r_full:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
 ---
 ...
 r_full:insert{1, 1, 'a'}
@@ -1020,7 +1009,7 @@ r_full:insert{5, 5, 'e'}
 ---
 - [5, 5, 'e']
 ...
-s_full:create_index('multikey', { type = 'tree', unique = true, parts = { 2, 'num', 3, 'str'}})
+indexf1 = s_full:create_index('multikey', { type = 'tree', unique = true, parts = { 2, 'num', 3, 'str'}})
 ---
 ...
 s_full:insert{6, 6, 'f'}
@@ -1193,6 +1182,10 @@ s_nil.index.secondary:count(1)
 i1 = s_empty:create_index("test")
 ---
 ...
+i1:select{}
+---
+- []
+...
 i2 = s_empty:create_index("test")
 ---
 - error: Index 'test' already exists
diff --git a/test/box/alter_limits.test.lua b/test/box/alter_limits.test.lua
index 73f87152d589d17a09ee24f953e0a326f21887aa..ce4b581f5298f58dde4bc2c52f1c212471b004f0 100644
--- a/test/box/alter_limits.test.lua
+++ b/test/box/alter_limits.test.lua
@@ -58,7 +58,7 @@ s.index[0]
 s:truncate()
 s.enabled
 -- enabled/disabled transition
-s:create_index('primary', { type = 'hash' })
+index = s:create_index('primary', { type = 'hash' })
 s.enabled
 -- rename space - same name
 s:rename('tweedledum')
@@ -82,7 +82,7 @@ s.id
 s:drop()
 s = box.schema.create_space('test', { field_count = 2 })
 s.field_count
-s:create_index('primary')
+index = s:create_index('primary')
 -- field_count actually works
 s:insert{1}
 s:insert{1, 2}
@@ -128,40 +128,40 @@ s:drop()
 s = box.schema.create_space('test')
 --# setopt delimiter ';'
 for k=1, box.schema.INDEX_MAX, 1 do
-    s:create_index('i'..k, { type = 'hash' })
+    index = s:create_index('i'..k, { type = 'hash' })
 end;
 --# setopt delimiter ''
 -- cleanup
 for k, v in pairs (s.index) do if v.id ~= 0 then v:drop() end end
 -- test limits enforced in key_def_check:
 -- unknown index type
-s:create_index('test', { type = 'nosuchtype' })
+index = s:create_index('test', { type = 'nosuchtype' })
 -- hash index is not unique
-s:create_index('test', { type = 'hash', unique = false })
+index = s:create_index('test', { type = 'hash', unique = false })
 -- bitset index is unique
-s:create_index('test', { type = 'bitset', unique = true })
+index = s:create_index('test', { type = 'bitset', unique = true })
 -- bitset index is multipart
-s:create_index('test', { type = 'bitset', parts = {1, 'num', 2, 'num'}})
+index = s:create_index('test', { type = 'bitset', parts = {1, 'num', 2, 'num'}})
 -- part count must be positive
-s:create_index('test', { type = 'hash', parts = {}})
+index = s:create_index('test', { type = 'hash', parts = {}})
 -- part count must be positive
-s:create_index('test', { type = 'hash', parts = { 1 }})
+index = s:create_index('test', { type = 'hash', parts = { 1 }})
 -- unknown field type
-s:create_index('test', { type = 'hash', parts = { 1, 'nosuchtype' }})
+index = s:create_index('test', { type = 'hash', parts = { 1, 'nosuchtype' }})
 -- bad field no
-s:create_index('test', { type = 'hash', parts = { 'qq', 'nosuchtype' }})
+index = s:create_index('test', { type = 'hash', parts = { 'qq', 'nosuchtype' }})
 -- big field no
-s:create_index('test', { type = 'hash', parts = { box.schema.FIELD_MAX, 'num' }})
-s:create_index('test', { type = 'hash', parts = { box.schema.FIELD_MAX - 1, 'num' }})
-s:create_index('test', { type = 'hash', parts = { box.schema.FIELD_MAX + 90, 'num' }})
-s:create_index('test', { type = 'hash', parts = { box.schema.INDEX_FIELD_MAX + 1, 'num' }})
-s:create_index('t1', { type = 'hash', parts = { box.schema.INDEX_FIELD_MAX, 'num' }})
-s:create_index('t2', { type = 'hash', parts = { box.schema.INDEX_FIELD_MAX - 1, 'num' }})
+index = s:create_index('test', { type = 'hash', parts = { box.schema.FIELD_MAX, 'num' }})
+index = s:create_index('test', { type = 'hash', parts = { box.schema.FIELD_MAX - 1, 'num' }})
+index = s:create_index('test', { type = 'hash', parts = { box.schema.FIELD_MAX + 90, 'num' }})
+index = s:create_index('test', { type = 'hash', parts = { box.schema.INDEX_FIELD_MAX + 1, 'num' }})
+index = s:create_index('t1', { type = 'hash', parts = { box.schema.INDEX_FIELD_MAX, 'num' }})
+index = s:create_index('t2', { type = 'hash', parts = { box.schema.INDEX_FIELD_MAX - 1, 'num' }})
 -- cleanup
 s:drop()
 s = box.schema.create_space('test')
 -- same part can't be indexed twice
-s:create_index('t1', { type = 'hash', parts = { 1, 'num', 1, 'str' }})
+index = s:create_index('t1', { type = 'hash', parts = { 1, 'num', 1, 'str' }})
 -- a lot of key parts
 parts = {}
 --# setopt delimiter ';'
@@ -170,14 +170,14 @@ for k=1, box.schema.INDEX_PART_MAX + 1, 1 do
     table.insert(parts, 'num')
 end;
 #parts;
-s:create_index('t1', { type = 'hash', parts = parts});
+index = s:create_index('t1', { type = 'hash', parts = parts});
 parts = {};
 for k=1, box.schema.INDEX_PART_MAX, 1 do
     table.insert(parts, k + 1)
     table.insert(parts, 'num')
 end;
 #parts;
-s:create_index('t1', { type = 'hash', parts = parts});
+index = s:create_index('t1', { type = 'hash', parts = parts});
 --# setopt delimiter ''
 -- this is actually incorrect since parts is a lua table
 -- and length of a lua table which has index 0 set is not correct
@@ -186,18 +186,18 @@ s:create_index('t1', { type = 'hash', parts = parts});
 s:drop()
 -- check costraints in tuple_format_new()
 s = box.schema.create_space('test')
-s:create_index('t1', { type = 'hash' })
+index = s:create_index('t1', { type = 'hash' })
 -- field type contradicts field type of another index
-s:create_index('t2', { type = 'hash', parts = { 1, 'str' }})
+index = s:create_index('t2', { type = 'hash', parts = { 1, 'str' }})
 -- ok
-s:create_index('t2', { type = 'hash', parts = { 2, 'str' }})
+index = s:create_index('t2', { type = 'hash', parts = { 2, 'str' }})
 -- don't allow drop of the primary key in presence of other keys
 s.index[0]:drop()
 -- cleanup
 s:drop()
 -- index name, name manipulation
 s = box.schema.create_space('test')
-s:create_index('primary', { type = 'hash' })
+index = s:create_index('primary', { type = 'hash' })
 -- space cache is updated correctly
 s.index[0].name
 s.index[0].id
@@ -227,7 +227,7 @@ s.index.primary.name
 s:drop()
 -- modify index
 s = box.schema.create_space('test')
-s:create_index('primary', { type = 'hash' })
+index = s:create_index('primary', { type = 'hash' })
 -- correct error on misuse of alter
 s.index.primary.alter({unique=false})
 s.index.primary:alter({unique=false})
@@ -239,9 +239,9 @@ s.index.primary
 s.index.pk.type
 s.index.pk.unique
 s.index.pk:rename('primary')
-s:create_index('second', { type = 'tree', parts = {  2, 'str' } })
+index = s:create_index('second', { type = 'tree', parts = {  2, 'str' } })
 s.index.second.id
-s:create_index('third', { type = 'hash', parts = {  3, 'num' } })
+index = s:create_index('third', { type = 'hash', parts = {  3, 'num' } })
 s.index.third:rename('second')
 s.index.third.id
 s.index.second:drop()
@@ -254,7 +254,7 @@ s:drop()
 -- BUILD INDEX: changes of a non-empty index
 -- ----------------------------------------------------------------
 s = box.schema.create_space('full')
-s:create_index('primary', { type = 'tree', parts =  { 1, 'str' }})
+index = s:create_index('primary', { type = 'tree', parts =  { 1, 'str' }})
 s:insert{'No such movie', 999}
 s:insert{'Barbara', 2012}
 s:insert{'Cloud Atlas', 2012}
@@ -263,34 +263,34 @@ s:insert{'Halt auf freier Strecke', 2011}
 s:insert{'Homevideo', 2011}
 s:insert{'Die Fremde', 2010}
 -- create index with data
-s:create_index('year', { type = 'tree', unique=false, parts = { 2, 'num'} })
+index = s:create_index('year', { type = 'tree', unique=false, parts = { 2, 'num'} })
 s.index.primary:select{}
 -- a duplicate in the created index
-s:create_index('nodups', { type = 'tree', unique=true, parts = { 2, 'num'} })
+index = s:create_index('nodups', { type = 'tree', unique=true, parts = { 2, 'num'} })
 -- change of non-unique index to unique: same effect
 s.index.year:alter({unique=true})
 s.index.primary:select{}
 box.space['_index']:update({s.id, s.index.year.id}, {{"=", 8, 'num'}})
 -- ambiguous field type
-s:create_index('str', { type = 'tree', unique =  false, parts = { 2, 'str'}})
+index = s:create_index('str', { type = 'tree', unique =  false, parts = { 2, 'str'}})
 -- create index on a non-existing field
-s:create_index('nosuchfield', { type = 'tree', unique = true, parts = { 3, 'str'}})
+index = s:create_index('nosuchfield', { type = 'tree', unique = true, parts = { 3, 'str'}})
 s.index.year:drop()
 s:insert{'Der Baader Meinhof Komplex', '2009 '}
 -- create an index on a field with a wrong type
-s:create_index('year', { type = 'tree', unique = false, parts = { 2, 'num'}})
+index = s:create_index('year', { type = 'tree', unique = false, parts = { 2, 'num'}})
 -- a field is missing
 s:replace{'Der Baader Meinhof Komplex'}
-s:create_index('year', { type = 'tree', unique = false, parts = { 2, 'num'}})
+index = s:create_index('year', { type = 'tree', unique = false, parts = { 2, 'num'}})
 s:drop()
 -- unique -> non-unique transition
 s = box.schema.create_space('test')
 -- primary key must be unique
-s:create_index('primary', { unique = false })
+index = s:create_index('primary', { unique = false })
 -- create primary key
-s:create_index('primary', { type = 'hash' })
+index = s:create_index('primary', { type = 'hash' })
 s:insert{1, 1}
-s:create_index('secondary', { type = 'tree', unique = false, parts = {2, 'num'}})
+index = s:create_index('secondary', { type = 'tree', unique = false, parts = {2, 'num'}})
 s:insert{2, 1}
 s.index.secondary:alter{ unique = true }
 s:delete{2}
@@ -305,7 +305,7 @@ s:drop()
 -- ----------------------------------------------------------------
 s = box.schema.create_space('test')
 s1 = s
-s:create_index('primary')
+index = s:create_index('primary')
 s1.index.primary.id
 primary = s1.index.primary
 s.index.primary:drop()
@@ -321,12 +321,12 @@ s:drop()
 -- ----------------------------------------------------------------
 -- primary, secondary keys in a snapshot
 s_empty = box.schema.create_space('s_empty')
-s_empty:create_index('primary')
-s_empty:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
+indexe1 = s_empty:create_index('primary')
+indexe2 = s_empty:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
 
 s_full = box.schema.create_space('s_full')
-s_full:create_index('primary')
-s_full:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
+indexf1 = s_full:create_index('primary')
+indexf2 = s_full:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
 
 s_full:insert{1, 1, 'a'}
 s_full:insert{2, 2, 'b'}
@@ -342,19 +342,19 @@ box.snapshot()
 
 s_drop:drop()
 
-s_nil:create_index('primary', { type = 'hash'})
+indexn1 = s_nil:create_index('primary', { type = 'hash'})
 s_nil:insert{1,2,3,4,5,6}
 s_nil:insert{7, 8, 9, 10, 11,12}
-s_nil:create_index('secondary', { type = 'tree', unique=false, parts = {2, 'num', 3, 'num', 4, 'num'}})
+indexn2 = s_nil:create_index('secondary', { type = 'tree', unique=false, parts = {2, 'num', 3, 'num', 4, 'num'}})
 s_nil:insert{13, 14, 15, 16, 17}
 
 r_empty = box.schema.create_space('r_empty')
-r_empty:create_index('primary')
-r_empty:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
+indexe1 = r_empty:create_index('primary')
+indexe2 = r_empty:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
 
 r_full = box.schema.create_space('r_full')
-r_full:create_index('primary', { type = 'tree', unique = true, parts = {1, 'num'}})
-r_full:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
+indexf1 = r_full:create_index('primary', { type = 'tree', unique = true, parts = {1, 'num'}})
+indexf2 = r_full:create_index('secondary', { type = 'hash', unique = true, parts = {2, 'num'}})
 
 r_full:insert{1, 1, 'a'}
 r_full:insert{2, 2, 'b'}
@@ -362,7 +362,7 @@ r_full:insert{3, 3, 'c'}
 r_full:insert{4, 4, 'd'}
 r_full:insert{5, 5, 'e'}
 
-s_full:create_index('multikey', { type = 'tree', unique = true, parts = { 2, 'num', 3, 'str'}})
+indexf1 = s_full:create_index('multikey', { type = 'tree', unique = true, parts = { 2, 'num', 3, 'str'}})
 s_full:insert{6, 6, 'f'}
 s_full:insert{7, 7, 'g'}
 s_full:insert{8, 8, 'h'}
@@ -421,6 +421,7 @@ s_nil.index.secondary:count(1)
 
 -- gh-503 if_not_exits option in create index
 i1 = s_empty:create_index("test")
+i1:select{}
 i2 = s_empty:create_index("test")
 i3 = s_empty:create_index("test", { if_not_exists = true } )
 i3:select{}
diff --git a/test/box/box.net.box.result b/test/box/box.net.box.result
index 1c0b7af47d7b1574ee1aa4bb4903967f6061bd97..58c38375be26804809d6ce1e6d56307612c8f09a 100644
--- a/test/box/box.net.box.result
+++ b/test/box/box.net.box.result
@@ -19,7 +19,7 @@ LISTEN = require('uri').parse(box.cfg.listen)
 space = box.schema.create_space('net_box_test_space')
 ---
 ...
-space:create_index('primary', { type = 'tree' })
+index = space:create_index('primary', { type = 'tree' })
 ---
 ...
 -- low level connection
diff --git a/test/box/box.net.box.test.lua b/test/box/box.net.box.test.lua
index e1b7396b052abe0e74b7ac37f9759e8433b61377..9803bc9c5061ea4750a355e8290ebea3385dc06e 100644
--- a/test/box/box.net.box.test.lua
+++ b/test/box/box.net.box.test.lua
@@ -6,7 +6,7 @@ msgpack = require 'msgpack'
 box.schema.user.grant('guest', 'read,write,execute', 'universe')
 LISTEN = require('uri').parse(box.cfg.listen)
 space = box.schema.create_space('net_box_test_space')
-space:create_index('primary', { type = 'tree' })
+index = space:create_index('primary', { type = 'tree' })
 
 -- low level connection
 log.info("create connection")
diff --git a/test/box/call.result b/test/box/call.result
index b9f77a9f4c95db8257b4f8cb145fdbb5eff9abcd..b23515307bdc5e832ec3a19ea029e2f93f3ea62a 100644
--- a/test/box/call.result
+++ b/test/box/call.result
@@ -186,7 +186,7 @@ call f1('jason', 1, 'test', 2, 'stewart')
 space = box.schema.create_space('tweedledum', { id = 0 })
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 function myreplace(...) return space:replace{...} end
diff --git a/test/box/call.test.py b/test/box/call.test.py
index bfb30d386a9509b7842ada91e683100b23fb9766..d1681f28ea299c8e617b9086e4f74bbef3cf2420 100644
--- a/test/box/call.test.py
+++ b/test/box/call.test.py
@@ -69,7 +69,7 @@ sql("call f1('jason')")
 sql("call f1('jason', 1, 'test', 2, 'stewart')")
 
 admin("space = box.schema.create_space('tweedledum', { id = 0 })")
-admin("space:create_index('primary', { type = 'hash' })")
+admin("index = space:create_index('primary', { type = 'hash' })")
 
 admin("function myreplace(...) return space:replace{...} end")
 admin("function myinsert(...) return space:insert{...} end")
diff --git a/test/box/crossjoin.result b/test/box/crossjoin.result
index ef64f6e841fac440068f04846a6c61c2e8a82b03..3898aa417cba0f3c908ab1430690f25caefd1a2f 100644
--- a/test/box/crossjoin.result
+++ b/test/box/crossjoin.result
@@ -1,7 +1,7 @@
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'tree' })
+index = space:create_index('primary', { type = 'tree' })
 ---
 ...
 --# setopt delimiter ';'
diff --git a/test/box/crossjoin.test.lua b/test/box/crossjoin.test.lua
index 5919ae40b5cd6f10a6f4fa0006af4cebc643e388..2c168de1be63b47a5e4f1cc79013918ed1455b4d 100644
--- a/test/box/crossjoin.test.lua
+++ b/test/box/crossjoin.test.lua
@@ -1,5 +1,5 @@
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'tree' })
+index = space:create_index('primary', { type = 'tree' })
 --# setopt delimiter ';'
 function crossjoin(space0, space1, limit)
   local result = {}
diff --git a/test/box/errinj.result b/test/box/errinj.result
index e525ed83c1d11dab10a269a7d30ab154aca470f6..204d1ddda9c0ba993046521b96ec3227f0c86583 100644
--- a/test/box/errinj.result
+++ b/test/box/errinj.result
@@ -4,7 +4,7 @@ errinj = require('box.error.injection')
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 errinj.info()
@@ -158,13 +158,13 @@ s_disabled = box.schema.create_space('disabled')
 s_withindex = box.schema.create_space('withindex')
 ---
 ...
-s_withindex:create_index('primary', { type = 'hash' })
+index1 = s_withindex:create_index('primary', { type = 'hash' })
 ---
 ...
 s_withdata = box.schema.create_space('withdata')
 ---
 ...
-s_withdata:create_index('primary', { type = 'tree' })
+index2 = s_withdata:create_index('primary', { type = 'tree' })
 ---
 ...
 s_withdata:insert{1, 2, 3, 4, 5}
@@ -175,7 +175,7 @@ s_withdata:insert{4, 5, 6, 7, 8}
 ---
 - [4, 5, 6, 7, 8]
 ...
-s_withdata:create_index('secondary', { type = 'hash', parts = {2, 'num', 3, 'num' }})
+index3 = s_withdata:create_index('secondary', { type = 'hash', parts = {2, 'num', 3, 'num' }})
 ---
 ...
 errinj.set("ERRINJ_WAL_IO", true)
@@ -222,7 +222,7 @@ box.space['withdata'].enabled
 ---
 - true
 ...
-s_withdata:create_index('another', { type = 'tree', parts = { 5, 'num' }, unique = false})
+index4 = s_withdata:create_index('another', { type = 'tree', parts = { 5, 'num' }, unique = false})
 ---
 - error: Failed to write to disk
 ...
@@ -237,7 +237,7 @@ errinj.set("ERRINJ_WAL_IO", false)
 test = box.schema.create_space('test')
 ---
 ...
-s_disabled:create_index('primary', { type = 'hash' })
+index5 = s_disabled:create_index('primary', { type = 'hash' })
 ---
 ...
 s_disabled.enabled
@@ -248,7 +248,7 @@ s_disabled:insert{0}
 ---
 - [0]
 ...
-s_withindex:create_index('secondary', { type = 'tree', parts = { 2, 'num'} })
+index6 = s_withindex:create_index('secondary', { type = 'tree', parts = { 2, 'num'} })
 ---
 ...
 s_withindex.index.secondary.unique
@@ -269,7 +269,7 @@ box.space['withdata']
 ---
 - null
 ...
-s_withdata:create_index('another', { type = 'tree', parts = { 5, 'num' }, unique = false})
+index7 = s_withdata:create_index('another', { type = 'tree', parts = { 5, 'num' }, unique = false})
 ---
 - error: Space '#514' does not exist
 ...
diff --git a/test/box/errinj.test.lua b/test/box/errinj.test.lua
index d16edf5c9d85b9de3c613aaef34e611b2fee85c7..78c50356fc794d661d5ef75c0ee3d5cae827c034 100644
--- a/test/box/errinj.test.lua
+++ b/test/box/errinj.test.lua
@@ -1,7 +1,7 @@
 errinj = require('box.error.injection')
 
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 
 errinj.info()
 errinj.set("some-injection", true)
@@ -48,12 +48,12 @@ space:drop()
 -- Check how well we handle a failed log write in DDL
 s_disabled = box.schema.create_space('disabled')
 s_withindex = box.schema.create_space('withindex')
-s_withindex:create_index('primary', { type = 'hash' })
+index1 = s_withindex:create_index('primary', { type = 'hash' })
 s_withdata = box.schema.create_space('withdata')
-s_withdata:create_index('primary', { type = 'tree' })
+index2 = s_withdata:create_index('primary', { type = 'tree' })
 s_withdata:insert{1, 2, 3, 4, 5}
 s_withdata:insert{4, 5, 6, 7, 8}
-s_withdata:create_index('secondary', { type = 'hash', parts = {2, 'num', 3, 'num' }})
+index3 = s_withdata:create_index('secondary', { type = 'hash', parts = {2, 'num', 3, 'num' }})
 errinj.set("ERRINJ_WAL_IO", true)
 test = box.schema.create_space('test')
 s_disabled:create_index('primary', { type = 'hash' })
@@ -65,20 +65,20 @@ s_withdata.index.secondary:drop()
 s_withdata.index.secondary.unique
 s_withdata:drop()
 box.space['withdata'].enabled
-s_withdata:create_index('another', { type = 'tree', parts = { 5, 'num' }, unique = false})
+index4 = s_withdata:create_index('another', { type = 'tree', parts = { 5, 'num' }, unique = false})
 s_withdata.index.another
 errinj.set("ERRINJ_WAL_IO", false)
 test = box.schema.create_space('test')
-s_disabled:create_index('primary', { type = 'hash' })
+index5 = s_disabled:create_index('primary', { type = 'hash' })
 s_disabled.enabled
 s_disabled:insert{0}
-s_withindex:create_index('secondary', { type = 'tree', parts = { 2, 'num'} })
+index6 = s_withindex:create_index('secondary', { type = 'tree', parts = { 2, 'num'} })
 s_withindex.index.secondary.unique
 s_withdata.index.secondary:drop()
 s_withdata.index.secondary
 s_withdata:drop()
 box.space['withdata']
-s_withdata:create_index('another', { type = 'tree', parts = { 5, 'num' }, unique = false})
+index7 = s_withdata:create_index('another', { type = 'tree', parts = { 5, 'num' }, unique = false})
 s_withdata.index.another
 test:drop()
 s_disabled:drop()
diff --git a/test/box/errinj_index.result b/test/box/errinj_index.result
index 0bce3216dacf3de941595092b597ceb614018a3d..d79edc5b1ecac7a2cc142e74f0b023d93680657b 100644
--- a/test/box/errinj_index.result
+++ b/test/box/errinj_index.result
@@ -5,7 +5,7 @@ errinj = require('box.error.injection')
 s = box.schema.create_space('tweedledum')
 ---
 ...
-s:create_index('primary', {type = 'tree'} )
+index = s:create_index('primary', {type = 'tree'} )
 ---
 ...
 for i = 1,10 do s:insert{i, i, 'test' .. i} end
@@ -264,7 +264,7 @@ s:drop()
 s = box.schema.create_space('tweedledum')
 ---
 ...
-s:create_index('primary', {type = 'hash'} )
+index = s:create_index('primary', {type = 'hash'} )
 ---
 ...
 for i = 1,10 do s:insert{i, i, 'test' .. i} end
diff --git a/test/box/errinj_index.test.lua b/test/box/errinj_index.test.lua
index 3a339d4aca6007e14c35271211903ab268327824..1913b50caca060a477a87fb30d3f67837a3d7419 100644
--- a/test/box/errinj_index.test.lua
+++ b/test/box/errinj_index.test.lua
@@ -3,7 +3,7 @@ errinj = require('box.error.injection')
 -- Check a failed realloc in tree index.
 
 s = box.schema.create_space('tweedledum')
-s:create_index('primary', {type = 'tree'} )
+index = s:create_index('primary', {type = 'tree'} )
 
 for i = 1,10 do s:insert{i, i, 'test' .. i} end
 res = {}
@@ -70,7 +70,7 @@ s:drop()
 -- Check a failed realloc in hash index.
 
 s = box.schema.create_space('tweedledum')
-s:create_index('primary', {type = 'hash'} )
+index = s:create_index('primary', {type = 'hash'} )
 
 for i = 1,10 do s:insert{i, i, 'test' .. i} end
 res = {}
diff --git a/test/box/fiber.result b/test/box/fiber.result
index 13a1aa6044ed9b8a51b2f6744deef3477548b8f8..122647fce6f66abd91c21d28c08c370690380fd1 100644
--- a/test/box/fiber.result
+++ b/test/box/fiber.result
@@ -4,7 +4,7 @@ fiber = require('fiber')
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 -- A test case for a race condition between ev_schedule
diff --git a/test/box/fiber.test.lua b/test/box/fiber.test.lua
index 258561e06c04dc5b89bbe9f055cd63c2dcb2b8c4..73eb308e2a9b72fa7de8f4095689677966009e90 100644
--- a/test/box/fiber.test.lua
+++ b/test/box/fiber.test.lua
@@ -1,6 +1,6 @@
 fiber = require('fiber')
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 -- A test case for a race condition between ev_schedule
 -- and wal_schedule fiber schedulers.
 -- The same fiber should not be scheduled by ev_schedule (e.g.
diff --git a/test/box/insert.result b/test/box/insert.result
index 6542c0defcfa0dfb7212c7c02be7fbce6cdcdd90..f0d05321b1ea1bd4026a712ea61056d507fb1581 100644
--- a/test/box/insert.result
+++ b/test/box/insert.result
@@ -3,7 +3,7 @@
 s = box.schema.create_space('s')
 ---
 ...
-s:create_index('pk')
+index = s:create_index('pk')
 ---
 ...
 s:insert(1)
diff --git a/test/box/insert.test.lua b/test/box/insert.test.lua
index 79e8d0ab5c07f7a33b529b22139c366b2c9747f1..5a106cf69d7139a6fe537a87911540d7d6b3bfeb 100644
--- a/test/box/insert.test.lua
+++ b/test/box/insert.test.lua
@@ -1,7 +1,7 @@
 -- gh-186 New implementation of box.replace does not check that tuple is
 -- array
 s = box.schema.create_space('s')
-s:create_index('pk')
+index = s:create_index('pk')
 s:insert(1)
 s:insert(1, 2)
 s:insert(1, 2, 3)
diff --git a/test/box/iproto.result b/test/box/iproto.result
index 9b6826200771788236f0f5e126eac12457059c5c..fa577523ee906d71b657bd6fb7875cc39808a46c 100644
--- a/test/box/iproto.result
+++ b/test/box/iproto.result
@@ -76,7 +76,7 @@ box.cfg.wal_mode
 space = box.schema.create_space('test', { id = 567 })
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 box.schema.user.grant('guest', 'read,write,execute', 'space', 'test')
@@ -112,7 +112,7 @@ space:drop()
 space = box.schema.create_space('test')
 ---
 ...
-space:create_index('primary', { type = 'hash', parts = {1, 'str'}})
+index = space:create_index('primary', { type = 'hash', parts = {1, 'str'}})
 ---
 ...
 STR 1
diff --git a/test/box/iproto.test.py b/test/box/iproto.test.py
index beae1a2071420f679482daa96524a5d97b971851..4c8d511bbdf5a4b24e3d2602bdf29c92bf72e10c 100644
--- a/test/box/iproto.test.py
+++ b/test/box/iproto.test.py
@@ -93,7 +93,7 @@ print "\n"
 # gh-434 Tarantool crashes on multiple iproto requests with WAL enabled
 admin("box.cfg.wal_mode")
 admin("space = box.schema.create_space('test', { id = 567 })")
-admin("space:create_index('primary', { type = 'hash' })")
+admin("index = space:create_index('primary', { type = 'hash' })")
 admin("box.schema.user.grant('guest', 'read,write,execute', 'space', 'test')")
 
 c = Connection('localhost', server.sql.port)
@@ -154,7 +154,7 @@ admin("space:drop()")
 # gh-522: Broken compatibility with msgpack-python for strings of size 33..255
 #
 admin("space = box.schema.create_space('test')")
-admin("space:create_index('primary', { type = 'hash', parts = {1, 'str'}})")
+admin("index = space:create_index('primary', { type = 'hash', parts = {1, 'str'}})")
 
 class RawInsert(Request):
     request_type = REQUEST_TYPE_INSERT
diff --git a/test/box/luafun.result b/test/box/luafun.result
index 70f98792cf0d5b7b0cbae348535f4fc076a789bb..295e884b3cd11d8f857ee73e1d02d4786f03b9ae 100644
--- a/test/box/luafun.result
+++ b/test/box/luafun.result
@@ -4,7 +4,7 @@
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 for i = 1,5,1 do space:replace({i, i}) end
diff --git a/test/box/luafun.test.lua b/test/box/luafun.test.lua
index d66aa5874bac1b80c73b64a5a71c84eb2ef4616b..f01bb9b3dac1610f5de0a3d6c16b9f23b3fd3eab 100644
--- a/test/box/luafun.test.lua
+++ b/test/box/luafun.test.lua
@@ -3,7 +3,7 @@
 --------------------------------------------------------------------------------
 
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 for i = 1,5,1 do space:replace({i, i}) end
 
 fun = require('fun')
diff --git a/test/box/misc.result b/test/box/misc.result
index b58402743425ee14bad1524e63dee097f671a491..247bff00e6063cc1e0ee8555a69c63a709727b5b 100644
--- a/test/box/misc.result
+++ b/test/box/misc.result
@@ -1,7 +1,7 @@
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 -- Test Lua from admin console. Whenever producing output,
diff --git a/test/box/misc.test.lua b/test/box/misc.test.lua
index 10edd169c8516ee26cee0b29bcb0373a693787ef..e0995a73ec4372beaf8957be68b60938c5ea80d2 100644
--- a/test/box/misc.test.lua
+++ b/test/box/misc.test.lua
@@ -1,5 +1,5 @@
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 
 -- Test Lua from admin console. Whenever producing output,
 -- make sure it's a valid YAML.
diff --git a/test/box/on_replace.result b/test/box/on_replace.result
index 3de8a9e9edc2f0e325116e016d017b02f12d165b..c5295f375047c923dc224e8a8aaa0beb613e0342 100644
--- a/test/box/on_replace.result
+++ b/test/box/on_replace.result
@@ -1,7 +1,7 @@
 ts = box.schema.create_space('test_space')
 ---
 ...
-ts:create_index('primary', { type = 'hash' })
+ti = ts:create_index('primary', { type = 'hash' })
 ---
 ...
 type(ts.on_replace)
diff --git a/test/box/on_replace.test.lua b/test/box/on_replace.test.lua
index 6a79ba6337b24e237ffa776c9ed19ebaa0c5ef76..78ccefb0936e1200c73b5c7befeee509392440ac 100644
--- a/test/box/on_replace.test.lua
+++ b/test/box/on_replace.test.lua
@@ -1,5 +1,5 @@
 ts = box.schema.create_space('test_space')
-ts:create_index('primary', { type = 'hash' })
+ti = ts:create_index('primary', { type = 'hash' })
 
 type(ts.on_replace)
 ts.on_replace()
diff --git a/test/box/protocol.result b/test/box/protocol.result
index f1e99fccb70c88b6891e9fa4be66a9540d47fd2b..86698ffceaa0bb801cdbf272a034cf0bb31dc237 100644
--- a/test/box/protocol.result
+++ b/test/box/protocol.result
@@ -7,7 +7,7 @@ box.schema.user.grant('guest', 'read,write,execute', 'universe')
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'tree'})
+index = space:create_index('primary', { type = 'tree'})
 ---
 ...
 for i=1,5 do space:insert{i} end
diff --git a/test/box/protocol.test.lua b/test/box/protocol.test.lua
index fa75d8d8cd854e8020ccfb2ae59dc567fcd1f6f1..1349541bbcc147ba52d8859e77ca61cf6b14281e 100644
--- a/test/box/protocol.test.lua
+++ b/test/box/protocol.test.lua
@@ -5,7 +5,7 @@ box.schema.user.grant('guest', 'read,write,execute', 'universe')
 --------------------------------------------------------------------------------
 
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'tree'})
+index = space:create_index('primary', { type = 'tree'})
 for i=1,5 do space:insert{i} end
 
 LISTEN = require('uri').parse(box.cfg.listen)
diff --git a/test/box/reconfigure.result b/test/box/reconfigure.result
index 17d1412ebaef603869400ed0cccc5da9ed9e068c..048460b37e87479d4435a3e377120dda8f7e7a0f 100644
--- a/test/box/reconfigure.result
+++ b/test/box/reconfigure.result
@@ -36,7 +36,7 @@ box.cfg.io_collect_interval
 space = box.schema.create_space('tweedledum', { id = 0 })
 ---
 ...
-space:create_index('primary', { type = 'hash'})
+index = space:create_index('primary', { type = 'hash'})
 ---
 ...
 space:insert{1, 'tuple'}
diff --git a/test/box/reconfigure.test.lua b/test/box/reconfigure.test.lua
index 236b5de8688a3d397e04d0a6de91fa0792778453..9c607b95099423ea730cbc76b7a647cc0bd82215 100644
--- a/test/box/reconfigure.test.lua
+++ b/test/box/reconfigure.test.lua
@@ -14,7 +14,7 @@ box.cfg.io_collect_interval
 -- configuration'
 --
 space = box.schema.create_space('tweedledum', { id = 0 })
-space:create_index('primary', { type = 'hash'})
+index = space:create_index('primary', { type = 'hash'})
 space:insert{1, 'tuple'}
 box.snapshot()
 box.cfg{}
diff --git a/test/box/schema.result b/test/box/schema.result
index 6a658d3f0c727fca7b2f6a0295bf92f45e104053..02aa15cd96aae2172075f5259c97272784a6efd6 100644
--- a/test/box/schema.result
+++ b/test/box/schema.result
@@ -1,7 +1,7 @@
 space = box.schema.create_space('tweedledum', { id = 0 })
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 t = {} for k,v in pairs(box.space[0]) do if type(v) ~= 'table' and type(v) ~= 'function' then table.insert(t, k..': '..tostring(v)) end end
diff --git a/test/box/schema.test.lua b/test/box/schema.test.lua
index 9e589c1a24f032dd7c6a5ca620b006dfd3d60497..0c72916a1d2ebc2151d8af82f2598f768b06e93a 100644
--- a/test/box/schema.test.lua
+++ b/test/box/schema.test.lua
@@ -1,5 +1,5 @@
 space = box.schema.create_space('tweedledum', { id = 0 })
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 
 t = {} for k,v in pairs(box.space[0]) do if type(v) ~= 'table' and type(v) ~= 'function' then table.insert(t, k..': '..tostring(v)) end end
 t
diff --git a/test/box/select.result b/test/box/select.result
index 9165a6e00019663278f530669fe6c2c5cb558cbf..82fa43b53777d292e62d6c1ebd6b6cd9526bfa2c 100644
--- a/test/box/select.result
+++ b/test/box/select.result
@@ -1,10 +1,10 @@
 s = box.schema.create_space('select', { temporary = true })
 ---
 ...
-index = s:create_index('primary', { type = 'tree' })
+index1 = s:create_index('primary', { type = 'tree' })
 ---
 ...
-s:create_index('second', { type = 'tree', unique = true,  parts = {2, 'num', 1, 'num'}})
+index2 = s:create_index('second', { type = 'tree', unique = true,  parts = {2, 'num', 1, 'num'}})
 ---
 ...
 for i = 1, 20 do s:insert({ i, 1, 2, 3 }) end
@@ -541,7 +541,7 @@ s:drop()
 s = box.schema.create_space('select', { temporary = true })
 ---
 ...
-s:create_index('primary', { type = 'tree' })
+index = s:create_index('primary', { type = 'tree' })
 ---
 ...
 local a s:insert{0}
diff --git a/test/box/select.test.lua b/test/box/select.test.lua
index 385a3c295bbec59e7f2b9ded48f92eacf18ea515..cb30b6c4cc607880c4210ba0a3ed00eeb88a4122 100644
--- a/test/box/select.test.lua
+++ b/test/box/select.test.lua
@@ -1,6 +1,6 @@
 s = box.schema.create_space('select', { temporary = true })
-index = s:create_index('primary', { type = 'tree' })
-s:create_index('second', { type = 'tree', unique = true,  parts = {2, 'num', 1, 'num'}})
+index1 = s:create_index('primary', { type = 'tree' })
+index2 = s:create_index('second', { type = 'tree', unique = true,  parts = {2, 'num', 1, 'num'}})
 for i = 1, 20 do s:insert({ i, 1, 2, 3 }) end
 
 --------------------------------------------------------------------------------
@@ -78,7 +78,7 @@ s:select(2)
 s:drop()
 
 s = box.schema.create_space('select', { temporary = true })
-s:create_index('primary', { type = 'tree' })
+index = s:create_index('primary', { type = 'tree' })
 local a s:insert{0}
 lots_of_links = {}
 ref_count = 0
diff --git a/test/box/session.result b/test/box/session.result
index 96469ca9389aae39fe99580b2ec388a3bc57bc05..a087de691b433742a6ee07ff1ef498d1a00e1957 100644
--- a/test/box/session.result
+++ b/test/box/session.result
@@ -7,7 +7,7 @@ fiber = require('fiber')
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 session.exists(session.id())
diff --git a/test/box/session.test.lua b/test/box/session.test.lua
index 95152624feb1015433c4c135a6500a97510228ed..da1bc63e8d42ef24ae9200e76fc632f8edbe39e6 100644
--- a/test/box/session.test.lua
+++ b/test/box/session.test.lua
@@ -2,7 +2,7 @@ session = box.session
 fiber = require('fiber')
 
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 
 session.exists(session.id())
 session.peer(session.id())
diff --git a/test/box/snapshot.result b/test/box/snapshot.result
index 536a00b789d176afd9675f6dcf87a118b11bc87e..b5920d412146ca26aa0b91a9d9ee74f4d716c377 100644
--- a/test/box/snapshot.result
+++ b/test/box/snapshot.result
@@ -1,7 +1,7 @@
 space = box.schema.create_space('tweedledum', { id = 0 })
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 #
diff --git a/test/box/snapshot.test.py b/test/box/snapshot.test.py
index f7f66c6c930ed819532cfbe2465edf8793627d4b..cdcbbdfe3caf52963aee6d092f09daeb897c2d23 100644
--- a/test/box/snapshot.test.py
+++ b/test/box/snapshot.test.py
@@ -4,7 +4,7 @@ import time
 from signal import SIGUSR1
 
 admin("space = box.schema.create_space('tweedledum', { id = 0 })")
-admin("space:create_index('primary', { type = 'hash' })")
+admin("index = space:create_index('primary', { type = 'hash' })")
 
 print """#
 # A test case for: http://bugs.launchpad.net/bugs/686411
diff --git a/test/box/snapshot_daemon.result b/test/box/snapshot_daemon.result
index 57e0fd3d52964518cf632195051ce6f36021c963..95aa45ff93a1b86a481d0933c154bb0ba9ad6216 100644
--- a/test/box/snapshot_daemon.result
+++ b/test/box/snapshot_daemon.result
@@ -46,7 +46,7 @@ end
 space = box.schema.create_space('snapshot_daemon')
 ---
 ...
-space:create_index('pk', { type = 'tree', parts = { 1, 'num' }})
+index = space:create_index('pk', { type = 'tree', parts = { 1, 'num' }})
 ---
 ...
 box.cfg{snapshot_period = PERIOD, snapshot_count = 2 }
diff --git a/test/box/snapshot_daemon.test.lua b/test/box/snapshot_daemon.test.lua
index 45aeb441fc5981d1527210571af289b486396613..d81104d26c81ff694c130b9350efd14c924171a3 100644
--- a/test/box/snapshot_daemon.test.lua
+++ b/test/box/snapshot_daemon.test.lua
@@ -24,7 +24,7 @@ end
 
 
 space = box.schema.create_space('snapshot_daemon')
-space:create_index('pk', { type = 'tree', parts = { 1, 'num' }})
+index = space:create_index('pk', { type = 'tree', parts = { 1, 'num' }})
 
 
 box.cfg{snapshot_period = PERIOD, snapshot_count = 2 }
diff --git a/test/box/sql.result b/test/box/sql.result
index cd40f5349dea5e2321d31a20ee043b4966752c6a..9c1c375829e19b4d40aaba65013fd1306a8d6199 100644
--- a/test/box/sql.result
+++ b/test/box/sql.result
@@ -16,7 +16,7 @@ box.schema.user.grant('test', 'Execute', 'function', 'f')
 call f()
 ---
 ...
-box.space.test:create_index('primary', { type = 'hash' })
+index = box.space.test:create_index('primary', { type = 'hash' })
 ---
 ...
 ping
diff --git a/test/box/sql.test.py b/test/box/sql.test.py
index 77a7698a70a1c974c4be19efa2beb2bdd3014e6b..2dfd8a6515167a6145539102b96f20a02414b7c1 100644
--- a/test/box/sql.test.py
+++ b/test/box/sql.test.py
@@ -8,7 +8,7 @@ admin("box.schema.user.grant('test', 'Execute', 'function', 'f')")
 sql.authenticate('test', 'test')
 # call from sql to have the right owner
 sql("call f()")
-admin("box.space.test:create_index('primary', { type = 'hash' })")
+admin("index = box.space.test:create_index('primary', { type = 'hash' })")
 sql("ping")
 # xxx: bug -- currently selects no rows
 sql("select * from t0")
diff --git a/test/box/stat.result b/test/box/stat.result
index 9a7d80f3ec8bc3c7ca54e63c41ba464e648c2433..573b5b2cf6ebf3b37ca94a6ffa0c107d88ab85ef 100644
--- a/test/box/stat.result
+++ b/test/box/stat.result
@@ -24,7 +24,7 @@ box.stat.SELECT.total
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 -- check stat_cleanup
diff --git a/test/box/stat.test.lua b/test/box/stat.test.lua
index d27662d6aea73d6912bcca155a86aecf73b31a78..d25a67e22f2c6d04303d932a2d2bae44f408b7c4 100644
--- a/test/box/stat.test.lua
+++ b/test/box/stat.test.lua
@@ -8,7 +8,7 @@ box.stat.REPLACE.total
 box.stat.SELECT.total
 
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 
 -- check stat_cleanup
 -- add several tuples
diff --git a/test/box/temp_spaces.result b/test/box/temp_spaces.result
index 640f872956238fdffe4d8ebf6b3b92facbe93442..16b1a4b8677257ea3486e3c5ec461e2d31347aa3 100644
--- a/test/box/temp_spaces.result
+++ b/test/box/temp_spaces.result
@@ -38,7 +38,7 @@ s:drop()
 s = box.schema.create_space('t', { temporary = true })
 ---
 ...
-s:create_index('primary', { type = 'hash' })
+index = s:create_index('primary', { type = 'hash' })
 ---
 ...
 s:insert{1, 2, 3}
diff --git a/test/box/temp_spaces.test.lua b/test/box/temp_spaces.test.lua
index 82e4953fd05227aa035fbfc3d3db6560104a0a5f..bc4961a90415b649d623c9aa9ce8f4e1ab453d86 100644
--- a/test/box/temp_spaces.test.lua
+++ b/test/box/temp_spaces.test.lua
@@ -16,7 +16,7 @@ s.temporary
 s:drop()
 
 s = box.schema.create_space('t', { temporary = true })
-s:create_index('primary', { type = 'hash' })
+index = s:create_index('primary', { type = 'hash' })
 
 s:insert{1, 2, 3}
 s:get{1}
diff --git a/test/box/transaction.result b/test/box/transaction.result
index c8b38ae3a6d6080bdf8a0e93ef71aa8fa246504d..6cfc1893e80a4d33b02a17f28b29ef46f8bf0d42 100644
--- a/test/box/transaction.result
+++ b/test/box/transaction.result
@@ -107,14 +107,14 @@ box.rollback();
 s = box.schema.space.create('test');
 ---
 ...
-box.begin() s:create_index('primary');
+box.begin() index = s:create_index('primary');
 ---
 - error: Space _index does not support multi-statement transactions
 ...
 box.rollback();
 ---
 ...
-s:create_index('primary');
+index = s:create_index('primary');
 ---
 ...
 function multi()
@@ -264,7 +264,7 @@ s:drop();
 tester = box.schema.create_space('tester')
 ---
 ...
-tester:create_index('primary')
+tindex = tester:create_index('primary')
 ---
 ...
 box.begin() tester:insert{1} box.rollback()
diff --git a/test/box/transaction.test.lua b/test/box/transaction.test.lua
index 341b1eea65bd125148e73b17f6ba2e4d06a2b10e..c49152234ddad1b549e5c021b0102d70d512da2a 100644
--- a/test/box/transaction.test.lua
+++ b/test/box/transaction.test.lua
@@ -42,9 +42,9 @@ box.rollback();
 box.begin() box.space._cluster:insert{123456789, 'abc'};
 box.rollback();
 s = box.schema.space.create('test');
-box.begin() s:create_index('primary');
+box.begin() index = s:create_index('primary');
 box.rollback();
-s:create_index('primary');
+index = s:create_index('primary');
 function multi()
     box.begin()
     s:auto_increment{'first row'}
@@ -122,7 +122,7 @@ s:select{};
 s:drop();
 --# setopt delimiter ''
 tester = box.schema.create_space('tester')
-tester:create_index('primary')
+tindex = tester:create_index('primary')
 box.begin() tester:insert{1} box.rollback()
 tester:select{1}
 box.begin() tester:insert{1} box.commit()
diff --git a/test/box/tuple.result b/test/box/tuple.result
index 975be871b5ce53c4f92baf19cc6e47b17f4af263..08db8a8078a3e7da70afa3ab1b159944d26297a0 100644
--- a/test/box/tuple.result
+++ b/test/box/tuple.result
@@ -260,7 +260,7 @@ getmetatable(box.tuple.new{1, 2, 3}:totable())
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary')
+index = space:create_index('primary')
 ---
 ...
 space:truncate()
diff --git a/test/box/tuple.test.lua b/test/box/tuple.test.lua
index cb8f126f3d96ffd141119d63a28a4cac81b72d6f..f5161f58ecdf4a6b701c57c5b372ff1f76b4353f 100644
--- a/test/box/tuple.test.lua
+++ b/test/box/tuple.test.lua
@@ -81,7 +81,7 @@ getmetatable(box.tuple.new{1, 2, 3}:totable())
 
 --  A test case for the key as an tuple
 space = box.schema.create_space('tweedledum')
-space:create_index('primary')
+index = space:create_index('primary')
 space:truncate()
 t=space:insert{0, 777, '0', '1', '2', '3'}
 t
diff --git a/test/box/update.result b/test/box/update.result
index b2b49e328484118f8bc65f7d4222f463e871c4fe..682e25b1ede18357b39b22273c7a41546d7861c4 100644
--- a/test/box/update.result
+++ b/test/box/update.result
@@ -1,7 +1,7 @@
 s = box.schema.create_space('tweedledum')
 ---
 ...
-s:create_index('pk')
+index = s:create_index('pk')
 ---
 ...
 -- test delete field
@@ -334,7 +334,7 @@ s:drop()
 s = box.schema.create_space('tweedledum')
 ---
 ...
-s:create_index('pk')
+index = s:create_index('pk')
 ---
 ...
 s:insert{1, 2, 3}
diff --git a/test/box/update.test.lua b/test/box/update.test.lua
index 010721ce170bed04660c16ed85d7e2a84c153bb4..4c480a90d3662fcb33a4a209d65a14d750b12cd9 100644
--- a/test/box/update.test.lua
+++ b/test/box/update.test.lua
@@ -1,5 +1,5 @@
 s = box.schema.create_space('tweedledum')
-s:create_index('pk')
+index = s:create_index('pk')
 
 -- test delete field
 s:insert{1000001, 1000002, 1000003, 1000004, 1000005}
@@ -113,7 +113,7 @@ s:drop()
 
 -- #521: Cryptic error message in update operation
 s = box.schema.create_space('tweedledum')
-s:create_index('pk')
+index = s:create_index('pk')
 s:insert{1, 2, 3}
 s:update({1})
 s:update({1}, {'=', 1, 1})
diff --git a/test/box/xlog.result b/test/box/xlog.result
index 2cbf8cb9d5500721a5cbb6a9572cdd0d6440312d..89a982a4ba0195c13f884d8f09b9054772237a0e 100644
--- a/test/box/xlog.result
+++ b/test/box/xlog.result
@@ -5,7 +5,7 @@ space = box.schema.create_space('tweedledum', { id = 0 })
 ---
 ...
 .xlog.inprogress exists
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 .xlog.inprogress has been successfully renamed
@@ -34,7 +34,7 @@ box.space[0]:insert{5, 'Unfinished record'}
 space = box.schema.create_space('test')
 ---
 ...
-box.space['test']:create_index('primary')
+index = box.space['test']:create_index('primary')
 ---
 ...
 box.space['test']:insert{1, 'first tuple'}
@@ -49,7 +49,7 @@ box.space['test']:insert{2, 'second tuple'}
 space = box.schema.create_space('test')
 ---
 ...
-box.space['test']:create_index('primary')
+index = box.space['test']:create_index('primary')
 ---
 ...
 box.space['test']:insert{1, 'first tuple'}
@@ -88,7 +88,7 @@ box.space['test']:len()
 space = box.schema.create_space('test')
 ---
 ...
-box.space.test:create_index('primary')
+index = box.space.test:create_index('primary')
 ---
 ...
 box.space.test:insert{1, 'first tuple'}
diff --git a/test/box/xlog.test.py b/test/box/xlog.test.py
index 3b93d72c37710cdd2295ed6181b5589b8700b699..6d70d7491574935c1afb785b51dadd798bc57ad3 100644
--- a/test/box/xlog.test.py
+++ b/test/box/xlog.test.py
@@ -24,7 +24,7 @@ server.admin("space = box.schema.create_space('tweedledum', { id = 0 })")
 if os.access(wal_inprogress, os.F_OK):
   print ".xlog.inprogress exists"
 
-server.admin("space:create_index('primary', { type = 'hash' })")
+server.admin("index = space:create_index('primary', { type = 'hash' })")
 
 if os.access(wal, os.F_OK) and not os.access(wal_inprogress, os.F_OK):
   print ".xlog.inprogress has been successfully renamed"
@@ -145,7 +145,7 @@ wal = os.path.join(server.vardir, filename)
 
 # Create wal#1
 server.admin("space = box.schema.create_space('test')")
-server.admin("box.space['test']:create_index('primary')")
+server.admin("index = box.space['test']:create_index('primary')")
 server.admin("box.space['test']:insert{1, 'first tuple'}")
 server.admin("box.space['test']:insert{2, 'second tuple'}")
 server.stop()
@@ -160,7 +160,7 @@ lsn += 4
 # Create another wal#1
 server.start()
 server.admin("space = box.schema.create_space('test')")
-server.admin("box.space['test']:create_index('primary')")
+server.admin("index = box.space['test']:create_index('primary')")
 server.admin("box.space['test']:insert{1, 'first tuple'}")
 server.admin("box.space['test']:delete{1}")
 server.stop()
@@ -207,7 +207,7 @@ server.deploy()
 
 # Create wal#1
 server.admin("space = box.schema.create_space('test')")
-server.admin("box.space.test:create_index('primary')")
+server.admin("index = box.space.test:create_index('primary')")
 server.admin("box.space.test:insert{1, 'first tuple'}")
 server.admin("box.space.test:insert{2, 'second tuple'}")
 lsn = int(yaml.load(server.admin("box.info.server.lsn", silent=True))[0])
diff --git a/test/replication/consistent.result b/test/replication/consistent.result
index c2bcd55ee174d0a8fcafff8f08b1a6b8e7abac56..a57f992fb11dfe5a0ff344f1cfff13de818ba9c6 100644
--- a/test/replication/consistent.result
+++ b/test/replication/consistent.result
@@ -60,7 +60,7 @@ a:close()
 s = box.schema.create_space('tweedledum', {id = 0});
 ---
 ...
-s:create_index('primary', {type = 'hash'})
+index = s:create_index('primary', {type = 'hash'})
 ---
 ...
 _insert(1, 10, 'master')
diff --git a/test/replication/consistent.test.lua b/test/replication/consistent.test.lua
index a756258b8956bb6857496aac03be510ba6731a4c..06c18ac135729d3f25889ae76cedfa1beac83d2a 100644
--- a/test/replication/consistent.test.lua
+++ b/test/replication/consistent.test.lua
@@ -44,7 +44,7 @@ a:call('_set_pri_lsn', box.info.lsn)
 a:close()
 
 s = box.schema.create_space('tweedledum', {id = 0});
-s:create_index('primary', {type = 'hash'})
+index = s:create_index('primary', {type = 'hash'})
 _insert(1, 10, 'master')
 _select(1, 10)
 --# set connection replica
diff --git a/test/replication/hot_standby.result b/test/replication/hot_standby.result
index d2b066d47a98c1c6fc952afcf7743f088c45fd28..571613664c3a67514da4212971c4ad7dda26e4e3 100644
--- a/test/replication/hot_standby.result
+++ b/test/replication/hot_standby.result
@@ -84,7 +84,7 @@ a:close()
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 _insert(1, 10)
diff --git a/test/replication/hot_standby.test.lua b/test/replication/hot_standby.test.lua
index 560207fb6b5dd5f2b9495272dc252a75a29a32f8..655c22652705daf4d5688793466692fa2af3b9b6 100644
--- a/test/replication/hot_standby.test.lua
+++ b/test/replication/hot_standby.test.lua
@@ -63,7 +63,7 @@ a:call('_set_pri_lsn', box.info.server.id, box.info.server.lsn)
 a:close()
 
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 
 _insert(1, 10)
 _select(1, 10)
diff --git a/test/replication/init_storage.result b/test/replication/init_storage.result
index 1e57498026fcc632b019c7eba0d546e8852dc735..a013177fbbf7d1dbe653ab71d39beda3d674174b 100644
--- a/test/replication/init_storage.result
+++ b/test/replication/init_storage.result
@@ -4,7 +4,7 @@ box.schema.user.grant('guest', 'read,write,execute', 'universe')
 space = box.schema.create_space('test', {id =  42})
 ---
 ...
-space:create_index('primary', { type = 'tree'})
+index = space:create_index('primary', { type = 'tree'})
 ---
 ...
 for k = 1, 9 do space:insert{k, k*k} end
diff --git a/test/replication/init_storage.test.py b/test/replication/init_storage.test.py
index e7049c89a2efd78ae4f8d757e38c5ae2a35ad97c..4f6f78a6d0904c434d8f6b3d15b41c3e1a9a7097 100644
--- a/test/replication/init_storage.test.py
+++ b/test/replication/init_storage.test.py
@@ -8,7 +8,7 @@ master_id = master.get_param('server')['id']
 
 master.admin("box.schema.user.grant('guest', 'read,write,execute', 'universe')")
 master.admin("space = box.schema.create_space('test', {id =  42})")
-master.admin("space:create_index('primary', { type = 'tree'})")
+master.admin("index = space:create_index('primary', { type = 'tree'})")
 
 master.admin('for k = 1, 9 do space:insert{k, k*k} end')
 
diff --git a/test/replication/swap.result b/test/replication/swap.result
index 7264bc985d053c0fb122f80eeda232b9e9e736eb..117f464cec8de76222ce4ce84a5f6a1bdc0c89af 100644
--- a/test/replication/swap.result
+++ b/test/replication/swap.result
@@ -13,7 +13,7 @@ while box.space['_priv']:len() < 1 do require('fiber').sleep(0.01) end
 s = box.schema.create_space('tweedledum', {id = 0})
 ---
 ...
-s:create_index('primary', {type = 'hash'})
+index = s:create_index('primary', {type = 'hash'})
 ---
 ...
 test 0 iteration
diff --git a/test/replication/swap.test.py b/test/replication/swap.test.py
index 74cd85a7b37e7d7042bb79fc03c6f29b04ba8c02..108d7f237b55b731c2573a7e1a833ae5c00e0174 100644
--- a/test/replication/swap.test.py
+++ b/test/replication/swap.test.py
@@ -37,7 +37,7 @@ replica.admin("while box.space['_priv']:len() < 1 do require('fiber').sleep(0.01
 replica.sql.py_con.authenticate(LOGIN, PASSWORD)
 
 master.admin("s = box.schema.create_space('tweedledum', {id = 0})")
-master.admin("s:create_index('primary', {type = 'hash'})")
+master.admin("index = s:create_index('primary', {type = 'hash'})")
 
 ### gh-343: replica.cc must not add login and password to proc title
 #status = replica.get_param("status")
diff --git a/test/sophia/crud.result b/test/sophia/crud.result
index 52822918ea54bc3c82205c05c31912985589da3d..4ebfdc36ff12cccb294848e0d1c5481e2c8abec3 100644
--- a/test/sophia/crud.result
+++ b/test/sophia/crud.result
@@ -5,7 +5,7 @@ sophia_rmdir()
 space = box.schema.create_space('test', { engine = 'sophia', id = 100 })
 ---
 ...
-space:create_index('primary', { type = 'tree', parts = {1, 'num'} })
+index = space:create_index('primary', { type = 'tree', parts = {1, 'num'} })
 ---
 ...
 for key = 1, 132 do space:insert({key}) end
diff --git a/test/sophia/crud.test.lua b/test/sophia/crud.test.lua
index 191a58057830fb0de8478d8a21cbcf01e88b9e29..39109a25e48094d52724d325c6ebf47b1c0a8c2f 100644
--- a/test/sophia/crud.test.lua
+++ b/test/sophia/crud.test.lua
@@ -4,7 +4,7 @@ sophia_rmdir()
 -- insert
 
 space = box.schema.create_space('test', { engine = 'sophia', id = 100 })
-space:create_index('primary', { type = 'tree', parts = {1, 'num'} })
+index = space:create_index('primary', { type = 'tree', parts = {1, 'num'} })
 for key = 1, 132 do space:insert({key}) end
 t = {}
 for key = 1, 132 do table.insert(t, space:get({key})) end
diff --git a/test/sophia/dml.result b/test/sophia/dml.result
index 69b0f8746bf5b7d9d09d73126652466522b10167..b2a433a2571623120f6daedbbeb28d52ff0fcc1f 100644
--- a/test/sophia/dml.result
+++ b/test/sophia/dml.result
@@ -20,7 +20,7 @@ sophia_printdir()
 space = box.schema.create_space('test', { id = 101, engine = 'sophia' })
 ---
 ...
-space:create_index('primary')
+index = space:create_index('primary')
 ---
 ...
 sophia_printdir()
@@ -40,7 +40,7 @@ sophia_printdir()
 space = box.schema.create_space('test', { id = 102, engine = 'sophia' })
 ---
 ...
-space:create_index('primary')
+index = space:create_index('primary')
 ---
 ...
 sophia_printdir()
@@ -67,7 +67,7 @@ space:drop()
 space = box.schema.create_space('test', { id = 103, engine = 'sophia' })
 ---
 ...
-space:create_index('primary', {type = 'tree', parts = {1, 'STR'}})
+index = space:create_index('primary', {type = 'tree', parts = {1, 'STR'}})
 ---
 ...
 space:insert({'test'})
@@ -87,7 +87,7 @@ space:drop()
 space = box.schema.create_space('test', { id = 104, engine = 'sophia' })
 ---
 ...
-space:create_index('primary', {type = 'tree', parts = {1, 'num'}})
+index = space:create_index('primary', {type = 'tree', parts = {1, 'num'}})
 ---
 ...
 space:insert({13})
@@ -107,7 +107,7 @@ space:drop()
 space = box.schema.create_space('test', { id = 105, engine = 'sophia' })
 ---
 ...
-space:create_index('primary', {type = 'hash'})
+index = space:create_index('primary', {type = 'hash'})
 ---
 - error: Unsupported index type supplied for index 0 in space 105
 ...
@@ -118,10 +118,10 @@ space:drop()
 space = box.schema.create_space('test', { id = 106, engine = 'sophia' })
 ---
 ...
-space:create_index('primary')
+index1 = space:create_index('primary')
 ---
 ...
-space:create_index('secondary')
+index2 = space:create_index('secondary')
 ---
 - error: 'Can''t create or modify index 1 in space 106: Sophia TREE secondary indexes
     are not supported'
@@ -137,7 +137,7 @@ sophia_printdir()
 space = box.schema.create_space('test', { id = 107, engine = 'sophia' })
 ---
 ...
-space:create_index('primary')
+index = space:create_index('primary')
 ---
 ...
 primary = space.index[0]
diff --git a/test/sophia/dml.test.lua b/test/sophia/dml.test.lua
index 56ca115287d3c6edca13fda99bc4e70c403e45c4..ebd6ce8f64b14953e547ec2bdb6b49d56ad6b80e 100644
--- a/test/sophia/dml.test.lua
+++ b/test/sophia/dml.test.lua
@@ -11,7 +11,7 @@ sophia_printdir()
 -- index create/drop
 
 space = box.schema.create_space('test', { id = 101, engine = 'sophia' })
-space:create_index('primary')
+index = space:create_index('primary')
 sophia_printdir()
 space:drop()
 sophia_printdir()
@@ -19,7 +19,7 @@ sophia_printdir()
 -- index create/drop alter
 
 space = box.schema.create_space('test', { id = 102, engine = 'sophia' })
-space:create_index('primary')
+index = space:create_index('primary')
 sophia_printdir()
 _index = box.space[box.schema.INDEX_ID]
 _index:delete{102, 0}
@@ -29,7 +29,7 @@ space:drop()
 -- index create/drop tree string
 
 space = box.schema.create_space('test', { id = 103, engine = 'sophia' })
-space:create_index('primary', {type = 'tree', parts = {1, 'STR'}})
+index = space:create_index('primary', {type = 'tree', parts = {1, 'STR'}})
 space:insert({'test'})
 sophia_printdir()
 space:drop()
@@ -37,7 +37,7 @@ space:drop()
 -- index create/drop tree num
 
 space = box.schema.create_space('test', { id = 104, engine = 'sophia' })
-space:create_index('primary', {type = 'tree', parts = {1, 'num'}})
+index = space:create_index('primary', {type = 'tree', parts = {1, 'num'}})
 space:insert({13})
 sophia_printdir()
 space:drop()
@@ -45,21 +45,21 @@ space:drop()
 -- index create hash 
 
 space = box.schema.create_space('test', { id = 105, engine = 'sophia' })
-space:create_index('primary', {type = 'hash'})
+index = space:create_index('primary', {type = 'hash'})
 space:drop()
 
 -- secondary index create
 
 space = box.schema.create_space('test', { id = 106, engine = 'sophia' })
-space:create_index('primary')
-space:create_index('secondary')
+index1 = space:create_index('primary')
+index2 = space:create_index('secondary')
 space:drop()
 sophia_printdir()
 
 -- index size
 
 space = box.schema.create_space('test', { id = 107, engine = 'sophia' })
-space:create_index('primary')
+index = space:create_index('primary')
 primary = space.index[0]
 primary:len()
 space:insert({13})
diff --git a/test/sophia/gh.result b/test/sophia/gh.result
index 7debe9511955e359d13fe24eb09354eca7aebd68..d393238be546719c9f196d9479ed0ab3f45fbdf0 100644
--- a/test/sophia/gh.result
+++ b/test/sophia/gh.result
@@ -70,7 +70,7 @@ s:drop()
 s = box.schema.create_space('tester',{engine='sophia'})
 ---
 ...
-s:create_index('sophia_index', {})
+i = s:create_index('sophia_index', {})
 ---
 ...
 s:insert{10000, 'Hilton'}
@@ -103,7 +103,7 @@ s = box.schema.create_space('tester',{engine='sophia', temporary=true})
 s = box.schema.create_space('tester',{id = 89, engine='sophia'})
 ---
 ...
-s:create_index('sophia_index', {})
+i = s:create_index('sophia_index', {})
 ---
 ...
 for v=1, 100 do s:insert({v}) end
@@ -130,7 +130,7 @@ s:drop()
 s = box.schema.create_space('tester', {id = 90, engine='sophia'})
 ---
 ...
-s:create_index('sophia_index', {type = 'tree', parts = {1, 'STR'}})
+i = s:create_index('sophia_index', {type = 'tree', parts = {1, 'STR'}})
 ---
 ...
 for v=1, 100 do s:insert({tostring(v)}) end
diff --git a/test/sophia/gh.test.lua b/test/sophia/gh.test.lua
index 790863b4d17aee01ae13a365d1f4ff4f0924de0f..4f01d2349000e586ff23096e277fab329fd713f0 100644
--- a/test/sophia/gh.test.lua
+++ b/test/sophia/gh.test.lua
@@ -31,7 +31,7 @@ s:drop()
 -- gh-431: Sophia: assertion if box.begin
 
 s = box.schema.create_space('tester',{engine='sophia'})
-s:create_index('sophia_index', {})
+i = s:create_index('sophia_index', {})
 s:insert{10000, 'Hilton'}
 box.begin()
 s:delete{10000} -- exception
@@ -46,7 +46,7 @@ s = box.schema.create_space('tester',{engine='sophia', temporary=true})
 -- gh-432: Sophia: ignored limit
 
 s = box.schema.create_space('tester',{id = 89, engine='sophia'})
-s:create_index('sophia_index', {})
+i = s:create_index('sophia_index', {})
 for v=1, 100 do s:insert({v}) end
 t = s:select({''},{iterator='GT', limit =1})
 t
@@ -55,7 +55,7 @@ t
 s:drop()
 
 s = box.schema.create_space('tester', {id = 90, engine='sophia'})
-s:create_index('sophia_index', {type = 'tree', parts = {1, 'STR'}})
+i = s:create_index('sophia_index', {type = 'tree', parts = {1, 'STR'}})
 for v=1, 100 do s:insert({tostring(v)}) end
 t = s:select({''},{iterator='GT', limit =1})
 t
diff --git a/test/sophia/recover.result b/test/sophia/recover.result
index 4903baa4388743108b9dc90789309e54c050a27b..f162a5564482678cc81f37a577fafe153222d831 100644
--- a/test/sophia/recover.result
+++ b/test/sophia/recover.result
@@ -5,7 +5,7 @@ sophia_rmdir()
 space = box.schema.create_space('test', { id = 100, engine = 'sophia' })
 ---
 ...
-space:create_index('primary')
+index = space:create_index('primary')
 ---
 ...
 sophia_printdir()
diff --git a/test/sophia/recover.test.lua b/test/sophia/recover.test.lua
index ffea2d43ca920888f7cbd065477306ab3d28ab6e..a62d2172d1b95d3f41221d51bd19d070eee185bd 100644
--- a/test/sophia/recover.test.lua
+++ b/test/sophia/recover.test.lua
@@ -4,7 +4,7 @@ sophia_rmdir()
 -- snapshot
 
 space = box.schema.create_space('test', { id = 100, engine = 'sophia' })
-space:create_index('primary')
+index = space:create_index('primary')
 sophia_printdir()
 box.snapshot()
 space:drop()
diff --git a/test/wal/lua.result b/test/wal/lua.result
index 6bd2c18bfea920e0f310db3f2ce6956b745352c3..07d561f99873b4ec8938e9a6e8c87fd05f92d52a 100644
--- a/test/wal/lua.result
+++ b/test/wal/lua.result
@@ -1,10 +1,10 @@
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type ='hash', parts = {1, 'str'}, unique = true })
+index1 = space:create_index('primary', { type ='hash', parts = {1, 'str'}, unique = true })
 ---
 ...
-space:create_index('secondary', { type = 'tree', parts = {2, 'num'}, unique = false })
+index2 = space:create_index('secondary', { type = 'tree', parts = {2, 'num'}, unique = false })
 ---
 ...
 -- A test case for Bug#1042738
@@ -50,7 +50,7 @@ space:drop()
 space = box.schema.create_space('tweedledum', {id=0})
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 --# setopt delimiter ';'
diff --git a/test/wal/lua.test.lua b/test/wal/lua.test.lua
index c137b6bb2a05f1742056b5f8bcaddd5c64aaa320..28b6e29752602cc73e8ceb5e3064137cf334e975 100644
--- a/test/wal/lua.test.lua
+++ b/test/wal/lua.test.lua
@@ -1,6 +1,6 @@
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type ='hash', parts = {1, 'str'}, unique = true })
-space:create_index('secondary', { type = 'tree', parts = {2, 'num'}, unique = false })
+index1 = space:create_index('primary', { type ='hash', parts = {1, 'str'}, unique = true })
+index2 = space:create_index('secondary', { type = 'tree', parts = {2, 'num'}, unique = false })
 -- A test case for Bug#1042738
 -- https://bugs.launchpad.net/tarantool/+bug/1042738
 -- Iteration over a non-unique TREE index
@@ -35,7 +35,7 @@ space:drop()
 -- Space does not exist error on repetitive access to space 0 in Lua
 --
 space = box.schema.create_space('tweedledum', {id=0})
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 
 --# setopt delimiter ';'
 function mktuple(n)
diff --git a/test/wal/oom.result b/test/wal/oom.result
index 089a7c863cee3698aad087f5e4726a1ced3fe041..4a27adc6142d909ce5bc7ab0aa724603b1a67b07 100644
--- a/test/wal/oom.result
+++ b/test/wal/oom.result
@@ -3,7 +3,7 @@
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 --# setopt delimiter ';'
diff --git a/test/wal/oom.test.lua b/test/wal/oom.test.lua
index 586b05f9671dbe12224298fd97e451f15a5ac109..160390a8c5770bb661bbcf2a3d4d6e8054eaf83a 100644
--- a/test/wal/oom.test.lua
+++ b/test/wal/oom.test.lua
@@ -1,7 +1,7 @@
 --# stop server default
 --# start server default
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 --# setopt delimiter ';'
 i = 1;
 while true do
diff --git a/test/wal/tuple.result b/test/wal/tuple.result
index fda61d9397f6253d9e4a02ffc699499b5c031130..26d6507f8f4c82b30899c4073c49e5950781ff1f 100644
--- a/test/wal/tuple.result
+++ b/test/wal/tuple.result
@@ -10,7 +10,7 @@
 tester = box.schema.create_space('tester')
 ---
 ...
-tester:create_index('primary',{})
+index = tester:create_index('primary',{})
 ---
 ...
 --# setopt delimiter ';'
diff --git a/test/wal/tuple.test.lua b/test/wal/tuple.test.lua
index af1a13193f1d69095a86e2c4ce2aac29862b3339..9965eb3090209d49cb45a183cd9efd380526eb3d 100644
--- a/test/wal/tuple.test.lua
+++ b/test/wal/tuple.test.lua
@@ -8,7 +8,7 @@
 -- large tables
 -- -------------------------------------------------------
 tester = box.schema.create_space('tester')
-tester:create_index('primary',{})
+index = tester:create_index('primary',{})
 --# setopt delimiter ';'
 function tuple_max()
     local n = 'a'
diff --git a/test/wal/wal_mode.result b/test/wal/wal_mode.result
index 5e6f49f044e58952f226c02d857723826c26504c..07f5870879612415504e5c7d1bc42767220c85bc 100644
--- a/test/wal/wal_mode.result
+++ b/test/wal/wal_mode.result
@@ -5,7 +5,7 @@ box.cfg.wal_mode
 space = box.schema.create_space('tweedledum')
 ---
 ...
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 ---
 ...
 space:insert{1}
diff --git a/test/wal/wal_mode.test.lua b/test/wal/wal_mode.test.lua
index 4fad8a33e751d19b3763591f129db3c7c4c98992..14a022b3f97e19b350edb1f1a3e2bbaa2c11a0f7 100644
--- a/test/wal/wal_mode.test.lua
+++ b/test/wal/wal_mode.test.lua
@@ -1,6 +1,6 @@
 box.cfg.wal_mode
 space = box.schema.create_space('tweedledum')
-space:create_index('primary', { type = 'hash' })
+index = space:create_index('primary', { type = 'hash' })
 space:insert{1}
 space:insert{2}
 space:insert{3}