Description
The following test script demonstrates the problem:
– This script creates a table with varchar values longer than 256 characters.
– It tnen demonstrates issues with incremental stats on such values.
?section setup
drop table if exists testbigcol;
create table testbigcol
( a int not null,
b varchar(500),
primary key (a) )
salt using 4 partitions;
insert into testbigcol values (1,'axq'),(2,'bxw');
insert into testbigcol select x.a + 2 * y.a, x.b || y.b from testbigcol x cross join testbigcol y;
insert into testbigcol select x.a + 6 * y.a, x.b || y.b from testbigcol x cross join testbigcol y;
insert into testbigcol select x.a + 42 * y.a, x.b || y.b from testbigcol x cross join testbigcol y;
– 0 1 2 3 4 5
– 012345678901234567890123456789012345678901234567890123
update testbigcol set b = b || ' and now for something completely different 0123456789'
where mod(a,2) = 1;
update testbigcol set b = b || ' that was fun, and now for something completely different 0123456789'
where mod(a,3) = 1;
update testbigcol set b = b || ' and then there was a great hue and cry and now for something completely different 0123456789'
where mod(a,5) = 1;
update testbigcol set b = b || ' and we can do all sorts of things to make these strings longer, and now for something completely different 0123456789'
where mod(a,7) = 1;
?section testit
update statistics for table testbigcol on every column sample random 100 percent persistent;
showstats for table testbigcol on existing columns detail;
update testbigcol set b = 'c' || b where a > 1700;
update statistics for table testbigcol on existing columns incremental where a > 1700;
showstats for table testbigcol on existing columns detail;
When run, the last UPDATE STATISTICS command fails as follows:
>>update statistics for table testbigcol on existing columns incremental where a > 1700;
-
-
- ERROR[9200] UPDATE STATISTICS for table TRAFODION.SEABASE.TESTBIGCOL encountered an error (8402) from statement IUS data set I creation.
-
-
-
- ERROR[8402] A string overflow occurred during the evaluation of a character expression. Conversion of Source Type:VARCHAR(REC_BYTE_V_ASCII,290 BYTES,ISO88591) Source Value:caxqbxwbxwaxqaxqbxwbxwbxw and now for something completely different 0123456789 and then there was a great hue and cry and now for something completely different 0123456789 and we can do all sorts of to Target Type:VARCHAR(REC_BYTE_V_ASCII,256 BYTES,ISO88591).
-
— SQL operation failed with errors.
Attachments
Issue Links
- links to