
|
If you were logged in you would be able to see more operations.
|
|
|
|
Issue Links:
|
Duplicate
|
|
|
|
This issue is duplicated by:
|
|
CORE-3270
CREATE VIEW with UNION fails -> "string right truncation"
|
|
|
|
|
Relate
|
|
|
|
This issue is related to:
|
|
|
|
|
|
|
|
| Planning Status: |
Unspecified
|
|
Test case:
CREATE TABLE T ( ID integer, FIELD1 varchar(30) );
CREATE VIEW VT ( ID )
AS
select T1.ID from T as T1 where T1.FIELD1 not in ( select T2.FIELD1 from T as T2 where T2.FIELD1 = 'system1' )
;
INSERT INTO T (ID, FIELD1) VALUES (1, 'system');
INSERT INTO T (ID, FIELD1) VALUES (2, 'system');
INSERT INTO T (ID, FIELD1) VALUES (3, 'system');
INSERT INTO T (ID, FIELD1) VALUES (4, 'system');
INSERT INTO T (ID, FIELD1) VALUES (5, 'system');
COMMIT WORK;
select * from VT;
-- ERROR: string right truncation
The problem is that every select retrieves the db_key/record_version pair and they're described as having length of 8 and 4 bytes respectively. But these values gets concatenated in this case, because expand_view_nodes() returns two items. It seems being related to NOT IN, because an equivalent query with NOT EXISTS works fine. The same query without a view also works fine.
|
|
Description
|
Test case:
CREATE TABLE T ( ID integer, FIELD1 varchar(30) );
CREATE VIEW VT ( ID )
AS
select T1.ID from T as T1 where T1.FIELD1 not in ( select T2.FIELD1 from T as T2 where T2.FIELD1 = 'system1' )
;
INSERT INTO T (ID, FIELD1) VALUES (1, 'system');
INSERT INTO T (ID, FIELD1) VALUES (2, 'system');
INSERT INTO T (ID, FIELD1) VALUES (3, 'system');
INSERT INTO T (ID, FIELD1) VALUES (4, 'system');
INSERT INTO T (ID, FIELD1) VALUES (5, 'system');
COMMIT WORK;
select * from VT;
-- ERROR: string right truncation
The problem is that every select retrieves the db_key/record_version pair and they're described as having length of 8 and 4 bytes respectively. But these values gets concatenated in this case, because expand_view_nodes() returns two items. It seems being related to NOT IN, because an equivalent query with NOT EXISTS works fine. The same query without a view also works fine. |
Show » |
| There are no comments yet on this issue.
|
|