Hybrid Query Cache causes a select query to core at NAColumnArray::getColumn()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
Fix Released
|
Critical
|
Howard Qin |
Bug Description
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/
or to generate a sqlci core at NAColumnArray:
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/
*** 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/
#3 0x00007ffff7084f87 in VMError:
from /usr/java/
#4 0x00007ffff708550e in crash_handler(int, siginfo*, void*) ()
from /usr/java/
#5 0x00007ffff6f03bf2 in os::Linux:
from /usr/java/
#6 0x00007ffff6f098d6 in JVM_handle_
from /usr/java/
#7 <signal handler called>
#8 0x00007ffff6f24ce9 in ParallelScaveng
() from /usr/java/
#9 0x00007ffff6efc2b0 in os::print_
from /usr/java/
#10 0x00007ffff6f092fb in os::print_
from /usr/java/
#11 0x00007ffff708357c in VMError:
from /usr/java/
#12 0x00007ffff7084b8a in VMError:
from /usr/java/
#13 0x00007ffff6f0996f in JVM_handle_
from /usr/java/
#14 <signal handler called>
#15 0x00007fffee8b0f03 in NAColumnArray:
colName=
#16 0x00007fffee8c0e88 in NATable:
this=
#17 0x00007fffee8d8eaf in NATable:
at ../optimizer/
#18 0x00007fffeeb7870e in TableDesc:
at ../optimizer/
#19 0x00007ffff0047bff in tableColStats (this=0x7fffd51
0x7fffd5119810, cParameter=
hqcConstPos
#20 HQCParseKey:
cParameter=
at ../sqlcomp/
#21 0x00007fffee7a29be in bindConstant2SQC (this=0x7fffd51
bindWA=..., other=0x7fffd51
#22 ItemList:
other=
#23 0x00007fffee7a2a2e in ItemList:
this=
at ../optimizer/
#24 0x00007fffee7a3aff in BiRelat:
cwa=..., bindWA=...) at ../optimizer/
#25 0x00007fffeebb0b34 in ValueIdSet:
cwa=..., bindWA=...) at ../optimizer/
#26 0x00007fffeea4f35f in RelExpr:
cwa=..., bindWA=...) at ../optimizer/
#27 0x00007fffeea4f272 in RelExpr:
cachewa=..., bindWA=...) at ../optimizer/
#28 0x00007fffeea4f2f0 in RelExpr:
cwa=..., bindWA=...) at ../optimizer/
#29 0x00007fffeea4f49e in RelRoot:
cwa=..., bindWA=...) at ../optimizer/
#30 0x00007fffeff3415d in CmpMain:
sText=
charset=15, queryExpr=
plan=
bPatchOK=
#31 0x00007fffeff3af23 in CmpMain::compile (this=0x7ffffff
input_
charset=15, queryExpr=
gen_
fragmentDir
cacheable=
at ../sqlcomp/
#32 0x00007fffeff3d19c in CmpMain::sqlcomp (this=0x7ffffff
input_
charset=15, queryExpr=
gen_
fragmentDir
cacheable=
at ../sqlcomp/
#33 0x00007fffeff3e4a0 in CmpMain::sqlcomp (this=0x7ffffff
gen_
phase=
at ../sqlcomp/
#34 0x00007ffff4abd288 in CmpStatement:
sqltext=<value optimized out>) at ../arkcmp/
#35 0x00007ffff4ab0713 in CmpContext:
data=
charset=15, op=CmpMessageOb
gen_
at ../arkcmp/
#36 0x00007ffff549ae07 in CliStatement:
source=
diagsArea=..., passed_
passed_
at ../cli/
#37 0x00007ffff549b256 in CliStatement:
source=
diagsArea=..., passed_
passed_
unpackTdbs=1, cliFlags=129) at ../cli/
#38 0x00007ffff544a6b4 in SQLCLI_Prepare2 (cliGlobals=
statement_
gencode_len=0, ret_gencode_
query_
uniqueStmtI
#39 0x00007ffff54a8c10 in SQL_EXEC_Prepare2 (statement_
sql_
query_
uniqueStmtI
flags=129) at ../cli/
#40 0x00007ffff77afdef in SqlCmd::do_prepare (sqlci_
prep_
sqlStmt=
resetLastEx
statisticsT
#41 0x00007ffff77af1f0 in DML::process (this=0x2054eb0, sqlci_env=0xb7cc80)
at ../sqlci/
#42 0x00007ffff7795ad4 in Obey::process (this=0x1fc7050,
sqlci_
#43 0x00007ffff779bfe6 in SqlciEnv:
input_
#44 0x00007ffff779e08b in SqlciEnv::run (this=0xb7cc80)
at ../sqlci/
#45 0x0000000000401ad9 in main (argc=1, argv=0x7fffffff
at ../bin/
Changed in trafodion: | |
assignee: | nobody → Howard Qin (hao-qin) |
Changed in trafodion: | |
status: | New → In Progress |
Changed in trafodion: | |
status: | In Progress → Fix Committed |
Verified on the v0110 build installed on a cluster. This problem is now fixed:
>>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...