You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by li...@apache.org on 2018/02/07 03:47:42 UTC

[1/4] trafodion git commit: [TRAFODION-2908] create table with wrong char length hang and crash

Repository: trafodion
Updated Branches:
  refs/heads/master b1e176f0c -> 9d88d0810


[TRAFODION-2908] create table with wrong char length hang and crash


Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/5f5808ab
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/5f5808ab
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/5f5808ab

Branch: refs/heads/master
Commit: 5f5808ab9d66bc2fba02292b3a0e5c371d3f5678
Parents: d80f009
Author: Liu Ming <ov...@sina.com>
Authored: Mon Feb 5 08:11:50 2018 +0000
Committer: Liu Ming <ov...@sina.com>
Committed: Mon Feb 5 08:11:50 2018 +0000

----------------------------------------------------------------------
 core/sql/bin/SqlciErrors.txt            |  2 +-
 core/sql/sqlcomp/CmpDDLCatErrorCodes.h  |  2 +-
 core/sql/sqlcomp/CmpSeabaseDDLtable.cpp | 12 ++++++++++++
 3 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/5f5808ab/core/sql/bin/SqlciErrors.txt
----------------------------------------------------------------------
diff --git a/core/sql/bin/SqlciErrors.txt b/core/sql/bin/SqlciErrors.txt
index 0a82369..4ef465a 100644
--- a/core/sql/bin/SqlciErrors.txt
+++ b/core/sql/bin/SqlciErrors.txt
@@ -140,7 +140,7 @@
 1138 ZZZZZ 99999 ADVANCED CRTCL DIALOUT --- unused ---
 1139 ZZZZZ 99999 BEGINNER MAJOR DBADMIN System-generated column $0~ColumnName of base table $1~TableName cannot appear in the search condition of a check constraint definition.
 1140 ZZZZZ 99999 BEGINNER MAJOR DBADMIN Row-length $0~int0 exceeds the maximum allowed row-length of $1~int1 for table $2~TableName.
-1141 ZZZZZ 99999 BEGINNER MAJOR DBADMIN --- unused ---
+1141 ZZZZZ 99999 BEGINNER MAJOR DBADMIN Key-length $0~int0 exceeds the maximum allowed rowkey length $1~int1.
 1142 0A000 99999 BEGINNER MAJOR DBADMIN --- unused ---
 1143 ZZZZZ 99999 BEGINNER MAJOR DBADMIN Validation for constraint $0~ConstraintName failed; incompatible data exists in referencing base table $1~TableName and referenced base table $2~String0.  To display the data that violates the constraint, please use the following DML statement: $3~String1
 1144 ZZZZZ 99999 BEGINNER MAJOR DBADMIN A quoted string was expected in first key clause for column $0~ColumnName on table $1~TableName, but the value detected is ($2~String0).

http://git-wip-us.apache.org/repos/asf/trafodion/blob/5f5808ab/core/sql/sqlcomp/CmpDDLCatErrorCodes.h
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpDDLCatErrorCodes.h b/core/sql/sqlcomp/CmpDDLCatErrorCodes.h
index e00eb91..713690f 100644
--- a/core/sql/sqlcomp/CmpDDLCatErrorCodes.h
+++ b/core/sql/sqlcomp/CmpDDLCatErrorCodes.h
@@ -171,7 +171,7 @@ enum CatErrorCode { CAT_FIRST_ERROR = 1000
                   // unused                                       = 1138
                   , CAT_SYSKEY_COL_NOT_ALLOWED_IN_CK_CNSTRNT      = 1139
                   , CAT_REC_LEN_TOO_LARGE                         = 1140
-                  // unused                                       = 1141
+                  , CAT_ROWKEY_LEN_TOO_LARGE                      = 1141
                   // unused                                       = 1142
                   , CAT_DATA_NOT_MEET_RI_CONSTRAINT_CRITERIA      = 1143
                   , CAT_MISSING_QUOTE_IN_CHAR_FIRSTKEY            = 1144

http://git-wip-us.apache.org/repos/asf/trafodion/blob/5f5808ab/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp b/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp
index de6f778..248deef 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp
@@ -57,6 +57,8 @@
 
 #include "TrafDDLdesc.h"
 
+#define MAX_HBASE_ROWKEY_LEN 32768
+
 // defined in CmpDescribe.cpp
 extern short CmpDescribeSeabaseTable ( 
      const CorrName  &dtName,
@@ -2517,6 +2519,16 @@ short CmpSeabaseDDL::createSeabaseTable2(
 	}
       keyLength += colType->getEncodedKeyLength();
     }
+  //check the key length
+  if(keyLength > MAX_HBASE_ROWKEY_LEN )
+  {
+      *CmpCommon::diags() << DgSqlCode(-CAT_ROWKEY_LEN_TOO_LARGE)
+                              << DgInt0(keyLength)
+                              << DgInt1(MAX_HBASE_ROWKEY_LEN);
+      deallocEHI(ehi); 
+      processReturn();
+      return -1;
+  }
 
   if (hbaseMapFormat)
     {


[4/4] trafodion git commit: Merge branch 'master' of https://github.com/apache/trafodion into mrg_1441

Posted by li...@apache.org.
Merge branch 'master' of https://github.com/apache/trafodion into mrg_1441


Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/9d88d081
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/9d88d081
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/9d88d081

Branch: refs/heads/master
Commit: 9d88d08101bd0e41d8cb6645653a01251a94cd46
Parents: 659f4ac b1e176f
Author: Liu Ming <ov...@sina.com>
Authored: Tue Feb 6 22:34:04 2018 +0000
Committer: Liu Ming <ov...@sina.com>
Committed: Tue Feb 6 22:34:04 2018 +0000

----------------------------------------------------------------------
 core/.gitignore                                 |    2 +-
 .../odbc/odbcclient/unixcli/cli/ctosqlconv.cpp  |    4 +-
 core/sqf/Makefile                               |   10 +-
 core/sqf/export/include/trafconf/trafconfig.h   |  349 ++
 core/sqf/monitor/linux/clusterconf.cxx          |  863 -----
 core/sqf/monitor/linux/clusterconf.h            |  118 -
 core/sqf/monitor/linux/config.cxx               |    8 +-
 core/sqf/monitor/linux/getseq.cxx               |    2 -
 core/sqf/monitor/linux/lnode.h                  |    1 +
 core/sqf/monitor/linux/lnodeconfig.cxx          |  399 ---
 core/sqf/monitor/linux/lnodeconfig.h            |  119 -
 core/sqf/monitor/linux/macros.gmk               |   10 +
 core/sqf/monitor/linux/makefile                 |  117 +-
 core/sqf/monitor/linux/monlogging.cxx           |    3 +-
 core/sqf/monitor/linux/msgdef.h                 |   27 +-
 core/sqf/monitor/linux/persistconfig.cxx        |  636 ----
 core/sqf/monitor/linux/persistconfig.h          |  165 -
 core/sqf/monitor/linux/pnode.cxx                |    3 +-
 core/sqf/monitor/linux/pnode.h                  |    2 -
 core/sqf/monitor/linux/pnodeconfig.cxx          |  631 ----
 core/sqf/monitor/linux/pnodeconfig.h            |  130 -
 core/sqf/monitor/linux/pstartd.h                |    2 +-
 core/sqf/monitor/linux/reqnodeadd.cxx           |    2 +-
 core/sqf/monitor/linux/shell.cxx                |    5 +-
 core/sqf/monitor/linux/tcdb.cxx                 |  478 ---
 core/sqf/monitor/linux/tcdb.h                   |  117 -
 core/sqf/monitor/linux/tcdbsqlite.cxx           | 3390 ------------------
 core/sqf/monitor/linux/tcdbsqlite.h             |  130 -
 core/sqf/monitor/linux/tcdbstore.cxx            |   55 -
 core/sqf/monitor/linux/tcdbstore.h              |  113 -
 core/sqf/monitor/linux/tcdbzstore.cxx           | 2192 -----------
 core/sqf/monitor/linux/tcdbzstore.h             |  130 -
 core/sqf/monitor/linux/tclog.cxx                |  121 -
 core/sqf/monitor/linux/tclog.h                  |   46 -
 core/sqf/monitor/linux/tctrace.cxx              |  366 --
 core/sqf/monitor/linux/tctrace.h                |  103 -
 core/sqf/monitor/linux/trafconf.cxx             |  631 ----
 core/sqf/monitor/linux/trafconfig.cxx           |  560 ---
 core/sqf/monitor/linux/trafconfig.h             |  305 --
 core/sqf/sqenvcom.sh                            |    9 +
 core/sqf/sql/scripts/monitor.env                |   59 +
 core/sqf/sql/scripts/sqconfig.sample            |    7 +
 core/sqf/sql/scripts/sqgen                      |   62 +-
 core/sqf/src/Makefile                           |    4 +
 core/sqf/src/trafconf/Makefile                  |  119 +
 core/sqf/src/trafconf/clusterconf.cpp           |  855 +++++
 core/sqf/src/trafconf/clusterconf.h             |  118 +
 core/sqf/src/trafconf/lnodeconfig.cpp           |  397 ++
 core/sqf/src/trafconf/lnodeconfig.h             |  121 +
 core/sqf/src/trafconf/macros.gmk                |  112 +
 core/sqf/src/trafconf/persistconfig.cpp         |  637 ++++
 core/sqf/src/trafconf/persistconfig.h           |  164 +
 core/sqf/src/trafconf/pnodeconfig.cpp           |  629 ++++
 core/sqf/src/trafconf/pnodeconfig.h             |  131 +
 core/sqf/src/trafconf/tcdb.cpp                  |  474 +++
 core/sqf/src/trafconf/tcdb.h                    |  118 +
 core/sqf/src/trafconf/tcdbsqlite.cpp            | 3390 ++++++++++++++++++
 core/sqf/src/trafconf/tcdbsqlite.h              |  130 +
 core/sqf/src/trafconf/tcdbstore.cpp             |   56 +
 core/sqf/src/trafconf/tcdbstore.h               |  112 +
 core/sqf/src/trafconf/tclog.cpp                 |  121 +
 core/sqf/src/trafconf/tclog.h                   |   46 +
 core/sqf/src/trafconf/tctrace.cpp               |  367 ++
 core/sqf/src/trafconf/tctrace.h                 |  105 +
 core/sqf/src/trafconf/trafconf.cpp              |  630 ++++
 core/sqf/src/trafconf/trafconfig.cpp            |  599 ++++
 core/sql/optimizer/SynthType.cpp                |   11 +-
 core/sql/regress/executor/EXPECTED002.SB        |   21 +-
 core/sql/regress/executor/TEST002               |    3 +
 69 files changed, 9987 insertions(+), 11965 deletions(-)
----------------------------------------------------------------------



[2/4] trafodion git commit: update Message guide and rewording of error message body

Posted by li...@apache.org.
update Message guide and rewording of error message body


Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/c83581ca
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/c83581ca
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/c83581ca

Branch: refs/heads/master
Commit: c83581ca08384bbd1936274ac92eb7c583defc40
Parents: 5f5808a
Author: Liu Ming <ov...@sina.com>
Authored: Tue Feb 6 07:33:11 2018 +0000
Committer: Liu Ming <ov...@sina.com>
Committed: Tue Feb 6 07:33:11 2018 +0000

----------------------------------------------------------------------
 core/sql/bin/SqlciErrors.txt                      |  2 +-
 .../src/asciidoc/_chapters/ddl_msgs.adoc          | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/c83581ca/core/sql/bin/SqlciErrors.txt
----------------------------------------------------------------------
diff --git a/core/sql/bin/SqlciErrors.txt b/core/sql/bin/SqlciErrors.txt
index 4ef465a..c79010b 100644
--- a/core/sql/bin/SqlciErrors.txt
+++ b/core/sql/bin/SqlciErrors.txt
@@ -140,7 +140,7 @@
 1138 ZZZZZ 99999 ADVANCED CRTCL DIALOUT --- unused ---
 1139 ZZZZZ 99999 BEGINNER MAJOR DBADMIN System-generated column $0~ColumnName of base table $1~TableName cannot appear in the search condition of a check constraint definition.
 1140 ZZZZZ 99999 BEGINNER MAJOR DBADMIN Row-length $0~int0 exceeds the maximum allowed row-length of $1~int1 for table $2~TableName.
-1141 ZZZZZ 99999 BEGINNER MAJOR DBADMIN Key-length $0~int0 exceeds the maximum allowed rowkey length $1~int1.
+1141 ZZZZZ 99999 BEGINNER MAJOR DBADMIN Key length $0-int0 exceeds the maximum allowed key length of $1~int1
 1142 0A000 99999 BEGINNER MAJOR DBADMIN --- unused ---
 1143 ZZZZZ 99999 BEGINNER MAJOR DBADMIN Validation for constraint $0~ConstraintName failed; incompatible data exists in referencing base table $1~TableName and referenced base table $2~String0.  To display the data that violates the constraint, please use the following DML statement: $3~String1
 1144 ZZZZZ 99999 BEGINNER MAJOR DBADMIN A quoted string was expected in first key clause for column $0~ColumnName on table $1~TableName, but the value detected is ($2~String0).

http://git-wip-us.apache.org/repos/asf/trafodion/blob/c83581ca/docs/messages_guide/src/asciidoc/_chapters/ddl_msgs.adoc
----------------------------------------------------------------------
diff --git a/docs/messages_guide/src/asciidoc/_chapters/ddl_msgs.adoc b/docs/messages_guide/src/asciidoc/_chapters/ddl_msgs.adoc
index e9ce886..5d2b6b3 100644
--- a/docs/messages_guide/src/asciidoc/_chapters/ddl_msgs.adoc
+++ b/docs/messages_guide/src/asciidoc/_chapters/ddl_msgs.adoc
@@ -1526,6 +1526,24 @@ exceeds the maximum allowed row size.
 *Recovery:* See the {docs-url}/sql_reference/index.html[_{project-name} SQL Reference Manual_] for row size limit
 calculations. Change the column definitions and reissue the statement.
 
+[[SQL-1141]]
+== SQL 1141
+
+```
+Key length <actual-key-length> exceeds the maximum allowed key length of <maximum-key-length>.
+```
+
+Where <actual-key-length> is the summary length of all the primary key for the given table.
+
+Where <maximum-key-length> is the largest key size allowed according to the underlying storage engine.
+
+*Cause:* On a CREATE TABLE statement, the size of the primary key total size in bytes
+exceeds the maximum allowed key size.
+
+*Effect:* The operation fails.
+
+*Recovery:* See the error message for the maximum allowed key size, change the column definitions and reissue the statement.
+
 <<<
 [[SQL-1143]]
 == SQL 1143


[3/4] trafodion git commit: [TRAFODION-2908] create table with wrong char length hang and crash

Posted by li...@apache.org.
[TRAFODION-2908] create table with wrong char length hang and crash 


Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/659f4ac0
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/659f4ac0
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/659f4ac0

Branch: refs/heads/master
Commit: 659f4ac028dc919742e4cbb02ee7eab43e1ba4d2
Parents: d80f009 c83581c
Author: Liu Ming <ov...@sina.com>
Authored: Tue Feb 6 22:32:26 2018 +0000
Committer: Liu Ming <ov...@sina.com>
Committed: Tue Feb 6 22:32:26 2018 +0000

----------------------------------------------------------------------
 core/sql/bin/SqlciErrors.txt                      |  2 +-
 core/sql/sqlcomp/CmpDDLCatErrorCodes.h            |  2 +-
 core/sql/sqlcomp/CmpSeabaseDDLtable.cpp           | 12 ++++++++++++
 .../src/asciidoc/_chapters/ddl_msgs.adoc          | 18 ++++++++++++++++++
 4 files changed, 32 insertions(+), 2 deletions(-)
----------------------------------------------------------------------