insert/select from column values greater than 32K cause crash

Bug #1392914 reported by Anoop Sharma
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Trafodion
Fix Committed
High
Anoop Sharma

Bug Description

This sequence will crash sqlci:

create table t (a char(40000));
insert into t values ('a'); -- this will blankpad and create a 40K long row
select char_length(a) from t; -- once insert issue is fixed, select from that table will crash.

Internally, length used to pass values between executor and hbase through JNI is using
a short field to represent length. That should be changed to long(4 bytes).

Tags: sql-exe
Revision history for this message
Anoop Sharma (anoop-sharma) wrote :

Once addition to this.
In previous product, there was a 32K block limit which cause rows to not exceed that limit.
A short field to represent length was ok for that.

In Trafodion, we increased this limit to a larger number (currently 100K but can be increased).
This allows larger unstructured string values to be stored in this column. It is an inlined blob
implementation.

This change is needed to support larger values to be inserted/selected from trafodion
as well as native hbase tables.

Changed in trafodion:
assignee: Selvaganesan Govindarajan (selva-ganesan) → Anoop Sharma (anoop-sharma)
Revision history for this message
Anoop Sharma (anoop-sharma) wrote :

This issue has been fixed.

By default, a trafodion table char/varchar column can go upto 200K in size.
Internally, a 4-byte integer is used to pass in values between sql and hbase.

>>create table t (a char(40000));

--- SQL operation complete.
>>insert into t values ('a');

--- 1 row(s) inserted.
>>select char_length(a) from t;

(EXPR)
----------

     40000

--- 1 row(s) selected.
>>select left(a, 10) from t;

(EXPR)
----------

a

--- 1 row(s) selected.
>>
>>create table tt (a varchar(200000));

--- SQL operation complete.
>>create table ttt (a varchar(200001));

*** ERROR[4247] Specified size in bytes (200001) exceeds the maximum size allowed (200000) for column A.

--- SQL operation failed with errors.
>>

Changed in trafodion:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.