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
String truncation error when selecting from a VIEW with UNION inside [CORE3697] #4045
Comments
Modified by: JNA (jna)environment: Версия FB 2.5 Firebird-2.5.0.26074_1_Win32.exe ODS 11.2 BD in UTF-8 cod => Версия FB 2.5 Firebird-2.5.0.26074_1_Win32.exe ODS 11.2 BD in UTF-8 cod |
Commented by: @dyemanov What was the connection charset? Please also post a DDL for the ORG_DELIVERY table. |
Modified by: @dyemanovsummary: Firebird-2.5.0.26074_1_Win32 Arithmetic overflow when use VIEW with UNION => String truncation error when selecting from a VIEW with UNION inside |
Commented by: JNA (jna) All text fileds as VARCHAR(nnn) CHARACTER SET UTF8 |
Commented by: @dyemanov Once more, what was the *connection* charset? What is the data type of UIDORG? It would be much better if you could post a reproducible test case or attach the database to this ticket. |
Modified by: JNA (jna)Attachment: pubob.fbk [ 12067 ] |
Commented by: JNA (jna) I'm attach backup file |
Commented by: @dyemanov Confirmed, thanks. |
Commented by: JNA (jna) Oh, sorry, I'm forgot. And this sample working OK 3. And changing view TREE_TEST, add union select ID, TEXT, PARENTID, CONDITIONS, STMT, RULFNAME |
Commented by: @dyemanov The problem is somehow related to the RELFNAME field: select RULFNAME from TREE_TEST1 |
Commented by: JNA (jna) Agree, this work properly |
Modified by: JNA (jna)Attachment: pb_empty.fbk [ 12068 ] |
Modified by: @dyemanovAttachment: pubob.fbk [ 12067 ] => |
Modified by: @dyemanovVersion: 2.5.1 [ 10333 ] Version: 2.1.4 [ 10361 ] Version: 2.0.6 [ 10303 ] Version: 3.0 Initial [ 10301 ] Version: 2.1.3 [ 10302 ] Version: 2.1.2 [ 10270 ] Version: 2.0.5 [ 10222 ] Version: 2.1.1 [ 10223 ] Version: 2.1.0 [ 10041 ] Component: Engine [ 10000 ] |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Modified by: @dyemanovstatus: Open [ 1 ] => In Progress [ 3 ] |
Commented by: @dyemanov The problem appears only if the view has been created in the multi-byte connection charset (UTF8 in this case). |
Modified by: @dyemanovstatus: In Progress [ 3 ] => Open [ 1 ] |
Commented by: @dyemanov Please test the next (tomorrow's) snapshot build, it should have the issue fixed. |
Commented by: JNA (jna) tested... OK |
Modified by: @dyemanovFix Version: 2.1.5 [ 10420 ] Fix Version: 2.5.2 [ 10450 ] Version: 3.0 Initial [ 10301 ] => |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Done successfully Test Details: Confirmed on 2.5.1: |
Commented by: @pcisar Test created. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: JNA (jna)
Is related to QA472
Attachments:
pb_empty.fbk
First
create view TREE_TEST (
ID, TEXT, PARENTID, CONDITIONS, STMT, RULFNAME )
as
select uidorg , nameorg
, '0' , ' G.UIDORG = ' || '''' || uidorg || ''''
, '' , 'KODORG'
from org_delivery;
select ID, TEXT, PARENTID, CONDITIONS, STMT, RULFNAME
from TREE_TEST - All result OK
Second. And now i add UNION clause
create view TREE_TEST (
ID, TEXT, PARENTID, CONDITIONS,
STMT, RULFNAME )
as
select 0, 'Организации', NULL, '', ''
, 'KODORG'
from rdb$database
union
select uidorg
, nameorg
, '0'
, ' G.UIDORG = ' || '''' || uidorg || ''''
, ''
, 'KODORG'
from org_delivery
select ID, TEXT, PARENTID, CONDITIONS, STMT, RULFNAME
from TREE_TEST
ERROR
Arithmetic overflow or division by zero has occurred.
arithmetic exception, numeric overflow, or string truncation.
string right truncation.
Commits: 6753377 529e0bc
====== Test Details ======
Confirmed on 2.5.1:
Statement failed, SQLSTATE = 22001
arithmetic exception, numeric overflow, or string truncation
-string right truncation
The text was updated successfully, but these errors were encountered: