[ 
https://issues.apache.org/jira/browse/TRAFODION-862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Suresh Subbiah closed TRAFODION-862.
------------------------------------

> LP Bug: 1408485 - Hybrid Query Cache causes a select query to core at 
> NAColumnArray::getColumn()
> ------------------------------------------------------------------------------------------------
>
>                 Key: TRAFODION-862
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-862
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>            Reporter: Weishiun Tsai
>            Assignee: Howard Qin
>            Priority: Blocker
>             Fix For: 1.0 (pre-incubation)
>
>
> The Hybrid Query Cache feature causes a select query to either return an 
> internal assertion error:
> ERROR[2006] Internal error: assertion failure (initLen < MAX_COLL_INDEX) in 
> file ../common/Collections.cpp at line 176.
> or to generate a sqlci core at NAColumnArray::getColumn().
> As shown in the following execution output, the same query runs fine if the 
> CQD hybrid_query_cache is set to 'off' in the first part of the execution.  
> But it either returns the internal error or cores once the CQD is turned back 
> to on (the default value for this CQD is ‘on’ right now).
> This is seen on the v0105_0830 build.  It is a regression introduced sometime 
> around the end of December.
> -------------------------------------------------------------------------------
> Here is the entire script to reproduce this problem:
> cqd hybrid_query_cache 'off';
> drop schema myschema cascade;
> create schema myschema;
> set schema myschema;
> Create Table BTA1P006
> (
> sbin0_4             Integer      not null,
> varchar0_uniq       VarChar(8)   not null,
> sdec0_100           Numeric(9,0) not null,
> sdec1_20            Numeric(5,0) not null,
> udec1_nuniq         Numeric(4,0) unsigned,
> char2_2             Char(2)      not null,
> sbin2_nuniq         Largeint     ,
> sdec2_500           Numeric(9,0) signed       not null,
> udec3_n100          Numeric(9,0) unsigned,
> ubin3_n2000         Numeric(4,0) unsigned,
> char3_4             Char(8)      not null,
> sdec4_n20           Numeric(4,0) ,
> sbin4_n1000         Smallint     ,
> char4_n10           Char(8)      ,
> char5_n20           Char(8)      ,
> sdec5_10            Numeric(9,0) signed       not null,
> ubin5_n500          Numeric(9,0) unsigned ,
> sbin6_nuniq         Largeint     ,
> sdec6_4             Numeric(4,0) signed       not null,
> char6_n100          Char(8)      ,
> sbin7_n20           Smallint     ,
> char7_500           Char(8)      not null,
> udec7_n10           Numeric(4,0) unsigned,
> ubin8_10            Numeric(4,0) unsigned not null,
> char8_n1000         Char(8)      ,
> sdec8_4             Numeric(9,0) unsigned not null,
> sdec9_uniq          Numeric(18,0) signed      not null,
> char9_100           Char(2)      not null,
> char10_nuniq        Char(8)      ,
> udec10_uniq         Numeric(9,0) unsigned     not null,
> udec11_2000         Numeric(9,0) unsigned     not null,
> sbin11_100          Integer      not null,
> char11_uniq         Char(8)      not null,
> ubin12_2            Numeric(4,0) unsigned     not null,
> sdec12_n1000        Numeric(18,0) signed ,
> char12_n2000        Char(8)      ,
> udec13_500          Numeric(9,0) unsigned     not null,
> char13_1000         Char(8)      not null,
> sbin14_1000         Integer      not null,
> udec14_100          Numeric(4,0) unsigned not null,
> char14_n500         Char(8)      ,
> sbinneg15_nuniq     Largeint     ,
> sdecneg15_100       Numeric(9,0) signed not null,
> char15_100          VarChar(8)   not null,
> ubin16_n10          Numeric(4,0) unsigned  ,
> sdec16_uniq         Numeric(18,0) signed   not null,
> char16_n20          Char(5)      ,
> sbin17_uniq         Largeint   not null,
> sdec17_nuniq        Numeric(18,0) ,
> char17_2            VarChar(7)    not null
> , primary key ( sdec9_uniq ASC
> , sdec0_100 DESC
> , sdec1_20 ASC )
> );
> Insert Into BTA1P006
> Values (
> -0, 'CJAAAAAC', -81, -2, 1973,
> 'AA', -702, -202, 81, 81, 'BAAAAAAA',
> -4, -724, NULL , 'BDAAAAAA', -3, 473, -- (5)
> -702, -2, 'CCAAAAAA', -1, 'ABAAEAAA', NULL ,
> 4, 'GFAAFAAA', 0, -201, 'BX',
> 'CJAAAAAC', 702, 81, -81, 'AAAAMAAB', -- (10)
> 0, -724, 'GFAAFAAA', 473, 'GEAAKAAA',
> -702, 2, 'CGAAAAAA', -4081, -81, 'BGAAAAAA', -- (15)
> NULL , -4724, 'AEAA', -76757, -1973, 'BAAA'
> ),(
> -1, 'AEAAJAAB', -44, -6, 60,
> 'AA', -3766, -266, 44, 344, 'AAAAAAAA',
> -9, -509,  NULL , 'AAAAAAAA', -0, 60, -- (5)
> -3766, -2, 'CQAAAAAA', -4, 'EAAAGAAA', NULL ,
> 9, 'DBAAAAAA', 1, -200, 'AK',
> 'AEAAJAAB', 3766, 344, -44, 'EKAACAAE', -- (10)
> 1, -509, 'DBAAAAAB', 60, 'EFAAIAAA',
> -766, 66, 'AGAAEAAA', -4344, -44, 'ATAAAAA', -- (15)
> NULL , -2509, 'BE   ', -37055, -60, 'AAAA'
> ),(
> -2, 'CCAAFAAC', -52, -12, 2086,
> 'AA', -772, -272, 52, 1552, 'AAAAAAAA',
> -18, -678, NULL , 'CBAAAAAA', -6, 86, -- (5)
> -772, -0, 'AWAAAAAA', -12, 'DAAAGAAA', NULL ,
> 8, 'DEAAMAAA', 2, -101, 'CL',
> 'CCAAFAAC', 772, 1552, -52, 'DKAADAAC', -- (10)
> 0, -678, 'DEAAMAAA', 86, 'AHAAGAAA',
> -772, 72, 'CEAAHAAA', -3552, -52, 'ACAAAAAA', -- (15)
> NULL , -3678, 'AB', -49700, -2086, 'AAAAAA'
> ),(
> -2, 'AIAALAAA', -89, -5, 812,
> 'BA', -2065, -65, 89, 389, 'BAAAAAAA',
> -14, -594, NULL , 'ACAAAAAA', -2, 312, -- (5)
> -2065, -1, 'BPAAAAAA', -9, 'CFAAEAAA', NULL ,
> 4, 'FKAAIAAA', 2, -100, 'AM',
> 'AIAALAAA', 2065, 389, -89, 'CCAAKAAE', -- (10)
> 0, -594, 'FKAAIAAA', 312, 'AJAAGAAA',
> -65, 65, 'ABAAEAAA', -2389, -89, 'BOAAAAA',
> NULL , -1594, 'AA', -15935, -812, 'AAAAAAA' -- (15)
> )
> ;
> select t.varchar0_uniq as t_varchar0_uniq
> , t.char2_2       as t_char2_2
> , t.char3_4       as t_char3_4
> , u.varchar0_uniq as u_varchar0_uniq
> , u.char2_2       as u_char2_2
> from BTA1P006 t, BTA1P006 u
> where (t.char2_2,  'AA', t.char3_4  ,'CJAAAAAC')
> =('AA' ,u.char2_2 , 'AAAAAAAA' , u.varchar0_uniq)
> order by 1, 2
> ;
> cqd hybrid_query_cache 'on';
> drop schema myschema cascade;
> create schema myschema;
> set schema myschema;
> Create Table BTA1P006
> (
> sbin0_4             Integer      not null,
> varchar0_uniq       VarChar(8)   not null,
> sdec0_100           Numeric(9,0) not null,
> sdec1_20            Numeric(5,0) not null,
> udec1_nuniq         Numeric(4,0) unsigned,
> char2_2             Char(2)      not null,
> sbin2_nuniq         Largeint     ,
> sdec2_500           Numeric(9,0) signed       not null,
> udec3_n100          Numeric(9,0) unsigned,
> ubin3_n2000         Numeric(4,0) unsigned,
> char3_4             Char(8)      not null,
> sdec4_n20           Numeric(4,0) ,
> sbin4_n1000         Smallint     ,
> char4_n10           Char(8)      ,
> char5_n20           Char(8)      ,
> sdec5_10            Numeric(9,0) signed       not null,
> ubin5_n500          Numeric(9,0) unsigned ,
> sbin6_nuniq         Largeint     ,
> sdec6_4             Numeric(4,0) signed       not null,
> char6_n100          Char(8)      ,
> sbin7_n20           Smallint     ,
> char7_500           Char(8)      not null,
> udec7_n10           Numeric(4,0) unsigned,
> ubin8_10            Numeric(4,0) unsigned not null,
> char8_n1000         Char(8)      ,
> sdec8_4             Numeric(9,0) unsigned not null,
> sdec9_uniq          Numeric(18,0) signed      not null,
> char9_100           Char(2)      not null,
> char10_nuniq        Char(8)      ,
> udec10_uniq         Numeric(9,0) unsigned     not null,
> udec11_2000         Numeric(9,0) unsigned     not null,
> sbin11_100          Integer      not null,
> char11_uniq         Char(8)      not null,
> ubin12_2            Numeric(4,0) unsigned     not null,
> sdec12_n1000        Numeric(18,0) signed ,
> char12_n2000        Char(8)      ,
> udec13_500          Numeric(9,0) unsigned     not null,
> char13_1000         Char(8)      not null,
> sbin14_1000         Integer      not null,
> udec14_100          Numeric(4,0) unsigned not null,
> char14_n500         Char(8)      ,
> sbinneg15_nuniq     Largeint     ,
> sdecneg15_100       Numeric(9,0) signed not null,
> char15_100          VarChar(8)   not null,
> ubin16_n10          Numeric(4,0) unsigned  ,
> sdec16_uniq         Numeric(18,0) signed   not null,
> char16_n20          Char(5)      ,
> sbin17_uniq         Largeint   not null,
> sdec17_nuniq        Numeric(18,0) ,
> char17_2            VarChar(7)    not null
> , primary key ( sdec9_uniq ASC
> , sdec0_100 DESC
> , sdec1_20 ASC )
> );
> Insert Into BTA1P006
> Values (
> -0, 'CJAAAAAC', -81, -2, 1973,
> 'AA', -702, -202, 81, 81, 'BAAAAAAA',
> -4, -724, NULL , 'BDAAAAAA', -3, 473, -- (5)
> -702, -2, 'CCAAAAAA', -1, 'ABAAEAAA', NULL ,
> 4, 'GFAAFAAA', 0, -201, 'BX',
> 'CJAAAAAC', 702, 81, -81, 'AAAAMAAB', -- (10)
> 0, -724, 'GFAAFAAA', 473, 'GEAAKAAA',
> -702, 2, 'CGAAAAAA', -4081, -81, 'BGAAAAAA', -- (15)
> NULL , -4724, 'AEAA', -76757, -1973, 'BAAA'
> ),(
> -1, 'AEAAJAAB', -44, -6, 60,
> 'AA', -3766, -266, 44, 344, 'AAAAAAAA',
> -9, -509,  NULL , 'AAAAAAAA', -0, 60, -- (5)
> -3766, -2, 'CQAAAAAA', -4, 'EAAAGAAA', NULL ,
> 9, 'DBAAAAAA', 1, -200, 'AK',
> 'AEAAJAAB', 3766, 344, -44, 'EKAACAAE', -- (10)
> 1, -509, 'DBAAAAAB', 60, 'EFAAIAAA',
> -766, 66, 'AGAAEAAA', -4344, -44, 'ATAAAAA', -- (15)
> NULL , -2509, 'BE   ', -37055, -60, 'AAAA'
> ),(
> -2, 'CCAAFAAC', -52, -12, 2086,
> 'AA', -772, -272, 52, 1552, 'AAAAAAAA',
> -18, -678, NULL , 'CBAAAAAA', -6, 86, -- (5)
> -772, -0, 'AWAAAAAA', -12, 'DAAAGAAA', NULL ,
> 8, 'DEAAMAAA', 2, -101, 'CL',
> 'CCAAFAAC', 772, 1552, -52, 'DKAADAAC', -- (10)
> 0, -678, 'DEAAMAAA', 86, 'AHAAGAAA',
> -772, 72, 'CEAAHAAA', -3552, -52, 'ACAAAAAA', -- (15)
> NULL , -3678, 'AB', -49700, -2086, 'AAAAAA'
> ),(
> -2, 'AIAALAAA', -89, -5, 812,
> 'BA', -2065, -65, 89, 389, 'BAAAAAAA',
> -14, -594, NULL , 'ACAAAAAA', -2, 312, -- (5)
> -2065, -1, 'BPAAAAAA', -9, 'CFAAEAAA', NULL ,
> 4, 'FKAAIAAA', 2, -100, 'AM',
> 'AIAALAAA', 2065, 389, -89, 'CCAAKAAE', -- (10)
> 0, -594, 'FKAAIAAA', 312, 'AJAAGAAA',
> -65, 65, 'ABAAEAAA', -2389, -89, 'BOAAAAA',
> NULL , -1594, 'AA', -15935, -812, 'AAAAAAA' -- (15)
> )
> ;
> select t.varchar0_uniq as t_varchar0_uniq
> , t.char2_2       as t_char2_2
> , t.char3_4       as t_char3_4
> , u.varchar0_uniq as u_varchar0_uniq
> , u.char2_2       as u_char2_2
> from BTA1P006 t, BTA1P006 u
> where (t.char2_2,  'AA', t.char3_4  ,'CJAAAAAC')
> =('AA' ,u.char2_2 , 'AAAAAAAA' , u.varchar0_uniq)
> order by 1, 2
> ;
> drop schema myschema cascade;
> -------------------------------------------------------------------------------
> Here is the execution output when it returns the internal error:
> >>cqd hybrid_query_cache 'off';
> --- SQL operation complete.
> >>drop schema myschema cascade;
> *** ERROR[1003] Schema TRAFODION.MYSCHEMA does not exist.
> --- SQL operation failed with errors.
> >>create schema myschema;
> --- SQL operation complete.
> >>set schema myschema;
> --- SQL operation complete.
> >>
> >>Create Table BTA1P006
> +>(
> +>sbin0_4             Integer      not null,
> +>varchar0_uniq       VarChar(8)   not null,
> +>sdec0_100           Numeric(9,0) not null,
> +>sdec1_20            Numeric(5,0) not null,
> +>udec1_nuniq         Numeric(4,0) unsigned,
> +>
> +>char2_2             Char(2)      not null,
> +>sbin2_nuniq         Largeint     ,
> +>sdec2_500           Numeric(9,0) signed       not null,
> +>udec3_n100          Numeric(9,0) unsigned,
> +>ubin3_n2000         Numeric(4,0) unsigned,
> +>char3_4             Char(8)      not null,
> +>
> +>sdec4_n20           Numeric(4,0) ,
> +>sbin4_n1000         Smallint     ,
> +>char4_n10           Char(8)      ,
> +>char5_n20           Char(8)      ,
> +>sdec5_10            Numeric(9,0) signed       not null,
> +>ubin5_n500          Numeric(9,0) unsigned ,
> +>
> +>sbin6_nuniq         Largeint     ,
> +>sdec6_4             Numeric(4,0) signed       not null,
> +>char6_n100          Char(8)      ,
> +>sbin7_n20           Smallint     ,
> +>char7_500           Char(8)      not null,
> +>udec7_n10           Numeric(4,0) unsigned,
> +>
> +>ubin8_10            Numeric(4,0) unsigned not null,
> +>char8_n1000         Char(8)      ,
> +>sdec8_4             Numeric(9,0) unsigned not null,
> +>sdec9_uniq          Numeric(18,0) signed      not null,
> +>char9_100           Char(2)      not null,
> +>
> +>char10_nuniq        Char(8)      ,
> +>udec10_uniq         Numeric(9,0) unsigned     not null,
> +>udec11_2000         Numeric(9,0) unsigned     not null,
> +>sbin11_100          Integer      not null,
> +>char11_uniq         Char(8)      not null,
> +>
> +>ubin12_2            Numeric(4,0) unsigned     not null,
> +>sdec12_n1000        Numeric(18,0) signed ,
> +>char12_n2000        Char(8)      ,
> +>udec13_500          Numeric(9,0) unsigned     not null,
> +>
> +>char13_1000         Char(8)      not null,
> +>
> +>sbin14_1000         Integer      not null,
> +>udec14_100          Numeric(4,0) unsigned not null,
> +>char14_n500         Char(8)      ,
> +>sbinneg15_nuniq     Largeint     ,
> +>sdecneg15_100       Numeric(9,0) signed not null,
> +>char15_100          VarChar(8)   not null,
> +>
> +>ubin16_n10          Numeric(4,0) unsigned  ,
> +>sdec16_uniq         Numeric(18,0) signed   not null,
> +>char16_n20          Char(5)      ,
> +>sbin17_uniq         Largeint   not null,
> +>sdec17_nuniq        Numeric(18,0) ,
> +>char17_2            VarChar(7)    not null
> +>
> +>, primary key ( sdec9_uniq ASC
> +>, sdec0_100 DESC
> +>, sdec1_20 ASC )
> +>);
> --- SQL operation complete.
> >>
> >>Insert Into BTA1P006
> +>Values (
> +>-0, 'CJAAAAAC', -81, -2, 1973,
> +>'AA', -702, -202, 81, 81, 'BAAAAAAA',
> +>-4, -724, NULL , 'BDAAAAAA', -3, 473, -- (5)
> +>-702, -2, 'CCAAAAAA', -1, 'ABAAEAAA', NULL ,
> +>4, 'GFAAFAAA', 0, -201, 'BX',
> +>'CJAAAAAC', 702, 81, -81, 'AAAAMAAB', -- (10)
> +>0, -724, 'GFAAFAAA', 473, 'GEAAKAAA',
> +>-702, 2, 'CGAAAAAA', -4081, -81, 'BGAAAAAA', -- (15)
> +>NULL , -4724, 'AEAA', -76757, -1973, 'BAAA'
> +>),(
> +>-1, 'AEAAJAAB', -44, -6, 60,
> +>'AA', -3766, -266, 44, 344, 'AAAAAAAA',
> +>-9, -509,  NULL , 'AAAAAAAA', -0, 60, -- (5)
> +>-3766, -2, 'CQAAAAAA', -4, 'EAAAGAAA', NULL ,
> +>9, 'DBAAAAAA', 1, -200, 'AK',
> +>'AEAAJAAB', 3766, 344, -44, 'EKAACAAE', -- (10)
> +>1, -509, 'DBAAAAAB', 60, 'EFAAIAAA',
> +>-766, 66, 'AGAAEAAA', -4344, -44, 'ATAAAAA', -- (15)
> +>NULL , -2509, 'BE   ', -37055, -60, 'AAAA'
> +>),(
> +>-2, 'CCAAFAAC', -52, -12, 2086,
> +>'AA', -772, -272, 52, 1552, 'AAAAAAAA',
> +>-18, -678, NULL , 'CBAAAAAA', -6, 86, -- (5)
> +>-772, -0, 'AWAAAAAA', -12, 'DAAAGAAA', NULL ,
> +>8, 'DEAAMAAA', 2, -101, 'CL',
> +>'CCAAFAAC', 772, 1552, -52, 'DKAADAAC', -- (10)
> +>0, -678, 'DEAAMAAA', 86, 'AHAAGAAA',
> +>-772, 72, 'CEAAHAAA', -3552, -52, 'ACAAAAAA', -- (15)
> +>NULL , -3678, 'AB', -49700, -2086, 'AAAAAA'
> +>),(
> +>-2, 'AIAALAAA', -89, -5, 812,
> +>'BA', -2065, -65, 89, 389, 'BAAAAAAA',
> +>-14, -594, NULL , 'ACAAAAAA', -2, 312, -- (5)
> +>-2065, -1, 'BPAAAAAA', -9, 'CFAAEAAA', NULL ,
> +>4, 'FKAAIAAA', 2, -100, 'AM',
> +>'AIAALAAA', 2065, 389, -89, 'CCAAKAAE', -- (10)
> +>0, -594, 'FKAAIAAA', 312, 'AJAAGAAA',
> +>-65, 65, 'ABAAEAAA', -2389, -89, 'BOAAAAA',
> +>NULL , -1594, 'AA', -15935, -812, 'AAAAAAA' -- (15)
> +>)
> +>;
> --- 4 row(s) inserted.
> >>
> >>select t.varchar0_uniq as t_varchar0_uniq
> +>, t.char2_2       as t_char2_2
> +>, t.char3_4       as t_char3_4
> +>, u.varchar0_uniq as u_varchar0_uniq
> +>, u.char2_2       as u_char2_2
> +>from BTA1P006 t, BTA1P006 u
> +>where (t.char2_2,  'AA', t.char3_4  ,'CJAAAAAC')
> +>=('AA' ,u.char2_2 , 'AAAAAAAA' , u.varchar0_uniq)
> +>order by 1, 2
> +>;
> T_VARCHAR0_UNIQ  T_CHAR2_2  T_CHAR3_4  U_VARCHAR0_UNIQ  U_CHAR2_2
> ---------------  ---------  ---------  ---------------  ---------
> AEAAJAAB         AA         AAAAAAAA   CJAAAAAC         AA
> CCAAFAAC         AA         AAAAAAAA   CJAAAAAC         AA
> --- 2 row(s) selected.
> >>
> >>cqd hybrid_query_cache 'on';
> --- SQL operation complete.
> >>drop schema myschema cascade;
> --- SQL operation complete.
> >>create schema myschema;
> --- SQL operation complete.
> >>set schema myschema;
> --- SQL operation complete.
> >>
> >>Create Table BTA1P006
> +>(
> +>sbin0_4             Integer      not null,
> +>varchar0_uniq       VarChar(8)   not null,
> +>sdec0_100           Numeric(9,0) not null,
> +>sdec1_20            Numeric(5,0) not null,
> +>udec1_nuniq         Numeric(4,0) unsigned,
> +>
> +>char2_2             Char(2)      not null,
> +>sbin2_nuniq         Largeint     ,
> +>sdec2_500           Numeric(9,0) signed       not null,
> +>udec3_n100          Numeric(9,0) unsigned,
> +>ubin3_n2000         Numeric(4,0) unsigned,
> +>char3_4             Char(8)      not null,
> +>
> +>sdec4_n20           Numeric(4,0) ,
> +>sbin4_n1000         Smallint     ,
> +>char4_n10           Char(8)      ,
> +>char5_n20           Char(8)      ,
> +>sdec5_10            Numeric(9,0) signed       not null,
> +>ubin5_n500          Numeric(9,0) unsigned ,
> +>
> +>sbin6_nuniq         Largeint     ,
> +>sdec6_4             Numeric(4,0) signed       not null,
> +>char6_n100          Char(8)      ,
> +>sbin7_n20           Smallint     ,
> +>char7_500           Char(8)      not null,
> +>udec7_n10           Numeric(4,0) unsigned,
> +>
> +>ubin8_10            Numeric(4,0) unsigned not null,
> +>char8_n1000         Char(8)      ,
> +>sdec8_4             Numeric(9,0) unsigned not null,
> +>sdec9_uniq          Numeric(18,0) signed      not null,
> +>char9_100           Char(2)      not null,
> +>
> +>char10_nuniq        Char(8)      ,
> +>udec10_uniq         Numeric(9,0) unsigned     not null,
> +>udec11_2000         Numeric(9,0) unsigned     not null,
> +>sbin11_100          Integer      not null,
> +>char11_uniq         Char(8)      not null,
> +>
> +>ubin12_2            Numeric(4,0) unsigned     not null,
> +>sdec12_n1000        Numeric(18,0) signed ,
> +>char12_n2000        Char(8)      ,
> +>udec13_500          Numeric(9,0) unsigned     not null,
> +>
> +>char13_1000         Char(8)      not null,
> +>
> +>sbin14_1000         Integer      not null,
> +>udec14_100          Numeric(4,0) unsigned not null,
> +>char14_n500         Char(8)      ,
> +>sbinneg15_nuniq     Largeint     ,
> +>sdecneg15_100       Numeric(9,0) signed not null,
> +>char15_100          VarChar(8)   not null,
> +>
> +>ubin16_n10          Numeric(4,0) unsigned  ,
> +>sdec16_uniq         Numeric(18,0) signed   not null,
> +>char16_n20          Char(5)      ,
> +>sbin17_uniq         Largeint   not null,
> +>sdec17_nuniq        Numeric(18,0) ,
> +>char17_2            VarChar(7)    not null
> +>
> +>, primary key ( sdec9_uniq ASC
> +>, sdec0_100 DESC
> +>, sdec1_20 ASC )
> +>);
> --- SQL operation complete.
> >>
> >>Insert Into BTA1P006
> +>Values (
> +>-0, 'CJAAAAAC', -81, -2, 1973,
> +>'AA', -702, -202, 81, 81, 'BAAAAAAA',
> +>-4, -724, NULL , 'BDAAAAAA', -3, 473, -- (5)
> +>-702, -2, 'CCAAAAAA', -1, 'ABAAEAAA', NULL ,
> +>4, 'GFAAFAAA', 0, -201, 'BX',
> +>'CJAAAAAC', 702, 81, -81, 'AAAAMAAB', -- (10)
> +>0, -724, 'GFAAFAAA', 473, 'GEAAKAAA',
> +>-702, 2, 'CGAAAAAA', -4081, -81, 'BGAAAAAA', -- (15)
> +>NULL , -4724, 'AEAA', -76757, -1973, 'BAAA'
> +>),(
> +>-1, 'AEAAJAAB', -44, -6, 60,
> +>'AA', -3766, -266, 44, 344, 'AAAAAAAA',
> +>-9, -509,  NULL , 'AAAAAAAA', -0, 60, -- (5)
> +>-3766, -2, 'CQAAAAAA', -4, 'EAAAGAAA', NULL ,
> +>9, 'DBAAAAAA', 1, -200, 'AK',
> +>'AEAAJAAB', 3766, 344, -44, 'EKAACAAE', -- (10)
> +>1, -509, 'DBAAAAAB', 60, 'EFAAIAAA',
> +>-766, 66, 'AGAAEAAA', -4344, -44, 'ATAAAAA', -- (15)
> +>NULL , -2509, 'BE   ', -37055, -60, 'AAAA'
> +>),(
> +>-2, 'CCAAFAAC', -52, -12, 2086,
> +>'AA', -772, -272, 52, 1552, 'AAAAAAAA',
> +>-18, -678, NULL , 'CBAAAAAA', -6, 86, -- (5)
> +>-772, -0, 'AWAAAAAA', -12, 'DAAAGAAA', NULL ,
> +>8, 'DEAAMAAA', 2, -101, 'CL',
> +>'CCAAFAAC', 772, 1552, -52, 'DKAADAAC', -- (10)
> +>0, -678, 'DEAAMAAA', 86, 'AHAAGAAA',
> +>-772, 72, 'CEAAHAAA', -3552, -52, 'ACAAAAAA', -- (15)
> +>NULL , -3678, 'AB', -49700, -2086, 'AAAAAA'
> +>),(
> +>-2, 'AIAALAAA', -89, -5, 812,
> +>'BA', -2065, -65, 89, 389, 'BAAAAAAA',
> +>-14, -594, NULL , 'ACAAAAAA', -2, 312, -- (5)
> +>-2065, -1, 'BPAAAAAA', -9, 'CFAAEAAA', NULL ,
> +>4, 'FKAAIAAA', 2, -100, 'AM',
> +>'AIAALAAA', 2065, 389, -89, 'CCAAKAAE', -- (10)
> +>0, -594, 'FKAAIAAA', 312, 'AJAAGAAA',
> +>-65, 65, 'ABAAEAAA', -2389, -89, 'BOAAAAA',
> +>NULL , -1594, 'AA', -15935, -812, 'AAAAAAA' -- (15)
> +>)
> +>;
> --- 4 row(s) inserted.
> >>
> >>select t.varchar0_uniq as t_varchar0_uniq
> +>, t.char2_2       as t_char2_2
> +>, t.char3_4       as t_char3_4
> +>, u.varchar0_uniq as u_varchar0_uniq
> +>, u.char2_2       as u_char2_2
> +>from BTA1P006 t, BTA1P006 u
> +>where (t.char2_2,  'AA', t.char3_4  ,'CJAAAAAC')
> +>=('AA' ,u.char2_2 , 'AAAAAAAA' , u.varchar0_uniq)
> +>order by 1, 2
> +>;
> *** ERROR[2006] Internal error: assertion failure (initLen < MAX_COLL_INDEX) 
> in file ../common/Collections.cpp at line 176.
> *** ERROR[8822] The statement was not prepared.
> >>
> >>drop schema myschema cascade;
> --- SQL operation complete.
> -------------------------------------------------------------------------------
> Here is the stack trace of the sqlci core when it produces a core:
> (gdb) bt
> #0  0x00007ffff57108a5 in raise () from /lib64/libc.so.6
> #1  0x00007ffff571200d in abort () from /lib64/libc.so.6
> #2  0x00007ffff6f04a55 in os::abort(bool) ()
>    from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
> #3  0x00007ffff7084f87 in VMError::report_and_die() ()
>    from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
> #4  0x00007ffff708550e in crash_handler(int, siginfo*, void*) ()
>    from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
> #5  0x00007ffff6f03bf2 in os::Linux::chained_handler(int, siginfo*, void*) ()
>    from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
> #6  0x00007ffff6f098d6 in JVM_handle_linux_signal ()
>    from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
> #7  <signal handler called>
> #8  0x00007ffff6f24ce9 in ParallelScavengeHeap::block_start(void const*) const
>     () from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
> #9  0x00007ffff6efc2b0 in os::print_location(outputStream*, long, bool) ()
>    from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
> #10 0x00007ffff6f092fb in os::print_register_info(outputStream*, void*) ()
>    from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
> #11 0x00007ffff708357c in VMError::report(outputStream*) ()
>    from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
> #12 0x00007ffff7084b8a in VMError::report_and_die() ()
>    from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
> #13 0x00007ffff6f0996f in JVM_handle_linux_signal ()
>    from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
> #14 <signal handler called>
> #15 0x00007fffee8b0f03 in NAColumnArray::getColumn (this=0x7fffd51288c0,
>     colName=0x7fffeebdf894 "SYSKEY") at ../optimizer/NAColumn.cpp:704
> #16 0x00007fffee8c0e88 in NATable::markColumnsForHistograms (
>     this=0x7fffd5128618) at ../optimizer/NATable.cpp:7519
> #17 0x00007fffee8d8eaf in NATable::getStatistics (this=0x7fffd5128618)
>     at ../optimizer/NATable.cpp:5901
> #18 0x00007fffeeb7870e in TableDesc::getTableColStats (this=0x7fffd5119988)
>     at ../optimizer/TableDesc.cpp:382
> #19 0x00007ffff0047bff in tableColStats (this=0x7fffd5162618, base=
>     0x7fffd5119810, cParameter=0x7fffd3d2bf50,
>     hqcConstPos=<value optimized out>) at ../optimizer/TableDesc.h:130
> #20 HQCParseKey::bindConstant2SQC (this=0x7fffd5162618, base=0x7fffd5119810,
>     cParameter=0x7fffd3d2bf50, hqcConstPos=<value optimized out>)
>     at ../sqlcomp/QCache.cpp:3300
> #21 0x00007fffee7a29be in bindConstant2SQC (this=0x7fffd511a4d8, cwa=...,
>     bindWA=..., other=0x7fffd511bbf8) at ../optimizer/CacheWA.h:219
> #22 ItemList::normalizeListForCache (this=0x7fffd511a4d8, cwa=..., bindWA=...,
>     other=0x7fffd511bbf8) at ../optimizer/ItemCache.cpp:1125
> #23 0x00007fffee7a2a2e in ItemList::normalizeListForCache (
>     this=0x7fffd511a610, cwa=..., bindWA=..., other=0x7fffd511bd30)
>     at ../optimizer/ItemCache.cpp:1129
> #24 0x00007fffee7a3aff in BiRelat::normalizeForCache (this=0x7fffd511be68,
>     cwa=..., bindWA=...) at ../optimizer/ItemCache.cpp:415
> #25 0x00007fffeebb0b34 in ValueIdSet::normalizeForCache (this=0x7fffd5118950,
>     cwa=..., bindWA=...) at ../optimizer/ValueDesc.cpp:6165
> #26 0x00007fffeea4f35f in RelExpr::normalizeForCache (this=0x7fffd5118918,
>     cwa=..., bindWA=...) at ../optimizer/RelCache.cpp:906
> #27 0x00007fffeea4f272 in RelExpr::normalizeKidsForCache (this=0x7fffd511c0b8,
>     cachewa=..., bindWA=...) at ../optimizer/RelCache.cpp:924
> #28 0x00007fffeea4f2f0 in RelExpr::normalizeForCache (this=0x7fffd511c0b8,
>     cwa=..., bindWA=...) at ../optimizer/RelCache.cpp:900
> #29 0x00007fffeea4f49e in RelRoot::normalizeForCache (this=0x7fffd511c0b8,
>     cwa=..., bindWA=...) at ../optimizer/RelCache.cpp:1119
> #30 0x00007fffeff3415d in CmpMain::compileFromCache (this=0x7fffffff4c90,
>     sText=0x7fffd3df59b8 "select t.varchar0_uniq as t_varchar0_uniq , 
> t.char2_2       as t_char2_2 , t.char3_4       as t_char3_4 , u.varchar0_uniq 
> as u_varchar0_uniq , u.char2_2       as u_char2_2 from BTA1P006 t, BTA1P006 u 
> "...,
>     charset=15, queryExpr=0x7fffd511c0b8, bindWA=..., cachewa=...,
>     plan=0x7fffd516d688, pLen=0x7fffd516d680, heap=0x7fffe6a47c08, op=3004,
>     bPatchOK=@0x7fffffff3d9c, begTime=...) at ../sqlcomp/CmpMain.cpp:1559
> #31 0x00007fffeff3af23 in CmpMain::compile (this=0x7fffffff4c90,
>     input_str=0x7fffd3df59b8 "select t.varchar0_uniq as t_varchar0_uniq , 
> t.char2_2       as t_char2_2 , t.char3_4       as t_char3_4 , u.varchar0_uniq 
> as u_varchar0_uniq , u.char2_2       as u_char2_2 from BTA1P006 t, BTA1P006 u 
> "...,
>     charset=15, queryExpr=@0x7fffffff4bc8, gen_code=0x7fffd516d688,
>     gen_code_len=0x7fffd516d680, heap=0x7fffe6a47c08, phase=CmpMain::END,
>     fragmentDir=0x7fffffff4de8, op=3004, useQueryCache=1,
>     cacheable=0x7fffffff4bd8, begTime=0x7fffffff4bb0, shouldLog=0)
>     at ../sqlcomp/CmpMain.cpp:2161
> #32 0x00007fffeff3d19c in CmpMain::sqlcomp (this=0x7fffffff4c90,
>     input_str=0x7fffd3df59b8 "select t.varchar0_uniq as t_varchar0_uniq , 
> t.char2_2       as t_char2_2 , t.char3_4       as t_char3_4 , u.varchar0_uniq 
> as u_varchar0_uniq , u.char2_2       as u_char2_2 from BTA1P006 t, BTA1P006 u 
> "...,
>     charset=15, queryExpr=@0x7fffffff4bc8, gen_code=0x7fffd516d688,
>     gen_code_len=0x7fffd516d680, heap=0x7fffe6a47c08, phase=CmpMain::END,
>     fragmentDir=0x7fffffff4de8, op=3004, useQueryCache=1,
>     cacheable=0x7fffffff4bd8, begTime=0x7fffffff4bb0, shouldLog=0)
>     at ../sqlcomp/CmpMain.cpp:1732
> #33 0x00007fffeff3e4a0 in CmpMain::sqlcomp (this=0x7fffffff4c90, input=...,
>     gen_code=0x7fffd516d688, gen_code_len=0x7fffd516d680, heap=0x7fffe6a47c08,
>     phase=CmpMain::END, fragmentDir=0x7fffffff4de8, op=3004)
>     at ../sqlcomp/CmpMain.cpp:817
> #34 0x00007ffff4abd288 in CmpStatement::process (this=0x7fffd510f808,
>     sqltext=<value optimized out>) at ../arkcmp/CmpStatement.cpp:508
> #35 0x00007ffff4ab0713 in CmpContext::compileDirect (this=0x7fffe5eb0090,
>     data=0x7fffe6a56e70 "\200", data_len=448, outHeap=0x7ffff7ee1128,
>     charset=15, op=CmpMessageObj::SQLTEXT_COMPILE, gen_code=@0x7fffffff5370,
>     gen_code_len=@0x7fffffff5378, parserFlags=0, diagsArea=0x7fffe6a57038)
>     at ../arkcmp/CmpContext.cpp:697
> #36 0x00007ffff549ae07 in CliStatement::prepare2 (this=0x7fffe6a3bbd0,
>     source=0x7fffe6a99da0 "select t.varchar0_uniq as t_varchar0_uniq , 
> t.char2_2       as t_char2_2 , t.char3_4       as t_char3_4 , u.varchar0_uniq 
> as u_varchar0_uniq , u.char2_2       as u_char2_2 from BTA1P006 t, BTA1P006 u 
> "...,
>     diagsArea=..., passed_gen_code=<value optimized out>,
>     passed_gen_code_len=4159574312, charset=15, unpackTdbs=1, cliFlags=129)
>     at ../cli/Statement.cpp:1827
> #37 0x00007ffff549b256 in CliStatement::prepare (this=0x7fffe6a3bbd0,
>     source=0x7fffe6a99da0 "select t.varchar0_uniq as t_varchar0_uniq , 
> t.char2_2       as t_char2_2 , t.char3_4       as t_char3_4 , u.varchar0_uniq 
> as u_varchar0_uniq , u.char2_2       as u_char2_2 from BTA1P006 t, BTA1P006 u 
> "...,
>     diagsArea=..., passed_gen_code=<value optimized out>,
>     passed_gen_code_len=<value optimized out>, charset=<value optimized out>,
>     unpackTdbs=1, cliFlags=129) at ../cli/Statement.cpp:1420
> #38 0x00007ffff544a6b4 in SQLCLI_Prepare2 (cliGlobals=0xb7ded0,
>     statement_id=0x2039a20, sql_source=0x2013220, gencode_ptr=0x0,
>     gencode_len=0, ret_gencode_len=0x0, query_cost_info=0x7fffffff68d0,
>     query_comp_stats_info=0x7fffffff5640, uniqueStmtId=<value optimized out>,
>     uniqueStmtIdLen=0x7fffffff6988, flags=129) at ../cli/Cli.cpp:5914
> #39 0x00007ffff54a8c10 in SQL_EXEC_Prepare2 (statement_id=0x2039a20,
>     sql_source=0x2013220, gencode_ptr=0x0, gencode_len=0, ret_gencode_len=0x0,
>     query_cost_info=0x7fffffff68d0, comp_stats_info=0x7fffffff5640,
>     uniqueStmtId=0x7fffffff6740 "    ", uniqueStmtIdLen=0x7fffffff6988,
>     flags=129) at ../cli/CliExtern.cpp:4985
> #40 0x00007ffff77afdef in SqlCmd::do_prepare (sqlci_env=0xb7cc80,
>     prep_stmt=0x20413c0,
>     sqlStmt=0xf81860 "select t.varchar0_uniq as t_varchar0_uniq , t.char2_2   
>     as t_char2_2 , t.char3_4       as t_char3_4 , u.varchar0_uniq as 
> u_varchar0_uniq , u.char2_2       as u_char2_2 from BTA1P006 t, BTA1P006 u 
> "...,
>     resetLastExecStmt=1, rsIndex=-39104, prepcode=0x7fffffff6a5c,
>     statisticsType=0x7fffffff6a58) at ../sqlci/SqlCmd.cpp:893
> #41 0x00007ffff77af1f0 in DML::process (this=0x2054eb0, sqlci_env=0xb7cc80)
>     at ../sqlci/SqlCmd.cpp:2803
> #42 0x00007ffff7795ad4 in Obey::process (this=0x1fc7050,
>     sqlci_env=<value optimized out>) at ../sqlci/Obey.cpp:264
> #43 0x00007ffff779bfe6 in SqlciEnv::executeCommands (this=0xb7cc80,
>     input_stmt=@0x7fffffff6c48) at ../sqlci/SqlciEnv.cpp:847
> #44 0x00007ffff779e08b in SqlciEnv::run (this=0xb7cc80)
>     at ../sqlci/SqlciEnv.cpp:656
> #45 0x0000000000401ad9 in main (argc=1, argv=0x7fffffff6e18)
>     at ../bin/SqlciMain.cpp:328



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to