From ccb02c76d4924a10477362cbf394eae521476a5f Mon Sep 17 00:00:00 2001
From: ocelot-inc <pgulutzan@ocelot.ca>
Date: Tue, 25 Nov 2014 15:03:49 -0700
Subject: [PATCH] Changes due to emails

---
 doc/user/databases.xml         |  10 +++
 doc/user/preface.xml           |  20 +++---
 doc/user/stored-procedures.xml |  27 +++++---
 doc/user/triggers.xml          |   2 +-
 doc/user/tutorial.xml          | 123 ---------------------------------
 5 files changed, 40 insertions(+), 142 deletions(-)

diff --git a/doc/user/databases.xml b/doc/user/databases.xml
index 9b5faeac45..c1290322a2 100644
--- a/doc/user/databases.xml
+++ b/doc/user/databases.xml
@@ -1025,6 +1025,10 @@ tarantool> <userinput>box.space.space19:dec{1,'a'}</userinput>
             <para>
               Returns: nil.
             </para>
+            <para>
+             Notes: A replace trigger can be temporarily disabled with <code>box.space.<replaceable>space-name</replaceable>:run_triggers(false)</code>
+             and re-enabled with <code>box.space.<replaceable>space-name</replaceable>:run_triggers(true)</code>.
+            </para>
             <para>
             <bridgehead renderas="sect4">Example</bridgehead>
               The following series of requests will create a space, create an index,
@@ -3095,6 +3099,12 @@ To drop a user, say
 <code>box.schema.user.drop(<replaceable>user-name</replaceable>)</code>.
 </para>
 
+<para>
+To check whether a user exists, say
+<code>box.schema.user.exists(<replaceable>user-name</replaceable>)</code>,
+which returns <code>true</code> or <code>false</code>.
+</para>
+
 <para>
 For example, here is a session which creates a new user with
 a strong password, selects a tuple in
diff --git a/doc/user/preface.xml b/doc/user/preface.xml
index c5975df9f7..e973ead3ba 100644
--- a/doc/user/preface.xml
+++ b/doc/user/preface.xml
@@ -165,41 +165,41 @@
    the download and connect to the online Tarantool server running on the web at
    <link xlink:href="http://try.tarantool.org">http://try.tarantool.org</link>.
    Either way, the first tryout can be a matter of following the example
-   in the second part of chapter 2: "Starting Tarantool and making your first
-   database".
+   in the second part of chapter 2: <link linkend="getting-started-start-stop">"Starting Tarantool and making your first
+   database"</link>.
  </para>
  <para>
-   Chapter 3 "Lua and the Tarantool Lua packages" begins with explanations
+   Chapter 3 <link linkend="lua-and-packages">"Lua and the Tarantool Lua packages"</link> begins with explanations
    about Lua and Tarantool's connection with Lua. Those explanations are
    necessary; however, the detailed instructions about each package can be
    regarded as reference material, skip over them lightly until their
    functionality is needed.
  </para>
  <para>
-    Chapter 4 "Databases" is about the Tarantool NoSQL DBMS.
+    Chapter 4 <link linkend="databases">"Databases"</link> is about the Tarantool NoSQL DBMS.
     If the only intent is to use Tarantool as a Lua application server,
     most of the material in this chapter and in the following chapter
-    (Chapter 5 "Replication") will not be necessary. Once again, the
+    (Chapter 5 <link linkend="replication">"Replication"</link>) will not be necessary. Once again, the
     detailed instructions about each package can be regarded as reference
     material.
  </para>
  <para>
-    Chapter 6 "Server administration" and Chapter 7 "Configuration reference"
+    Chapter 6 <link linkend="server-administration">"Server administration"</link> and Chapter 7 <link linkend="configuration-reference">"Configuration reference"</link>
     are primarily for administrators; however, every user should know
     something about how the server is configured so the section about
-    <code>box.cfg</code> is not skippable. Chapter 8 is strictly for
+    <code>box.cfg</code> is not skippable. Chapter 8 <link linkend="connectors">"Connectors"</link> is strictly for
     users who are connecting from a different language such as C or Perl or
     Python -- other users will find no immediate need for this chapter.
  </para>
  <para>
-    The two long tutorials in Appendix B -- "Insert one million tuples with a Lua
-    stored procedure" and "Sum a JSON field for all tuples" -- start
+    The two long tutorials in Appendix C -- <link linkend="lua-tutorial-insert">"Insert one million tuples with a Lua
+    stored procedure"</link> and <link linkend="lua-tutorial-sum">"Sum a JSON field for all tuples"</link> -- start
     slowly and contain commentary that is especially aimed at users
     who may not consider themselves experts at either Lua or NoSQL
     database management.
  </para>
  <para>
-    Finally, Appendix C "Plugins" has examples that will be essential
+    Finally, Appendix D <link linkend="plugins">"Plugins"</link> has examples that will be essential
     for those users who want to connect the Tarantool server to another
     DBMS: MySQL or PostgreSQL.
  </para>
diff --git a/doc/user/stored-procedures.xml b/doc/user/stored-procedures.xml
index 55aa10d18b..b288c3bea9 100644
--- a/doc/user/stored-procedures.xml
+++ b/doc/user/stored-procedures.xml
@@ -59,6 +59,13 @@ tarantool> <userinput>'hello' .. ' world' -- '..' means 'concatenate'</userinput
       targetptr="triggers">triggers</olink> invoked on various events
       within the system.
     </para>
+    <note><simpara>
+      TARANTOOL = A SCRIPT PROCESSOR. Instead of processing scripts with bash or Perl, use tarantool server.
+      For example, let the first line of a shell script be #!/usr/bin/tarantool.
+      This will be a 
+      (<link xlink:href="https://en.wikipedia.org/wiki/Shebang_%28Unix%29" xlink:title="wikipedia.org/Shebang">"Hashbang" hint</link>)
+      that Tarantool will be the script processor. Since Tarantool includes Lua, the file's instructions can be Lua. 
+    </simpara></note>
     <para>
       There is a single global instance of the Lua interpreter, which is
       shared across all connections. Any request from a client
@@ -188,21 +195,21 @@ provided one takes advantage of it where <link xlink:href="http://wiki.luajit.or
     </para>
 
 <para>
-<emphasis>Fibers</emphasis> are like Lua coroutines, but as <link xlink:href="http://members.chello.nl/~w.couwenberg/fibers.htm">one fiber developer</link>
+<link linkend="sp-box-fiber"><emphasis>Fibers</emphasis></link> are like Lua coroutines, but as <link xlink:href="http://members.chello.nl/~w.couwenberg/fibers.htm">one fiber developer</link>
 put it: "The main difference between a coroutine and a fiber
 is that a running fiber can be suspended anywhere in a call
 chain, regardless of its C and Lua call stack nesting levels."       
 </para>
 
 <para>
-<emphasis>MsgPack</emphasis> is a relatively new way to serialize data.                    
+<link linkend="sp-msgpack"><emphasis>MsgPack</emphasis></link> is a relatively new way to serialize data.                    
 The point of MsgPack is that it can
 handle Lua types and C types, with structures and nesting,
 without the overhead of an SGML-style markup language.
 </para>
 
 <para>
-<emphasis>Digest</emphasis> is a cryptography package for CRC32, SHA, and MDA.
+<link linkend="sp-digest"><emphasis>Digest</emphasis></link> is a cryptography package for CRC32, SHA, and MDA.
 Nothing new here -- except that Tarantool has made them into a
 package, so that one doesn't have to get each one of these
 things individually from the <link xlink:href="http://lua-users.org/wiki/CryptographyStuff">many that are available</link>.
@@ -211,7 +218,7 @@ API, the routines should run faster on LuaJIT.
 </para>
 
 <para>
-<emphasis>JSON</emphasis> is a serialization format which has
+<link linkend="sp-box-cjson"><emphasis>JSON</emphasis></link> is a serialization format which has
 become popular in the web world. The package within
 Tarantool is derived from <link xlink:href="http://www.kyne.com.au/~mark/software/lua-cjson-manual.html">CJSON</link>
 which, according to <link xlink:href="http://lua-users.org/wiki/JsonModules">a survey</link>, 
@@ -220,23 +227,27 @@ edge cases come up.
 </para>
 
 <para>
-<emphasis>YAML</emphasis> is short for "YAML Ain't a Markup Language". YAML is a            
+<link linkend="sp-yaml"><emphasis>YAML</emphasis></link> is short for "YAML Ain't a Markup Language". YAML is a            
 way to show data in human-readable form, without losing
 underlying information about typing, arrays, and structures.
 </para>
 
 <para>
-<emphasis>IPC</emphasis> is Inter-Process Communication.
+<link linkend="sp-fiber-ipc"><emphasis>IPC</emphasis></link> is Inter-Process Communication.
 This is useful for implementations of task queues and long polling.
 </para>
 
 <para>
-<emphasis>Fio</emphasis> is standard file IO,
+<link linkend="sp-fio"><emphasis>Fio</emphasis></link> is standard file IO,
 adapted to work with Tarantool's fibers in a cooperative environment.
 </para>
 
 <para>
-<emphasis>Box</emphasis> is the NoSQL DBMS that was developed by Tarantool
+<link linkend="sp-tap"><emphasis>Tap</emphasis></link> is a tool to test programs for errors.
+</para>
+
+<para>
+<link linkend="sp-box-library"><emphasis>Box</emphasis></link> is the NoSQL DBMS that was developed by Tarantool
 and its community. Box's architecture and routines will be the
 subject of the next chapter.
 </para>
diff --git a/doc/user/triggers.xml b/doc/user/triggers.xml
index 2e6ecbd770..6202fed4b8 100644
--- a/doc/user/triggers.xml
+++ b/doc/user/triggers.xml
@@ -12,7 +12,7 @@
     Triggers are Lua scripts which are executed by the server
     when certain events happen. Currently the two types of
     triggers are <link linkend="on_replace">on_replace</link> triggers
-    which for database events, and connection triggers,
+    which are for database events, and connection triggers,
     which are executed when a new connection
     is created or dropped.
     Triggers must be set up when the server starts.
diff --git a/doc/user/tutorial.xml b/doc/user/tutorial.xml
index 70a83172fb..83416b9ac9 100644
--- a/doc/user/tutorial.xml
+++ b/doc/user/tutorial.xml
@@ -674,129 +674,6 @@ inserted and selected tuples.
 </section>
 
 
-<section xml:id="differences-from-older-versions">
-  <title>Differences between Tarantool 1.6 and older versions</title>
-
-  <para>
-    These major differences will affect people upgrading from a previous Tarantool version.
-  </para>
-
-  <para>LUA ALL THE WAY DOWN. 
-    All requests are now treated as Lua instructions or Lua function invocations.
-    There no longer is any need to precede them with "lua" or "call".
-    For example, replace<programlisting>
-    lua function lua_function() return 'hello world' end
-    call lua_function()</programlisting>
-    with<programlisting>
-    function lua_function() return 'hello world' end
-    lua_function()</programlisting>
-  </para>
-  <para>NAMES RATHER THAN NUMBERS.
-    Spaces and indexes now have names as well as numbers.
-    Names are specified at create time.
-    Numbers (also called <computeroutput>id</computeroutput>s) are usually assigned automatically.
-    Applications should use the names rather than the numbers.
-  </para>
-  <para>CHANGED TUPLE STORAGE = MSGPACK.
-    There is a new format
-    (<link xlink:href="https://en.wikipedia.org/wiki/MessagePack">msgpack</link>).
-    Snapshot and WAL files have
-    <link xlink:href="http://tarantool.org/doc/box-protocol.html">an implementation of the msgpack format</link>;
-    incompatible with the old format.
-    Snapshot and WAL files have the same format (snapshots are  logs of inserts).
-  </para>
-  <para>CHANGED AUTHENTICATION.
-    There are new options for password-based authentication of individual users.
-    The old authentication method, "sandboxing" based on port, no longer exists.
-  </para>
-  <para>CHANGES IN CONFIGURATION.
-    All options in the configuration file are now optional.
-    The configuration file itself is now optional.
-    "backlog" no longer exists.
-    "script_dir" no longer exists, use #! instead (see below re "Tarantool = a shell script processor").
-  </para>
-  <para>CHANGES IN PORT CONFIGURATION.
-    "secondary_port" no longer exists; use "listen".
-    "replication_port" no longer exists; use "listen".
-    "memcached" no longer exists (memcached is not supported).
-    The admin port is Lua-only now, and the lua prefix is gone. 
-  </para>
-  <para>DATA DEFINITION WITH RUNTIME REQUESTS RATHER THAN A CONFIGURATION FILE.
-    <computeroutput>box.schema</computeroutput> is a new package for space configuration.
-    Spaces are added/dropped with box.schema.space.create / box.space.<replaceable>space_name</replaceable>.drop.
-    Indexes are added/dropped with box.space.<replaceable>space-name</replaceable>.create_index /
-    box.space.<replaceable>.space-name</replaceable>.index.<replaceable>index_name</replaceable>.drop.
-    "space.estimated_rows" no longer exists.
-    "space.cardinality" is renamed to "space.field_count".
-    "space.temporary" means "not in snapshot or WAL, only definition exists".
-  </para>
-  <para>CHANGED FUNCTIONS IN BOX.SPACE.
-    Where X is any of insert | select | update | replace | delete " etc. ...
-    Old syntax box.space.name:X() no longer exists.
-    Old syntax box.X() no longer exists.
-    New syntax is
-    box.space.<replaceable>space_name(</replaceable>:<replaceable>Lua-table</replaceable>).
-    Example: box.space.t0:insert{0,'Hello'}
-    Minor properties of a space (for example the name) can be altered without rebuild.
-    All properties of an index can be altered without rebuild.
-    The "return tuple" option no longer exists (f a tuple is found, it's returned).
-  </para>
-  <para>CHANGED FUNCTIONS IN BOX.TUPLE.
-    There is a new, msgpack-based tuple update syntax.
-    An update of the same field more than once in a single update is no longer allowed.
-  </para>
-  <para>CHANGES FOR TYPES.
-    The NUM and NUM64 types are merged; both are now unsigned 64-bit.
-    Output format is now consistently YAML so it can always be used with print().
-  </para>
-  <para>NEW METADATA RETRIEVAL METHOD = SYSTEM SPACES.
-    The new system spaces contain metadata that can be retrieved with box.space..:select.
-    The _space system space has information about existing spaces.
-    The _index system space has information about existing indexes.
-    Old syntax "show ..." no longer exists.
-    New syntax is box.space._space:select{<replaceable>Lua-table</replaceable>}
-    or other Lua functions.
-  </para>
-  <para>NEW TRIGGERS FOR REPLACE.
-    Triggers can now be defined for replace, not just for connect/disconnect.
-    Triggers can be disabled.
-  </para>
-  <para>CHANGED SERVER STARTUP BEHAVIOR.
-    At start, if neither of the ports is bound, and no fibers are started
-    by a script, the server exits as soon as the script finishes.
-    The server now automatically creates a snapshot file 
-    if it is missing. If it is a replica, it automatically 
-    connects to the master and downloads the snapshot file
-    from it.
-  </para>
-  <para>TARANTOOL = A SCRIPT PROCESSOR.
-    Instead of processing scripts with bash or Perl, use tarantool server.
-    For example, let the first line of a shell script be
-    <computeroutput>#!/usr/bin/tarantool</computeroutput>.
-    This will be a
-    (<link xlink:href="https://en.wikipedia.org/wiki/Shebang_%28Unix%29" xlink:title="wikipedia.org/Shebang">"Hashbang" hint</link>)
-    that Tarantool will be the script processor.
-    Since Tarantool includes Lua, the file's instructions can be Lua.
-  </para>
-  <para>PERFORMANCE ENHANCEMENTS WHICH DO NOT AFFECT SYNTAX OR CONFIGURATION.
-    On start, Tarantool uses multithreaded sorting to build tree indexes.
-    There is a new slab allocator for tuples, which is less susceptible to fragmentation.
-    The new tuple storage with msgpack handles a wide value range in a compact way.
-    For the binary protocol, box request ids are renumbered to form a continuous space from 0 to 6.
-  </para>
-  <para>REMOVAL OF REDUNDANT FUNCTIONALITY.
-    The backward-compatible next_equal/next/prev_equal/next/prev
-    iteration functions no longer exist.
-    The ability to handle multiple keys for select no longer exists,
-    only one key per request is allowed.
-    The "SQL-like" syntax no longer exists -- invoke functions from the box package instead,
-    for example, replace
-    <computeroutput>SELECT * FROM t0 WHERE k0 = 2</computeroutput>
-    with
-    <computeroutput>box.space.t0:select(2)</computeroutput>.
-  </para>
-
-</section>
 
 
 </chapter>
-- 
GitLab