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

DSQL truncate [CORE1445] #1863

Closed
firebird-automations opened this issue Sep 7, 2007 · 8 comments
Closed

DSQL truncate [CORE1445] #1863

firebird-automations opened this issue Sep 7, 2007 · 8 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Arteev Alexei (arteev.a)

Duplicates CORE1434

CREATE TABLE PROPERTY_DOC (
ID_PROPERTY UID_STR /* UID_STR = VARCHAR(10) DEFAULT '0' */,
FORTABLE STR_31 COLLATE PXW_CYRL /* STR_31 = VARCHAR(31) DEFAULT '_' */,
ID_KEYTABLE UID /* UID = INTEGER DEFAULT 0 */,
VAL VARCHAR(8000),
READONLY BOOL /* BOOL = SMALLINT DEFAULT 0 */
);
set term ^ ;
CREATE PROCEDURE GET_PROP_ALL(
ATABLE VARCHAR(64),
AID_KEYTABLE INTEGER)
RETURNS (
VAL VARCHAR(8000),
READONLY SMALLINT,
ID_PROPERTY VARCHAR(10),
FORTABLE VARCHAR(64),
ID_KEYTABLE INTEGER)
AS
begin
/*.......................*/
ATABLE = upper(ATABLE );
if (AID_KEYTABLE IS NULL) then AID_KEYTABLE=0;
ID_KEYTABLE = AID_KEYTABLE;
FORTABLE = ATABLE ;
/*.......................*/
FOR
execute statement
'SELECT VAL,READONLY,ID_PROPERTY FROM property_doc WHERE FORTABLE='''||:atable||'''
AND ID_KEYTABLE = '||:AID_KEYTABLE

INTO
:val,
:readonly,
:ID_PROPERTY
DO
suspend;
end
^
set term ; ^

INSERT INTO PROPERTY_DOC (ID_PROPERTY, FORTABLE, ID_KEYTABLE, VAL, READONLY) VALUES ('DOC_SL_ALL', 'DOC', 225, '0.00', 1);
commit;

/*............*/

select VAL,ID_PROPERTY from GET_PROP_ALL('DOC',225);

Gived:
VAL ID_PROPERTY
0.00 DOC_SL_A

Must:
VAL ID_PROPERTY
0 DOC_SL_ALL

Solved:

set term ^ ;
CREATE PROCEDURE GET_PROP_ALL(
ATABLE VARCHAR(64),
AID_KEYTABLE INTEGER)
RETURNS (
VAL VARCHAR(8000),
READONLY SMALLINT,
ID_PROPERTY VARCHAR(10),
FORTABLE VARCHAR(64),
ID_KEYTABLE INTEGER)
AS
begin
/*.......................*/
ATABLE = upper(ATABLE );
if (AID_KEYTABLE IS NULL) then AID_KEYTABLE=0;
ID_KEYTABLE = AID_KEYTABLE;
FORTABLE = ATABLE ;
/*.......................*/
FOR
execute statement
'SELECT VAL,READONLY,cast(ID_PROPERTY as varchar(100)) FROM property_doc WHERE FORTABLE='''||:atable||'''
AND ID_KEYTABLE = '||:AID_KEYTABLE

INTO
:val,
:readonly,
:ID_PROPERTY
DO
suspend;
end
^
set term ; ^

@firebird-automations
Copy link
Collaborator Author

Modified by: Arteev Alexei (arteev.a)

security: Developers [ 10012 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Are your problem the same one of CORE1434?

Your test case is not valid and there is no description of the issue.

BTW, 2.0.2 is recalled because CORE1434.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Duplicate [ 3 ]

Fix Version: 2.0.3 [ 10200 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue duplicates CORE1434 [ CORE1434 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

summary: DSQL trancate => DSQL truncate

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 12991 ] => Firebird [ 13929 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

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