Merge PR 1645 [TRAFODION-3144] Correct Syntactic Descriptions of Character String Data Types and Add Examples (NCHAR) for *ALTER TABLE Statement* in *Trafodion SQL Reference Manual*
diff --git a/core/conn/jdbcT4/src/main/java/T4Messages.properties b/core/conn/jdbcT4/src/main/java/T4Messages.properties
index 3b2e661..a6e68e9 100644
--- a/core/conn/jdbcT4/src/main/java/T4Messages.properties
+++ b/core/conn/jdbcT4/src/main/java/T4Messages.properties
@@ -172,18 +172,10 @@
 unsupported_encoding_sqlstate=HY000
 unsupported_encoding_sqlcode=29036
 
-forward_only_cursor_msg=The Result Set Type is TYPE_FORWARD_ONLY
-forward_only_cursor_sqlstate=HY106
-forward_only_cursor_sqlcode=29037
-
 invalid_row_number_msg=The row number is not valid
 invalid_row_number_sqlstate=HY107
 invalid_row_number_sqlcode=29038
 
-read_only_concur_msg=The concurrency mode of the result set is CONCUR_READ_ONLY
-read_only_concur_sqlstate=HY092
-read_only_concur_sqlcode=29039
-
 invalid_operation_msg=Operation invalid, since the current row is insert row
 invalid_operation_sqlstate=HY000
 invalid_operation_sqlcode=29040
@@ -304,9 +296,9 @@
 address_format_2_error_sqlstate=HY000
 address_format_2_error_sqlcode=29109
 
-missing ip_or_name_error_msg=Address is missing an IP address or machine name
-missing ip_or_name_error_sqlstate=HY000
-missing ip_or_name_error_sqlcode=29110
+missing_ip_or_name_error_msg=Address is missing an IP address or machine name
+missing_ip_or_name_error_sqlstate=HY000
+missing_ip_or_name_error_sqlcode=29110
 
 address_lookup_error_msg=Unable to evaluate address {0} Cause: {1}
 address_lookup_error_sqlstate=HY000
diff --git a/core/conn/jdbcT4/src/main/samples/t4jdbc.properties b/core/conn/jdbcT4/src/main/samples/t4jdbc.properties
index d8ae73e..e0e5f47 100755
--- a/core/conn/jdbcT4/src/main/samples/t4jdbc.properties
+++ b/core/conn/jdbcT4/src/main/samples/t4jdbc.properties
@@ -23,4 +23,4 @@
 schema  = SEABASE
 url = jdbc:t4jdbc://server:port/:
 user = usr
-password = pwd
+password = password
diff --git a/core/sql/bin/SqlciErrors.txt b/core/sql/bin/SqlciErrors.txt
index 71a43a6..3437cef 100644
--- a/core/sql/bin/SqlciErrors.txt
+++ b/core/sql/bin/SqlciErrors.txt
@@ -1450,6 +1450,7 @@
 4494 ZZZZZ 99999 BEGINNER MINOR LOGONLY LOAD is not supported on a table with LOB columns. Table $0~TableName has LOB column $1~ColumnName.
 4495 ZZZZZ 99999 BEGINNER MINOR LOGONLY UNLOAD is not supported on a SELECT with LOB columns. $0~ColumnName is a LOB column.
 4496 42000 99999 BEGINNER MAJOR DBADMIN $0~String0 is supported only with datetime fields.
+4497 ZZZZZ 99999 BEGINNER MAJOR DBADMIN The $0~String0 operand of $1~String1 must be $2~String2.
 5000 ZZZZZ 99999 ADVANCED MAJOR DBADMIN Internal error in the query normalizer.
 5001 ZZZZZ 99999 ADVANDED MINOR LOGONLY Common subexpression $0~String0 will not be shared among multiple consumers. Reason: $1~String1.
 6000 ZZZZZ 99999 ADVANCED MAJOR DBADMIN Internal error in the query optimizer.
@@ -1683,7 +1684,7 @@
 8676 ZZZZZ 99999 ADVANCED INFRM DBADMIN Cannot suspend the query because it is already suspended.
 8677 ZZZZZ 99999 ADVANCED INFRM DBADMIN Cannot activate the query because it is not suspended.
 8690 ZZZZZ 99999 BEGINNER MINOR LOGONLY An invalid character value encountered in TRANSLATE function. Source charset $0~string0 , Target charset $1~string1. Error data in HEX: $2~string2 .
-8691 ZZZZZ 99999 UUUUUUUU UUUUU UUUUUUU ---- unused ----
+8691 ZZZZZ 99999 BEGINNER MINOR LOGONLY Field position must be greater than zero, currently is $0~int0.
 8692 ZZZZZ 99999 UUUUUUUU UUUUU UUUUUUU ---- unused ----
 8693 ZZZZZ 99999 UUUUUUUU UUUUU UUUUUUU ---- unused ----
 8694 ZZZZZ 99999 UUUUUUUU UUUUU UUUUUUU ---- unused ----
diff --git a/core/sql/common/ComResWords.cpp b/core/sql/common/ComResWords.cpp
index 49a66f9..7f49b20 100644
--- a/core/sql/common/ComResWords.cpp
+++ b/core/sql/common/ComResWords.cpp
@@ -55,50 +55,50 @@
   ComResWord("AFTER",            COMPAQ_|RESWORD_),
   ComResWord("AGGREGATE",        COMPAQ_|RESWORD_),
   ComResWord("ALIAS",            POTANS_|RESWORD_),
-  ComResWord("ALL",              ANS_|RESWORD_|MPWORD_),
+  ComResWord("ALL",              ANS_|RESWORD_),
   ComResWord("ALLOCATE",         ANS_|RESWORD_),
   ComResWord("ALTER",            ANS_|RESWORD_),
-  ComResWord("AND",              ANS_|RESWORD_|MPWORD_),
-  ComResWord("ANY",              ANS_|RESWORD_|MPWORD_),
+  ComResWord("AND",              ANS_|RESWORD_),
+  ComResWord("ANY",              ANS_|RESWORD_),
   ComResWord("ARE",              ANS_|RESWORD_),
   ComResWord("ARRAY",            COMPAQ_|RESWORD_),
-  ComResWord("AS",               ANS_|RESWORD_|MPWORD_),
-  ComResWord("ASC",              ANS_|RESWORD_|MPWORD_),
+  ComResWord("AS",               ANS_|RESWORD_),
+  ComResWord("ASC",              ANS_|RESWORD_),
   ComResWord("ASSERTION",        ANS_|RESWORD_),
   ComResWord("ASYNC",            POTANS_|RESWORD_),
   ComResWord("AT",               ANS_|RESWORD_),
   ComResWord("AUTHORIZATION",    ANS_|RESWORD_),
-  ComResWord("AVG",              ANS_|RESWORD_|MPWORD_),
+  ComResWord("AVG",              ANS_|RESWORD_),
   ComResWord("BEFORE",           POTANS_|RESWORD_),
-  ComResWord("BEGIN",            ANS_|RESWORD_|MPWORD_),
-  ComResWord("BETWEEN",          ANS_|RESWORD_|MPWORD_),
+  ComResWord("BEGIN",            ANS_|RESWORD_),
+  ComResWord("BETWEEN",          ANS_|RESWORD_),
   ComResWord("BINARY",           COMPAQ_|RESWORD_),
   ComResWord("BIT",              ANS_|RESWORD_),
   ComResWord("BIT_LENGTH",       ANS_|RESWORD_),
   ComResWord("BLOB",             COMPAQ_|RESWORD_),
   ComResWord("BOOLEAN",          POTANS_|RESWORD_),
-  ComResWord("BOTH",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("BOTH",             ANS_|RESWORD_),
   ComResWord("BREADTH",          POTANS_|RESWORD_),
-  ComResWord("BY",               ANS_|RESWORD_|MPWORD_),
+  ComResWord("BY",               ANS_|RESWORD_),
   ComResWord("CALL",             POTANS_|RESWORD_),
   ComResWord("CASCADE",          ANS_|RESWORD_),
   ComResWord("CASCADED",         ANS_|RESWORD_),
-  ComResWord("CASE",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("CASE",             ANS_|RESWORD_),
   ComResWord("CAST",             ANS_|RESWORD_),
-  ComResWord("CATALOG",          ANS_|RESWORD_|MPWORD_),
-  ComResWord("CHAR",             ANS_|RESWORD_|MPWORD_),
-  ComResWord("CHARACTER",        ANS_|RESWORD_|MPWORD_),
+  ComResWord("CATALOG",          ANS_|RESWORD_),
+  ComResWord("CHAR",             ANS_|RESWORD_),
+  ComResWord("CHARACTER",        ANS_|RESWORD_),
   ComResWord("CHARACTER_LENGTH", ANS_|RESWORD_),
   ComResWord("CHAR_LENGTH",      ANS_|RESWORD_),
-  ComResWord("CHECK",            ANS_|RESWORD_|MPWORD_),
+  ComResWord("CHECK",            ANS_|RESWORD_),
   ComResWord("CLASS",            COMPAQ_|RESWORD_),
   ComResWord("CLOB",             COMPAQ_|RESWORD_),
-  ComResWord("CLOSE",            ANS_|RESWORD_|MPWORD_),
+  ComResWord("CLOSE",            ANS_|RESWORD_),
   ComResWord("COALESCE",         ANS_|RESWORD_),
-  ComResWord("COLLATE",          ANS_|RESWORD_|MPWORD_),
+  ComResWord("COLLATE",          ANS_|RESWORD_),
   ComResWord("COLLATION",        ANS_|RESWORD_),
   ComResWord("COLUMN",           ANS_|RESWORD_),
-  ComResWord("COMMIT",           ANS_|RESWORD_|MPWORD_),
+  ComResWord("COMMIT",           ANS_|RESWORD_),
   ComResWord("COMPLETION",       POTANS_|RESWORD_),
   ComResWord("CONNECT",          ANS_|RESWORD_),
   //  ComResWord("CONNECTION",       ANS_|RESWORD_),
@@ -108,17 +108,17 @@
   ComResWord("CONTINUE",         ANS_|RESWORD_),
   ComResWord("CONVERT",          ANS_|RESWORD_),
   ComResWord("CORRESPONDING",    ANS_|RESWORD_),
-  ComResWord("COUNT",            ANS_|RESWORD_|MPWORD_),
+  ComResWord("COUNT",            ANS_|RESWORD_),
   ComResWord("CREATE",           ANS_|RESWORD_),
   ComResWord("CROSS",            ANS_|RESWORD_),
   ComResWord("CUBE",             COMPAQ_|RESWORD_),
-  ComResWord("CURRENT",          ANS_|RESWORD_|MPWORD_),
+  ComResWord("CURRENT",          ANS_|RESWORD_),
   ComResWord("CURRENT_DATE",     ANS_|RESWORD_),
   ComResWord("CURRENT_PATH",     COMPAQ_|RESWORD_),
   ComResWord("CURRENT_TIME",     ANS_|RESWORD_),
   ComResWord("CURRENT_TIMESTAMP",ANS_|RESWORD_),
   ComResWord("CURRENT_USER",     ANS_|RESWORD_),
-  ComResWord("CURSOR",           ANS_|RESWORD_|MPWORD_),
+  ComResWord("CURSOR",           ANS_|RESWORD_),
   ComResWord("CYCLE",            POTANS_|RESWORD_),
   ComResWord("DATA",             POTANS_|NONRESWORD_),
   // The word DATA is used in several places in mxcmp (ISP and RFORK),
@@ -126,20 +126,20 @@
   // made it reserved even though it is in the potential ANSI reserved
   // word list.
 
-  ComResWord("DATE",             ANS_|RESWORD_|MPWORD_),
-  ComResWord("DATETIME",         COMPAQ_|RESWORD_|MPWORD_),
-  ComResWord("DAY",              ANS_|RESWORD_|MPWORD_),
+  ComResWord("DATE",             ANS_|RESWORD_),
+  ComResWord("DATETIME",         COMPAQ_|RESWORD_),
+  ComResWord("DAY",              ANS_|RESWORD_),
   ComResWord("DEALLOCATE",       ANS_|RESWORD_),
-  ComResWord("DEC",              ANS_|RESWORD_|MPWORD_),
-  ComResWord("DECIMAL",          ANS_|RESWORD_|MPWORD_),
-  ComResWord("DECLARE",          ANS_|RESWORD_|MPWORD_),
-  ComResWord("DEFAULT",          ANS_|RESWORD_|MPWORD_),
+  ComResWord("DEC",              ANS_|RESWORD_),
+  ComResWord("DECIMAL",          ANS_|RESWORD_),
+  ComResWord("DECLARE",          ANS_|RESWORD_),
+  ComResWord("DEFAULT",          ANS_|RESWORD_),
   ComResWord("DEFERRABLE",       ANS_|RESWORD_),
   ComResWord("DEFERRED",         ANS_|RESWORD_),
-  ComResWord("DELETE",           ANS_|RESWORD_|MPWORD_),
+  ComResWord("DELETE",           ANS_|RESWORD_),
   ComResWord("DEPTH",            POTANS_|RESWORD_),
   ComResWord("DEREF",            COMPAQ_|RESWORD_),
-  ComResWord("DESC",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("DESC",             ANS_|RESWORD_),
   ComResWord("DESCRIBE",         ANS_|RESWORD_),
   ComResWord("DESCRIPTOR",       ANS_|RESWORD_),
   ComResWord("DESTROY",          COMPAQ_|RESWORD_),
@@ -148,7 +148,7 @@
   ComResWord("DIAGNOSTICS",      ANS_|RESWORD_),
   ComResWord("DICTIONARY",       POTANS_|RESWORD_),
   ComResWord("DISCONNECT",       ANS_|RESWORD_),
-  ComResWord("DISTINCT",         ANS_|RESWORD_|MPWORD_),
+  ComResWord("DISTINCT",         ANS_|RESWORD_),
   ComResWord("DOMAIN",           ANS_|RESWORD_),
   ComResWord("DOUBLE",           ANS_|RESWORD_),
   ComResWord("DROP",             ANS_|RESWORD_),
@@ -159,24 +159,24 @@
   ComResWord("END",              ANS_|RESWORD_),
   ComResWord("END-EXEC",         ANS_|RESWORD_),
   ComResWord("EQUALS",           POTANS_|RESWORD_),
-  ComResWord("ESCAPE",           ANS_|RESWORD_|MPWORD_),
+  ComResWord("ESCAPE",           ANS_|RESWORD_),
   ComResWord("EXCEPT",           ANS_|RESWORD_),
   ComResWord("EXCEPTION",        ANS_|RESWORD_),
   ComResWord("EXEC",             ANS_|RESWORD_),
   ComResWord("EXECUTE",          ANS_|RESWORD_),
-  ComResWord("EXISTS",           ANS_|RESWORD_|MPWORD_),
+  ComResWord("EXISTS",           ANS_|RESWORD_),
   ComResWord("EXTERNAL",         ANS_|RESWORD_),
   ComResWord("EXTRACT",          ANS_|RESWORD_),
   ComResWord("FALSE",            ANS_|RESWORD_),
-  ComResWord("FETCH",            ANS_|RESWORD_|MPWORD_),
+  ComResWord("FETCH",            ANS_|RESWORD_),
   ComResWord("FIRST",            ANS_|RESWORD_),
   ComResWord("FLOAT",            ANS_|RESWORD_),
-  ComResWord("FOR",              ANS_|RESWORD_|MPWORD_),
+  ComResWord("FOR",              ANS_|RESWORD_),
   ComResWord("FOREIGN",          ANS_|RESWORD_),
   ComResWord("FOUND",            ANS_|RESWORD_),
-  ComResWord("FRACTION",         COMPAQ_|RESWORD_|MPWORD_),
+  ComResWord("FRACTION",         COMPAQ_|RESWORD_),
   ComResWord("FREE",             COMPAQ_|RESWORD_),
-  ComResWord("FROM",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("FROM",             ANS_|RESWORD_),
   ComResWord("FULL",             ANS_|RESWORD_),
   ComResWord("FUNCTION",         COMPAQ_|RESWORD_),
   ComResWord("GENERAL",          POTANS_|RESWORD_),
@@ -185,43 +185,43 @@
   ComResWord("GO",               ANS_|RESWORD_),
   ComResWord("GOTO",             ANS_|RESWORD_),
   ComResWord("GRANT",            ANS_|RESWORD_),
-  ComResWord("GROUP",            ANS_|RESWORD_|MPWORD_),
+  ComResWord("GROUP",            ANS_|RESWORD_),
   ComResWord("GROUPING",         COMPAQ_|RESWORD_),
-  ComResWord("HAVING",           ANS_|RESWORD_|MPWORD_),
+  ComResWord("HAVING",           ANS_|RESWORD_),
   ComResWord("HOST",             COMPAQ_|RESWORD_),
-  ComResWord("HOUR",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("HOUR",             ANS_|RESWORD_),
   ComResWord("IDENTITY",         ANS_|RESWORD_),
   ComResWord("IF",               POTANS_|RESWORD_),
   ComResWord("IGNORE",           POTANS_|RESWORD_),
   ComResWord("IMMEDIATE",        ANS_|RESWORD_),
-  ComResWord("IN",               ANS_|RESWORD_|MPWORD_),
+  ComResWord("IN",               ANS_|RESWORD_),
   ComResWord("INDICATOR",        ANS_|RESWORD_),
   ComResWord("INITIALLY",        ANS_|RESWORD_),
-  ComResWord("INNER",            ANS_|RESWORD_|MPWORD_),
+  ComResWord("INNER",            ANS_|RESWORD_),
   ComResWord("INOUT",            COMPAQ_|RESWORD_),
-  ComResWord("INPUT",            ANS_|RESWORD_|MPWORD_),
+  ComResWord("INPUT",            ANS_|RESWORD_),
   ComResWord("INSENSITIVE",      ANS_|RESWORD_),
-  ComResWord("INSERT",           ANS_|RESWORD_|MPWORD_),
-  ComResWord("INT",              ANS_|RESWORD_|MPWORD_),
-  ComResWord("INTEGER",          ANS_|RESWORD_|MPWORD_),
+  ComResWord("INSERT",           ANS_|RESWORD_),
+  ComResWord("INT",              ANS_|RESWORD_),
+  ComResWord("INTEGER",          ANS_|RESWORD_),
   ComResWord("INTERSECT",        ANS_|RESWORD_),
-  ComResWord("INTERVAL",         ANS_|RESWORD_|MPWORD_),
-  ComResWord("INTO",             ANS_|RESWORD_|MPWORD_),
-  ComResWord("IS",               ANS_|RESWORD_|MPWORD_),
+  ComResWord("INTERVAL",         ANS_|RESWORD_),
+  ComResWord("INTO",             ANS_|RESWORD_),
+  ComResWord("IS",               ANS_|RESWORD_),
   ComResWord("ISOLATION",        ANS_|RESWORD_),
   ComResWord("ITERATE",          COMPAQ_|RESWORD_),
-  ComResWord("JOIN",             ANS_|RESWORD_|MPWORD_),
-  ComResWord("KEY",              ANS_|RESWORD_|MPWORD_),
+  ComResWord("JOIN",             ANS_|RESWORD_),
+  ComResWord("KEY",              ANS_|RESWORD_),
   ComResWord("LANGUAGE",         ANS_|RESWORD_),
   ComResWord("LARGE",            COMPAQ_|RESWORD_),
   ComResWord("LAST",             ANS_|RESWORD_),
   ComResWord("LATERAL",          COMPAQ_|RESWORD_),
-  ComResWord("LEADING",          ANS_|RESWORD_|MPWORD_),
+  ComResWord("LEADING",          ANS_|RESWORD_),
   ComResWord("LEAVE",            POTANS_|RESWORD_),
-  ComResWord("LEFT",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("LEFT",             ANS_|RESWORD_),
   ComResWord("LESS",             POTANS_|RESWORD_),
   ComResWord("LEVEL",            ANS_|RESWORD_),
-  ComResWord("LIKE",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("LIKE",             ANS_|RESWORD_),
   ComResWord("LIMIT",            POTANS_|RESWORD_),
   ComResWord("LOCAL",            ANS_|RESWORD_),
   ComResWord("LOCALTIME",        COMPAQ_|RESWORD_),
@@ -230,13 +230,13 @@
   ComResWord("LOOP",             POTANS_|RESWORD_),
   ComResWord("LOWER",            ANS_|RESWORD_),
   ComResWord("MATCH",            ANS_|RESWORD_),
-  ComResWord("MAX",              ANS_|RESWORD_|MPWORD_),
+  ComResWord("MAX",              ANS_|RESWORD_),
   ComResWord("MIN",              ANS_|RESWORD_),
-  ComResWord("MINUTE",           ANS_|RESWORD_|MPWORD_),
+  ComResWord("MINUTE",           ANS_|RESWORD_),
   ComResWord("MODIFIES",         COMPAQ_|RESWORD_),
   ComResWord("MODIFY",           POTANS_|RESWORD_),
   ComResWord("MODULE",           ANS_|RESWORD_),
-  ComResWord("MONTH",            ANS_|RESWORD_|MPWORD_),
+  ComResWord("MONTH",            ANS_|RESWORD_),
   ComResWord("NAMES",            ANS_|RESWORD_),
   ComResWord("NATIONAL",         ANS_|RESWORD_),
   ComResWord("NATURAL",          ANS_|RESWORD_),
@@ -245,26 +245,26 @@
   ComResWord("NEXT",             ANS_|RESWORD_),
   ComResWord("NO",               ANS_|RESWORD_),
   ComResWord("NONE",             POTANS_|RESWORD_),
-  ComResWord("NOT",              ANS_|RESWORD_|MPWORD_),
-  ComResWord("NULL",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("NOT",              ANS_|RESWORD_),
+  ComResWord("NULL",             ANS_|RESWORD_),
   ComResWord("NULLIF",           ANS_|RESWORD_),
-  ComResWord("NUMERIC",          ANS_|RESWORD_|MPWORD_),
+  ComResWord("NUMERIC",          ANS_|RESWORD_),
   ComResWord("OBJECT",           POTANS_|RESWORD_),
   ComResWord("OCTET_LENGTH",     ANS_|RESWORD_),
-  ComResWord("OF",               ANS_|RESWORD_|MPWORD_),
+  ComResWord("OF",               ANS_|RESWORD_),
   ComResWord("OFF",              POTANS_|RESWORD_),
-  ComResWord("ON",               ANS_|RESWORD_|MPWORD_),
+  ComResWord("ON",               ANS_|RESWORD_),
   ComResWord("ONLY",             ANS_|RESWORD_),
-  ComResWord("OPEN",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("OPEN",             ANS_|RESWORD_),
   ComResWord("OPERATION",        POTANS_|NONRESWORD_),
   // The word OPERATION is used as a column in the SMD LOCKS table, so
   // we have not made this word reserved even though it is in the
   // potential ANSI reserved word list.
 
   ComResWord("OPERATORS",        POTANS_|RESWORD_),
-  ComResWord("OPTION",           ANS_|RESWORD_|MPWORD_),
-  ComResWord("OR",               ANS_|RESWORD_|MPWORD_),
-  ComResWord("ORDER",            ANS_|RESWORD_|MPWORD_),
+  ComResWord("OPTION",           ANS_|RESWORD_),
+  ComResWord("OR",               ANS_|RESWORD_),
+  ComResWord("ORDER",            ANS_|RESWORD_),
   ComResWord("ORDINALITY",       COMPAQ_|RESWORD_),
   ComResWord("OTHERS",           POTANS_|RESWORD_),
   ComResWord("OUT",              COMPAQ_|RESWORD_),
@@ -308,8 +308,8 @@
   ComResWord("RETURN",           POTANS_|RESWORD_),
   ComResWord("RETURNS",          POTANS_|RESWORD_),
   ComResWord("REVOKE",           ANS_|RESWORD_),
-  ComResWord("RIGHT",            ANS_|RESWORD_|MPWORD_),
-  ComResWord("ROLLBACK",         ANS_|RESWORD_|MPWORD_),
+  ComResWord("RIGHT",            ANS_|RESWORD_),
+  ComResWord("ROLLBACK",         ANS_|RESWORD_),
   ComResWord("ROLLUP",           COMPAQ_|RESWORD_),
   ComResWord("ROUTINE",          POTANS_|RESWORD_),
   ComResWord("ROW",              ANS_|RESWORD_),
@@ -319,19 +319,19 @@
   ComResWord("SCOPE",            COMPAQ_|RESWORD_),
   ComResWord("SCROLL",           ANS_|RESWORD_),
   ComResWord("SEARCH",           POTANS_|RESWORD_),
-  ComResWord("SECOND",           ANS_|RESWORD_|MPWORD_),
+  ComResWord("SECOND",           ANS_|RESWORD_),
   ComResWord("SECTION",          ANS_|RESWORD_),
-  ComResWord("SELECT",           ANS_|RESWORD_|MPWORD_),
+  ComResWord("SELECT",           ANS_|RESWORD_),
   ComResWord("SENSITIVE",        POTANS_|RESWORD_),
   ComResWord("SESSION",          ANS_|RESWORD_),
   ComResWord("SESSION_USER",     ANS_|RESWORD_),
-  ComResWord("SET",              ANS_|RESWORD_|MPWORD_),
+  ComResWord("SET",              ANS_|RESWORD_),
   ComResWord("SETS",             COMPAQ_|RESWORD_),
   ComResWord("SIGNAL",           POTANS_|RESWORD_),
   ComResWord("SIMILAR",          POTANS_|RESWORD_),
   ComResWord("SIZE",             ANS_|RESWORD_),
-  ComResWord("SMALLINT",         ANS_|RESWORD_|MPWORD_),
-  ComResWord("SOME",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("SMALLINT",         ANS_|RESWORD_),
+  ComResWord("SOME",             ANS_|RESWORD_),
   ComResWord("SPECIFIC",         COMPAQ_|RESWORD_),
   ComResWord("SPECIFICTYPE",     COMPAQ_|RESWORD_),
   ComResWord("SQL",              ANS_|RESWORD_),
@@ -358,21 +358,21 @@
 // used in qat tests
   ComResWord("STRUCTURE",        POTANS_|RESWORD_),
   ComResWord("SUBSTRING",        ANS_|RESWORD_),
-  ComResWord("SUM",              ANS_|RESWORD_|MPWORD_),
+  ComResWord("SUM",              ANS_|RESWORD_),
   ComResWord("SYSTEM_USER",      ANS_|RESWORD_),
-  ComResWord("TABLE",            ANS_|RESWORD_|MPWORD_),
+  ComResWord("TABLE",            ANS_|RESWORD_),
   ComResWord("TEMPORARY",        ANS_|RESWORD_),
   ComResWord("TERMINATE",        COMPAQ_|RESWORD_),
   ComResWord("TEST",             POTANS_|RESWORD_),
   ComResWord("THAN",             COMPAQ_|RESWORD_),
-  ComResWord("THEN",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("THEN",             ANS_|RESWORD_),
   ComResWord("THERE",            POTANS_|RESWORD_),
-  ComResWord("TIME",             ANS_|RESWORD_|MPWORD_),
-  ComResWord("TIMESTAMP",        ANS_|RESWORD_|MPWORD_),
+  ComResWord("TIME",             ANS_|RESWORD_),
+  ComResWord("TIMESTAMP",        ANS_|RESWORD_),
   ComResWord("TIMEZONE_HOUR",    ANS_|RESWORD_),
   ComResWord("TIMEZONE_MINUTE",  ANS_|RESWORD_),
-  ComResWord("TO",               ANS_|RESWORD_|MPWORD_),
-  ComResWord("TRAILING",         ANS_|RESWORD_|MPWORD_),
+  ComResWord("TO",               ANS_|RESWORD_),
+  ComResWord("TRAILING",         ANS_|RESWORD_),
   ComResWord("TRANSACTION",      ANS_|RESWORD_),
   ComResWord("TRANSLATE",        ANS_|RESWORD_),
   ComResWord("TRANSLATION",      ANS_|RESWORD_),
@@ -382,34 +382,34 @@
   ComResWord("TRIM",             ANS_|RESWORD_),
   ComResWord("TRUE",             ANS_|RESWORD_),
   ComResWord("UNDER",            POTANS_|RESWORD_),
-  ComResWord("UNION",            ANS_|RESWORD_|MPWORD_),
-  ComResWord("UNIQUE",           ANS_|RESWORD_|MPWORD_),
+  ComResWord("UNION",            ANS_|RESWORD_),
+  ComResWord("UNIQUE",           ANS_|RESWORD_),
   ComResWord("UNKNOWN",          ANS_|RESWORD_),
   ComResWord("UNNEST",           COMPAQ_|RESWORD_),
-  ComResWord("UPDATE",           ANS_|RESWORD_|MPWORD_),
+  ComResWord("UPDATE",           ANS_|RESWORD_),
   ComResWord("UPPER",            ANS_|RESWORD_),
   ComResWord("UPSERT",           RESWORD_),
   ComResWord("UPSHIFT",          COMPAQ_|RESWORD_),
   ComResWord("USAGE",            ANS_|RESWORD_),
   ComResWord("USER",             ANS_|RESWORD_),
   ComResWord("USING",            ANS_|RESWORD_),
-  ComResWord("VALUES",           ANS_|RESWORD_|MPWORD_),
+  ComResWord("VALUES",           ANS_|RESWORD_),
   ComResWord("VARCHAR",          ANS_|RESWORD_),
   ComResWord("VARIABLE",         POTANS_|RESWORD_),
   ComResWord("VARYING",          ANS_|RESWORD_),
-  ComResWord("VIEW",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("VIEW",             ANS_|RESWORD_),
   ComResWord("VIRTUAL",          POTANS_|RESWORD_),
   ComResWord("VISIBLE",          POTANS_|RESWORD_),
   ComResWord("WAIT",             POTANS_|RESWORD_),
-  ComResWord("WHEN",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("WHEN",             ANS_|RESWORD_),
   ComResWord("WHENEVER",         ANS_|RESWORD_),
-  ComResWord("WHERE",            ANS_|RESWORD_|MPWORD_),
+  ComResWord("WHERE",            ANS_|RESWORD_),
   ComResWord("WHILE",            POTANS_|RESWORD_),
-  ComResWord("WITH",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("WITH",             ANS_|RESWORD_),
   ComResWord("WITHOUT",          POTANS_|RESWORD_),
-  ComResWord("WORK",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("WORK",             ANS_|RESWORD_),
   ComResWord("WRITE",            ANS_|RESWORD_),
-  ComResWord("YEAR",             ANS_|RESWORD_|MPWORD_),
+  ComResWord("YEAR",             ANS_|RESWORD_),
   ComResWord("ZONE",             ANS_|RESWORD_)
 };
 
@@ -462,7 +462,7 @@
 // =================================================================
 //
 NABoolean
-ComResWords::isSqlReservedWord(const char *word,NABoolean mp_context,
+ComResWords::isSqlReservedWord(const char *word,
 			       UInt32 ifSetFlags)
 {
   char uword[MAX_RESWORD_LENGTH];
@@ -489,7 +489,7 @@
     //resWord.setResWord(uword, 0);
     ComResWord *entry = searchResWordTbl(&resWord);
 
-    return (entry && entry->isReserved(mp_context,ifSetFlags));
+    return (entry && entry->isReserved(ifSetFlags));
   } else {
     return FALSE;
   }
diff --git a/core/sql/common/ComResWords.h b/core/sql/common/ComResWords.h
index 99c817b..e8f7af9 100644
--- a/core/sql/common/ComResWords.h
+++ b/core/sql/common/ComResWords.h
@@ -54,8 +54,6 @@
                                 // are not for various reason. See ABSOLUTE,
                                 // DATA, and OPERATION in ComResWords.cpp.
 
-  MPWORD_      = 0x04,          // a SQL/MP Reserved word.
-
   ANS_         = 0x08,          // Indicates that the word is reserved by ANSI
                                 // This flag is used only for notation.
 
@@ -94,12 +92,9 @@
   //
   inline const char *getResWord() const { return resWord_; };
 
-  // Is the word reserved, depends on isMPContext.
+  // Is the word reserved
   //
-  inline NABoolean isReserved(NABoolean inMPContext,UInt32 ifSetFlags) {
-    if (inMPContext) 
-      return isMPReserved();
-     else 
+  inline NABoolean isReserved(UInt32 ifSetFlags) {
       return ((flags_ & RESWORD_) &&
 	      !(allowOldAndNew(ifSetFlags) ));
    
@@ -112,16 +107,6 @@
     return  (ifSetFlags & (flags_ & ALLOWOLDNEW_));
   };
 
-  // Are we parsing/lexing SQL/MP Stored text.
-  // This affect which words are reserved identifiers.
-  //
-  
-  
-  // Is the word reserved by SQL/MP.
-  //
-  inline NABoolean isMPReserved() const { return flags_ & MPWORD_; };
-
-
   // The reserved word.
   //
   const char * resWord_;
@@ -153,11 +138,9 @@
   ComResWords(const ComResWords &other, NAMemory * h=0); 
   ComResWords(NAMemory * h=0);
 
-  // Determine if the given word is reserved. Depends on if parsing
-  // MX or MP text.
+  // Determine if the given word is reserved. 
   //
   static NABoolean isSqlReservedWord(const char *word,
-				     NABoolean MPContext =FALSE,
 				     UInt32 ifSetFlags = 0);
 
 private:
diff --git a/core/sql/common/NAString.cpp b/core/sql/common/NAString.cpp
index c2c8d47..107e620 100644
--- a/core/sql/common/NAString.cpp
+++ b/core/sql/common/NAString.cpp
@@ -377,7 +377,7 @@
 // an ANSI, PotentialANSI, or Tandem reserved word.
 NABoolean IsSqlReservedWord(const char *sqlText)
 {
-  return ComResWords::isSqlReservedWord(sqlText,FALSE,0);
+  return ComResWords::isSqlReservedWord(sqlText,0);
 }
 
 NABoolean IsCIdentifier(const char *id)
diff --git a/core/sql/common/OperTypeEnum.h b/core/sql/common/OperTypeEnum.h
index e375c0a..6bda946 100644
--- a/core/sql/common/OperTypeEnum.h
+++ b/core/sql/common/OperTypeEnum.h
@@ -519,6 +519,7 @@
                         ITM_JSONOBJECTFIELDTEXT = 2241,
 
                         // string functions
+                        ITM_SPLIT_PART = 2249,
                         ITM_TRUNC = 2250,
                         ITM_ASCII = 2251,
                         ITM_POSITION = 2252,
diff --git a/core/sql/exp/ExpErrorEnums.h b/core/sql/exp/ExpErrorEnums.h
index 96defee..ef17b71 100644
--- a/core/sql/exp/ExpErrorEnums.h
+++ b/core/sql/exp/ExpErrorEnums.h
@@ -263,6 +263,11 @@
   //-------------------------------------------------------------
   EXE_INVALID_CHAR_IN_TRANSLATE_FUNC    = 8690,
 
+  //-------------------------------------------------------------
+  // Errors codes split_part function.
+  //-------------------------------------------------------------
+  EXE_INVALID_FIELD_POSITION            = 8691,
+  
   // ---------------------------------------------------------------------
   // Parallel execution
   // ---------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPackDefs.cpp b/core/sql/exp/ExpPackDefs.cpp
index b8e6d6b..617e820 100644
--- a/core/sql/exp/ExpPackDefs.cpp
+++ b/core/sql/exp/ExpPackDefs.cpp
@@ -244,6 +244,11 @@
   return packClause(space_, sizeof(ex_function_upper));
 }  
 
+Long ex_function_split_part::pack(void * space_)
+{
+  return packClause(space_, sizeof(ex_function_split_part));
+}  
+
 Long ex_function_translate::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_translate));
diff --git a/core/sql/exp/exp_clause.cpp b/core/sql/exp/exp_clause.cpp
index ffd8b27..7c908d1 100644
--- a/core/sql/exp/exp_clause.cpp
+++ b/core/sql/exp/exp_clause.cpp
@@ -224,6 +224,9 @@
 	case ITM_POSITION_DOUBLEBYTE:
 	  setClassID(FUNC_POSITION_DOUBLEBYTE_ID);
 	  break;
+	case ITM_SPLIT_PART:
+	  setClassID(FUNC_SPLIT_PART_ID);
+	  break;
 	case ITM_CONCAT:
 	  setClassID(FUNC_CONCAT_ID);
 	  break;
@@ -723,6 +726,9 @@
     case ex_clause::FUNC_POSITION_DOUBLEBYTE_ID:
       GetVTblPtr(vtblPtr, ex_function_position_doublebyte);
       break;
+    case ex_clause::FUNC_SPLIT_PART_ID:
+      GetVTblPtr(vtblPtr, ex_function_split_part);
+      break;
     case ex_clause::FUNC_CONCAT_ID:
       GetVTblPtr(vtblPtr, ex_function_concat);
       break;
diff --git a/core/sql/exp/exp_clause.h b/core/sql/exp/exp_clause.h
index fda7269..ad51e4f 100644
--- a/core/sql/exp/exp_clause.h
+++ b/core/sql/exp/exp_clause.h
@@ -211,7 +211,8 @@
     FUNC_AES_DECRYPT         = 130,
     FUNC_REVERSE_ID         = 131,
     FUNC_SLEEP_ID           = 132,
-    FUNC_UNIX_TIMESTAMP_ID = 133
+    FUNC_UNIX_TIMESTAMP_ID = 133,
+    FUNC_SPLIT_PART_ID     = 134
   };
 
   // max number of operands (including result) in a clause.
diff --git a/core/sql/exp/exp_function.cpp b/core/sql/exp/exp_function.cpp
index 85a5fbf..ecd904b 100644
--- a/core/sql/exp/exp_function.cpp
+++ b/core/sql/exp/exp_function.cpp
@@ -192,6 +192,7 @@
 ex_function_nullifzero::ex_function_nullifzero(){};
 ex_function_nvl::ex_function_nvl(){};
 ex_function_json_object_field_text::ex_function_json_object_field_text(){};
+ex_function_split_part::ex_function_split_part(){};
 
 ex_function_queryid_extract::ex_function_queryid_extract(){};
 ExFunctionUniqueId::ExFunctionUniqueId(){};
@@ -829,6 +830,13 @@
 
 };
 
+ex_function_split_part::ex_function_split_part(OperatorTypeEnum oper_type
+            , Attributes **attr
+                    , Space *space)
+      : ex_function_clause(oper_type, 4, attr, space)
+{
+
+}
 
 // Triggers
 ex_expr::exp_return_type ex_function_get_bit_value_at::eval(char *op_data[],
@@ -2746,6 +2754,57 @@
   return ex_expr::EXPR_OK;
 }
 
+ex_expr::exp_return_type ex_function_split_part::eval(char *op_data[]
+                               , CollHeap* heap
+                               , ComDiagsArea** diagsArea)
+{
+  size_t sourceLen = getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]);
+  size_t patternLen = getOperand(2)->getLength(op_data[-MAX_OPERANDS+2]);
+  Lng32 indexOfTarget = *(Lng32 *)op_data[3];
+
+  if (indexOfTarget <= 0)
+    {
+       ExRaiseSqlError(heap, diagsArea, EXE_INVALID_FIELD_POSITION);
+       *(*diagsArea) << DgInt0(indexOfTarget);
+       return ex_expr::EXPR_ERROR;
+    }
+
+  NAString source(op_data[1], sourceLen);
+  NAString pattern(op_data[2], patternLen);
+
+  Lng32 patternCnt = 0;
+  StringPos currentTargetPos = 0;
+  StringPos pos = 0;
+
+  while (patternCnt != indexOfTarget)
+    {
+       currentTargetPos = pos;
+       pos = source.index(pattern, pos);
+       if (pos == NA_NPOS)
+        break;
+       pos = pos + patternLen;
+       patternCnt++;
+    }
+
+  size_t targetLen = 0;
+  if ((patternCnt == 0)
+        ||((patternCnt != indexOfTarget)
+             && (patternCnt != indexOfTarget - 1)))
+    op_data[0][0] = '\0';
+  else
+    {
+       if (patternCnt == indexOfTarget)
+         targetLen = pos - currentTargetPos - patternLen;
+       else  //if (patternLen == indexOfTarget-1)
+         targetLen = sourceLen - currentTargetPos;
+
+       str_cpy_all(op_data[0], op_data[1] + currentTargetPos, targetLen);
+    }
+  getOperand(0)->setVarLength(targetLen, op_data[-MAX_OPERANDS]);
+  return ex_expr::EXPR_OK;
+}
+
+
 ex_expr::exp_return_type ex_function_current::eval(char *op_data[],
 						   CollHeap*,
 						   ComDiagsArea**)
diff --git a/core/sql/exp/exp_function.h b/core/sql/exp/exp_function.h
index c107606..6debaba 100644
--- a/core/sql/exp/exp_function.h
+++ b/core/sql/exp/exp_function.h
@@ -4188,7 +4188,26 @@
   // that the size of the object remains the same (and is modulo 8).
   // ---------------------------------------------------------------------
   char          fillers_[8];            // 08-15
+};
 
+class ex_function_split_part: public ex_function_clause {
+
+public:
+    ex_function_split_part(OperatorTypeEnum oper_type
+                                      , Attributes **attr
+                                      , Space *space);
+    ex_function_split_part();
+
+    ex_expr::exp_return_type eval(char *op_data[], CollHeap*, ComDiagsArea** = 0);
+    Long pack(void *);
+    virtual unsigned char getClassVersionID(){return 1;}
+    virtual void populateImageVersionIDArray()
+      {
+         setImageVersionID(2, getClassVersionID());
+         ex_function_clause::populateImageVersionIDArray();
+      }
+
+    virtual short getClassSize(){return (short)sizeof(*this);} 
 };
 
 
diff --git a/core/sql/generator/GenItemFunc.cpp b/core/sql/generator/GenItemFunc.cpp
index 60a8f19..f653c03 100644
--- a/core/sql/generator/GenItemFunc.cpp
+++ b/core/sql/generator/GenItemFunc.cpp
@@ -713,6 +713,13 @@
                                                         CmpCommon::getDefaultNumeric(BLOCK_ENCRYPTION_MODE));
       break;
     }
+
+    case ITM_SPLIT_PART:
+    {
+      function_clause = 
+            new (generator->getSpace()) ex_function_split_part(getOperatorType(), attr, space);
+      break;
+    }
     default:
       break;
     }
diff --git a/core/sql/optimizer/ItemExpr.cpp b/core/sql/optimizer/ItemExpr.cpp
index 920d2f4..f0c3825 100644
--- a/core/sql/optimizer/ItemExpr.cpp
+++ b/core/sql/optimizer/ItemExpr.cpp
@@ -7765,6 +7765,9 @@
     case ITM_TO_TIMESTAMP:
       return "to_timestamp";
 
+    case ITM_SPLIT_PART:
+      return "split_part";
+
     default:
       return "unknown func";
     } // switch
@@ -15234,3 +15237,16 @@
    return this;
 }
 
+SplitPart::~SplitPart() {}
+
+ItemExpr * SplitPart::copyTopNode(ItemExpr *derivedNode, CollHeap *outHeap)
+{
+      ItemExpr *result = NULL;
+      if (derivedNode == NULL)
+        result = new (outHeap) SplitPart(child(0), child(1), child(2));
+      else
+        result = derivedNode;
+
+     return BuiltinFunction::copyTopNode(result, outHeap);
+}
+
diff --git a/core/sql/optimizer/ItemFunc.h b/core/sql/optimizer/ItemFunc.h
index 2062919..0dd901e 100644
--- a/core/sql/optimizer/ItemFunc.h
+++ b/core/sql/optimizer/ItemFunc.h
@@ -5843,4 +5843,22 @@
 
 }; // class RowNumFunc
 
+class SplitPart : public CacheableBuiltinFunction
+{
+public: 
+  SplitPart(ItemExpr *val1Ptr, ItemExpr *val2Ptr, ItemExpr *val3Ptr)
+    :CacheableBuiltinFunction(ITM_SPLIT_PART, 3, val1Ptr, val2Ptr, val3Ptr)
+    {
+      allowsSQLnullArg() = FALSE;
+    } 
+
+   virtual ~SplitPart();
+
+   // a virtual function for type propagating the node
+   virtual const NAType * synthesizeType();
+   
+   virtual ItemExpr * copyTopNode(ItemExpr *derivedNode = NULL,
+                      CollHeap *outheap = 0);
+}; //class SplitPart
+
 #endif /* ITEMFUNC_H */
diff --git a/core/sql/optimizer/SynthType.cpp b/core/sql/optimizer/SynthType.cpp
index eaf4b89..9efcb41 100644
--- a/core/sql/optimizer/SynthType.cpp
+++ b/core/sql/optimizer/SynthType.cpp
@@ -7139,3 +7139,72 @@
    return result;
 }
 
+const NAType * SplitPart::synthesizeType()
+{
+  ValueId vid1 = child(0)->getValueId(); 
+  ValueId vid2 = child(1)->getValueId();
+  ValueId vid3 = child(2)->getValueId();
+  vid1.coerceType(NA_CHARACTER_TYPE);
+  vid2.coerceType(NA_CHARACTER_TYPE);
+  SQLInt si(NULL);
+  vid3.coerceType(NA_NUMERIC_TYPE);
+
+  const NAType *operand1 = &child(0)->getValueId().getType();
+  const NAType *operand2 = &child(1)->getValueId().getType();
+  const NAType *operand3 = &child(2)->getValueId().getType();
+
+  if ((operand1->getTypeQualifier() != NA_CHARACTER_TYPE) 
+      && (operand1->getFSDatatype() != REC_CLOB))
+  {
+    //4051 The first operand of a split_part function must be character.
+    *CmpCommon::diags()<<DgSqlCode(-4051) << DgString0(getTextUpper());
+    return NULL;
+  }
+  if ((operand2->getTypeQualifier() != NA_CHARACTER_TYPE)
+      && (operand1->getFSDatatype() != REC_CLOB))
+  {
+    //4497 The second operand of a split_part function must be character.
+    *CmpCommon::diags()<<DgSqlCode(-4497) << DgString0("second")
+                                          << DgString1(getTextUpper())
+                                          << DgString2("character");
+    return NULL;
+  }
+
+  if (operand3->getTypeQualifier() != NA_NUMERIC_TYPE)
+  {
+    //4053 The third operand of a split_part function must be numeric.
+    *CmpCommon::diags() << DgSqlCode(-4053) << DgString0(getTextUpper());
+    return NULL;
+  }
+
+  const CharType *charOperand = (CharType *)operand1; 
+  Lng32 maxLength_bytes = charOperand->getDataStorageSize();
+  Lng32 maxLength_chars = charOperand->getPrecisionOrMaxNumChars();
+  CharInfo::CharSet op1_cs = operand1->getCharSet();
+  if (maxLength_chars <= 0) //if unlimited
+    maxLength_chars = maxLength_bytes/CharInfo::minBytesPerChar(op1_cs);
+
+  if (operand1->getFSDatatype() == REC_CLOB)
+  {
+    return new HEAP SQLClob(HEAP
+                            , maxLength_bytes
+                            , Lob_Invalid_Storage
+                            , operand1->supportsSQLnull()
+                                OR operand2->supportsSQLnull()
+                                OR operand3->supportsSQLnull()
+                           );
+  } 
+
+  return new HEAP SQLVarChar(HEAP
+                             , CharLenInfo(maxLength_chars, maxLength_bytes)
+                             , operand1->supportsSQLnull()
+                                 OR operand2->supportsSQLnull()
+                                 OR operand3->supportsSQLnull()
+                             , charOperand->isUpshifted()
+                             , charOperand->isCaseinsensitive()
+                             , operand1->getCharSet()
+                             , charOperand->getCollation()
+                             , charOperand->getCoercibility()
+                             );
+
+}
diff --git a/core/sql/parser/ParKeyWords.cpp b/core/sql/parser/ParKeyWords.cpp
index b58bc35..df891ce 100644
--- a/core/sql/parser/ParKeyWords.cpp
+++ b/core/sql/parser/ParKeyWords.cpp
@@ -110,7 +110,7 @@
   ParKeyWord("ALIAS",              TOK_ALIAS,       POTANS_|RESWORD_),
   ParKeyWord("ALIGNED",            TOK_ALIGNED,     NONRESTOKEN_),
   ParKeyWord("ALIGNED_LENGTH",     TOK_ALIGNED_LENGTH,     NONRESTOKEN_),
-  ParKeyWord("ALL",                TOK_ALL,         ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("ALL",                TOK_ALL,         ANS_|RESWORD_),
   ParKeyWord("ALL_DDL",            TOK_ALL_DDL,     NONRESTOKEN_),
   ParKeyWord("ALL_DML",            TOK_ALL_DML,     NONRESTOKEN_),
   ParKeyWord("ALL_UTILITY",        TOK_ALL_UTILITY, NONRESTOKEN_),
@@ -128,16 +128,16 @@
   ParKeyWord("ALTER_TABLE",        TOK_ALTER_TABLE,	NONRESTOKEN_),
   ParKeyWord("ALTER_TRIGGER",      TOK_ALTER_TRIGGER,	NONRESTOKEN_),
   ParKeyWord("ALTER_VIEW",         TOK_ALTER_VIEW,	NONRESTOKEN_),
-  ParKeyWord("AND",                TOK_AND,         ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("AND",                TOK_AND,         ANS_|RESWORD_),
   ParKeyWord("ANSIVARCHAR",        TOK_ANSIVARCHAR, NONRESTOKEN_),
-  ParKeyWord("ANY",                TOK_ANY,         ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("ANY",                TOK_ANY,         ANS_|RESWORD_),
   ParKeyWord("APPEND",             TOK_APPEND,      NONRESTOKEN_),
   ParKeyWord("AQR",                TOK_AQR,         NONRESTOKEN_),
   ParKeyWord("AREA",               TOK_AREA,        NONRESTOKEN_),
   ParKeyWord("ARRAY",              TOK_ARRAY,       COMPAQ_|RESWORD_),
   ParKeyWord("ARE",                TOK_ARE,         ANS_|RESWORD_),
-  ParKeyWord("AS",                 TOK_AS,          ANS_|RESWORD_|MPWORD_),
-  ParKeyWord("ASC",                TOK_ASC,         ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("AS",                 TOK_AS,          ANS_|RESWORD_),
+  ParKeyWord("ASC",                TOK_ASC,         ANS_|RESWORD_),
   ParKeyWord("ASCENDING",          TOK_ASCENDING,   NONRESTOKEN_),
   ParKeyWord("ASCII",              TOK_ASCII,       NONRESTOKEN_),
   ParKeyWord("ASIN",               TOK_ASIN,        NONRESTOKEN_),
@@ -161,12 +161,12 @@
   ParKeyWord("AUTOCOMMIT",         TOK_AUTOCOMMIT,  NONRESTOKEN_),
   ParKeyWord("AUTOMATIC",          TOK_AUTOMATIC, FLAGSNONE_),
   ParKeyWord("AVERAGE_STREAM_WAIT", TOK_AVERAGE_STREAM_WAIT, NONRESTOKEN_),
-  ParKeyWord("AVG",                TOK_AVG,         ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("AVG",                TOK_AVG,         ANS_|RESWORD_),
   ParKeyWord("BACKUP",             TOK_BACKUP,      NONRESTOKEN_),
   ParKeyWord("BALANCE",            TOK_BALANCE,     NONRESTOKEN_),
   ParKeyWord("BEFORE",             TOK_BEFORE,      ANS_|RESWORD_|NONRESTOKEN_),
-  ParKeyWord("BEGIN",              TOK_BEGIN,       ANS_|RESWORD_|MPWORD_),
-  ParKeyWord("BETWEEN",            TOK_BETWEEN,     SECOND_|ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("BEGIN",              TOK_BEGIN,       ANS_|RESWORD_),
+  ParKeyWord("BETWEEN",            TOK_BETWEEN,     SECOND_|ANS_|RESWORD_),
   ParKeyWord("BIGINT",             TOK_BIGINT,      NONRESTOKEN_),
   ParKeyWord("BINARY",             TOK_BINARY,      COMPAQ_|RESWORD_),
   ParKeyWord("BIT",                TOK_BIT,         ANS_|RESWORD_),
@@ -180,14 +180,14 @@
   ParKeyWord("BLOCKS",             TOK_BLOCKS,      NONRESTOKEN_),
   ParKeyWord("BLOCKSIZE",          TOK_BLOCKSIZE,   NONRESTOKEN_),
   ParKeyWord("BOOLEAN",            TOK_BOOLEAN,     RESWORD_),
-  ParKeyWord("BOTH",               TOK_BOTH,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("BOTH",               TOK_BOTH,        ANS_|RESWORD_),
   ParKeyWord("BREADTH",            IDENTIFIER,      POTANS_|RESWORD_),
   ParKeyWord("BRIEF",              TOK_BRIEF,       NONRESTOKEN_),
   ParKeyWord("BT",                 TOK_BT,          NONRESTOKEN_),
   ParKeyWord("BUFFER",             TOK_BUFFER,      NONRESTOKEN_),
   ParKeyWord("BUFFERED",           TOK_BUFFERED,    NONRESTOKEN_),
   ParKeyWord("BUFFERTOLOB",        TOK_BUFFERTOLOB, NONRESTOKEN_),
-  ParKeyWord("BY",                 TOK_BY,          SECOND_|ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("BY",                 TOK_BY,          SECOND_|ANS_|RESWORD_),
   ParKeyWord("BYTE",               TOK_BYTE,        NONRESTOKEN_),
   ParKeyWord("BYTEINT",            TOK_BYTEINT,     NONRESTOKEN_),
   ParKeyWord("BYTES",              TOK_BYTES,       NONRESTOKEN_),
@@ -200,10 +200,10 @@
   ParKeyWord("CARDINALITY",        TOK_CARDINALITY, NONRESTOKEN_),
   ParKeyWord("CASCADE",            TOK_CASCADE,     ANS_|RESWORD_),
   ParKeyWord("CASCADED",           TOK_CASCADED,    ANS_|RESWORD_),
-  ParKeyWord("CASE",               TOK_CASE,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("CASE",               TOK_CASE,        ANS_|RESWORD_),
   ParKeyWord("CASESPECIFIC",       TOK_CASESPECIFIC, SECOND_|NONRESTOKEN_),  
   ParKeyWord("CAST",               TOK_CAST,        ANS_|RESWORD_|NONRESTOKEN_),
-  ParKeyWord("CATALOG",            TOK_CATALOG,     ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("CATALOG",            TOK_CATALOG,     ANS_|RESWORD_),
   ParKeyWord("CATALOGS",           TOK_CATALOGS,    NONRESTOKEN_),
   ParKeyWord("CATALOG_NAME",       TOK_CATALOG_NAME, NONRESTOKEN_),
   ParKeyWord("CATCHUP",            TOK_CATCHUP,     FLAGSNONE_),
@@ -212,17 +212,17 @@
   ParKeyWord("CENTURY",            TOK_CENTURY,     NONRESTOKEN_),
   ParKeyWord("CHANGED",            TOK_CHANGED,     NONRESTOKEN_),
   ParKeyWord("CHANGES",            TOK_CHANGES,     FLAGSNONE_),
-  ParKeyWord("CHAR",               TOK_CHAR,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("CHAR",               TOK_CHAR,        ANS_|RESWORD_),
   ParKeyWord("CHARS",              TOK_CHARS,       NONRESTOKEN_),
   ParKeyWord("CHR",                TOK_CHR,         NONRESTOKEN_),
-  ParKeyWord("CHARACTER",          TOK_CHARACTER,   ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("CHARACTER",          TOK_CHARACTER,   ANS_|RESWORD_),
   ParKeyWord("CHARACTERS",         TOK_CHARACTERS,  NONRESTOKEN_),
   ParKeyWord("CHARACTER_LENGTH",   TOK_CHAR_LENGTH, ANS_|RESWORD_|NONRESTOKEN_),
   ParKeyWord("CHARACTER_SET_CATALOG", TOK_CHARACTER_SET_CATALOG, NONRESTOKEN_),
   ParKeyWord("CHARACTER_SET_NAME", TOK_CHARACTER_SET_NAME, NONRESTOKEN_),
   ParKeyWord("CHARACTER_SET_SCHEMA", TOK_CHARACTER_SET_SCHEMA, NONRESTOKEN_),
   ParKeyWord("CHAR_LENGTH",        TOK_CHAR_LENGTH, ANS_|RESWORD_|NONRESTOKEN_),
-  ParKeyWord("CHECK",              TOK_CHECK,       ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("CHECK",              TOK_CHECK,       ANS_|RESWORD_),
   ParKeyWord("CHECKSUM",           TOK_CHECKSUM,    NONRESTOKEN_),
   ParKeyWord("CLASS",              TOK_CLASS,       COMPAQ_|RESWORD_),
   ParKeyWord("CLASS_ORIGIN",       TOK_CLASS_ORIGIN, NONRESTOKEN_),
@@ -231,7 +231,7 @@
   ParKeyWord("CLEAR",              TOK_CLEAR,       NONRESTOKEN_),
   ParKeyWord("CLEARONPURGE",       TOK_CLEARONPURGE, NONRESTOKEN_),
   ParKeyWord("CLOB",               TOK_CLOB,        COMPAQ_|RESWORD_),
-  ParKeyWord("CLOSE",              TOK_CLOSE,       ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("CLOSE",              TOK_CLOSE,       ANS_|RESWORD_),
   ParKeyWord("CLUSTER",            TOK_CLUSTER,     NONRESTOKEN_),
   ParKeyWord("CLUSTERING",         TOK_CLUSTERING,    NONRESTOKEN_),
   ParKeyWord("CLUSTERS",           TOK_CLUSTERS,    NONRESTOKEN_),
@@ -239,7 +239,7 @@
   ParKeyWord("CMP",                TOK_ARKCMP,      NONRESTOKEN_),
   ParKeyWord("COALESCE",           TOK_COALESCE,    ANS_|RESWORD_),
   ParKeyWord("CODE_VALUE",         TOK_CODE_VALUE,  NONRESTOKEN_),
-  ParKeyWord("COLLATE",            TOK_COLLATE,     ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("COLLATE",            TOK_COLLATE,     ANS_|RESWORD_),
   ParKeyWord("COLLATION",          TOK_COLLATION,   ANS_|RESWORD_),
   ParKeyWord("COLLATION_CATALOG",  TOK_COLLATION_CATALOG, NONRESTOKEN_),
   ParKeyWord("COLLATION_NAME",     TOK_COLLATION_NAME, NONRESTOKEN_),
@@ -254,7 +254,7 @@
   ParKeyWord("COMMAND_FUNCTION",   TOK_COMMAND_FUNCTION, NONRESTOKEN_),
   ParKeyWord("COMMANDS",           TOK_COMMANDS, NONRESTOKEN_),
   ParKeyWord("COMMENT",            TOK_COMMENT, NONRESTOKEN_),
-  ParKeyWord("COMMIT",             TOK_COMMIT,      SECOND_|ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("COMMIT",             TOK_COMMIT,      SECOND_|ANS_|RESWORD_),
   ParKeyWord("COMMITTED",          TOK_COMMITTED,   NONRESTOKEN_),
   ParKeyWord("COMP",               TOK_COMP,        NONRESTOKEN_),
   ParKeyWord("COMPACT",            TOK_COMPACT,     NONRESTOKEN_),
@@ -294,7 +294,7 @@
   ParKeyWord("COS",                TOK_COS,         NONRESTOKEN_),
   ParKeyWord("COSH",               TOK_COSH,        NONRESTOKEN_),
   ParKeyWord("COST",               TOK_COST,        NONRESTOKEN_),
-  ParKeyWord("COUNT",              TOK_COUNT,       ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("COUNT",              TOK_COUNT,       ANS_|RESWORD_),
   ParKeyWord("COPY",               TOK_COPY,        NONRESTOKEN_),
   ParKeyWord("CPU",                TOK_CPU,         NONRESTOKEN_),
   ParKeyWord("CQD",                TOK_CQD,         NONRESTOKEN_),
@@ -313,7 +313,7 @@
   ParKeyWord("CROSS",              TOK_CROSS,       ANS_|RESWORD_),
   ParKeyWord("CUBE",               TOK_CUBE,        COMPAQ_|RESWORD_),
   ParKeyWord("CURDATE",            TOK_CURDATE,     NONRESTOKEN_),
-  ParKeyWord("CURRENT",            TOK_CURRENT,     ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("CURRENT",            TOK_CURRENT,     ANS_|RESWORD_),
   ParKeyWord("CURRENT_DATE",       TOK_CURRENT_DATE, ANS_|RESWORD_),
   ParKeyWord("CURRENT_PATH",       TOK_CURRENT_PATH, COMPAQ_|RESWORD_),
   ParKeyWord("CURRENT_RUNNING",    TOK_CURRENT_RUNNING,     NONRESTOKEN_),
@@ -324,7 +324,7 @@
   ParKeyWord("CURRENT_TIME_UTC",   TOK_CURRENT_TIME_UTC,     NONRESTOKEN_),
   ParKeyWord("CURRENT_USER",       TOK_CURRENT_USER, ANS_|RESWORD_),
   ParKeyWord("CURRNT_USR_INTN",    TOK_CURRNT_USR_INTN, RESWORD_),
-  ParKeyWord("CURSOR",             TOK_CURSOR,      FIRST_|ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("CURSOR",             TOK_CURSOR,      FIRST_|ANS_|RESWORD_),
   ParKeyWord("CURSOR_NAME",        TOK_CURSOR_NAME, NONRESTOKEN_),
   ParKeyWord("CURTIME",            TOK_CURTIME,     NONRESTOKEN_),
   ParKeyWord("CYCLE",              TOK_CYCLE,       ANS_|RESWORD_),
@@ -337,7 +337,7 @@
 
   ParKeyWord("DATABASE",           TOK_DATABASE,    NONRESTOKEN_),
   ParKeyWord("DATA_OFFSET",        TOK_DATA_OFFSET, NONRESTOKEN_),
-  ParKeyWord("DATE",               TOK_DATE,        FIRST_|ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("DATE",               TOK_DATE,        FIRST_|ANS_|RESWORD_),
   ParKeyWord("DATEADD",            TOK_DATEADD,     NONRESTOKEN_),
   ParKeyWord("DATE_ADD",           TOK_DATE_ADD,    NONRESTOKEN_),
   ParKeyWord("DATE_PART",          TOK_DATE_PART,   NONRESTOKEN_),
@@ -345,9 +345,9 @@
   ParKeyWord("DATEDIFF",           TOK_DATEDIFF,    NONRESTOKEN_),
   ParKeyWord("DATE_SUB",           TOK_DATE_SUB,    NONRESTOKEN_),
   ParKeyWord("DATEFORMAT",         TOK_DATEFORMAT,  NONRESTOKEN_),
-  ParKeyWord("DATETIME",           TOK_DATETIME,    COMPAQ_|RESWORD_|MPWORD_),
+  ParKeyWord("DATETIME",           TOK_DATETIME,    COMPAQ_|RESWORD_),
   ParKeyWord("DATETIME_CODE",      TOK_DATETIME_CODE, NONRESTOKEN_),
-  ParKeyWord("DAY",                TOK_DAY,         ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("DAY",                TOK_DAY,         ANS_|RESWORD_),
   ParKeyWord("DAYNAME",            TOK_DAYNAME,     NONRESTOKEN_),
   ParKeyWord("DAYOFMONTH",         TOK_DAYOFMONTH,  NONRESTOKEN_),
   ParKeyWord("DAYOFWEEK",          TOK_DAYOFWEEK,   NONRESTOKEN_),
@@ -359,12 +359,12 @@
   ParKeyWord("DE",                 TOK_DE,          FLAGSNONE_),
   ParKeyWord("DEALLOCATE",         TOK_DEALLOCATE,  ANS_|RESWORD_),
   ParKeyWord("DEBUG",              TOK_DEBUG,       NONRESTOKEN_),
-  ParKeyWord("DEC",                TOK_DECIMAL,     ANS_|RESWORD_|MPWORD_),
-  ParKeyWord("DECIMAL",            TOK_DECIMAL,     ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("DEC",                TOK_DECIMAL,     ANS_|RESWORD_),
+  ParKeyWord("DECIMAL",            TOK_DECIMAL,     ANS_|RESWORD_),
   ParKeyWord("DECADE",             TOK_DECADE,      NONRESTOKEN_),
   ParKeyWord("DECODE",             TOK_DECODE,      NONRESTOKEN_),
-  ParKeyWord("DECLARE",            TOK_DECLARE,     ANS_|RESWORD_|MPWORD_),
-  ParKeyWord("DEFAULT",            TOK_DEFAULT,     SECOND_|ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("DECLARE",            TOK_DECLARE,     ANS_|RESWORD_),
+  ParKeyWord("DEFAULT",            TOK_DEFAULT,     SECOND_|ANS_|RESWORD_),
   ParKeyWord("DEFAULTS",           TOK_DEFAULTS,    NONRESTOKEN_),
   ParKeyWord("DEFERRABLE",         IDENTIFIER,      ANS_|RESWORD_),
   ParKeyWord("DEFERRED",           IDENTIFIER,      ANS_|RESWORD_),
@@ -372,13 +372,13 @@
   ParKeyWord("DEFINITION",         TOK_DEFINITION,  NONRESTOKEN_),
   ParKeyWord("DEGREES",            TOK_DEGREES,     NONRESTOKEN_),
   ParKeyWord("DELAY",              TOK_DELAY,       NONRESTOKEN_),
-  ParKeyWord("DELETE",             TOK_DELETE,      ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("DELETE",             TOK_DELETE,      ANS_|RESWORD_),
   ParKeyWord("DELIMITER",          TOK_DELIMITER,   NONRESTOKEN_),
   ParKeyWord("DEPENDENT", 	   TOK_DEPENDENT,   NONRESTOKEN_),
   ParKeyWord("DENSE_RANK",         TOK_D_RANK,      NONRESTOKEN_),
   ParKeyWord("DEPTH",              IDENTIFIER,      POTANS_|RESWORD_),
   ParKeyWord("DEREF",              TOK_DEREF,       COMPAQ_|RESWORD_),
-  ParKeyWord("DESC",               TOK_DESC,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("DESC",               TOK_DESC,        ANS_|RESWORD_),
   ParKeyWord("DESCENDING",         TOK_DESCENDING,  NONRESTOKEN_),
   ParKeyWord("DESCRIBE",           TOK_DESCRIBE,    ANS_|RESWORD_),
   ParKeyWord("DESCRIPTOR",         TOK_DESCRIPTOR,  ANS_|RESWORD_),
@@ -396,7 +396,7 @@
   ParKeyWord("DISCONNECT",         IDENTIFIER,      ANS_|RESWORD_),
   ParKeyWord("DISK",		   TOK_DISK,        NONRESTOKEN_),
   ParKeyWord("DISPLAY",            TOK_DISPLAY,     NONRESTOKEN_),
-  ParKeyWord("DISTINCT",           TOK_DISTINCT,    ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("DISTINCT",           TOK_DISTINCT,    ANS_|RESWORD_),
   ParKeyWord("DIVISION",           TOK_DIVISION,    NONRESTOKEN_),
   ParKeyWord("DO",                 TOK_DO,          NONRESTOKEN_),
   ParKeyWord("DOMAIN",             IDENTIFIER,      ANS_|RESWORD_),
@@ -440,7 +440,7 @@
   ParKeyWord("EPOCH",              TOK_EPOCH,       NONRESTOKEN_),
   ParKeyWord("EQUALS",             IDENTIFIER,      POTANS_|RESWORD_),
   ParKeyWord("ERROR",              TOK_ERROR,       NONRESTOKEN_),
-  ParKeyWord("ESCAPE",             TOK_ESCAPE,      ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("ESCAPE",             TOK_ESCAPE,      ANS_|RESWORD_),
   ParKeyWord("ET",                 TOK_ET,          NONRESTOKEN_),
   ParKeyWord("EUROPEAN",           TOK_EUROPEAN,    NONRESTOKEN_),
   ParKeyWord("EVERY",              TOK_EVERY,       NONRESTOKEN_),
@@ -454,7 +454,7 @@
   ParKeyWord("EXECUTE",            TOK_EXECUTE,     ANS_|RESWORD_),
   ParKeyWord("EXECUTION",          TOK_EXECUTION,   NONRESTOKEN_),
   ParKeyWord("EXISTING",           TOK_EXISTING,    NONRESTOKEN_),
-  ParKeyWord("EXISTS",             TOK_EXISTS,      ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("EXISTS",             TOK_EXISTS,      ANS_|RESWORD_),
   ParKeyWord("EXIT",               TOK_EXIT,        NONRESTOKEN_),
   ParKeyWord("EXP",                TOK_EXP,         NONRESTOKEN_),
   ParKeyWord("EXPLAIN",            TOK_EXPLAIN,     NONRESTOKEN_),
@@ -471,7 +471,7 @@
   ParKeyWord("FAMILY",               TOK_FAMILY,        NONRESTOKEN_),
   ParKeyWord("FAST",               TOK_FAST,        NONRESTOKEN_),
   ParKeyWord("FEATURE_VERSION_INFO",TOK_FEATURE_VERSION_INFO, NONRESTOKEN_),
-  ParKeyWord("FETCH",              TOK_FETCH,       ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("FETCH",              TOK_FETCH,       ANS_|RESWORD_),
   ParKeyWord("FILE",               TOK_FILE,        NONRESTOKEN_),
   ParKeyWord("FILETOLOB",          TOK_FILETOLOB,   NONRESTOKEN_),
   ParKeyWord("FILETOEXTERNAL",          TOK_FILETOEXTERNAL,   NONRESTOKEN_),
@@ -485,15 +485,15 @@
   ParKeyWord("FLOOR",              TOK_FLOOR,       NONRESTOKEN_),
   ParKeyWord("FN",                 TOK_FN,          NONRESTOKEN_),
   ParKeyWord("FOLLOWING",          TOK_FOLLOWING,   NONRESTOKEN_),
-  ParKeyWord("FOR",                TOK_FOR,         FIRST_|ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("FOR",                TOK_FOR,         FIRST_|ANS_|RESWORD_),
   ParKeyWord("FORCE",              TOK_FORCE,       NONRESTOKEN_),
   ParKeyWord("FOREIGN",            TOK_FOREIGN,     ANS_|RESWORD_),
   ParKeyWord("FORMAT",             TOK_FORMAT,      NONRESTOKEN_),
   ParKeyWord("FOUND",              TOK_FOUND,       ANS_|RESWORD_),
-  ParKeyWord("FRACTION",           TOK_FRACTION,    COMPAQ_|RESWORD_|MPWORD_),
+  ParKeyWord("FRACTION",           TOK_FRACTION,    COMPAQ_|RESWORD_),
   ParKeyWord("FREE",               TOK_FREE,        COMPAQ_|RESWORD_),
   ParKeyWord("FREESPACE",          TOK_FREESPACE,   NONRESTOKEN_),  
-  ParKeyWord("FROM",               TOK_FROM,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("FROM",               TOK_FROM,        ANS_|RESWORD_),
   ParKeyWord("FULL",               TOK_FULL,        ANS_|RESWORD_),
   ParKeyWord("FUNCTION",           TOK_FUNCTION,    COMPAQ_|RESWORD_),
   ParKeyWord("FUNCTIONS",          TOK_FUNCTIONS,   NONRESTOKEN_),
@@ -511,7 +511,7 @@
   ParKeyWord("GRANTEES",           TOK_GRANTEES,    NONRESTOKEN_),
   ParKeyWord("GRANTED",            TOK_GRANTED,     NONRESTOKEN_),
   ParKeyWord("GREATEST",                  TOK_GREATEST,           NONRESTOKEN_),
-  ParKeyWord("GROUP",              TOK_GROUP,       ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("GROUP",              TOK_GROUP,       ANS_|RESWORD_),
   ParKeyWord("GROUP_CONCAT",       TOK_GROUP_CONCAT,   NONRESTOKEN_),
   ParKeyWord("GROUPING",           TOK_GROUPING,    COMPAQ_|RESWORD_),
   ParKeyWord("GROUPING_ID",        TOK_GROUPING_ID, NONRESTOKEN_),
@@ -521,7 +521,7 @@
   ParKeyWord("HASH2",              TOK_HASH2,        NONRESTOKEN_),
   ParKeyWord("HASHPARTFUNC",       TOK_HASHPARTFUNC, NONRESTOKEN_),
   ParKeyWord("HASH2PARTFUNC",      TOK_HASH2PARTFUNC, NONRESTOKEN_),
-  ParKeyWord("HAVING",             TOK_HAVING,      ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("HAVING",             TOK_HAVING,      ANS_|RESWORD_),
   ParKeyWord("HBASE",              TOK_HBASE,      NONRESTOKEN_),
   ParKeyWord("HBASE_OPTIONS",  TOK_HBASE_OPTIONS,      NONRESTOKEN_),
   ParKeyWord("HBASE_TIMESTAMP",  TOK_HBASE_TIMESTAMP,      NONRESTOKEN_),
@@ -538,7 +538,7 @@
   ParKeyWord("HOLD",               TOK_HOLD,        THIRD_|NONRESTOKEN_),
   ParKeyWord("HORIZONTAL",         TOK_HORIZONTAL,  NONRESTOKEN_),
   ParKeyWord("HOST",               TOK_HOST,        COMPAQ_|RESWORD_),
-  ParKeyWord("HOUR",               TOK_HOUR,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("HOUR",               TOK_HOUR,        ANS_|RESWORD_),
   ParKeyWord("HOURS",              TOK_HOURS,       NONRESTOKEN_),
   ParKeyWord("ICOMPRESS",          TOK_ICOMPRESS,   NONRESTOKEN_),
   ParKeyWord("IDENTITY",           TOK_IDENTITY,    ANS_|RESWORD_),
@@ -550,7 +550,7 @@
   ParKeyWord("IMMEDIATE",          TOK_IMMEDIATE,   ANS_|RESWORD_),
   ParKeyWord("IMMUTABLE",          TOK_IMMUTABLE,   NONRESTOKEN_),
   ParKeyWord("IMPLICIT",           TOK_IMPLICIT,    NONRESTOKEN_),
-  ParKeyWord("IN",                 TOK_IN,          SECOND_|ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("IN",                 TOK_IN,          SECOND_|ANS_|RESWORD_),
   ParKeyWord("INCLUSIVE",          TOK_INCLUSIVE,   NONRESTOKEN_),
   ParKeyWord("INCREMENT",          TOK_INCREMENT,    NONRESTOKEN_),
   ParKeyWord("INCREMENTAL",        TOK_INCREMENTAL,  NONRESTOKEN_),
@@ -569,27 +569,27 @@
   ParKeyWord("INITIALIZED",        TOK_INITIALIZED, FLAGSNONE_),
   ParKeyWord("INITIALLY",          IDENTIFIER,      ANS_|RESWORD_),
   ParKeyWord("INGEST",             TOK_INGEST,      NONRESTOKEN_),
-  ParKeyWord("INNER",              TOK_INNER,       ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("INNER",              TOK_INNER,       ANS_|RESWORD_),
   ParKeyWord("INOUT",              TOK_INOUT,       COMPAQ_|RESWORD_),
-  ParKeyWord("INPUT",              TOK_INPUT,       ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("INPUT",              TOK_INPUT,       ANS_|RESWORD_),
   ParKeyWord("INPUTS",             TOK_INPUTS,      NONRESTOKEN_),
   ParKeyWord("INSENSITIVE",        IDENTIFIER,      ANS_|RESWORD_),
-  ParKeyWord("INSERT",             TOK_INSERT,      ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("INSERT",             TOK_INSERT,      ANS_|RESWORD_),
   ParKeyWord("INSERT_ONLY",        TOK_INSERT_ONLY, NONRESTOKEN_),
   ParKeyWord("INS",                TOK_INS,         NONRESTOKEN_),
   ParKeyWord("INSERTLOG",          TOK_INSERTLOG,   FLAGSNONE_),
   ParKeyWord("INSTR",              TOK_INSTR,       NONRESTOKEN_),
-  ParKeyWord("INT",                TOK_INTEGER,     ANS_|RESWORD_|MPWORD_),
-  ParKeyWord("INTEGER",            TOK_INTEGER,     ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("INT",                TOK_INTEGER,     ANS_|RESWORD_),
+  ParKeyWord("INTEGER",            TOK_INTEGER,     ANS_|RESWORD_),
   ParKeyWord("INTERNAL",           TOK_INTERNAL,    FLAGSNONE_),
   ParKeyWord("INTERSECT",          TOK_INTERSECT,   ANS_|RESWORD_),
-  ParKeyWord("INTERVAL",           TOK_INTERVAL,    ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("INTERVAL",           TOK_INTERVAL,    ANS_|RESWORD_),
   ParKeyWord("INTERVALS",          TOK_INTERVALS,   NONRESTOKEN_),
-  ParKeyWord("INTO",               TOK_INTO,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("INTO",               TOK_INTO,        ANS_|RESWORD_),
   ParKeyWord("INVOKE",             TOK_INVOKE,      NONRESTOKEN_),
   ParKeyWord("INVOKER",            TOK_INVOKER,     NONRESTOKEN_),
   ParKeyWord("IO",                 TOK_IO,          NONRESTOKEN_),
-  ParKeyWord("IS",                 TOK_IS,          ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("IS",                 TOK_IS,          ANS_|RESWORD_),
   ParKeyWord("ISLACK",             TOK_ISLACK,      NONRESTOKEN_),
   ParKeyWord("ISNULL",             TOK_ISNULL,      NONRESTOKEN_),
   ParKeyWord("ISOLATE",            TOK_ISOLATE,     NONRESTOKEN_),
@@ -602,12 +602,12 @@
   ParKeyWord("INVALID", 	   TOK_INVALID,    NONRESTOKEN_),
   ParKeyWord("INVALIDATE", 	   TOK_INVALIDATE, NONRESTOKEN_),
   ParKeyWord("JAVA",               TOK_JAVA,        NONRESTOKEN_),
-  ParKeyWord("JOIN",               TOK_JOIN,        SECOND_|ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("JOIN",               TOK_JOIN,        SECOND_|ANS_|RESWORD_),
   ParKeyWord("JOURNAL",            TOK_JOURNAL,     NONRESTOKEN_), 
   ParKeyWord("JSON_OBJECT_FIELD_TEXT",  TOK_JSONOBJECTFIELDTEXT, NONRESTOKEN_),
   ParKeyWord("JULIANTIMESTAMP",    TOK_JULIANTIMESTAMP, NONRESTOKEN_),
   ParKeyWord("K",                  TOK_K,           NONRESTOKEN_),
-  ParKeyWord("KEY",                TOK_KEY,         ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("KEY",                TOK_KEY,         ANS_|RESWORD_),
   ParKeyWord("KEY_RANGE_COMPARE",  TOK_KEY_RANGE_COMPARE, NONRESTOKEN_),
   ParKeyWord("LABEL",              TOK_LABEL,       NONRESTOKEN_),
   ParKeyWord("LABEL_ALTER",        TOK_LABEL_ALTER,        NONRESTOKEN_),
@@ -627,18 +627,18 @@
   ParKeyWord("LATERAL",            TOK_LATERAL,     COMPAQ_|RESWORD_),
   ParKeyWord("LCASE",              TOK_LCASE,       NONRESTOKEN_),
   ParKeyWord("LEAD",               TOK_LEAD,        ANS_|RESWORD_),
-  ParKeyWord("LEADING",            TOK_LEADING,     ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("LEADING",            TOK_LEADING,     ANS_|RESWORD_),
   ParKeyWord("LEADING_PRECISION",  TOK_LEADING_PRECISION, NONRESTOKEN_),
   ParKeyWord("LEAST",                  TOK_LEAST,           NONRESTOKEN_),
   ParKeyWord("LEAVE",              IDENTIFIER,      POTANS_|RESWORD_),
-  ParKeyWord("LEFT",               TOK_LEFT,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("LEFT",               TOK_LEFT,        ANS_|RESWORD_),
   ParKeyWord("LENGTH",             TOK_LENGTH,      NONRESTOKEN_),
   ParKeyWord("LESS",               IDENTIFIER,      POTANS_|RESWORD_),
   ParKeyWord("LEVEL",              TOK_LEVEL,       ANS_|RESWORD_),
   ParKeyWord("LEVELS",             TOK_LEVELS,      NONRESTOKEN_),
   ParKeyWord("LIBRARY",            TOK_LIBRARY,     NONRESTOKEN_|SECOND_),
   ParKeyWord("LIBRARIES",          TOK_LIBRARIES,   NONRESTOKEN_),
-  ParKeyWord("LIKE",               TOK_LIKE,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("LIKE",               TOK_LIKE,        ANS_|RESWORD_),
   ParKeyWord("LIMIT",              TOK_LIMIT,      POTANS_|RESWORD_),
   ParKeyWord("LINE_NUMBER",        TOK_LINE_NUMBER, NONRESTOKEN_),
   ParKeyWord("LOAD",               TOK_LOAD,        NONRESTOKEN_|SECOND_),
@@ -684,7 +684,7 @@
   ParKeyWord("MATCH",              TOK_MATCH,       ANS_|RESWORD_),
   ParKeyWord("MATCHED",            TOK_MATCHED,     ANS_|RESWORD_),
   ParKeyWord("MATERIALIZED",       TOK_MATERIALIZED,FLAGSNONE_),
-  ParKeyWord("MAX",                TOK_MAX,         ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("MAX",                TOK_MAX,         ANS_|RESWORD_),
   ParKeyWord("MAXEXTENTS",         TOK_MAXEXTENTS,  NONRESTOKEN_),
   ParKeyWord("MAXIMUM",            TOK_MAX,         NONRESTOKEN_),
   ParKeyWord("MAXRUNTIME",         TOK_MAXRUNTIME,  SECOND_|NONRESTOKEN_),
@@ -699,7 +699,7 @@
   ParKeyWord("METADATA",       TOK_METADATA, SECOND_ | NONRESTOKEN_),
   ParKeyWord("MIN",                TOK_MIN,         ANS_|RESWORD_|NONRESTOKEN_),
   ParKeyWord("MINIMAL",            TOK_MINIMAL,     NONRESTOKEN_),
-  ParKeyWord("MINUTE",             TOK_MINUTE,      ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("MINUTE",             TOK_MINUTE,      ANS_|RESWORD_),
   ParKeyWord("MINUTES",            TOK_MINUTES,     NONRESTOKEN_),
   ParKeyWord("MINVALUE",           TOK_MINVALUE,   NONRESTOKEN_),
   ParKeyWord("MIXED",              TOK_MIXED,       FLAGSNONE_),
@@ -709,7 +709,7 @@
   ParKeyWord("MODIFY",             IDENTIFIER,      POTANS_|RESWORD_),
   ParKeyWord("MODULE",             TOK_MODULE,      ANS_|RESWORD_),
   ParKeyWord("MODULES",            TOK_MODULES,     NONRESTOKEN_),
-  ParKeyWord("MONTH",              TOK_MONTH,       ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("MONTH",              TOK_MONTH,       ANS_|RESWORD_),
   ParKeyWord("MONTHNAME",          TOK_MONTHNAME,   NONRESTOKEN_),
   ParKeyWord("MONTHS_BETWEEN",     TOK_MONTHS_BETWEEN,   NONRESTOKEN_),
   ParKeyWord("MORE",               TOK_MORE,        NONRESTOKEN_),
@@ -761,34 +761,34 @@
   ParKeyWord("NOMVLOG",            TOK_NOMVLOG,     FLAGSNONE_),
   ParKeyWord("NONE",               TOK_NONE,        ANS_|RESWORD_),
   ParKeyWord("NORMAL",             TOK_NORMAL,      NONRESTOKEN_),
-  ParKeyWord("NOT",                TOK_NOT,         FIRST_|ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("NOT",                TOK_NOT,         FIRST_|ANS_|RESWORD_),
   ParKeyWord("NOW",                TOK_NOW,         NONRESTOKEN_),
   ParKeyWord("NSK_CODE",           TOK_NSK_CODE,    NONRESTOKEN_),
-  ParKeyWord("NULL",               TOK_NULL,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("NULL",               TOK_NULL,        ANS_|RESWORD_),
   ParKeyWord("NULLABLE",           TOK_NULLABLE,    NONRESTOKEN_),
   ParKeyWord("NULLIF",             TOK_NULLIF,      ANS_|RESWORD_),
   ParKeyWord("NULLIFZERO",         TOK_NULLIFZERO,  NONRESTOKEN_),
   ParKeyWord("NULL_IND_OFFSET",    TOK_NULL_IND_OFFSET, NONRESTOKEN_),
   ParKeyWord("NULL_STRING",        TOK_NULL_STRING, NONRESTOKEN_),
   ParKeyWord("NUMBER",             TOK_NUMBER,      NONRESTOKEN_),
-  ParKeyWord("NUMERIC",            TOK_NUMERIC,     ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("NUMERIC",            TOK_NUMERIC,     ANS_|RESWORD_),
   ParKeyWord("NUM_OF_RANGES",      TOK_NUM_OF_RANGES, FLAGSNONE_),
   ParKeyWord("NVL",                TOK_NVL,         NONRESTOKEN_),
   ParKeyWord("OBJECT",            TOK_OBJECT,     NONRESTOKEN_),
   ParKeyWord("OBJECTS",            TOK_OBJECTS,     NONRESTOKEN_),
   ParKeyWord("OBSOLETE",           TOK_OBSOLETE,    NONRESTOKEN_),
   ParKeyWord("OCTET_LENGTH",       TOK_OCTET_LENGTH, ANS_|RESWORD_|NONRESTOKEN_),
-  ParKeyWord("OF",                 TOK_OF,          ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("OF",                 TOK_OF,          ANS_|RESWORD_),
   ParKeyWord("OFF",                TOK_OFF,         POTANS_|RESWORD_),
   ParKeyWord("OFFLINE",            TOK_OFFLINE,     NONRESTOKEN_),
   ParKeyWord("OFFSET",             TOK_OFFSET,      NONRESTOKEN_),
   ParKeyWord("OJ",                 TOK_OJ,          NONRESTOKEN_),
   ParKeyWord("OLD",                TOK_OLD,         ANS_|RESWORD_|NONRESTOKEN_|ALLOWOLDNEW_),
-  ParKeyWord("ON",                 TOK_ON,          FIRST_|ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("ON",                 TOK_ON,          FIRST_|ANS_|RESWORD_),
   ParKeyWord("ONLINE",             TOK_ONLINE,      NONRESTOKEN_),
   ParKeyWord("ONLY",               TOK_ONLY,        THIRD_|ANS_|RESWORD_),
   ParKeyWord("OPCODE",             TOK_OPCODE,      NONRESTOKEN_),
-  ParKeyWord("OPEN",               TOK_OPEN,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("OPEN",               TOK_OPEN,        ANS_|RESWORD_),
   ParKeyWord("OPENBLOWNAWAY",      TOK_OPENBLOWNAWAY, FLAGSNONE_),
   ParKeyWord("OPERATION",          IDENTIFIER,      POTANS_|NONRESWORD_),
   // The word OPERATION is used as a column in the SMD LOCKS table, so
@@ -796,10 +796,10 @@
   // potential ANSI reserved word list.
 
   ParKeyWord("OPERATORS",          IDENTIFIER,      POTANS_|RESWORD_),
-  ParKeyWord("OPTION",             TOK_OPTION,      ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("OPTION",             TOK_OPTION,      ANS_|RESWORD_),
   ParKeyWord("OPTIONS",            TOK_OPTIONS,     COMPAQ_|RESWORD_),
-  ParKeyWord("OR",                 TOK_OR,          ANS_|RESWORD_|MPWORD_),
-  ParKeyWord("ORDER",              TOK_ORDER,       ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("OR",                 TOK_OR,          ANS_|RESWORD_),
+  ParKeyWord("ORDER",              TOK_ORDER,       ANS_|RESWORD_),
   ParKeyWord("ORDERED",            TOK_ORDERED,     NONRESTOKEN_),
   ParKeyWord("ORDINALITY",         TOK_ORDINALITY,  COMPAQ_|RESWORD_),
   ParKeyWord("OSIM",                 TOK_OSIM,    NONRESTOKEN_),
@@ -950,11 +950,11 @@
   ParKeyWord("REVERSE",            TOK_REVERSE,     NONRESTOKEN_),
   ParKeyWord("REVOKE",             TOK_REVOKE,      ANS_|RESWORD_),
   ParKeyWord("REWRITE",            TOK_REWRITE,     FLAGSNONE_),
-  ParKeyWord("RIGHT",              TOK_RIGHT,       ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("RIGHT",              TOK_RIGHT,       ANS_|RESWORD_),
   ParKeyWord("RMS",                TOK_RMS,         NONRESTOKEN_),
   ParKeyWord("ROLE",               TOK_ROLE,        NONRESTOKEN_|SECOND_), 
   ParKeyWord("ROLES",              TOK_ROLES,       NONRESTOKEN_),
-  ParKeyWord("ROLLBACK",           TOK_ROLLBACK,    ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("ROLLBACK",           TOK_ROLLBACK,    ANS_|RESWORD_),
   ParKeyWord("ROLLUP",             TOK_ROLLUP,      COMPAQ_|RESWORD_),
   ParKeyWord("ROUND",              TOK_ROUND,       NONRESTOKEN_),
   ParKeyWord("ROUNDROBINPARTFUNC", TOK_RRPARTFUNC,  NONRESTOKEN_),
@@ -1002,12 +1002,12 @@
   ParKeyWord("SERIALIZED",             TOK_SERIALIZED,      NONRESTOKEN_),
   ParKeyWord("SEARCH",             IDENTIFIER,      POTANS_|RESWORD_),
   ParKeyWord("STRING_SEARCH",      TOK_STRING_SEARCH,        NONRESTOKEN_),
-  ParKeyWord("SECOND",             TOK_SECOND,      ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("SECOND",             TOK_SECOND,      ANS_|RESWORD_),
   ParKeyWord("SECONDS",            TOK_SECONDS,     NONRESTOKEN_),
   ParKeyWord("SECTION",            TOK_SECTION,     ANS_|RESWORD_),
   ParKeyWord("SECURITY",           TOK_SECURITY,    NONRESTOKEN_),  
   ParKeyWord("SEL",                TOK_SEL,         NONRESTOKEN_),
-  ParKeyWord("SELECT",             TOK_SELECT,      ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("SELECT",             TOK_SELECT,      ANS_|RESWORD_),
   ParKeyWord("SELECTIVITY",        TOK_SELECTIVITY, NONRESTOKEN_),
   ParKeyWord("SENSITIVE",          IDENTIFIER,      POTANS_|RESWORD_),
   ParKeyWord("SEPARATE",           TOK_SEPARATE,    NONRESTOKEN_),
@@ -1023,7 +1023,7 @@
   ParKeyWord("SESSIONS",           TOK_SESSIONS,    NONRESTOKEN_), 
   ParKeyWord("SESSION_USER",       TOK_SESSION_USER, ANS_|RESWORD_),
   ParKeyWord("SESSN_USR_INTN",     TOK_SESSN_USR_INTN, RESWORD_),
-  ParKeyWord("SET",                TOK_SET,         ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("SET",                TOK_SET,         ANS_|RESWORD_),
   ParKeyWord("SETS",               TOK_SETS,        COMPAQ_|RESWORD_),
   ParKeyWord("SG_TABLE",           TOK_SG_TABLE,    NONRESTOKEN_),
   ParKeyWord("SHA",                TOK_SHA,         NONRESTOKEN_),
@@ -1053,10 +1053,10 @@
   ParKeyWord("SKIP",               TOK_SKIP,        FIRST_|SECOND_|NONRESTOKEN_),
   ParKeyWord("SLACK",              TOK_SLACK,        NONRESTOKEN_),
   ParKeyWord("SLEEP",              TOK_SLEEP,        NONRESTOKEN_),
-  ParKeyWord("SMALLINT",           TOK_SMALLINT,    ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("SMALLINT",           TOK_SMALLINT,    ANS_|RESWORD_),
   ParKeyWord("SNAPSHOT",           TOK_SNAPSHOT,    NONRESTOKEN_),
   ParKeyWord("SOFTWARE",           TOK_SOFTWARE,    NONRESTOKEN_),
-  ParKeyWord("SOME",               TOK_SOME,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("SOME",               TOK_SOME,        ANS_|RESWORD_),
   ParKeyWord("SOUNDEX",            TOK_SOUNDEX,     NONRESTOKEN_),
   ParKeyWord("SORT",               TOK_SORT,        NONRESTOKEN_),
   ParKeyWord("SORT_KEY",           TOK_SORT_KEY,    NONRESTOKEN_),
@@ -1065,6 +1065,7 @@
   ParKeyWord("SPACE",              TOK_SPACE,       NONRESTOKEN_),
   ParKeyWord("SPECIFIC",           TOK_SPECIFIC,    COMPAQ_|RESWORD_),
   ParKeyWord("SPECIFICTYPE",       TOK_SPECIFICTYPE, COMPAQ_|RESWORD_),
+  ParKeyWord("SPLIT_PART",         TOK_SPLIT_PART, NONRESTOKEN_),
   ParKeyWord("SP_RESULT_SET",      TOK_SP_RESULT_SET, NONRESTOKEN_),
   ParKeyWord("SQL",                TOK_SQL,         ANS_|RESWORD_|SECOND_),
   ParKeyWord("SQLCODE",            TOK_SQLCODE,     ANS_|RESWORD_),
@@ -1110,7 +1111,7 @@
   ParKeyWord("SUBSTRING",          TOK_SUBSTRING,   ANS_|RESWORD_|NONRESTOKEN_),
   ParKeyWord("SUBSYSTEM_ID",       TOK_SUBSYSTEM_ID, NONRESTOKEN_),
   ParKeyWord("SUFFIX",             TOK_SUFFIX,       NONRESTOKEN_),
-  ParKeyWord("SUM",                TOK_SUM,         ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("SUM",                TOK_SUM,         ANS_|RESWORD_),
   ParKeyWord("SUMMARY",            TOK_SUMMARY,     NONRESTOKEN_),
   ParKeyWord("SUSPEND",            TOK_SUSPEND,     NONRESTOKEN_),
   ParKeyWord("SYNONYM",            TOK_SYNONYM,     POTANS_|RESWORD_),
@@ -1121,7 +1122,7 @@
   ParKeyWord("SYSTEM_USER",        IDENTIFIER,      ANS_|RESWORD_),
   ParKeyWord("T",                  TOK_T,           NONRESTOKEN_),
   ParKeyWord("TAG",                TOK_TAG,         NONRESTOKEN_),
-  ParKeyWord("TABLE",              TOK_TABLE,       ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("TABLE",              TOK_TABLE,       ANS_|RESWORD_),
   ParKeyWord("TABLES",             TOK_TABLES,      FLAGSNONE_),
   ParKeyWord("TABLESPACE",             TOK_TABLESPACE,      NONRESTOKEN_),
   ParKeyWord("TABLE_MAPPING",      TOK_TABLE_MAPPING, NONRESTOKEN_),
@@ -1136,20 +1137,20 @@
   ParKeyWord("TEST",               IDENTIFIER,      POTANS_|RESWORD_),
   ParKeyWord("TEXT",               TOK_TEXT,        NONRESTOKEN_),
   ParKeyWord("THAN",               TOK_THAN,        COMPAQ_|RESWORD_),
-  ParKeyWord("THEN",               TOK_THEN,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("THEN",               TOK_THEN,        ANS_|RESWORD_),
   ParKeyWord("THERE",              IDENTIFIER,      POTANS_|RESWORD_),
   ParKeyWord("THIS",               TOK_THIS,        NONRESTOKEN_),
   ParKeyWord("THROUGH",            TOK_THROUGH,     NONRESTOKEN_),
-  ParKeyWord("TIME",               TOK_TIME,        FIRST_|ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("TIME",               TOK_TIME,        FIRST_|ANS_|RESWORD_),
   ParKeyWord("TIMEOUT",            TOK_TIMEOUT,     NONRESTOKEN_),
-  ParKeyWord("TIMESTAMP",          TOK_TIMESTAMP,   ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("TIMESTAMP",          TOK_TIMESTAMP,   ANS_|RESWORD_),
   ParKeyWord("TIMESTAMPADD",       TOK_TIMESTAMPADD,NONRESTOKEN_),
   ParKeyWord("TIMESTAMPDIFF",      TOK_TIMESTAMPDIFF,NONRESTOKEN_),
   ParKeyWord("TIMEZONE_HOUR",      IDENTIFIER,      ANS_|RESWORD_),
   ParKeyWord("TIMEZONE_MINUTE",    IDENTIFIER,      ANS_|RESWORD_),
   ParKeyWord("TINYINT",            TOK_TINYINT,     NONRESTOKEN_),
   ParKeyWord("TITLE",              TOK_TITLE,       NONRESTOKEN_),
-  ParKeyWord("TO",                 TOK_TO,          ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("TO",                 TOK_TO,          ANS_|RESWORD_),
   ParKeyWord("TO_CHAR",            TOK_TO_CHAR,     NONRESTOKEN_),
   ParKeyWord("TO_DATE",            TOK_TO_DATE,     NONRESTOKEN_),
   ParKeyWord("TO_NUMBER",          TOK_TO_NUMBER,   NONRESTOKEN_),
@@ -1157,7 +1158,7 @@
   ParKeyWord("TO_TIMESTAMP",       TOK_TO_TIMESTAMP,   NONRESTOKEN_),
   ParKeyWord("TOKENSTR",           TOK_TOKENSTR,    NONRESTOKEN_),
   ParKeyWord("TRAFODION",          TOK_TRAFODION,    NONRESTOKEN_),
-  ParKeyWord("TRAILING",           TOK_TRAILING,    ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("TRAILING",           TOK_TRAILING,    ANS_|RESWORD_),
   ParKeyWord("TRANSACTION",        TOK_TRANSACTION, ANS_|RESWORD_),
   ParKeyWord("TRANSFORM",          TOK_TRANSFORM,   NONRESTOKEN_),
   ParKeyWord("TRANSLATE",          TOK_TRANSLATE,   ANS_|RESWORD_),
@@ -1186,8 +1187,8 @@
   ParKeyWord("UNBOUNDED",          TOK_UNBOUNDED,   NONRESTOKEN_),
   ParKeyWord("UNCOMMITTED",        TOK_UNCOMMITTED, NONRESTOKEN_),
   ParKeyWord("UNDER",              IDENTIFIER,      POTANS_|RESWORD_),
-  ParKeyWord("UNION",              TOK_UNION,       FIRST_|ANS_|RESWORD_|MPWORD_),
-  ParKeyWord("UNIQUE",             TOK_UNIQUE,      ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("UNION",              TOK_UNION,       FIRST_|ANS_|RESWORD_),
+  ParKeyWord("UNIQUE",             TOK_UNIQUE,      ANS_|RESWORD_),
   ParKeyWord("UNIQUE_ID",             TOK_UNIQUE_ID,      NONRESTOKEN_),
   ParKeyWord("UNIVERSAL",          TOK_UNIVERSAL,   NONRESTOKEN_),
   ParKeyWord("UNIX_TIMESTAMP",     TOK_UNIX_TIMESTAMP,   NONRESTOKEN_),
@@ -1198,7 +1199,7 @@
   ParKeyWord("UNNEST",             TOK_UNNEST,      COMPAQ_|RESWORD_),
   ParKeyWord("UNREGISTER",         TOK_UNREGISTER,  NONRESTOKEN_),
   ParKeyWord("UNSIGNED",           TOK_UNSIGNED,    NONRESTOKEN_),
-  ParKeyWord("UPDATE",             TOK_UPDATE,      FIRST_|ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("UPDATE",             TOK_UPDATE,      FIRST_|ANS_|RESWORD_),
   ParKeyWord("UPD",                TOK_UPD,         NONRESTOKEN_),
   ParKeyWord("UPDATE_STATS",       TOK_UPDATE_STATS,	  NONRESTOKEN_),
   ParKeyWord("UPGRADE",                TOK_UPGRADE,         NONRESTOKEN_),
@@ -1217,7 +1218,7 @@
   ParKeyWord("UUID_SHORT",          TOK_UUID_SHORT,	NONRESTOKEN_),
   ParKeyWord("VALIDATE",	   TOK_VALIDATE,    NONRESTOKEN_),
   ParKeyWord("VALUE",              TOK_VALUE,       NONRESTOKEN_),
-  ParKeyWord("VALUES",             TOK_VALUES,      ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("VALUES",             TOK_VALUES,      ANS_|RESWORD_),
   ParKeyWord("VARBINARY",          TOK_VARBINARY,   NONRESTOKEN_),
   ParKeyWord("VARCHAR",            TOK_VARCHAR,     ANS_|RESWORD_|NONRESTOKEN_),
   ParKeyWord("VARCHAR2",            TOK_VARCHAR,     ANS_|RESWORD_|NONRESTOKEN_),
@@ -1231,7 +1232,7 @@
   ParKeyWord("VERSION",            TOK_VERSION,     NONRESTOKEN_),
   ParKeyWord("VERSIONS",            TOK_VERSIONS,     NONRESTOKEN_),
   ParKeyWord("VERSION_INFO",       TOK_VERSION_INFO, NONRESTOKEN_),
-  ParKeyWord("VIEW",               TOK_VIEW,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("VIEW",               TOK_VIEW,        ANS_|RESWORD_),
   ParKeyWord("VIEWS",              TOK_VIEWS,       NONRESTOKEN_),
   ParKeyWord("VIRTUAL",            IDENTIFIER,      POTANS_|RESWORD_),
   ParKeyWord("VISIBLE",            IDENTIFIER,      POTANS_|RESWORD_),
@@ -1243,18 +1244,18 @@
   ParKeyWord("WAITEDIO",           TOK_WAITEDIO,      NONRESTOKEN_),
   ParKeyWord("WCHAR",              TOK_WCHAR,       NONRESTOKEN_),
   ParKeyWord("WEEK",               TOK_WEEK,        NONRESTOKEN_),
-  ParKeyWord("WHEN",               TOK_WHEN,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("WHEN",               TOK_WHEN,        ANS_|RESWORD_),
   ParKeyWord("WHENEVER",           TOK_WHENEVER,    ANS_|RESWORD_),
-  ParKeyWord("WHERE",              TOK_WHERE,       ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("WHERE",              TOK_WHERE,       ANS_|RESWORD_),
   ParKeyWord("WHILE",              IDENTIFIER,      POTANS_|RESWORD_),
-  ParKeyWord("WITH",               TOK_WITH,        SECOND_|ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("WITH",               TOK_WITH,        SECOND_|ANS_|RESWORD_),
   ParKeyWord("WITHOUT",            TOK_WITHOUT,     SECOND_|POTANS_|RESWORD_),
-  ParKeyWord("WORK",               TOK_WORK,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("WORK",               TOK_WORK,        ANS_|RESWORD_),
   ParKeyWord("WOM",                TOK_WOM,         NONRESTOKEN_),
   ParKeyWord("WRITE",              TOK_WRITE,       ANS_|RESWORD_),
   ParKeyWord("XMLAGG",               TOK_XMLAGG,        NONRESTOKEN_),
   ParKeyWord("XMLELEMENT",               TOK_XMLELEMENT,        NONRESTOKEN_),
-  ParKeyWord("YEAR",               TOK_YEAR,        ANS_|RESWORD_|MPWORD_),
+  ParKeyWord("YEAR",               TOK_YEAR,        ANS_|RESWORD_),
   ParKeyWord("ZEROIFNULL",         TOK_ZEROIFNULL,  NONRESTOKEN_),
   ParKeyWord("ZONE",               IDENTIFIER,      ANS_|RESWORD_)
 };
diff --git a/core/sql/parser/ParKeyWords.h b/core/sql/parser/ParKeyWords.h
index aa7e43d..6d588e8 100644
--- a/core/sql/parser/ParKeyWords.h
+++ b/core/sql/parser/ParKeyWords.h
@@ -76,8 +76,6 @@
                                 // used only for notation.  The Parser also 
                                 // maintains this list.
 
-  MPWORD_      = 0x040,         // a SQL/MP Reserved word.
-
   ALLOWOLDNEW_ = 0x080,         // Indicates that the word is allowed if the
                                 // ALLOWOLDNEW parser flag is set.  In certain
                                 // contexts the words OLD and NEW are allowed
@@ -133,19 +131,14 @@
   // Is the word an identifier.
   //
   inline NABoolean isIdentifier() const {
-    return ((tokenCode_ == IDENTIFIER) ||
-	    (inMPContext() && !isMPReserved() && !(flags_ & NONRESTOKEN_)));
+    return (tokenCode_ == IDENTIFIER);
   };
 
-  // Is the word reserved, depends on isMPContext.
+  // Is the word reserved.
   //
   inline NABoolean isReserved() const { 
-    if (inMPContext()) {
-      return isMPReserved();
-    } else {
       return ((flags_ & RESWORD_) &&
 	      !(allowOldAndNew() && (flags_ & ALLOWOLDNEW_)));
-    }
   };
 
   inline NABoolean isConditionallyReserved() const {
@@ -161,18 +154,7 @@
   inline static NABoolean allowOldAndNew(void) {
     return Get_SqlParser_Flags(ALLOW_OLD_AND_NEW_KEYWORD) ? TRUE : FALSE;
   }
-
-  // Are we parsing/lexing MP Stored text.
-  // This affect which words are reserved, identifiers, or tokens.
-  //
-  inline static NABoolean inMPContext(void) {
-    return FALSE;
-  }
   
-  // Is the word reserved by SQL/MP.
-  // 
-  inline NABoolean isMPReserved() const { return flags_ & MPWORD_; };
-
 
   // The keyword.
   //
diff --git a/core/sql/parser/SqlParserAux.h b/core/sql/parser/SqlParserAux.h
index e9ac2d4..ca2cabe 100644
--- a/core/sql/parser/SqlParserAux.h
+++ b/core/sql/parser/SqlParserAux.h
@@ -562,20 +562,13 @@
 
 // Change the <sqltext> arg of a CQD from
 //	SET SCHEMA X.Y;		-- unquoted: Tandem syntax extension
-//	SET MPLOC $V.SV;	-- MPLOC:    Tandem syntax extension
-//	SET MPLOC '$V.SV';	-- MPLOC:    Tandem syntax extension
 // into
 //	SET SCHEMA 'X.Y';	-- string literal: Ansi syntax, MX canonical fmt
-//	SET MP_SUBVOLUME '$V.SV';  -- string lit:  Tdm ext, MX canonical format
-//	SET MP_SUBVOLUME '$V.SV';  -- string lit:  Tdm ext, MX canonical format
 //
 // This needs to be called ONLY for:
 // - SET cqd's (not DECLARE cqd's), and
 //   - the SET cqd's unquoted (non-string-literal) variants, or
 //   - or if we are otherwise rewriting the user input text
-//     (e.g. the syntactic sugar of "SET MPLOC" --
-//	there is no NADefaults attribute of MPLOC --
-//	NADefaults parses a multi-part MP_SUBVOLUME instead).
 //
 ControlQueryDefault *normalizeDynamicCQD(const char *attrName,
                                          const NAString &attrValue);
diff --git a/core/sql/parser/sqlparser.y b/core/sql/parser/sqlparser.y
index bf9007b..74a6b03 100755
--- a/core/sql/parser/sqlparser.y
+++ b/core/sql/parser/sqlparser.y
@@ -1087,6 +1087,7 @@
 %token <tokval> TOK_STATUS
 %token <tokval> TOK_STDDEV              /* Tandem extension */
 %token <tokval> TOK_STOP                /* Tandem extension */
+%token <tokval> TOK_SPLIT_PART          /* Trafodion extension*/ 
 %token <tokval> TOK_STORED
 %token <tokval> TOK_SQL
 %token <tokval> TOK_SQL_DOUBLE
@@ -9280,6 +9281,11 @@
 	  $$ = new (PARSERHEAP()) 
 	    BuiltinFunction(ITM_REVERSE, CmpCommon::statementHeap(), 1, $3);
         } 
+     | TOK_SPLIT_PART '(' value_expression ',' value_expression ',' value_expression ')'
+        {                     
+               $$ = new (PARSERHEAP()) SplitPart($3, $5, $7);
+        }
+
 
 
 /* type item */
@@ -25411,7 +25417,7 @@
                      $$ = tableTokens;
 
                      SqlParser_CurrentParser->hiveDDLInfo_->
-                       setValues(TRUE, StmtDDLonHiveObjects::CREATE_, StmtDDLonHiveObjects::TABLE_, $3);
+                       setValues(TRUE, StmtDDLonHiveObjects::CREATE_, StmtDDLonHiveObjects::TABLE_, $4);
 		   }
 
                    | TOK_CREATE TOK_IMPLICIT TOK_EXTERNAL TOK_TABLE optional_if_not_exists_clause
diff --git a/core/sql/regress/core/EXPECTED038.LINUX b/core/sql/regress/core/EXPECTED038.LINUX
index d317748..aceb087 100644
--- a/core/sql/regress/core/EXPECTED038.LINUX
+++ b/core/sql/regress/core/EXPECTED038.LINUX
@@ -4670,6 +4670,135 @@
 --- 4 row(s) selected.
 >>-- 4 rows
 >>
+>>-- test SPLIT_PART function
+>>
+>>select split_part('sa:sbl:sc', ':', 1) from t038sf;
+
+(EXPR)   
+---------
+
+sa       
+sa       
+sa       
+sa       
+
+--- 4 row(s) selected.
+>>select split_part('sa:sbl:sc', ':', 2) from t038sf;
+
+(EXPR)   
+---------
+
+sbl      
+sbl      
+sbl      
+sbl      
+
+--- 4 row(s) selected.
+>>select split_part('sa:sbl:sc', ':', 3) from t038sf;
+
+(EXPR)   
+---------
+
+sc       
+sc       
+sc       
+sc       
+
+--- 4 row(s) selected.
+>>
+>>-- **EMPTY RESULT** 
+>>select split_part('sa:sbl:sc', ':', 0) from t038sf;
+
+*** ERROR[8691] Field position must be greater than zero, currently is 0.
+
+--- 0 row(s) selected.
+>>select split_part('sa:sbl:sc', ':', 4) from t038sf;
+
+(EXPR)   
+---------
+
+         
+         
+         
+         
+
+--- 4 row(s) selected.
+>>
+>>insert into T038sf values(110, 'a/b/c', 'sa/dsd/s');
+
+--- 1 row(s) inserted.
+>>insert into T038sf values(111, 'sasd', 'dsa:/~sd');
+
+--- 1 row(s) inserted.
+>>insert into T038sf values(112, '#$%$#@', 'dsasggggsad');
+
+--- 1 row(s) inserted.
+>>insert into T038sf values(114, 'a', '这是^中文:测试');
+
+--- 1 row(s) inserted.
+>>
+>>select split_part(c, '/', 2) from t038sf;
+
+(EXPR)                        
+------------------------------
+
+                              
+                              
+                              
+                              
+dsd                           
+~sd                           
+                              
+                              
+
+--- 8 row(s) selected.
+>>select split_part(c, 'ggg', 2) from t038sf;
+
+(EXPR)                        
+------------------------------
+
+                              
+                              
+                              
+                              
+                              
+                              
+gsad                          
+                              
+
+--- 8 row(s) selected.
+>>select split_part(c, 'sd', 1) from t038sf;
+
+(EXPR)                        
+------------------------------
+
+                              
+                              
+                              
+                              
+sa/d                          
+dsa:/~                        
+                              
+                              
+
+--- 8 row(s) selected.
+>>select split_part(c, ':', 1) from t038sf;
+
+(EXPR)                        
+------------------------------
+
+                              
+                              
+                              
+                              
+                              
+                              
+                              
+这是^中文                 
+
+--- 8 row(s) selected.
+>>
+>>
 >>-- Test for Genesis soln: 10-071004-7982
 >>-- Previously this would run out of memory in the Generator.
 >>-- Now it compiles successfully with Query Cache off.
diff --git a/core/sql/regress/core/TEST038 b/core/sql/regress/core/TEST038
index 36e988f..593822e 100755
--- a/core/sql/regress/core/TEST038
+++ b/core/sql/regress/core/TEST038
@@ -1139,6 +1139,27 @@
 select RPAD (b, 12, '5'), LPAD (c, 13) from T038sf where RPAD( RPAD(b, 13, 'X'), 10, 'W') = b;
 -- 4 rows
 
+-- test SPLIT_PART function
+
+select split_part('sa:sbl:sc', ':', 1) from t038sf;
+select split_part('sa:sbl:sc', ':', 2) from t038sf;
+select split_part('sa:sbl:sc', ':', 3) from t038sf;
+
+-- **EMPTY RESULT** 
+select split_part('sa:sbl:sc', ':', 0) from t038sf;
+select split_part('sa:sbl:sc', ':', 4) from t038sf;
+
+insert into T038sf values(110, 'a/b/c', 'sa/dsd/s');
+insert into T038sf values(111, 'sasd', 'dsa:/~sd');
+insert into T038sf values(112, '#$%$#@', 'dsasggggsad');
+insert into T038sf values(114, 'a', '这是^中文:测试');
+
+select split_part(c, '/', 2) from t038sf;
+select split_part(c, 'ggg', 2) from t038sf;
+select split_part(c, 'sd', 1) from t038sf;
+select split_part(c, ':', 1) from t038sf;
+
+
 -- Test for Genesis soln: 10-071004-7982
 -- Previously this would run out of memory in the Generator.
 -- Now it compiles successfully with Query Cache off.
diff --git a/core/sql/ustat/hs_la.cpp b/core/sql/ustat/hs_la.cpp
index 3e92350..62ed05d 100644
--- a/core/sql/ustat/hs_la.cpp
+++ b/core/sql/ustat/hs_la.cpp
@@ -1372,7 +1372,10 @@
         if (DFS2REC::isLOB(getColInfo(i).datatype)) // skip LOB columns
           continue;
 
-        if (!ComTrafReservedColName(*getColInfo(i).colname))
+        // skip derived column names (e.g. "_SALT_", "_DIVISION_n_")
+        // but only in Trafodion tables
+        if ((getTblOrigin() != HBASE_TBL) ||
+            (!ComTrafReservedColName(*getColInfo(i).colname)))
           {
             if (!first)
               qry += ", ";
diff --git a/docs/messages_guide/src/asciidoc/_chapters/binder_msgs.adoc b/docs/messages_guide/src/asciidoc/_chapters/binder_msgs.adoc
index 42b8509..f295205 100644
--- a/docs/messages_guide/src/asciidoc/_chapters/binder_msgs.adoc
+++ b/docs/messages_guide/src/asciidoc/_chapters/binder_msgs.adoc
@@ -2919,3 +2919,17 @@
 
 *Recovery:* See message.
 
+[[SQL-4497]]
+== SQL 4497
+
+```
+The <number> operand of builtin-func <name> must be <data type>.
+
+```
+
+*Cause:* You attempted to use an invalid type for the given operand of the given function.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct the syntax and resubmit.
+
diff --git a/docs/messages_guide/src/asciidoc/_chapters/executor_msgs.adoc b/docs/messages_guide/src/asciidoc/_chapters/executor_msgs.adoc
index 06403c7..71b34ff 100644
--- a/docs/messages_guide/src/asciidoc/_chapters/executor_msgs.adoc
+++ b/docs/messages_guide/src/asciidoc/_chapters/executor_msgs.adoc
@@ -464,6 +464,19 @@
 commit or rollback. {project-name} must start any transactions it will later commit or rollback.
 
 <<<
+[[SQL-8691]]                                                                                    
+== SQL 8691
+```
+Field position must be great than zero.
+```
+
+*Cause:* You attempted to use an invalid value for the third operand of the split_part function.
+
+*Effect:* The operation fails.
+
+*Recovery:* Correct the syntax and resubmit.
+
+<<<
 [[SQL-8808]]
 == SQL 8808
 
diff --git a/docs/sql_reference/src/asciidoc/_chapters/introduction.adoc b/docs/sql_reference/src/asciidoc/_chapters/introduction.adoc
index 63e9310..3779177 100644
--- a/docs/sql_reference/src/asciidoc/_chapters/introduction.adoc
+++ b/docs/sql_reference/src/asciidoc/_chapters/introduction.adoc
@@ -339,7 +339,7 @@
 | `float`               | `real`

 | `decimal (precision, scale)`                | `decimal (precision, scale)`^1^ +

 `numeric (precision, scale)`^2^

-| `double`              | `float(54)`

+| `double`              | `float`

 |===

 

 1. If p is less than or equal to 18, decimal (precision, scale) is mapped to decimal (precision, scale).

diff --git a/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc b/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc
index f84eec0..625952f 100644
--- a/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc
+++ b/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc
@@ -8270,7 +8270,7 @@
 [[float54_and_double_precision_data]]
 ==== FLOAT(54) and DOUBLE PRECISION Data
 
-Avoid using large FLOAT(54) or DOUBLE PRECISION values as arguments to
+Avoid using large FLOAT(52) or DOUBLE PRECISION values as arguments to
 STDDEV. If SUM(x * x) exceeds the value of 1.15792089237316192e77 during the computation
 of STDDEV(x), a numeric overflow occurs.
 
@@ -9929,7 +9929,7 @@
 [[float54_and_double_precision_data]]
 ==== FLOAT(54) and DOUBLE PRECISION Data
 
-Avoid using large FLOAT(54) or DOUBLE PRECISION values as arguments to
+Avoid using large FLOAT(52) or DOUBLE PRECISION values as arguments to
 VARIANCE. If SUM(x * x) exceeds the value of 1.15792089237316192e77 during
 the computation of VARIANCE(x), then a numeric overflow occurs.
 
diff --git a/docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc b/docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc
index 72a6052..7e8bd63 100644
--- a/docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc
+++ b/docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc
@@ -385,7 +385,7 @@
 | LARGEINT                      | Binary integer; signed only           | -2^63^ to +(2^63^)-1; stored in 8 bytes

 |Numeric (extended numeric precision)^7^ | NUMERIC (precision 19 to 128)  | Binary integer; signed or unsigned    | Stored as multiple chunks of 16-bit integers, with a minimum storage

 length of 8 bytes.

-.3+| Floating point number^7^ | FLOAT[(_precision_)] | Floating point number; precision designates from 1 through 52 bits of precision | +/- 2.2250738585072014e-308 through +/-1.7976931348623157e+308; stored in 8 bytes

+.3+| Floating point number^7^ | FLOAT[(_precision_)] | Floating point number (64 bits); precision designates from 1 through 52 bits of precision | +/- 2.2250738585072014e-308 through +/-1.7976931348623157e+308; stored in 8 bytes

 | REAL                  | Floating point number (32 bits)        | +/- 1.17549435e-38 through +/ 3.40282347e+38; stored in 4 bytes

 | DOUBLE PRECISION      | Floating-point numbers (64 bits) with 1 through 52 bits of precision (52 bits of binary precision and 1 bits of exponent) | +/- 2.2250738585072014e-308 through +/-1.7976931348623157e+308; stored in 8 bytes

 | Decimal number^6^        | DECIMAL (1,_scale_) to DECIMAL (18,_scale_)     | Decimal number with optional scale; stored as ASCII characters; signed or unsigned for 1 to 9 digits; signed required for 10 or more digits

@@ -1052,12 +1052,12 @@
 +

 specifies an approximate numeric column. The column stores

 floating-point numbers and

-designates from 1 through 54 bits of _precision_.

+designates from 1 through 52 bits of _precision_.

 The range is from +/- 2.2250738585072014e-308 through +/-1.7976931348623157e+308 stored in 8 bytes.

 +

 An IEEE FLOAT _precision_ data type is stored as an IEEE DOUBLE, that is, in 8 bytes, with the specified precision.

 +

-The default _precision_ is 54.

+The default _precision_ is 52.

 

 * `REAL`

 +

diff --git a/docs/src/site/markdown/index.md b/docs/src/site/markdown/index.md
index 6e99b42..04ca45d 100644
--- a/docs/src/site/markdown/index.md
+++ b/docs/src/site/markdown/index.md
@@ -42,15 +42,16 @@
 
 
 <table><tr><td>
-  <p><h5>Apache Trafodion is now a Top Level Project!</h5></p>
-  <p>Check out the <a href="http://globenewswire.com/news-release/2018/01/10/1286517/0/en/The-Apache-Software-Foundation-Announces-Apache-Trafodion-as-a-Top-Level-Project.html">NewsWire</a> article for the official announcement.</p>
-  <p>See also this nice <a href="https://thenewstack.io/sql-hadoop-database-trafodion-bridges-transactions-analysis-divide/">article</a> where Trafodion's own Suresh Subbiah spreads the word on Trafodion's features.</p>
-  <p><h5>We're working on release 2.2!</h5></p> 
+  <p><h5>We're working on release 2.3!</h5></p> 
   <p>Check out the <a href="https://cwiki.apache.org/confluence/display/TRAFODION/Roadmap">Roadmap</a> page for planned content.</p>
-  <p><h5>Apache Trafodion 2.1.0-incubating was released on May 1, 2017</h5></p> 
+  <p><h5>Apache Trafodion 2.2.0, our first release as a Top Level Project, was released on March 12, 2018.</h5></p> 
   <p>Check it out on the <a href="http://trafodion.apache.org/download.html">Download</a> page.</p>
-  <p><h5>Want to disucss Trafodion in Chinese? Join the Trafodion discussion on Tencent QQ!</h5></p> 
-  <p><a href="http://im.qq.com/">QQ</a> Group ID: 176011868.</p>
+  <p><h5>Apache Trafodion is now a Top Level Project!</h5></p>
+  <p>See the <a href="http://globenewswire.com/news-release/2018/01/10/1286517/0/en/The-Apache-Software-Foundation-Announces-Apache-Trafodion-as-a-Top-Level-Project.html">NewsWire</a> article for the official announcement.</p>
+  <p>See also this nice <a href="https://thenewstack.io/sql-hadoop-database-trafodion-bridges-transactions-analysis-divide/">article</a> where Trafodion's own Suresh Subbiah spreads the word on Trafodion's features.</p>
+  <p><h5>Apache Trafodion 2.1.0-incubating was released on May 1, 2017.</h5></p>  
+  <p><h5>Want to discuss Trafodion in Chinese? Join the Trafodion discussion on Tencent QQ!</h5></p> 
+  <p><a href="http://im.qq.com/">QQ</a> Group ID: 233105278.</p>
 </td></tr></table>
 
 <!-- 20160524 GTA Need more logos before using this part.
diff --git a/docs/src/site/site.xml b/docs/src/site/site.xml
index 5ccff3c..08d40fc 100644
--- a/docs/src/site/site.xml
+++ b/docs/src/site/site.xml
@@ -228,7 +228,7 @@
       <item href="http://www.apache.org/events/current-event.html" name="Events"/>
       <item href="logo.html" name="Logo"/>
       <item href="mail-lists.html" name="Mailing Lists"/>
-      <item href="http://im.qq.com" name="QQ (Group ID:176011868)"/>
+      <item href="http://im.qq.com" name="QQ (Group ID: 233105278)"/>
       <item href="http:divider" name=""/>
       <item href="source-repository.html" name="Source Repository"/>
       <item href="issue-tracking.html" name="Issue Tracking"/>
diff --git a/win-odbc64/Common/TransportBase.h b/win-odbc64/Common/TransportBase.h
index 4b24fa0..0ec7e60 100644
--- a/win-odbc64/Common/TransportBase.h
+++ b/win-odbc64/Common/TransportBase.h
@@ -134,6 +134,8 @@
 	SRVR_API_SQLFASTEXECDIRECT,					//OK WMS

 	SRVR_API_SQLFASTFETCH_PERF,					//OK WMS

 	SRVR_API_GETSEGMENTS,						//OK WMS

+    SRVR_API_EXTRACTLOB,                        //OK LOB

+    SRVR_API_UPDATELOB,                         //OK LOB

 	SRVR_API_LASTAPI								//Add new APIs before this

 

 };

diff --git a/win-odbc64/Common/marshalingdrvr_drvr.cpp b/win-odbc64/Common/marshalingdrvr_drvr.cpp
index 4cffe0e..01bcc59 100644
--- a/win-odbc64/Common/marshalingdrvr_drvr.cpp
+++ b/win-odbc64/Common/marshalingdrvr_drvr.cpp
@@ -2743,7 +2743,130 @@
 

 } /* odbc_SQLDrvr_Execute_param_pst_() */

 

+CEE_status

+odbc_SQLDrvr_ExtractLob_param_pst_(

+    /* In    */ CInterface * pSystem

+  , /* In    */ IDL_char * & buffer

+  , /* In    */ long        & message_length

+  , /* In    */ IDL_long     extractType

+  , /* In    */ IDL_string   lobHandle

+  , /* In    */ IDL_long     lobHandleLen

+  , /* In    */ IDL_long     lobHandleCharset

+  , /* In    */ IDL_long     extractlen

+ )

+{

+    IDL_char  *curptr = NULL;

+    IDL_long  wlength = 0;

+    IDL_long  charSet = 0;

 

+    //extractType

+    wlength += sizeof(IDL_short);

+

+    //lobHandleLen

+    wlength += sizeof(IDL_long);

+    if (lobHandle != NULL)

+    {

+        wlength += lobHandleLen;

+        wlength += sizeof(IDL_long);

+    }

+

+    wlength += sizeof(IDL_long);

+

+    message_length = wlength;

+    buffer = pSystem->w_allocate(message_length);

+    if (buffer == NULL)

+    {

+        return CEE_ALLOCFAIL;

+    }

+    curptr = buffer;

+

+    if (pSystem->swap() == SWAP_YES)

+    {

+        LONG_swap(&extractType);

+        LONG_swap(&lobHandleLen);

+        LONG_swap(&charSet);

+        LONG_swap(&extractlen);

+    }

+

+    IDL_long_copy(&extractType, curptr);

+

+    IDL_long_copy(&lobHandleLen, curptr);

+    if (lobHandle != NULL)

+    {

+        IDL_charArray_copy(lobHandle, curptr);

+        IDL_long_copy(&charSet, curptr);

+    }

+

+    IDL_long_copy(&extractlen, curptr);

+

+    return CEE_SUCCESS;

+}

+

+CEE_status

+odbc_SQLDrvr_UpdateLob_param_pst_(

+    /* In    */ CInterface * pSystem

+  , /* In    */ IDL_char * & buffer

+  , /* In    */ long        & message_length

+  , /* In    */ IDL_long     updataType

+  , /* In    */ IDL_string   lobHandle

+  , /* In    */ IDL_long     lobHandleLen

+  , /* In    */ IDL_long     lobHandleCharset

+  , /* In    */ IDL_long_long     totalLength

+  , /* In    */ IDL_long_long     offset

+  , /* In    */ BYTE *        data

+  , /* In    */ IDL_long_long pos

+  , /* In    */ IDL_long_long length

+)

+{

+    IDL_char  *curptr = NULL;

+    IDL_long   wlength = 0;

+    IDL_long   lobHandleLength = 0;

+

+    wlength += sizeof(IDL_long);

+

+    wlength += sizeof(lobHandleLength);

+    if (lobHandle != NULL)

+    {

+        lobHandleLength = strlen(lobHandle) + 1;

+        wlength += lobHandleLength;

+        wlength += sizeof(lobHandleCharset);

+    }

+

+    wlength += sizeof(IDL_long_long) * 3;

+    wlength += length;

+

+    message_length = wlength;

+    buffer = pSystem->w_allocate(message_length);

+    if (buffer == NULL)

+    {

+        return CEE_ALLOCFAIL;

+    }

+

+    curptr = buffer;

+

+    if (pSystem->swap() == SWAP_YES)

+    {

+        LONGLONG_swap(&totalLength);

+        LONGLONG_swap(&offset);

+        LONGLONG_swap(&length);

+    }

+

+    IDL_long_copy(&updataType, curptr);

+    IDL_long_copy(&lobHandleLength, curptr);

+    if (lobHandle != NULL)

+    {

+        IDL_charArray_copy(lobHandle, curptr);

+        IDL_long_copy(&lobHandleCharset, curptr);

+    }

+

+    IDL_long_long_copy(&totalLength, curptr);

+    IDL_long_long_copy(&offset, curptr);

+    IDL_long_long_copy(&length, curptr);

+

+    IDL_byteArray_copy(data, length, curptr);

+

+    return CEE_SUCCESS;

+}

 /************************************************************************************************************

  *                                                                                                          *

  * Keeping these functions around for the collapsed driver - get rid of these when it is not needed anymore *

diff --git a/win-odbc64/Common/marshalingdrvr_drvr.h b/win-odbc64/Common/marshalingdrvr_drvr.h
index 8163852..d3c7578 100644
--- a/win-odbc64/Common/marshalingdrvr_drvr.h
+++ b/win-odbc64/Common/marshalingdrvr_drvr.h
@@ -195,6 +195,33 @@
 	    , /* In    */ IDL_unsigned_short transactionOpt

 );

 

+CEE_status

+odbc_SQLDrvr_ExtractLob_param_pst_(

+    /* In    */ CInterface * pSystem

+  , /* In    */ IDL_char * & buffer

+  , /* In    */ long        & message_length

+  , /* In    */ IDL_long     extractType

+  , /* In    */ IDL_string   lobHandle

+  , /* In    */ IDL_long     lobHandleLen

+  , /* In    */ IDL_long     lobHandleCharset

+  , /* In    */ IDL_long     extractlen

+);

+

+CEE_status

+odbc_SQLDrvr_UpdateLob_param_pst_(

+    /* In    */ CInterface * pSystem

+  , /* In    */ IDL_char * & buffer

+  , /* In    */ long        & message_length

+  , /* In    */ IDL_long     updataType

+  , /* In    */ IDL_string   lobHandle

+  , /* In    */ IDL_long     lobHandleLen

+  , /* In    */ IDL_long     lobHandleCharset

+  , /* In    */ IDL_long_long     totalLength

+  , /* In    */ IDL_long_long     offset

+  , /* In    */ BYTE *        data

+  , /* In    */ IDL_long_long pos

+  , /* In    */ IDL_long_long length

+);

 /************************************************************************************************************

  *                                                                                                          *

  * Keeping these functions around for the collapsed driver - get rid of these when it is not needed anymore *

diff --git a/win-odbc64/Krypton/generated_incs/odbc_cl.h b/win-odbc64/Krypton/generated_incs/odbc_cl.h
index 04f28c9..0835de6 100644
--- a/win-odbc64/Krypton/generated_incs/odbc_cl.h
+++ b/win-odbc64/Krypton/generated_incs/odbc_cl.h
@@ -2408,6 +2408,58 @@
   , /* Out   */ ERROR_DESC_LIST_def *sqlWarning

   );

 

+/***************************************

+* Operation 'odbc_SQLsrvr_ExtractLob'

+* *************************************/

+

+/*

+* Exception number constants for

+* operation 'odbc_SQLsrvr_ExtractLob'

+*/

+#define odbc_SQLSvc_ExtractLob_ParamError_exn_          1

+#define odbc_SQLSvc_ExtractLob_InvalidConnection_exn_   2

+#define odbc_SQLSvc_ExtractLob_SQLError_exn_            3

+#define odbc_SQLSvc_ExtractLob_SQLInvalidhandle_exn_    4

+#define obdc_SQLSvc_ExtractLob_AllocLOBDataError_exn_   5

+

+/*

+* Exception struct for

+* Operation "odbc_SQLSrvr_ExtractLob"

+*/

+struct odbc_SQLsvc_ExtractLob_exc_ {

+    IDL_long exception_nr;

+    IDL_long exception_detail;

+    union {

+        odbc_SQLSvc_ParamError ParamError;

+        odbc_SQLSvc_SQLError SQLError;

+    } u;

+};

+

+/***************************************

+* Operation 'odbc_SQLsvc_UpdateLob'

+***************************************/

+/*

+* Exceptoin number constants for

+* operation 'odbc_SQLSvc_UpdateLob'

+*/

+#define odbc_SQLSvc_UpdateLob_ParamError_exn_        1

+#define odbc_SQLSvc_UpdateLob_InvalidConnect_exn_    2

+#define odbc_SQLSvc_UpdateLob_SQLError_exn_          3

+#define odbc_SQLSvc_UpdateLob_SQLInvalidhandle_exn_  4

+

+/*

+* Exception struct for

+* Operation "odbc_SQLSvc_UpdateLob"

+*/

+struct odbc_SQLSvc_UpdateLob_exc_ {

+    IDL_long exception_nr;

+    IDL_long exception_detail;

+    union {

+        odbc_SQLSvc_ParamError ParamError;

+        odbc_SQLSvc_SQLError   SQLError;

+    } u;

+};

+

 /*

  * CIN description of interface 'odbc_SQLSvc'

  */

diff --git a/win-odbc64/odbcclient/drvr35/Interface/odbcs_drvr.cpp b/win-odbc64/odbcclient/drvr35/Interface/odbcs_drvr.cpp
index 8228734..a8e11f2 100644
--- a/win-odbc64/odbcclient/drvr35/Interface/odbcs_drvr.cpp
+++ b/win-odbc64/odbcclient/drvr35/Interface/odbcs_drvr.cpp
@@ -2356,6 +2356,233 @@
 } // odbc_SQLDrvr_Execute_pst_()

 

 

+extern "C" CEE_status

+odbc_SQLDrvr_ExtractLOB_pst_(

+    /* In    */ CEE_tag_def tag_

+ , /* In    */ IDL_short extractType

+ , /* In    */ IDL_string  lobHandle

+ , /* In    */ IDL_long    lobHandleLen

+ , /* In    */ IDL_long  &extractLen

+ , /* Out   */ struct odbc_SQLsvc_ExtractLob_exc_ *exception_

+ , /* Out   */ BYTE *& extractData

+)

+{

+    bool sts;

+

+    CEE_status retcode;

+    IDL_long   wlength, rlength;

+    IDL_char   *wbuffer, *rbuffer;

+

+    IDL_long sqlWarningOrErrorLength = 0;

+    IDL_char   *curptr;

+    IDL_long   msg_total_len = 0;

+

+    IDL_long   lobHandleCharset = 1;

+

+    SRVR_CALL_CONTEXT *srvrCallContext = (SRVR_CALL_CONTEXT *)tag_;

+    CStmt * pStatement = (CStmt *)srvrCallContext->sqlHandle;

+    CConnect *pConnection = pStatement->getConnectHandle();

+

+    retcode = odbc_SQLDrvr_ExtractLob_param_pst_(

+        pConnection->m_srvrTCPIPSystem

+        , wbuffer

+        , wlength

+        , extractType

+        , lobHandle

+        , lobHandleLen

+        , lobHandleCharset

+        , extractLen

+        );

+

+    sts = OpenIO(pConnection->m_srvrTCPIPSystem, srvrCallContext->SQLSvc_ObjRef);

+    if (sts == false)

+        return MAP_SRVR_ERRORS(pConnection);

+

+    sts = DoIO(pConnection->m_srvrTCPIPSystem, wbuffer, wlength, rbuffer, rlength, pConnection, pStatement);

+    if (sts == false)

+        return MAP_SRVR_ERRORS(pConnection);

+

+    // process output parameters

+

+    char swap = pConnection->m_srvrTCPIPSystem->swap();

+    msg_total_len = 0;

+    curptr = rbuffer;

+

+    //

+    //   exception_

+    //

+

+    IDL_long ExceptionLength;

+

+    //

+    //   exception_ ->exception_nr

+    //

+    exception_->exception_nr = *(IDL_long*)(curptr + msg_total_len);

+    msg_total_len += sizeof(exception_->exception_nr);

+    LONG_swap(&exception_->exception_nr, swap);

+

+    //

+    //   exception_ ->exception_detail

+    //

+    exception_->exception_detail = *(IDL_long*)(curptr + msg_total_len);

+    msg_total_len += sizeof(exception_->exception_detail);

+    LONG_swap(&exception_->exception_detail, swap);

+

+    switch (exception_->exception_nr)

+    {

+    case odbc_SQLSvc_ExtractLob_ParamError_exn_:

+        ExceptionLength = *(IDL_long *)(curptr + msg_total_len);

+        msg_total_len += sizeof(ExceptionLength);

+        LONG_swap(&ExceptionLength);

+

+        if (ExceptionLength > 0)

+        {

+            exception_->u.ParamError.ParamDesc = (IDL_char *)(curptr + msg_total_len);

+            msg_total_len += ExceptionLength;

+        }

+        break;

+

+    case odbc_SQLSvc_ExtractLob_SQLError_exn_:

+        retcode = copy_ERROR_DESC_LIST(&exception_->u.SQLError.errorList, curptr, msg_total_len, swap);

+        if (retcode != CEE_SUCCESS)

+            return retcode;

+        break;

+

+    case odbc_SQLSvc_ExtractLob_InvalidConnection_exn_:

+    case odbc_SQLSvc_ExtractLob_SQLInvalidhandle_exn_:

+        break;

+    default:

+        break;

+    }

+    extractType = *(IDL_short *)(curptr + msg_total_len);

+    msg_total_len += sizeof(IDL_short);

+    SHORT_swap(&extractType, swap);

+

+    switch (extractType)

+    {

+    case 0:

+        extractLen = *(IDL_long_long *)(curptr + msg_total_len);

+        break;

+    case 1:

+        extractLen = *(IDL_long_long *)(curptr + msg_total_len);

+        msg_total_len += sizeof(IDL_long_long);

+        extractData = (BYTE *)(curptr + msg_total_len);

+    default:

+        break;

+    }

+

+    return CEE_SUCCESS;

+}

+

+

+extern "C" CEE_status

+odbc_SQLDrvr_UpdateLob_pst_(

+    /* In    */ CEE_tag_def tag_

+  , /* In    */ IDL_long  updataType

+  , /* In    */ IDL_string  lobHandle

+  , /* In    */ IDL_long    lobHandleLen

+  , /* In    */ IDL_long_long  totalLength

+  , /* In    */ IDL_long_long  offset

+  , /* In    */ IDL_long_long  pos

+  , /* In    */ IDL_long_long  length

+  , /* In    */ BYTE *        &data

+  , /* Out   */ struct odbc_SQLSvc_UpdateLob_exc_ *exception_

+)

+{

+    bool sts;

+

+    CEE_status retcode;

+    IDL_long   wlength, rlength;

+    IDL_char   *wbuffer, *rbuffer;

+

+    IDL_long sqlWarningOrErrorLength = 0;

+    IDL_char   *curptr;

+    IDL_long   msg_total_len = 0;

+

+    IDL_long   lobHandleCharset = 1;

+

+    SRVR_CALL_CONTEXT *srvrCallContext = (SRVR_CALL_CONTEXT *)tag_;

+    CStmt * pStatement = (CStmt *)srvrCallContext->sqlHandle;

+    CConnect *pConnection = pStatement->getConnectHandle();

+

+    pConnection->m_srvrTCPIPSystem->odbcAPI = SRVR_API_UPDATELOB;

+    pConnection->m_srvrTCPIPSystem->dialogueId = srvrCallContext->dialogueId;

+    pConnection->m_srvrTCPIPSystem->dwTimeout = srvrCallContext->statementTimeout;

+

+    retcode = odbc_SQLDrvr_UpdateLob_param_pst_(

+        pConnection->m_srvrTCPIPSystem

+        , wbuffer

+        , wlength

+        , updataType

+        , lobHandle

+        , lobHandleLen

+        , lobHandleCharset

+        , totalLength

+        , offset

+        , data

+        , pos

+        , length

+        );

+

+    sts = OpenIO(pConnection->m_srvrTCPIPSystem, srvrCallContext->SQLSvc_ObjRef);

+    if (sts == false)

+        return MAP_SRVR_ERRORS(pConnection);

+

+    sts = DoIO(pConnection->m_srvrTCPIPSystem, wbuffer, wlength, rbuffer, rlength, pConnection, pStatement);

+    if (sts == false)

+        return MAP_SRVR_ERRORS(pConnection);

+

+    char swap = pConnection->m_srvrTCPIPSystem->swap();

+    msg_total_len = 0;

+    curptr = rbuffer;

+

+    //

+    //   exception_

+    //

+

+    IDL_long ExceptionLength;

+

+    //

+    //   exception_ ->exception_nr

+    //

+    exception_->exception_nr = *(IDL_long*)(curptr + msg_total_len);

+    msg_total_len += sizeof(exception_->exception_nr);

+    LONG_swap(&exception_->exception_nr, swap);

+

+    //

+    //   exception_ ->exception_detail

+    //

+    exception_->exception_detail = *(IDL_long*)(curptr + msg_total_len);

+    msg_total_len += sizeof(exception_->exception_detail);

+    LONG_swap(&exception_->exception_detail, swap);

+

+    switch (exception_->exception_nr)

+    {

+    case odbc_SQLSvc_UpdateLob_ParamError_exn_:

+        ExceptionLength += *(IDL_long *)(curptr + msg_total_len);

+        msg_total_len += sizeof(ExceptionLength);

+        LONG_swap(&ExceptionLength);

+        if (ExceptionLength > 0)

+        {

+            exception_->u.ParamError.ParamDesc = (IDL_char *)(curptr + msg_total_len);

+            msg_total_len += ExceptionLength;

+        }

+        break;

+    case odbc_SQLSvc_UpdateLob_InvalidConnect_exn_:

+        retcode = copy_ERROR_DESC_LIST(&exception_->u.SQLError.errorList, curptr, msg_total_len, swap);

+        if (retcode != CEE_SUCCESS)

+            return retcode;

+    case odbc_SQLSvc_UpdateLob_SQLError_exn_:

+    case odbc_SQLSvc_UpdateLob_SQLInvalidhandle_exn_:

+        break;

+

+    default:

+        break;

+    }

+

+    return CEE_SUCCESS;

+}

+

 //-----------------------------------------------------------------

 

 CEE_status MAP_SRVR_ERRORS(CConnect *pConnection)

diff --git a/win-odbc64/odbcclient/drvr35/Interface/odbcs_drvr.h b/win-odbc64/odbcclient/drvr35/Interface/odbcs_drvr.h
index 7b044f9..c5a1a4f 100644
--- a/win-odbc64/odbcclient/drvr35/Interface/odbcs_drvr.h
+++ b/win-odbc64/odbcclient/drvr35/Interface/odbcs_drvr.h
@@ -138,4 +138,28 @@
   , /* Out   */ ERROR_DESC_LIST_def *sqlWarning

   );

 

+extern "C" CEE_status

+odbc_SQLDrvr_ExtractLOB_pst_(

+    /* In    */ CEE_tag_def tag_

+  , /* In    */ IDL_short extractType

+  , /* In    */ IDL_string  lobHandle

+  , /* In    */ IDL_long    lobHandleLen

+  , /* In    */ IDL_long  &extractLen

+  , /* Out   */ struct odbc_SQLsvc_ExtractLob_exc_ *exception_

+  , /* Out   */ BYTE *&extractData

+);

+

+extern "C" CEE_status

+odbc_SQLDrvr_UpdateLob_pst_(

+    /* In    */ CEE_tag_def tag_

+  , /* In    */ IDL_long  updataType

+  , /* In    */ IDL_string  lobHandle

+  , /* In    */ IDL_long    lobHandleLen

+  , /* In    */ IDL_long_long  totalLength

+  , /* In    */ IDL_long_long  offset

+  , /* In    */ IDL_long_long  pos

+  , /* In    */ IDL_long_long  length

+  , /* In    */ BYTE *        &data

+  , /* Out   */ struct odbc_SQLSvc_UpdateLob_exc_ *exception_

+);

 #endif /* ODBCS_DRVR_H */

diff --git a/win-odbc64/odbcclient/drvr35/cconnect.cpp b/win-odbc64/odbcclient/drvr35/cconnect.cpp
index b061872..e09ac3e 100644
--- a/win-odbc64/odbcclient/drvr35/cconnect.cpp
+++ b/win-odbc64/odbcclient/drvr35/cconnect.cpp
@@ -56,6 +56,9 @@
 	InitializeCriticalSection(&m_CSTransmision);

 	m_IgnoreCancel = false; 

 	m_StartNode = -1;

+

+    lobHandleSave = NULL;

+    lobHandleLenSave = 0;

 }

 

 CConnect::~CConnect()

diff --git a/win-odbc64/odbcclient/drvr35/cconnect.h b/win-odbc64/odbcclient/drvr35/cconnect.h
index 4bfe1df..39df0ed 100644
--- a/win-odbc64/odbcclient/drvr35/cconnect.h
+++ b/win-odbc64/odbcclient/drvr35/cconnect.h
@@ -277,6 +277,10 @@
 	SQLUINTEGER		m_SecurityMode;
 	bool			m_RetryEncryption;
 
+    //hold the lob handle from last select for insert >16m
+    IDL_string      lobHandleSave;
+    IDL_long        lobHandleLenSave;
+
 	void reset(bool clearE=true);
 	friend class	CStmt;
 	friend class	CDesc;
diff --git a/win-odbc64/odbcclient/drvr35/cdesc.cpp b/win-odbc64/odbcclient/drvr35/cdesc.cpp
index 73b6326..443529a 100644
--- a/win-odbc64/odbcclient/drvr35/cdesc.cpp
+++ b/win-odbc64/odbcclient/drvr35/cdesc.cpp
@@ -503,6 +503,13 @@
 		m_DescLength = 6 + m_DescDatetimeIntervalPrecision;

 		m_DescPrecision = 0;

 		break;

+    case TYPE_BLOB:

+    case TYPE_CLOB:

+        strcpy((char*)m_DescLiteralPrefix, "'");

+        strcpy((char*)m_DescLiteralSuffix, "'");

+        m_DescLength = SQLItemDesc->maxLen;

+        m_DescPrecision = m_DescLength;

+        break;

 	default:

 		return IDS_HY_021;

 	}

@@ -598,6 +605,10 @@
 //		m_SQLOctetLength = SQLItemDesc->maxLen+3;

 //		m_DescSearchable = SQL_PRED_SEARCHABLE;

 //		break;

+    case SQLTYPECODE_BLOB:

+    case SQLTYPECODE_CLOB:

+        m_SQLOctetLength = SQLItemDesc->maxLen + 4;

+        break;

 	default:

 		m_SQLOctetLength = SQLItemDesc->maxLen;

 		m_DescSearchable = SQL_PRED_BASIC;

@@ -645,6 +656,8 @@
 	case SQL_LONGVARCHAR:

 	case SQL_WCHAR:

 	case SQL_WVARCHAR:

+    case TYPE_BLOB:

+    case TYPE_CLOB:

 		m_DescDatetimeIntervalPrecision = m_DescLength;

 		break;

 	case SQL_INTERVAL_SECOND:

@@ -2819,7 +2832,9 @@
 				{

 					descRecPtr->m_SQLCharset=IRDDescRecPtr->m_SQLCharset;

 					descRecPtr->setTranslateOption(descRecPtr->m_DescConciseType);

-					retCode = ConvertSQLToC(m_ODBCAppVersion,

+                    retCode = ConvertSQLToC(m_ConnectHandle,

+                                            m_InputHandle,

+                                            m_ODBCAppVersion,

 											DataLang,

 											SQLDataType,

 											IRDDescRecPtr->m_ODBCDataType,

@@ -3210,7 +3225,8 @@
 				{

 					descRecPtr->m_SQLCharset=IRDDescRecPtr->m_SQLCharset;

 					descRecPtr->setTranslateOption(descRecPtr->m_DescConciseType);

-					retCode = ConvertSQLToC(//pStatement->getODBCAppVersion(),

+                    retCode = ConvertSQLToC(m_ConnectHandle,

+                                            m_InputHandle,

 											m_ODBCAppVersion,

 											DataLang,

 											SQLDataType,

@@ -3342,7 +3358,9 @@
 	else

 	{

 		descRecPtr->setTranslateOption(TargetType);

-		retCode = ConvertSQLToC(m_ODBCAppVersion,

+        retCode = ConvertSQLToC(m_ConnectHandle,

+                                m_InputHandle,

+                                m_ODBCAppVersion,

 								DataLang,

 								SQLValue->dataType,

 								descRecPtr->m_ODBCDataType,

diff --git a/win-odbc64/odbcclient/drvr35/cstmt.cpp b/win-odbc64/odbcclient/drvr35/cstmt.cpp
index 3dce053..67c453d 100644
--- a/win-odbc64/odbcclient/drvr35/cstmt.cpp
+++ b/win-odbc64/odbcclient/drvr35/cstmt.cpp
@@ -1063,6 +1063,15 @@
             else

                 m_StmtType = TYPE_UNKNOWN;

         }

+        else if (_strnicmp(token, "LOBUPDATE", 9) == 0)

+        {

+            if (m_SrvrCallContext.u.extractLobParams.lobHandle == NULL)

+            {

+                return SQL_ERROR;

+            }

+            m_CurrentOdbcAPI = SRVR_API_UPDATELOB;

+            return SQL_NEED_DATA;

+        }

 

         else

         {

@@ -3039,6 +3048,28 @@
     BOOL		SkipProcess = FALSE;

     SQLRETURN	rc;

 

+    //insert >16m lob

+    if (m_CurrentOdbcAPI == SRVR_API_UPDATELOB)

+    {

+        if (m_ConnectHandle->lobHandleLenSave == 0)

+            return SQL_ERROR;

+

+        if (m_StmtState == STMT_PARAM_DATA_NOT_CALLED)

+        {

+            m_CurrentParamStatus = SQL_WAITING_FOR_DATA;

+            return SQL_NEED_DATA;

+        }

+        else

+        {

+            rc = UpdateLob(0, m_ConnectHandle->lobHandleSave, m_ConnectHandle->lobHandleLenSave, 0, 0, 0, m_DataAtExecData.dataValue._length, (BYTE *)m_DataAtExecData.dataValue._buffer);

+            m_ConnectHandle->lobHandleLenSave == 0;

+            free(m_ConnectHandle->lobHandleSave);

+            m_ConnectHandle->lobHandleSave = NULL;

+            return rc;

+        }

+

+    }

+

     m_CurrentOdbcAPI = SQL_API_SQLPARAMDATA;

     if (m_AsyncEnable == SQL_ASYNC_ENABLE_ON)

     {

@@ -3123,6 +3154,47 @@
     SQLINTEGER		StrLen;

     SQLSMALLINT		ParameterType;

 

+    if (m_CurrentOdbcAPI == SRVR_API_UPDATELOB)

+    {

+        if (m_CurrentParamStatus == SQL_WAITING_FOR_DATA)

+        {

+            if (m_DataAtExecData.dataValue._buffer != NULL)

+            {

+                delete m_DataAtExecData.dataValue._buffer;

+                m_DataAtExecData.dataValue._buffer = NULL;

+                m_DataAtExecData.dataValue._length = 0;

+            }

+            m_CurrentParamStatus = SQL_RECEIVING_DATA;

+        }

+        else

+        {

+            OctetLength = m_DataAtExecData.dataValue._length;

+        }

+

+        if (StrLen_or_Ind == SQL_NTS)

+            StrLen = strlen((const char *)DataPtr);

+        else

+            StrLen = StrLen_or_Ind;

+

+        OctetLength += StrLen;

+        AllocDataPtr = new BYTE[OctetLength];

+

+        if (m_DataAtExecData.dataValue._buffer != NULL)

+        {

+            memcpy((unsigned char *)AllocDataPtr, (unsigned char*)m_DataAtExecData.dataValue._buffer, m_DataAtExecData.dataValue._length);

+            delete m_DataAtExecData.dataValue._buffer;

+            m_DataAtExecData.dataValue._buffer = NULL;

+        }

+

+        m_DataAtExecData.dataValue._buffer = (unsigned char *)AllocDataPtr;

+        memcpy(m_DataAtExecData.dataValue._buffer + m_DataAtExecData.dataValue._length, DataPtr, StrLen);

+

+        m_DataAtExecData.dataValue._length = OctetLength;

+        m_StmtState = STMT_PUT_DATA_CALLED;

+

+        return rc;

+    }

+

     m_CurrentOdbcAPI = SQL_API_SQLPUTDATA;

     clearError();

     if (m_CurrentParam == -1)

@@ -3505,6 +3577,12 @@
                     memOffSet += SQLMaxLength + 2;

                 }

                 break;

+            case SQLTYPECODE_BLOB:

+            case SQLTYPECODE_CLOB:

+                memOffSet = ((memOffSet + 2 - 1) >> 1) << 1;

+                VarOffSet = memOffSet;

+                memOffSet += SQLMaxLength + 2;

+                break;

             case SQLTYPECODE_INTERVAL:

                 VarOffSet = memOffSet;

                 memOffSet += SQLMaxLength;

@@ -4879,3 +4957,234 @@
     totalLength = ((totalLength + 4 - 1) >> 2) << 2;

     return *(long*)(&m_outputDataValue._buffer[totalLength + columnOffset]);

 }

+

+SQLRETURN CStmt::SendExtractLob(IDL_short extractType,

+    IDL_string lobHandle,

+    IDL_long   lobHandleLen,

+    IDL_long &extractLen,

+    BYTE * &extractData)

+{

+    SQLRETURN         rc = SQL_SUCCESS;

+

+    m_SrvrCallContext.odbcAPI = SRVR_API_EXTRACTLOB;

+    m_SrvrCallContext.sqlHandle = this;

+    m_SrvrCallContext.SQLSvc_ObjRef = m_ConnectHandle->getSrvrObjRef();

+    m_SrvrCallContext.ASSvc_ObjRef = NULL;

+    m_SrvrCallContext.eventHandle = m_StmtEvent;

+    m_SrvrCallContext.dialogueId = m_ConnectHandle->getDialogueId();

+    m_SrvrCallContext.connectionTimeout = m_ConnectHandle->getConnectionTimeout();

+    m_SrvrCallContext.u.fetchParams.queryTimeout = m_QueryTimeout;

+    m_SrvrCallContext.u.extractLobParams.extractType = extractType;

+    m_SrvrCallContext.u.extractLobParams.lobHandle = lobHandle;

+    m_SrvrCallContext.u.extractLobParams.lobHandleLen = lobHandleLen;

+    m_SrvrCallContext.u.extractLobParams.extractLen = extractLen;

+    m_SrvrCallContext.u.extractLobParams.extractData = extractData;

+

+    if (m_AsyncEnable == SQL_ASYNC_ENABLE_ON)

+    {

+        if ((m_AsyncThread = (HANDLE)_beginthreadex(NULL, 0, ThreadControlProc,

+            &m_SrvrCallContext, CREATE_SUSPENDED, &m_ThreadAddr)) == 0)

+        {

+            setNTError(m_ConnectHandle->getErrorMsgLang(), "SendExtractLob - _beginthreadex()");

+            rc = SQL_ERROR;

+        }

+        ResumeThread(m_AsyncThread);

+        rc = SQL_STILL_EXECUTING;

+        Sleep(0);

+    }

+    else

+    {

+        if ((m_SyncThread = (HANDLE)_beginthreadex(NULL, 0, ThreadControlProc,

+            &m_SrvrCallContext, CREATE_SUSPENDED, &m_ThreadAddr)) == 0)

+        {

+            setNTError(m_ConnectHandle->getErrorMsgLang(), "SendExtractLob - _beginthreadex()");

+            rc = SQL_ERROR;

+        }

+        else

+        {

+            ResumeThread(m_SyncThread);

+            WaitForSingleObject(m_SyncThread, INFINITE);

+            GetExitCodeThread(m_SyncThread, &m_ThreadStatus);

+            rc = m_ThreadStatus;

+            CloseHandle(m_SyncThread);

+            m_SyncThread = NULL;

+        }

+    }

+

+    if (rc == SQL_SUCCESS)

+    {

+        extractLen = m_SrvrCallContext.u.extractLobParams.extractLen;

+        extractData = m_SrvrCallContext.u.extractLobParams.extractData;

+

+        if (m_ConnectHandle->lobHandleSave != NULL)

+            free(m_ConnectHandle->lobHandleSave);

+

+        m_ConnectHandle->lobHandleSave = (IDL_string)malloc(lobHandleLen);

+        memcpy(m_ConnectHandle->lobHandleSave, lobHandle, lobHandleLen);

+        m_ConnectHandle->lobHandleLenSave = lobHandleLen;

+    }

+

+    return rc;

+}

+

+SQLRETURN CStmt::ExtractLob(IDL_short extractType,

+    IDL_string lobHandle,

+    IDL_long   lobHandleLen,

+    IDL_long   &extractLen,

+    BYTE * &extractData)

+{

+    SQLRETURN   rc = SQL_SUCCESS;

+    BOOL		SkipProcess = FALSE;

+

+    m_CurrentOdbcAPI = SRVR_API_EXTRACTLOB;

+    if (m_AsyncEnable == SQL_ASYNC_ENABLE_ON)

+    {

+        if (m_AsyncThread != NULL)

+        {

+            if (GetExitCodeThread(m_AsyncThread, &m_ThreadStatus))

+            {

+                if (m_ThreadStatus == STILL_ACTIVE)

+                    rc = SQL_STILL_EXECUTING;

+                else

+                {

+                    CloseHandle(m_AsyncThread);

+                    m_AsyncThread = NULL;

+                    if (m_AsyncCanceled == TRUE)

+                        rc = SQL_ERROR;

+                    else

+                        rc = m_ThreadStatus;

+                }

+            }

+            else

+            {

+                CloseHandle(m_AsyncThread);

+                m_AsyncThread = NULL;

+                setNTError(m_ConnectHandle->getErrorMsgLang(), "Fetch - GetExitCodeThread()");

+                rc = SQL_ERROR;

+            }

+        }

+        else

+        {

+            if (m_ThreadStatus == SQL_STILL_EXECUTING)

+                SkipProcess = TRUE;

+            rc = SendExtractLob(extractType, lobHandle, lobHandleLen, extractLen, extractData);

+        }

+    }

+    else

+        rc = SendExtractLob(extractType, lobHandle, lobHandleLen, extractLen, extractData);

+

+    return rc;

+}

+

+SQLRETURN CStmt::SendUpdateLob(IDL_long updateType,

+    IDL_string lobHandle,

+    IDL_long   lobHandleLen,

+    IDL_long_long totalLength,

+    IDL_long_long offset,

+    IDL_long_long pos,

+    IDL_long_long length,

+    BYTE *        data)

+{

+    SQLRETURN         rc = SQL_SUCCESS;

+

+    m_SrvrCallContext.odbcAPI = SRVR_API_UPDATELOB;

+    m_SrvrCallContext.sqlHandle = this;

+    m_SrvrCallContext.SQLSvc_ObjRef = m_ConnectHandle->getSrvrObjRef();

+    m_SrvrCallContext.ASSvc_ObjRef = NULL;

+    m_SrvrCallContext.eventHandle = m_StmtEvent;

+    m_SrvrCallContext.dialogueId = m_ConnectHandle->getDialogueId();

+    m_SrvrCallContext.connectionTimeout = m_ConnectHandle->getConnectionTimeout();

+    m_SrvrCallContext.u.fetchParams.queryTimeout = m_QueryTimeout;

+    m_SrvrCallContext.u.updateLobParams.updateType = updateType;

+    m_SrvrCallContext.u.updateLobParams.lobHandle = lobHandle;

+    m_SrvrCallContext.u.updateLobParams.lobHandleLen = lobHandleLen;

+    m_SrvrCallContext.u.updateLobParams.totalLength = totalLength;

+    m_SrvrCallContext.u.updateLobParams.offset = offset;

+    m_SrvrCallContext.u.updateLobParams.pos = pos;

+    m_SrvrCallContext.u.updateLobParams.length = length;

+    m_SrvrCallContext.u.updateLobParams.data = data;

+

+    if (m_AsyncEnable == SQL_ASYNC_ENABLE_ON)

+    {

+        if ((m_AsyncThread = (HANDLE)_beginthreadex(NULL, 0, ThreadControlProc,

+            &m_SrvrCallContext, CREATE_SUSPENDED, &m_ThreadAddr)) == 0)

+        {

+            setNTError(m_ConnectHandle->getErrorMsgLang(), "SendExtractLob - _beginthreadex()");

+            rc = SQL_ERROR;

+        }

+        ResumeThread(m_AsyncThread);

+        rc = SQL_STILL_EXECUTING;

+        Sleep(0);

+    }

+    else

+    {

+        if ((m_SyncThread = (HANDLE)_beginthreadex(NULL, 0, ThreadControlProc,

+            &m_SrvrCallContext, CREATE_SUSPENDED, &m_ThreadAddr)) == 0)

+        {

+            setNTError(m_ConnectHandle->getErrorMsgLang(), "SendExtractLob - _beginthreadex()");

+            rc = SQL_ERROR;

+        }

+        else

+        {

+            ResumeThread(m_SyncThread);

+            WaitForSingleObject(m_SyncThread, INFINITE);

+            GetExitCodeThread(m_SyncThread, &m_ThreadStatus);

+            rc = m_ThreadStatus;

+            CloseHandle(m_SyncThread);

+            m_SyncThread = NULL;

+        }

+    }

+

+    return rc;

+}

+

+SQLRETURN CStmt::UpdateLob(IDL_long updateType,

+    IDL_string lobHandle,

+    IDL_long   lobHandleLen,

+    IDL_long_long totalLength,

+    IDL_long_long offset,

+    IDL_long_long pos,

+    IDL_long_long length,

+    BYTE *        data)

+{

+    SQLRETURN   rc = SQL_SUCCESS;

+    BOOL		SkipProcess = FALSE;

+

+    if (m_AsyncEnable == SQL_ASYNC_ENABLE_ON)

+    {

+        if (m_AsyncThread != NULL)

+        {

+            if (GetExitCodeThread(m_AsyncThread, &m_ThreadStatus))

+            {

+                if (m_ThreadStatus == STILL_ACTIVE)

+                    rc = SQL_STILL_EXECUTING;

+                else

+                {

+                    CloseHandle(m_AsyncThread);

+                    m_AsyncThread = NULL;

+                    if (m_AsyncCanceled == TRUE)

+                        rc = SQL_ERROR;

+                    else

+                        rc = m_ThreadStatus;

+                }

+            }

+            else

+            {

+                CloseHandle(m_AsyncThread);

+                m_AsyncThread = NULL;

+                setNTError(m_ConnectHandle->getErrorMsgLang(), "Fetch - GetExitCodeThread()");

+                rc = SQL_ERROR;

+            }

+        }

+        else

+        {

+            if (m_ThreadStatus == SQL_STILL_EXECUTING)

+                SkipProcess = TRUE;

+            rc = SendUpdateLob(updateType, lobHandle, lobHandleLen, totalLength, offset, pos, length, data);

+        }

+    }

+    else

+        rc = SendUpdateLob(updateType, lobHandle, lobHandleLen, totalLength, offset, pos, length, data);

+

+    return rc;

+}

diff --git a/win-odbc64/odbcclient/drvr35/cstmt.h b/win-odbc64/odbcclient/drvr35/cstmt.h
index 5bb2d20..98d4ea4 100644
--- a/win-odbc64/odbcclient/drvr35/cstmt.h
+++ b/win-odbc64/odbcclient/drvr35/cstmt.h
@@ -245,6 +245,33 @@
 	SQLRETURN SetPos(SQLUSMALLINT	RowNumber,

 			SQLUSMALLINT    Operation,

 			SQLUSMALLINT    LockType);

+    SQLRETURN CStmt::SendExtractLob(IDL_short extractType,

+		IDL_string lobHandle,

+		IDL_long lobHandleLen,

+		IDL_long &extractLen,

+		BYTE *& extractData);

+

+    SQLRETURN ExtractLob(IDL_short extractType,

+        IDL_string lobHandle,

+        IDL_long   lobHandleLen,

+        IDL_long &extractLen,

+        BYTE * &extractData);

+    SQLRETURN SendUpdateLob(IDL_long updateType,

+        IDL_string lobHandle,

+        IDL_long   lobHandleLen,

+        IDL_long_long totalLength,

+        IDL_long_long offset,

+        IDL_long_long pos,

+        IDL_long_long length,

+        BYTE *        data);

+    SQLRETURN UpdateLob(IDL_long updateType,

+        IDL_string lobHandle,

+        IDL_long   lobHandleLen,

+        IDL_long_long totalLength,

+        IDL_long_long offset,

+        IDL_long_long pos,

+        IDL_long_long length,

+        BYTE *        data);

 

 	SQLRETURN setDescRec(const SQLItemDescList_def *IPDDescList, const SQLItemDescList_def *IRDDescList);

 	inline BOOL getHeartBeatEnable() {return m_ConnectHandle->getHeartBeatEnable();};

diff --git a/win-odbc64/odbcclient/drvr35/ctosqlconv.cpp b/win-odbc64/odbcclient/drvr35/ctosqlconv.cpp
index d62ea29..1d338b6 100644
--- a/win-odbc64/odbcclient/drvr35/ctosqlconv.cpp
+++ b/win-odbc64/odbcclient/drvr35/ctosqlconv.cpp
@@ -275,6 +275,18 @@
 

 	if (errorMsg)

 		*errorMsg = '\0';

+

+    if (SQLDataType == SQLTYPECODE_BLOB || SQLDataType == SQLTYPECODE_CLOB)

+    {

+        SQLINTEGER lob_len;

+        if (srcLength == SQL_NTS)

+            lob_len = strlen((const char *)srcDataPtr);

+        else

+            lob_len = srcLength;

+        memcpy((char *)targetDataPtr, &lob_len, sizeof(lob_len));

+        memcpy((char *)targetDataPtr + 4, (const char *)srcDataPtr, targetLength > srcLength ? srcLength : targetLength);

+        return SQL_SUCCESS;

+    }

 	

 	//if (targetPrecision < 19)

     if (((SQLDataType == SQLTYPECODE_NUMERIC) && (targetPrecision <= 18)) ||

diff --git a/win-odbc64/odbcclient/drvr35/drvr35_os.vcxproj b/win-odbc64/odbcclient/drvr35/drvr35_os.vcxproj
index 0194e10..8613089 100755
--- a/win-odbc64/odbcclient/drvr35/drvr35_os.vcxproj
+++ b/win-odbc64/odbcclient/drvr35/drvr35_os.vcxproj
@@ -296,6 +296,7 @@
     <ClCompile Include="drvrglobal.cpp" />

     <ClCompile Include="drvrnet.cpp" />

     <ClCompile Include="..\..\Common\ExpConvMxcs.cpp" />

+    <ClCompile Include="lob.cpp" />

     <ClCompile Include="netcommon.cpp" />

     <ClCompile Include="netconnect.cpp" />

     <ClCompile Include="netstmt.cpp" />

@@ -351,6 +352,7 @@
     <ClInclude Include="drvrnet.h" />

     <ClInclude Include="..\..\Common\DrvrSrvr.h" />

     <ClInclude Include="..\..\Common\OdbcMsg.h" />

+    <ClInclude Include="lob.h" />

     <ClInclude Include="resource.h" />

     <ClInclude Include="sqlconnect.h" />

     <ClInclude Include="sqldesc.h" />

@@ -382,4 +384,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

   <ImportGroup Label="ExtensionTargets">

   </ImportGroup>

-</Project>

+</Project>
\ No newline at end of file
diff --git a/win-odbc64/odbcclient/drvr35/drvr35_os.vcxproj.filters b/win-odbc64/odbcclient/drvr35/drvr35_os.vcxproj.filters
index b7d1b70..40f4850 100644
--- a/win-odbc64/odbcclient/drvr35/drvr35_os.vcxproj.filters
+++ b/win-odbc64/odbcclient/drvr35/drvr35_os.vcxproj.filters
@@ -164,6 +164,9 @@
     <ClCompile Include="..\..\Common\Compression.cpp">

       <Filter>Interface Files</Filter>

     </ClCompile>

+    <ClCompile Include="lob.cpp">

+      <Filter>Source Files</Filter>

+    </ClCompile>

   </ItemGroup>

   <ItemGroup>

     <ResourceCompile Include="drvr35.rc">

@@ -300,6 +303,9 @@
     <ClInclude Include="..\..\Common\Compression.h">

       <Filter>Interface Header Files</Filter>

     </ClInclude>

+    <ClInclude Include="lob.h">

+      <Filter>Header Files</Filter>

+    </ClInclude>

   </ItemGroup>

   <ItemGroup>

     <CustomBuildStep Include="drvr35.def">

diff --git a/win-odbc64/odbcclient/drvr35/drvrglobal.cpp b/win-odbc64/odbcclient/drvr35/drvrglobal.cpp
index 730eb11..7f3950f 100755
--- a/win-odbc64/odbcclient/drvr35/drvrglobal.cpp
+++ b/win-odbc64/odbcclient/drvr35/drvrglobal.cpp
@@ -30,6 +30,7 @@
 #include "DiagFunctions.h" 

 #include <errno.h>

 #include "StaticLocking.h"

+#include "DrvrSrvr.h"

 

 // Declare the global variable

 

@@ -48,7 +49,9 @@
 DATATYPE_TABLE gSQLDatatypeMap[] = 

 {

 //   conciseType,					verboseType,		datetimeIntervalCode,		columnSizeAttr,		decimalDigitsAttr,	displaySizeAttr,	octetLength,					defaultType,					typeName		

-	{SQL_CHAR,						SQL_CHAR,			0,							SQL_DESC_LENGTH,	0,					SQL_DESC_LENGTH,	SQL_DESC_LENGTH,				SQL_C_CHAR,						"CHAR"},

+    {TYPE_BLOB,                     SQL_CHAR,           0,                          SQL_DESC_LENGTH,    0,                  SQL_DESC_LENGTH,    SQL_DESC_LENGTH,                SQL_C_CHAR,                         "BLOB" },

+    {TYPE_CLOB,                     SQL_CHAR,           0,                          SQL_DESC_LENGTH,    0,                  SQL_DESC_LENGTH,    SQL_DESC_LENGTH,                SQL_C_CHAR,                         "CLOB" },

+    {SQL_CHAR,						SQL_CHAR,			0,							SQL_DESC_LENGTH,	0,					SQL_DESC_LENGTH,	SQL_DESC_LENGTH,				SQL_C_CHAR,						"CHAR"},

 	{SQL_VARCHAR,					SQL_VARCHAR,		0,							SQL_DESC_LENGTH,	0,					SQL_DESC_LENGTH,	SQL_DESC_LENGTH,				SQL_C_CHAR,						"VARCHAR"},

 	{SQL_LONGVARCHAR,				SQL_LONGVARCHAR,	0,							SQL_DESC_LENGTH,	0,					SQL_DESC_LENGTH,	SQL_DESC_LENGTH,				SQL_C_CHAR,						"LONG VARCHAR"},

 	{SQL_DECIMAL,					SQL_DECIMAL,		0,							SQL_DESC_PRECISION,	SQL_DESC_SCALE,		SQL_DESC_PRECISION, SQL_DESC_PRECISION,				SQL_C_CHAR,						"DECIMAL"},

diff --git a/win-odbc64/odbcclient/drvr35/drvrnet.cpp b/win-odbc64/odbcclient/drvr35/drvrnet.cpp
index 05d2f59..99bc0ec 100644
--- a/win-odbc64/odbcclient/drvr35/drvrnet.cpp
+++ b/win-odbc64/odbcclient/drvr35/drvrnet.cpp
@@ -77,6 +77,8 @@
 	case SQL_API_SQLCOLUMNPRIVILEGES:

 	case SQL_API_SQLTABLEPRIVILEGES:

 	case SQL_API_SQLFOREIGNKEYS:

+    case SRVR_API_EXTRACTLOB:

+    case SRVR_API_UPDATELOB:

 		pStatement = (CStmt*)srvrCallContext->sqlHandle;

 		pConnection = pStatement->getConnectHandle();

 		break;

@@ -134,6 +136,16 @@
 			rc = SQLFETCH_(srvrCallContext);

 			break;

 

+        case SRVR_API_EXTRACTLOB:

+            pConnection->m_srvrTCPIPSystem->odbcAPI = SRVR_API_EXTRACTLOB;

+            rc = EXTRACTLOB(srvrCallContext);

+            break;

+

+        case SRVR_API_UPDATELOB:

+            pConnection->m_srvrTCPIPSystem->odbcAPI = SRVR_API_UPDATELOB;

+            rc = UPDATELOB(srvrCallContext);

+            break;

+

 		case SQL_API_SQLFREESTMT:

 			rc = FREESTATEMENT(srvrCallContext);

 			break;

diff --git a/win-odbc64/odbcclient/drvr35/drvrnet.h b/win-odbc64/odbcclient/drvr35/drvrnet.h
index 04c0ca9..fa14cda 100644
--- a/win-odbc64/odbcclient/drvr35/drvrnet.h
+++ b/win-odbc64/odbcclient/drvr35/drvrnet.h
@@ -119,6 +119,25 @@
 			SQLUINTEGER				valueNum;

 			SQLPOINTER				valueStr;

 		} setConnectParams;

+        struct EXTRACTLOB_PARAMS

+        {

+            IDL_short               extractType;

+            IDL_string              lobHandle;

+            IDL_long                lobHandleLen;

+            IDL_long                extractLen;

+            BYTE *                  extractData;

+        } extractLobParams;

+        struct UPDATELOB_PARAMS

+        {

+            IDL_long                updateType;

+            IDL_string              lobHandle;

+            IDL_long                lobHandleLen;

+            IDL_long_long           totalLength;

+            IDL_long_long           offset;

+            IDL_long_long           pos;

+            IDL_long_long           length;

+            BYTE *                  data;

+        } updateLobParams;

 		SQLSMALLINT					completionType;

 	} u;

 

@@ -145,6 +164,8 @@
 extern "C" SQLRETURN SQLPREPARE_(SRVR_CALL_CONTEXT *srvrCallContext);

 extern "C" SQLRETURN SQLFETCH_(SRVR_CALL_CONTEXT *srvrCallContext);

 extern "C" SQLRETURN SQLEXECUTE_(SRVR_CALL_CONTEXT *srvrCallContext);

+extern "C" SQLRETURN EXTRACTLOB(SRVR_CALL_CONTEXT *srvrCallContext);

+extern "C" SQLRETURN UPDATELOB(SRVR_CALL_CONTEXT *srvrCallContext);

 

 extern "C" SQLRETURN checkNetStmt(SRVR_CALL_CONTEXT *srvrCallContext,CEE_status sts, char* procname);

 

diff --git a/win-odbc64/odbcclient/drvr35/lob.cpp b/win-odbc64/odbcclient/drvr35/lob.cpp
new file mode 100644
index 0000000..ef620b0
--- /dev/null
+++ b/win-odbc64/odbcclient/drvr35/lob.cpp
@@ -0,0 +1,88 @@
+/**********************************************************************

+// @@@ START COPYRIGHT @@@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+// @@@ END COPYRIGHT @@@
+********************************************************************/

+/**************************************************************************

+**************************************************************************/

+//

+//

+

+#include "lob.h"

+#include "cconnect.h"

+#include "cstmt.h"

+

+namespace ODBC {

+    IDL_long getLobLength(CConnect *m_ConnectHandle, SQLHANDLE InputHandle, IDL_string lobHandle, IDL_long lobHandleLen)

+    {

+        SQLHSTMT hstmt;

+        m_ConnectHandle->AllocHandle(SQL_HANDLE_STMT, InputHandle, &hstmt);

+

+        IDL_long totalLength;

+        BYTE * data;

+        CStmt *pStatement = (CStmt *)hstmt;

+        pStatement->ExtractLob(0,

+            lobHandle, lobHandleLen, totalLength, data);

+        pStatement->Close(SQL_CLOSE);

+        return totalLength;

+    }

+

+    bool getLobData(CConnect *m_ConnectHandle, SQLHANDLE InputHandle, IDL_string lobHandle, IDL_long lobHandleLen, SQLPOINTER target, IDL_long &length)

+    {

+        SQLHSTMT hstmt;

+        m_ConnectHandle->AllocHandle(SQL_HANDLE_STMT, InputHandle, &hstmt);

+

+        IDL_long totalLength = 0;

+        BYTE * data;

+        CStmt *pStatement = (CStmt *)hstmt;

+        IDL_long extractLen = length;

+

+        IDL_string lobHandleTemp = (IDL_string)malloc(lobHandleLen + 1);

+        memset(lobHandleTemp, 0, lobHandleLen + 1);

+        memcpy(lobHandleTemp, lobHandle, lobHandleLen);

+

+        if (pStatement->ExtractLob(1,

+            lobHandleTemp, lobHandleLen + 1, extractLen, data) != SQL_SUCCESS)

+        {

+            pStatement->Close(SQL_CLOSE);

+            free(lobHandleTemp);

+            lobHandleTemp = NULL;

+

+            return false;

+        }

+

+        if (length > extractLen)

+        {

+            memcpy(target, data, extractLen);

+            length = extractLen;

+        }

+        else

+        {

+            length = 0;

+        }

+

+        pStatement->Close(SQL_CLOSE);

+        free(lobHandleTemp);

+        lobHandleTemp = NULL;

+

+        return true;

+    }

+

+}
\ No newline at end of file
diff --git a/win-odbc64/odbcclient/drvr35/lob.h b/win-odbc64/odbcclient/drvr35/lob.h
new file mode 100644
index 0000000..1b65522
--- /dev/null
+++ b/win-odbc64/odbcclient/drvr35/lob.h
@@ -0,0 +1,38 @@
+/**********************************************************************

+// @@@ START COPYRIGHT @@@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+// @@@ END COPYRIGHT @@@
+********************************************************************/

+/**************************************************************************

+**************************************************************************/

+//

+//

+

+#ifndef _LOB_DEFINED

+#define _LOB_DEFINED

+#include "cconnect.h"

+namespace ODBC {

+    bool getLobData(CConnect *m_ConnectHandle, SQLHANDLE InputHandle, IDL_string lobHandle, IDL_long lobHandleLen, SQLPOINTER target, IDL_long &length);

+

+    IDL_long getLobLength(CConnect *m_ConnectHandle, SQLHANDLE InputHandle, IDL_string lobHandle, IDL_long lobHandleLen);

+

+};

+

+#endif
\ No newline at end of file
diff --git a/win-odbc64/odbcclient/drvr35/netstmt.cpp b/win-odbc64/odbcclient/drvr35/netstmt.cpp
index 38e09c4..0168916 100644
--- a/win-odbc64/odbcclient/drvr35/netstmt.cpp
+++ b/win-odbc64/odbcclient/drvr35/netstmt.cpp
@@ -1159,3 +1159,98 @@
 

 } /* SQLEXECUTE_() */

 

+

+SQLRETURN EXTRACTLOB(SRVR_CALL_CONTEXT *srvrCallContext)

+{

+    CEE_status    sts;

+    SQLRETURN     rc = SQL_SUCCESS;

+

+    struct odbc_SQLsvc_ExtractLob_exc_ exception_ = { 0, 0, 0 };

+    BYTE   *sqlWarningOrError = 0;

+

+    CStmt   * pStatement = (CStmt *)srvrCallContext->sqlHandle;

+

+    sts = odbc_SQLDrvr_ExtractLOB_pst_(

+        srvrCallContext,

+        srvrCallContext->u.extractLobParams.extractType,

+        srvrCallContext->u.extractLobParams.lobHandle,

+        srvrCallContext->u.extractLobParams.lobHandleLen,

+        srvrCallContext->u.extractLobParams.extractLen,

+        &exception_,

+        srvrCallContext->u.extractLobParams.extractData

+        );

+

+    pStatement->setExceptionErrors(exception_.exception_nr, exception_.exception_detail);

+    switch (exception_.exception_nr)

+    {

+    case CEE_SUCCESS:

+        break;

+    case odbc_SQLSvc_ExtractLob_SQLError_exn_:

+        pStatement->setDiagRec(&exception_.u.SQLError);

+        break;

+    case odbc_SQLSvc_ExtractLob_InvalidConnection_exn_:

+        pStatement->setDiagRec(SERVER_ERROR, IDS_08_S01);

+        break;

+    case odbc_SQLSvc_ExtractLob_ParamError_exn_:

+        pStatement->setDiagRec(SERVER_ERROR, IDS_HY_C00, exception_.exception_nr,

+            exception_.u.ParamError.ParamDesc, NULL,

+            SQL_ROW_NUMBER_UNKNOWN, SQL_COLUMN_NUMBER_UNKNOWN, 1, pStatement->getSrvrIdentity());

+        break;

+    case odbc_SQLSvc_ExtractLob_SQLInvalidhandle_exn_:

+        break;

+    default:

+        pStatement->sendCDInfo(exception_.exception_nr);

+        pStatement->setDiagRec(exception_.exception_nr, "EXTRACTLOB", pStatement->getSrvrIdentity());

+        break;

+    }

+    return rc;

+}

+

+SQLRETURN UPDATELOB(SRVR_CALL_CONTEXT *srvrCallContext)

+{

+    CEE_status    sts;

+    SQLRETURN     rc = SQL_SUCCESS;

+

+    struct odbc_SQLSvc_UpdateLob_exc_ exception_ = { 0, 0, 0 };

+    BYTE   *sqlWarningOrError = 0;

+

+    CStmt   * pStatement = (CStmt *)srvrCallContext->sqlHandle;

+

+    sts = odbc_SQLDrvr_UpdateLob_pst_(

+        srvrCallContext,

+        srvrCallContext->u.updateLobParams.updateType,

+        srvrCallContext->u.updateLobParams.lobHandle,

+        srvrCallContext->u.updateLobParams.lobHandleLen,

+        srvrCallContext->u.updateLobParams.totalLength,

+        srvrCallContext->u.updateLobParams.offset,

+        srvrCallContext->u.updateLobParams.pos,

+        srvrCallContext->u.updateLobParams.length,

+        srvrCallContext->u.updateLobParams.data,

+        &exception_

+        );

+

+    pStatement->setExceptionErrors(exception_.exception_nr, exception_.exception_detail);

+    switch (exception_.exception_nr)

+    {

+    case CEE_SUCCESS:

+        break;

+    case odbc_SQLSvc_UpdateLob_SQLError_exn_:

+        pStatement->setDiagRec(&exception_.u.SQLError);

+        break;

+    case odbc_SQLSvc_UpdateLob_InvalidConnect_exn_:

+        pStatement->setDiagRec(SERVER_ERROR, IDS_08_S01);

+        break;

+    case odbc_SQLSvc_UpdateLob_ParamError_exn_:

+        pStatement->setDiagRec(SERVER_ERROR, IDS_HY_C00, exception_.exception_nr,

+            exception_.u.ParamError.ParamDesc, NULL,

+            SQL_ROW_NUMBER_UNKNOWN, SQL_COLUMN_NUMBER_UNKNOWN, 1, pStatement->getSrvrIdentity());

+        break;

+    case odbc_SQLSvc_UpdateLob_SQLInvalidhandle_exn_:

+        break;

+    default:

+        pStatement->sendCDInfo(exception_.exception_nr);

+        pStatement->setDiagRec(exception_.exception_nr, "UPDATELOB", pStatement->getSrvrIdentity());

+        break;

+    }

+    return rc;

+}

diff --git a/win-odbc64/odbcclient/drvr35/sqltocconv.cpp b/win-odbc64/odbcclient/drvr35/sqltocconv.cpp
index e597135..062cca3 100755
--- a/win-odbc64/odbcclient/drvr35/sqltocconv.cpp
+++ b/win-odbc64/odbcclient/drvr35/sqltocconv.cpp
@@ -32,6 +32,7 @@
 #include "nskieee.h"

 #include "DiagFunctions.h"

 #include "csconvert.h" 

+#include "lob.h"

 #include <errno.h>

 

 #define MAXCHARLEN 32768 //32K

@@ -153,7 +154,9 @@
 // totalReturnedLength is a Input/Output parameter

 // *totalReturnedLength = Offset in Input

 // srcLength includes NULL for SQL_CHAR Type, hence srcLength is srcLength-1 for SQL_CHAR fields

-unsigned long ODBC::ConvertSQLToC(SQLINTEGER	ODBCAppVersion,

+unsigned long ODBC::ConvertSQLToC(CConnect *m_ConnectHandle,

+                            SQLHANDLE   InputHandle,

+                            SQLINTEGER	ODBCAppVersion,

 							DWORD		DataLangId,

 							SQLSMALLINT	SQLDataType,

 							SQLSMALLINT	ODBCDataType,

@@ -373,6 +376,29 @@
 	if (srcDataPtr == NULL)

 		return IDS_HY_000;

 

+    if (SQLDataType == SQLTYPECODE_BLOB || SQLDataType == SQLTYPECODE_CLOB)

+    {

+        if (srcPrecision >= 0xFFFFFFF)

+        {

+            DataLen = *(int *)srcDataPtr;

+            DataPtr = (char *)srcDataPtr + 4;

+        }

+        else

+        {

+            DataLen = *(USHORT *)srcDataPtr;

+            DataPtr = (char *)srcDataPtr + 2;

+        }

+

+        IDL_long dataRead = targetLength;

+        if (getLobData(m_ConnectHandle, InputHandle, (IDL_string)DataPtr, DataLen, targetDataPtr, dataRead) != true)

+            return SQL_ERROR;

+

+        if (targetStrLenPtr != NULL)

+            *targetStrLenPtr = dataRead;

+

+        if (dataRead <= 0) return SQL_NO_DATA;

+        return SQL_SUCCESS;

+    }

 	

 //	if(charsetSupport)

 		LangId = LANG_NEUTRAL;

diff --git a/win-odbc64/odbcclient/drvr35/sqltocconv.h b/win-odbc64/odbcclient/drvr35/sqltocconv.h
index 00d4eaf..6ef1fe2 100644
--- a/win-odbc64/odbcclient/drvr35/sqltocconv.h
+++ b/win-odbc64/odbcclient/drvr35/sqltocconv.h
@@ -33,7 +33,9 @@
 

 namespace ODBC {

 

-unsigned long ConvertSQLToC(SQLINTEGER	ODBCAppVersion,

+unsigned long ConvertSQLToC(CConnect *ConnectHandle,

+                            SQLHANDLE InputHandle,

+                            SQLINTEGER	ODBCAppVersion,

 							DWORD		DataLangId,

 							SQLSMALLINT	SQLDataType,

 							SQLSMALLINT	ODBCDataType,

diff --git a/win-odbc64/sql/cli/sqlcli.h b/win-odbc64/sql/cli/sqlcli.h
index fc964fb..478c3fb 100644
--- a/win-odbc64/sql/cli/sqlcli.h
+++ b/win-odbc64/sql/cli/sqlcli.h
@@ -418,6 +418,10 @@
     /* SQL/MP stype VARCHAR with length prefix: Tandem Extension */

     SQLTYPECODE_VARCHAR_WITH_LENGTH = -601,

 

+    /* BLOB TYPE */

+    SQLTYPECODE_BLOB = -602,

+    SQLTYPECODE_CLOB = -603,

+

     /* LONG VARCHAR/ODBC CHARACTER VARYING */

     SQLTYPECODE_VARCHAR_LONG  = -1,		/* ## NEGATIVE??? */