Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CREATE VIEW with UNION fails -> "string right truncation" [CORE3270] #3638

Closed
firebird-automations opened this issue Dec 3, 2010 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Ralf Steinhaeusser (ralfiii)

Duplicates CORE3211

Run the following script on a database, then try to view the view-data.
You'll get an error
"Arithmetic overflow or division by zero has occurred. arithmetic exception, numeric overflow, or string truncation. string right truncation."

The view works well with firebird 2.1.3

#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠

CREATE TABLE TEST (
ID INTEGER,
MYNAME VARCHAR(10));

insert into test (ID, MyName) Values(0, 'foo');
insert into test (ID, MyName) Values(1, 'foo');
insert into test (ID, MyName) Values(1, 'test');

create view TestView(ID, MyName)
as
select * from Test where Id=0
union all
Select * From Test where Id=1
and MYNAME not in
(Select MYNAME from Test where Id=0);

====== Test Details ======

See test for core-3211 (query is almost the same).

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue duplicates CORE3211 [ CORE3211 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Duplicates CORE3211.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Covered by another test(s)

Test Details: See test for core-3211 (query is almost the same).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant