Squashed commit of the following:

commit 1b8106079000418f4afa6ce0e247e81f3f5b2e2c
Merge: 7b7c311 e79bbdf
Author: Justin Du <justin.du@hp.com>
Date:   Thu Jun 26 13:41:50 2014 -0800

    Merge remote branch 'gerrit/master' into bp/reentrant_cmp

    Conflicts:
    	sql/common/arkcmp_proc.cpp

    Change-Id: I56a9cd33544e863c233a1b4e6a811bfb15efe27e

commit 7b7c3110c55f837672240f25dd5496540212ba17
Author: Justin Du <justin.du@hp.com>
Date:   Mon Jun 23 13:33:27 2014 -0800

    Expect file changes for executor/TEST013

    To report the expected error (8193) when the schema name has reserved
    word as perfix for either types of statements.

    Change-Id: I8ce1854afa1d916eecd01c70d27a89857fb6c2a9

commit 376666657d99b200fbcf8cd5e177096619d44c0e
Author: Justin Du <justin.du@hp.com>
Date:   Thu Jun 19 13:03:06 2014 -0800

    Pass diags info between CmpContext instances

    1) Preserve the diags info when restoring cqds and controls after meta
    data access.
    2) Pass diags info from current CmpContext to the previous CmpContext at
    the CmpContext switch back call.

    Change-Id: Ibac9ff19c82f8dc17f278ec4327f39837085503e

commit b22407a2b78ff8c2b7f1ea14c908833fe8e98540
Author: Justin Du <justin.du@hp.com>
Date:   Fri Jun 13 17:08:24 2014 -0800

    Rework after review

    Added warning (SQLCODE 2032) and assert when improperly using CmpContext
    switch logic

    Change-Id: I32e6e4f2168e3cf52dc58ec85da1555f4fd29051

commit 2870519283471f6b3c5ea844875546b0dda32a04
Author: Justin Du <justin.du@hp.com>
Date:   Thu Jun 12 10:14:12 2014 -0800

    Bug fixes related to CmpContext switch

    1. CmpContext switch takes place only if the embedded compiler is
    involved.
    2. Fix for TMF error 75 (process doesn't have the active transaction)
    see in DDL operations.

    Change-Id: Icdca929c4c782464e1f8267d497bf91518a8b3a1

commit 1cebd4b2c6134097a2b4bd419b00fdee71d93f1f
Merge: 8145ba5 0862f91
Author: Justin Du <justin.du@hp.com>
Date:   Tue Jun 10 11:21:11 2014 -0800

    Merge remote branch 'gerrit/master' into bp/reentrant_cmp

    Conflicts:
    	sql/arkcmp/CmpStatement.cpp

    Change-Id: Iba12fa3fb64809f9c9393d06db0215d7bbf6ee7d

commit 8145ba58927d0d954b68183031747a77367e000f
Author: Justin Du <justin.du@hp.com>
Date:   Tue Jun 10 10:12:59 2014 -0800

    Associate global empty input LogProp with CmpContext

    1. Changed GLOBAL_EMPTY_INPUT_LOGPROP as alias (via #define) instead of
    thread pointer to access the default input LogProp from curent
    CmpContext.
    2. Restored recursion counter for embedded compiler so that histogram
    access is done by external compiler

    Change-Id: I32560e3b0b1dfe5fc2b1ee9a839d75bfdb57fa9a

commit 80b36c32a0db1cf0dc5ae5cead2a04522da1231e
Author: Justin Du <justin.du@hp.com>
Date:   Mon Jun 2 20:58:47 2014 -0800

    First set of recursive compilation with CmpContext switch

    1. Disable recursion counter when entering compileDirect
    2. Starting or reuse CmpContext for metadata access during compilation
    3. Fixed few problems in CmpContext switching code.

    Change-Id: Iff66309319e989a247b80d92ea8e3e32a35e1755

Change-Id: Ib096a46288a8616fc26c9f52474873778e76ed8b
Merge "Squashed commit of the following:"