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
cmd update affect field not in command [CORE6146] #6395
Comments
Commented by: Sean Leyne (seanleyne) This is a support issue, which should be handled via the Firebird Support mailing list (see http://firebirdsql.org/en/mailing-lists/) |
Modified by: Sean Leyne (seanleyne)status: Open [ 1 ] => Resolved [ 5 ] resolution: Won't Fix [ 2 ] |
Commented by: ANDERSON BARRETTA (sistemas_prevedello.com.br) add arquivo .rar |
Modified by: ANDERSON BARRETTA (sistemas_prevedello.com.br)Attachment: Otimizacao.part01.rar [ 13383 ] description: I created a new database with only one table. and I pump 480,000 records. only: FIELD CODCFOP_NOTAVENDA HAS SOME NULLS. WHEN I RUN COMMAND " UPDATE NOTAVENDA SET CODCFOP_NOTAVENDA = CODCFOP_NOTAVENDA WHERE (CODCFOP_NOTAVENDA > 0) " FIELD XML becomes null in more than 300 records. BUT IF I USE COALESCE NO PROBLEM OCCURS. => I created a new database with only one table. and I pump 480,000 records. only: FIELD CODCFOP_NOTAVENDA HAS SOME NULLS. WHEN I RUN COMMAND " UPDATE NOTAVENDA SET CODCFOP_NOTAVENDA = CODCFOP_NOTAVENDA WHERE (CODCFOP_NOTAVENDA > 0) " the FIELD XML becomes null in more than 300 records. (SELECT COUNT(*) FROM NOTAVENDA WHERE (XMLNFE_NOTAVENDA IS NULL)) BUT IF I USE COALESCE NO PROBLEM OCCURS. |
Commented by: @hvlad Anderson, description looks improbable, sorry. |
Modified by: ANDERSON BARRETTA (sistemas_prevedello.com.br)Attachment: Otimizacao.part02.rar [ 13384 ] |
Modified by: ANDERSON BARRETTA (sistemas_prevedello.com.br)Attachment: Otimizacao.part03.rar [ 13385 ] |
Commented by: ANDERSON BARRETTA (sistemas_prevedello.com.br) hello Vlad, I agree with you. |
Commented by: @hvlad I can't confirm it: SQL> select count(*), sum(octet_length(XMLNFE_NOTAVENDA)) from notavenda;
===================== ===================== SQL> select count(*), sum(octet_length(XMLNFE_NOTAVENDA)) from notavenda where XMLNFE_NOTAVENDA is not null;
===================== ===================== SQL> commit;
===================== ===================== SQL> select count(*), sum(octet_length(XMLNFE_NOTAVENDA)) from notavenda where XMLNFE_NOTAVENDA is not null;
===================== ===================== SQL> commit;
===================== ===================== SQL> commit;
===================== |
Commented by: @hvlad Dmitry, yes, but it is not possible to reproduce with fresh restored database ;) |
Commented by: @dyemanov Fresh restored database cannot have multiple table formats (unless it has computed fields), so it really shouldn't be reproducible there. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: ANDERSON BARRETTA (sistemas_prevedello.com.br)
Attachments:
Otimizacao.part01.rar
Otimizacao.part02.rar
Otimizacao.part03.rar
I created a new database with only one table. and I pump 480,000 records.
I do not have TRIGGERS, NOTHING.
only:
CREATE TABLE NOTAVENDA (
COD_NOTAVENDA INTEGER NOT NULL,
CODCFOP_NOTAVENDA INTEGER,
XMLNFE_NOTAVENDA BLOB SUB_TYPE 0 SEGMENT SIZE 80
);
FIELD CODCFOP_NOTAVENDA HAS SOME NULLS.
WHEN I RUN COMMAND " UPDATE NOTAVENDA SET CODCFOP_NOTAVENDA = CODCFOP_NOTAVENDA WHERE (CODCFOP_NOTAVENDA > 0) "
the FIELD XML becomes null in more than 300 records. (SELECT COUNT(*) FROM NOTAVENDA WHERE (XMLNFE_NOTAVENDA IS NULL))
BUT IF I USE COALESCE
WHERE COALESCE((CODCFOP_NOTAVENDA,0) > 0)
NO PROBLEM OCCURS.
The text was updated successfully, but these errors were encountered: