[
https://issues.apache.org/jira/browse/TRAFODION-2674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16067449#comment-16067449
]
Suresh Subbiah commented on TRAFODION-2674:
-------------------------------------------
Region boundaries for indexes were not being captured or stored correctly. This
becomes visible when RangePartitionFunction (RPF) is used in the compiler. RPF
is used by bulkload, which is used by CREATE INDEX statement to populated a new
index. Turning OFF the default HBASE_HASH2_PARTITIONING will also show this
problem. The CharType assertion has a different cause, it occurs since the
wrong column length is passed in when creating the partfunc for an index.
With the fix showddl has this output
CREATE TABLE TRAFODION.MYTEST.PARTSUPP
(
PS_PARTKEY INT NO DEFAULT NOT NULL NOT DROPPABLE NOT
SERIALIZED
, PS_SUPPKEY INT NO DEFAULT NOT NULL NOT DROPPABLE NOT
SERIALIZED
, PS_AVAILQTY INT DEFAULT NULL NOT SERIALIZED
, PS_SUPPLYCOST NUMERIC(12, 2) DEFAULT NULL NOT SERIALIZED
, PS_COMMENT VARCHAR(199) CHARACTER SET ISO88591
COLLATE DEFAULT DEFAULT NULL NOT SERIALIZED
, PRIMARY KEY (PS_PARTKEY ASC, PS_SUPPKEY ASC)
)
SALT USING 8 PARTITIONS
ATTRIBUTES ALIGNED FORMAT
;
CREATE INDEX MYIDX_PARTSUPP_2 ON TRAFODION.MYTEST.PARTSUPP
(
PS_PARTKEY ASC
, PS_SUPPKEY ASC
, PS_AVAILQTY ASC
, PS_SUPPLYCOST ASC
, PS_COMMENT ASC
)
ATTRIBUTES ALIGNED FORMAT
SALT LIKE TABLE
;
CREATE INDEX MYIDX_PARTSUPP_3 ON TRAFODION.MYTEST.PARTSUPP
(
PS_PARTKEY ASC
, PS_SUPPKEY ASC
, PS_AVAILQTY ASC
, PS_SUPPLYCOST ASC
, PS_COMMENT ASC
)
ATTRIBUTES ALIGNED FORMAT
SALT LIKE TABLE
;
CREATE UNIQUE INDEX MYIDX_PARTSUPP_6 ON TRAFODION.MYTEST.PARTSUPP
(
PS_PARTKEY ASC
, PS_SUPPKEY ASC
)
ATTRIBUTES ALIGNED FORMAT
;
> Create index sees error 2006 internal assertion (keyColOffset ==
> totalKeyLength)
> --------------------------------------------------------------------------------
>
> Key: TRAFODION-2674
> URL: https://issues.apache.org/jira/browse/TRAFODION-2674
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmp
> Affects Versions: any
> Reporter: Suresh Subbiah
> Assignee: Suresh Subbiah
> Fix For: 2.3-incubating
>
>
> Problem was discovered by Weishiun Tsai. This JIRA is being created on
> Weishiun's behalf.
> As shown below, the 2nd create index sees an internal error 2006 with
> assertion failure (keyColOffset == totalKeyLength) in file
> ../optimizer/NATable.cpp Once it occurs, all of the following create index
> starts to fail with the same error as well. Sometimes the assertion is
> different. It could also be *** ERROR[2006] Internal error: assertion failure
> (*bufLen >= vcLenHdrSize + valBufLen) in file ../common/CharType.cpp at line
> 1189.
> To reproduce
> create table partsupp (
> ps_partkey int not null not droppable,
> ps_suppkey int not null not droppable,
> ps_availqty int,
> ps_supplycost numeric(12, 2),
> ps_comment varchar(199),
> primary key (ps_partkey, ps_suppkey))
> salt using 8 partitions;
> create index myidx_partsupp_2 on partsupp (ps_partkey, ps_suppkey,
> ps_availqty, ps_supplycost, ps_comment) salt like table;
> create index myidx_partsupp_3 on partsupp (ps_partkey, ps_suppkey,
> ps_availqty, ps_supplycost, ps_comment) salt like table;
> create unique index myidx_partsupp_6 on partsupp (ps_partkey, ps_suppkey);
> showddl partsupp;
> Errors seen are
> >>create index myidx_partsupp_3 on partsupp (ps_partkey, ps_suppkey,
> >>ps_availqty, ps_supplycost, ps_comment) salt like table;
> *** ERROR[2006] Internal error: assertion failure (*bufLen >= vcLenHdrSize +
> valBufLen) in file ../common/CharType.cpp at line 1189.
> *** ERROR[8822] The statement was not prepared.
> *** ERROR[1081] Loading of index TRAFODION.SEABASE.MYIDX_PARTSUPP_3 failed
> unexpectedly.
> OR
> *** ERROR[2006] Internal error: assertion failure (keyColOffset ==
> totalKeyLength) in file ../optimizer/NATable.cpp at line 1750.
> *** ERROR[8822] The statement was not prepared.
> *** ERROR[1081] Loading of index TRAFODION.SEABASE.MYIDX_PARTSUPP_3 failed
> unexpectedly.
> --- SQL operation failed with errors.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)