More C_EOF tweaks
[platform/upstream/lmdb.git] / libraries / liblmdb / mdb.c
index 4a79ae1..bbea0d2 100644 (file)
@@ -149,7 +149,7 @@ typedef SSIZE_T     ssize_t;
 #include <resolv.h>    /* defines BYTE_ORDER on HPUX and Solaris */
 #endif
 
-#if defined(__APPLE__) || defined (BSD)
+#if defined(__APPLE__) || defined (BSD) || defined(__FreeBSD_kernel__)
 # if !(defined(MDB_USE_POSIX_MUTEX) || defined(MDB_USE_POSIX_SEM))
 # define MDB_USE_SYSV_SEM      1
 # endif
@@ -160,6 +160,7 @@ typedef SSIZE_T     ssize_t;
 
 #ifndef _WIN32
 #include <pthread.h>
+#include <signal.h>
 #ifdef MDB_USE_POSIX_SEM
 # define MDB_USE_HASH          1
 #include <semaphore.h>
@@ -416,15 +417,15 @@ mdb_sem_wait(mdb_mutexref_t sem)
 #define mdb_mutex_consistent(mutex)    0
 
 #else  /* MDB_USE_POSIX_MUTEX: */
-       /** Shared mutex/semaphore as it is stored (mdb_mutex_t), and as
-        *      local variables keep it (mdb_mutexref_t).
+       /** Shared mutex/semaphore as the original is stored.
         *
-        *      An mdb_mutex_t can be assigned to an mdb_mutexref_t.  They can
-        *      be the same, or an array[size 1] and a pointer.
-        *      @{
+        *      Not for copies.  Instead it can be assigned to an #mdb_mutexref_t.
+        *      When mdb_mutexref_t is a pointer and mdb_mutex_t is not, then it
+        *      is array[size 1] so it can be assigned to the pointer.
         */
-typedef pthread_mutex_t mdb_mutex_t[1], *mdb_mutexref_t;
-       /*      @} */
+typedef pthread_mutex_t mdb_mutex_t[1];
+       /** Reference to an #mdb_mutex_t */
+typedef pthread_mutex_t *mdb_mutexref_t;
        /** Lock the reader or writer mutex.
         *      Returns 0 or a code to give #mdb_mutex_failed(), as in #LOCK_MUTEX().
         */
@@ -462,7 +463,7 @@ typedef pthread_mutex_t mdb_mutex_t[1], *mdb_mutexref_t;
 
 #define        Z       MDB_FMT_Z       /**< printf/scanf format modifier for size_t */
 #define        Yu      MDB_PRIy(u)     /**< printf format for #mdb_size_t */
-#define        Yd      MDB_PRIy(d)     /**< printf format for "signed #mdb_size_t" */
+#define        Yd      MDB_PRIy(d)     /**< printf format for 'signed #mdb_size_t' */
 
 #if defined(_WIN32) || defined(MDB_USE_POSIX_SEM)
 #define MNAME_LEN      32
@@ -972,19 +973,26 @@ typedef struct MDB_page {
        /** Header for a single key/data pair within a page.
         * Used in pages of type #P_BRANCH and #P_LEAF without #P_LEAF2.
         * We guarantee 2-byte alignment for 'MDB_node's.
+        *
+        * #mn_lo and #mn_hi are used for data size on leaf nodes, and for child
+        * pgno on branch nodes.  On 64 bit platforms, #mn_flags is also used
+        * for pgno.  (Branch nodes have no flags).  Lo and hi are in host byte
+        * order in case some accesses can be optimized to 32-bit word access.
+        *
+        * Leaf node flags describe node contents.  #F_BIGDATA says the node's
+        * data part is the page number of an overflow page with actual data.
+        * #F_DUPDATA and #F_SUBDATA can be combined giving duplicate data in
+        * a sub-page/sub-database, and named databases (just #F_SUBDATA).
         */
 typedef struct MDB_node {
-       /** lo and hi are used for data size on leaf nodes and for
-        * child pgno on branch nodes. On 64 bit platforms, flags
-        * is also used for pgno. (Branch nodes have no flags).
-        * They are in host byte order in case that lets some
-        * accesses be optimized into a 32-bit word access.
-        */
+       /** part of data size or pgno
+        *      @{ */
 #if BYTE_ORDER == LITTLE_ENDIAN
-       unsigned short  mn_lo, mn_hi;   /**< part of data size or pgno */
+       unsigned short  mn_lo, mn_hi;
 #else
        unsigned short  mn_hi, mn_lo;
 #endif
+       /** @} */
 /** @defgroup mdb_node Node Flags
  *     @ingroup internal
  *     Flags for node headers.
@@ -1129,7 +1137,7 @@ typedef struct MDB_meta {
 #else
        void            *mm_address;            /**< address for fixed mapping */
 #endif
-       pgno_t          mm_mapsize;                     /**< size of mmap region */
+       mdb_size_t      mm_mapsize;                     /**< size of mmap region */
        MDB_db          mm_dbs[CORE_DBS];       /**< first is free space, 2nd is main db */
        /** The size of pages used in this DB */
 #define        mm_psize        mm_dbs[FREE_DBI].md_pad
@@ -1214,11 +1222,12 @@ struct MDB_txn {
  *     @ingroup internal
  * @{
  */
-#define DB_DIRTY       0x01            /**< DB was modified or is DUPSORT data */
+#define DB_DIRTY       0x01            /**< DB was written in this txn */
 #define DB_STALE       0x02            /**< Named-DB record is older than txnID */
 #define DB_NEW         0x04            /**< Named-DB handle opened in this txn */
 #define DB_VALID       0x08            /**< DB handle is valid, see also #MDB_VALID */
 #define DB_USRVALID    0x10            /**< As #DB_VALID, but not set for #FREE_DBI */
+#define DB_DUPDATA     0x20            /**< DB is #MDB_DUPSORT data */
 /** @} */
        /** In write txns, array of cursors for each DB */
        MDB_cursor      **mt_cursors;
@@ -1899,6 +1908,7 @@ mdb_dcmp(MDB_txn *txn, MDB_dbi dbi, const MDB_val *a, const MDB_val *b)
 
 /** Allocate memory for a page.
  * Re-use old malloc'd pages first for singletons, otherwise just malloc.
+ * Set #MDB_TXN_ERROR on failure.
  */
 static MDB_page *
 mdb_page_malloc(MDB_txn *txn, unsigned num)
@@ -2092,13 +2102,9 @@ mdb_pages_xkeep(MDB_cursor *mc, unsigned pflags, int all)
        unsigned i, j;
        int rc = MDB_SUCCESS, level;
 
-       /* Mark pages seen by cursors */
-       if (mc->mc_flags & C_UNTRACK)
-               mc = NULL;                              /* will find mc in mt_cursors */
-       for (i = txn->mt_numdbs;; mc = txn->mt_cursors[--i]) {
-               for (; mc; mc=mc->mc_next) {
-                       if (!(mc->mc_flags & C_INITIALIZED))
-                               continue;
+       /* Mark pages seen by cursors: First m0, then tracked cursors */
+       for (i = txn->mt_numdbs;; ) {
+               if (mc->mc_flags & C_INITIALIZED) {
                        for (m3 = mc;; m3 = &mx->mx_cursor) {
                                mp = NULL;
                                for (j=0; j<m3->mc_snum; j++) {
@@ -2117,10 +2123,13 @@ mdb_pages_xkeep(MDB_cursor *mc, unsigned pflags, int all)
                                        break;
                        }
                }
-               if (i == 0)
-                       break;
+               mc = mc->mc_next;
+               for (; !mc || mc == m0; mc = txn->mt_cursors[--i])
+                       if (i == 0)
+                               goto mark_done;
        }
 
+mark_done:
        if (all) {
                /* Mark dirty root pages */
                for (i=0; i<txn->mt_numdbs; i++) {
@@ -2310,7 +2319,7 @@ mdb_page_dirty(MDB_txn *txn, MDB_page *mp)
 }
 
 /** Allocate page numbers and memory for writing.  Maintain me_pglast,
- * me_pghead and mt_next_pgno.
+ * me_pghead and mt_next_pgno.  Set #MDB_TXN_ERROR on failure.
  *
  * If there are free pages available from older transactions, they
  * are re-used first. Otherwise allocate a new page at mt_next_pgno.
@@ -2442,7 +2451,7 @@ mdb_page_alloc(MDB_cursor *mc, int num, MDB_page **mp)
                np = m2.mc_pg[m2.mc_top];
                leaf = NODEPTR(np, m2.mc_ki[m2.mc_top]);
                if ((rc = mdb_node_read(&m2, leaf, &data)) != MDB_SUCCESS)
-                       return rc;
+                       goto fail;
 
                idl = (MDB_ID *) data.mv_data;
                i = idl[0];
@@ -2606,6 +2615,7 @@ mdb_page_unspill(MDB_txn *txn, MDB_page *mp, MDB_page **ret)
 }
 
 /** Touch a page: make it dirty and re-insert into tree with updated pgno.
+ * Set #MDB_TXN_ERROR on failure.
  * @param[in] mc cursor pointing to the page to be touched
  * @return 0 on success, non-zero on failure.
  */
@@ -5788,7 +5798,9 @@ mdb_cursor_pop(MDB_cursor *mc)
        }
 }
 
-/** Push a page onto the top of the cursor's stack. */
+/** Push a page onto the top of the cursor's stack.
+ * Set #MDB_TXN_ERROR on failure.
+ */
 static int
 mdb_cursor_push(MDB_cursor *mc, MDB_page *mp)
 {
@@ -6096,6 +6108,7 @@ ok:
 #endif
 
 /** Find the address of the page corresponding to a given page number.
+ * Set #MDB_TXN_ERROR on failure.
  * @param[in] mc the cursor accessing the page.
  * @param[in] pgno the page number for the page to retrieve.
  * @param[out] ret address of a pointer where the page's address will be stored.
@@ -6191,8 +6204,17 @@ mdb_page_search_root(MDB_cursor *mc, MDB_val *key, int flags)
 
                if (flags & (MDB_PS_FIRST|MDB_PS_LAST)) {
                        i = 0;
-                       if (flags & MDB_PS_LAST)
+                       if (flags & MDB_PS_LAST) {
                                i = NUMKEYS(mp) - 1;
+                               /* if already init'd, see if we're already in right place */
+                               if (mc->mc_flags & C_INITIALIZED) {
+                                       if (mc->mc_ki[mc->mc_top] == i) {
+                                               mc->mc_top = mc->mc_snum++;
+                                               mp = mc->mc_pg[mc->mc_top];
+                                               goto ready;
+                                       }
+                               }
+                       }
                } else {
                        int      exact;
                        node = mdb_node_search(mc, key, &exact);
@@ -6218,6 +6240,7 @@ mdb_page_search_root(MDB_cursor *mc, MDB_val *key, int flags)
                if ((rc = mdb_cursor_push(mc, mp)))
                        return rc;
 
+ready:
                if (flags & MDB_PS_MODIFY) {
                        if ((rc = mdb_page_touch(mc)) != 0)
                                return rc;
@@ -6573,15 +6596,20 @@ mdb_cursor_next(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op)
        MDB_node        *leaf;
        int rc;
 
-       if ((mc->mc_flags & C_EOF) ||
-               ((mc->mc_flags & C_DEL) && op == MDB_NEXT_DUP)) {
+       if ((mc->mc_flags & C_DEL && op == MDB_NEXT_DUP))
                return MDB_NOTFOUND;
-       }
+
        if (!(mc->mc_flags & C_INITIALIZED))
                return mdb_cursor_first(mc, key, data);
 
        mp = mc->mc_pg[mc->mc_top];
 
+       if (mc->mc_flags & C_EOF) {
+               if (mc->mc_ki[mc->mc_top] >= NUMKEYS(mp)-1)
+                       return MDB_NOTFOUND;
+               mc->mc_flags ^= C_EOF;
+       }
+
        if (mc->mc_db->md_flags & MDB_DUPSORT) {
                leaf = NODEPTR(mp, mc->mc_ki[mc->mc_top]);
                if (F_ISSET(leaf->mn_flags, F_DUPDATA)) {
@@ -6708,8 +6736,6 @@ mdb_cursor_prev(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op)
        } else
                mc->mc_ki[mc->mc_top]--;
 
-       mc->mc_flags &= ~C_EOF;
-
        DPRINTF(("==> cursor points to page %"Yu" with %u keys, key index %u",
            mdb_dbg_pgno(mp), NUMKEYS(mp), mc->mc_ki[mc->mc_top]));
 
@@ -6998,16 +7024,13 @@ mdb_cursor_last(MDB_cursor *mc, MDB_val *key, MDB_val *data)
                mc->mc_xcursor->mx_cursor.mc_flags &= ~(C_INITIALIZED|C_EOF);
        }
 
-       if (!(mc->mc_flags & C_EOF)) {
-
-               if (!(mc->mc_flags & C_INITIALIZED) || mc->mc_top) {
-                       rc = mdb_page_search(mc, NULL, MDB_PS_LAST);
-                       if (rc != MDB_SUCCESS)
-                               return rc;
-               }
-               mdb_cassert(mc, IS_LEAF(mc->mc_pg[mc->mc_top]));
-
+       if (!(mc->mc_flags & C_INITIALIZED) || mc->mc_top) {
+               rc = mdb_page_search(mc, NULL, MDB_PS_LAST);
+               if (rc != MDB_SUCCESS)
+                       return rc;
        }
+       mdb_cassert(mc, IS_LEAF(mc->mc_pg[mc->mc_top]));
+
        mc->mc_ki[mc->mc_top] = NUMKEYS(mc->mc_pg[mc->mc_top]) - 1;
        mc->mc_flags |= C_INITIALIZED|C_EOF;
        leaf = NODEPTR(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top]);
@@ -7107,10 +7130,19 @@ mdb_cursor_get(MDB_cursor *mc, MDB_val *key, MDB_val *data,
                        rc = MDB_INCOMPATIBLE;
                        break;
                }
-               rc = MDB_SUCCESS;
-               if (!(mc->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED) ||
-                       (mc->mc_xcursor->mx_cursor.mc_flags & C_EOF))
+               if (!(mc->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED)) {
+                       rc = EINVAL;
                        break;
+               }
+               if (mc->mc_xcursor->mx_cursor.mc_flags & C_EOF) {
+                       MDB_cursor *mx = &mc->mc_xcursor->mx_cursor;
+                       if (mx->mc_ki[mx->mc_top] >= NUMKEYS(mx->mc_pg[mx->mc_top])-1) {
+                               rc = MDB_NOTFOUND;
+                               break;
+                       }
+                       mx->mc_flags ^= C_EOF;
+               }
+               rc = MDB_SUCCESS;
                goto fetchm;
        case MDB_NEXT_MULTIPLE:
                if (data == NULL) {
@@ -7225,7 +7257,8 @@ mdb_cursor_touch(MDB_cursor *mc)
 {
        int rc = MDB_SUCCESS;
 
-       if (mc->mc_dbi >= CORE_DBS && !(*mc->mc_dbflag & DB_DIRTY)) {
+       if (mc->mc_dbi >= CORE_DBS && !(*mc->mc_dbflag & (DB_DIRTY|DB_DUPDATA))) {
+               /* Touch DB record of named DB */
                MDB_cursor mc2;
                MDB_xcursor mcx;
                if (TXN_DBI_CHANGED(mc->mc_txn, mc->mc_dbi))
@@ -7884,6 +7917,7 @@ fail:
 }
 
 /** Allocate and initialize new pages for a database.
+ * Set #MDB_TXN_ERROR on failure.
  * @param[in] mc a cursor on the database being added to.
  * @param[in] flags flags defining what type of page is being allocated.
  * @param[in] num the number of pages to allocate. This is usually 1,
@@ -7969,6 +8003,7 @@ mdb_branch_size(MDB_env *env, MDB_val *key)
 }
 
 /** Add a node to the page pointed to by the cursor.
+ * Set #MDB_TXN_ERROR on failure.
  * @param[in] mc The cursor for this operation.
  * @param[in] indx The index on the page where the new node should be added.
  * @param[in] key The key for the new node.
@@ -8279,7 +8314,7 @@ mdb_xcursor_init1(MDB_cursor *mc, MDB_node *node)
        }
        DPRINTF(("Sub-db -%u root page %"Yu, mx->mx_cursor.mc_dbi,
                mx->mx_db.md_root));
-       mx->mx_dbflag = DB_VALID|DB_USRVALID|DB_DIRTY; /* DB_DIRTY guides mdb_cursor_touch */
+       mx->mx_dbflag = DB_VALID|DB_USRVALID|DB_DUPDATA;
        if (NEED_CMP_CLONG(mx->mx_dbx.md_cmp, mx->mx_db.md_pad))
                mx->mx_dbx.md_cmp = mdb_cmp_clong;
 }
@@ -8303,7 +8338,7 @@ mdb_xcursor_init2(MDB_cursor *mc, MDB_xcursor *src_mx, int new_dupdata)
                mx->mx_cursor.mc_top = 0;
                mx->mx_cursor.mc_flags |= C_INITIALIZED;
                mx->mx_cursor.mc_ki[0] = 0;
-               mx->mx_dbflag = DB_VALID|DB_USRVALID|DB_DIRTY; /* DB_DIRTY guides mdb_cursor_touch */
+               mx->mx_dbflag = DB_VALID|DB_USRVALID|DB_DUPDATA;
 #if UINT_MAX < MDB_SIZE_MAX    /* matches mdb_xcursor_init1:NEED_CMP_CLONG() */
                mx->mx_dbx.md_cmp = src_mx->mx_dbx.md_cmp;
 #endif
@@ -8413,9 +8448,15 @@ mdb_cursor_count(MDB_cursor *mc, mdb_size_t *countp)
        if (!(mc->mc_flags & C_INITIALIZED))
                return EINVAL;
 
-       if (!mc->mc_snum || (mc->mc_flags & C_EOF))
+       if (!mc->mc_snum)
                return MDB_NOTFOUND;
 
+       if (mc->mc_flags & C_EOF) {
+               if (mc->mc_ki[mc->mc_top] >= NUMKEYS(mc->mc_pg[mc->mc_top]))
+                       return MDB_NOTFOUND;
+               mc->mc_flags ^= C_EOF;
+       }
+
        leaf = NODEPTR(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top]);
        if (!F_ISSET(leaf->mn_flags, F_DUPDATA)) {
                *countp = 1;
@@ -8435,7 +8476,10 @@ mdb_cursor_close(MDB_cursor *mc)
                MDB_CURSOR_UNREF(mc, 0);
        }
        if (mc && !mc->mc_backup) {
-               /* remove from txn, if tracked */
+               /* Remove from txn, if tracked.
+                * A read-only txn (!C_UNTRACK) may have been freed already,
+                * so do not peek inside it.  Only write txns track cursors.
+                */
                if ((mc->mc_flags & C_UNTRACK) && mc->mc_txn->mt_cursors) {
                        MDB_cursor **prev = &mc->mc_txn->mt_cursors[mc->mc_dbi];
                        while (*prev && *prev != mc) prev = &(*prev)->mc_next;
@@ -8460,6 +8504,7 @@ mdb_cursor_dbi(MDB_cursor *mc)
 }
 
 /** Replace the key for a branch node with a new key.
+ * Set #MDB_TXN_ERROR on failure.
  * @param[in] mc Cursor pointing to the node to operate on.
  * @param[in] key The new key to use.
  * @return 0 on success, non-zero on failure.
@@ -9279,7 +9324,6 @@ mdb_del0(MDB_txn *txn, MDB_dbi dbi,
                 * run out of space, triggering a split. We need this
                 * cursor to be consistent until the end of the rebalance.
                 */
-               mc.mc_flags |= C_UNTRACK;
                mc.mc_next = txn->mt_cursors[dbi];
                txn->mt_cursors[dbi] = &mc;
                rc = mdb_cursor_del(&mc, flags);
@@ -9289,6 +9333,7 @@ mdb_del0(MDB_txn *txn, MDB_dbi dbi,
 }
 
 /** Split a page and insert a new node.
+ * Set #MDB_TXN_ERROR on failure.
  * @param[in,out] mc Cursor pointing to the page and desired insertion index.
  * The cursor will be updated to point to the actual page and index where
  * the node got inserted after the split.
@@ -9538,7 +9583,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno
                        } else {
                                /* find right page's left sibling */
                                mc->mc_ki[ptop] = mn.mc_ki[ptop];
-                               mdb_cursor_sibling(mc, 0);
+                               rc = mdb_cursor_sibling(mc, 0);
                        }
                }
        } else {
@@ -9547,6 +9592,8 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno
                mn.mc_top++;
        }
        if (rc != MDB_SUCCESS) {
+               if (rc == MDB_NOTFOUND) /* improper mdb_cursor_sibling() result */
+                       rc = MDB_PROBLEM;
                goto done;
        }
        if (nflags & MDB_APPEND) {
@@ -9756,7 +9803,10 @@ typedef struct mdb_copy {
        HANDLE mc_fd;
        int mc_toggle;                  /**< Buffer number in provider */
        int mc_new;                             /**< (0-2 buffers to write) | (#MDB_EOF at end) */
-       volatile int mc_error;  /**< Error code, never cleared if set */
+       /** Error code.  Never cleared if set.  Both threads can set nonzero
+        *      to fail the copy.  Not mutex-protected, LMDB expects atomic int.
+        */
+       volatile int mc_error;
 } mdb_copy;
 
        /** Dedicated writer thread for compacting copy. */
@@ -9772,6 +9822,13 @@ mdb_env_copythr(void *arg)
 #else
        int len;
 #define DO_WRITE(rc, fd, ptr, w2, len) len = write(fd, ptr, w2); rc = (len >= 0)
+#ifdef SIGPIPE
+       sigset_t set;
+       sigemptyset(&set);
+       sigaddset(&set, SIGPIPE);
+       if ((rc = pthread_sigmask(SIG_BLOCK, &set, NULL)) != 0)
+               my->mc_error = rc;
+#endif
 #endif
 
        pthread_mutex_lock(&my->mc_mutex);
@@ -9788,6 +9845,15 @@ again:
                        DO_WRITE(rc, my->mc_fd, ptr, wsize, len);
                        if (!rc) {
                                rc = ErrCode();
+#if defined(SIGPIPE) && !defined(_WIN32)
+                               if (rc == EPIPE) {
+                                       /* Collect the pending SIGPIPE, otherwise at least OS X
+                                        * gives it to the process on thread-exit (ITS#8504).
+                                        */
+                                       int tmp;
+                                       sigwait(&set, &tmp);
+                               }
+#endif
                                break;
                        } else if (len > 0) {
                                rc = MDB_SUCCESS;
@@ -9841,7 +9907,11 @@ mdb_env_cthr_toggle(mdb_copy *my, int adjust)
        return my->mc_error;
 }
 
-       /** Depth-first tree traversal for compacting copy. */
+       /** Depth-first tree traversal for compacting copy.
+        * @param[in] my control structure.
+        * @param[in,out] pg database root.
+        * @param[in] flags includes #F_DUPDATA if it is a sorted-duplicate sub-DB.
+        */
 static int ESECT
 mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags)
 {
@@ -10497,7 +10567,8 @@ int mdb_dbi_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *db
                memset(&dummy, 0, sizeof(dummy));
                dummy.md_root = P_INVALID;
                dummy.md_flags = flags & PERSISTENT_FLAGS;
-               rc = mdb_cursor_put(&mc, &key, &data, F_SUBDATA);
+               WITH_CURSOR_TRACKING(mc,
+                       rc = mdb_cursor_put(&mc, &key, &data, F_SUBDATA));
                dbflag |= DB_DIRTY;
        }
 
@@ -10857,7 +10928,7 @@ mdb_reader_check(MDB_env *env, int *dead)
        return env->me_txns ? mdb_reader_check0(env, 0, dead) : MDB_SUCCESS;
 }
 
-/** As #mdb_reader_check(). rlocked = <caller locked the reader mutex>. */
+/** As #mdb_reader_check(). \b rlocked is set if caller locked #me_rmutex. */
 static int ESECT
 mdb_reader_check0(MDB_env *env, int rlocked, int *dead)
 {