Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4687

impossible where with < operation, but =-5 return one row, same problem occur with UPDATE/SELECT/DELETE

    XMLWordPrintable

Details

    Description

      hi guys, i got a bug (i think i'm right)
      when executing this:
      well it's a big table, i will put a link to download
      it was 10.0.1 version, but it don't exists anymore in jira

      query retuning rows:
      SELECT * FROM nf_erro_20130620 WHERE emitente_tipo='j' AND emitente_id=1 AND emitente_propriedade=0 AND nf_serie="3nfe" AND nf=-5

      query without rows:
      SELECT * FROM nf_erro_20130620 WHERE emitente_tipo='j' AND emitente_id=1 AND emitente_propriedade=0 AND nf_serie="3nfe" AND nf<0

      link to table (tar -zcf nf_erro_20130620.tgz nf_erro*)
      i removed the link
      169.093.860 bytes - the internet link is slow (130KB/s)

      or a mysqldump: (mysqldump 19_org nf_erro_20130620 --force > nf_erro_20130620.sql)
      i removed the link
      112.587.870 bytes - the internet link is slow (130KB/s)-

      Note by elenst: use the attachment instead, see the comment: https://mariadb.atlassian.net/browse/MDEV-4687?focusedCommentId=32844&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-32844

      EXPLAIN EXTENDED
      SELECT * FROM nf_erro_20130620 WHERE emitente_tipo='j' AND emitente_id=1 AND emitente_propriedade=0 AND nf_serie="3nfe" AND nf<0

      return a where 0 ?!

      show warnings
      select `19_org`.`nf_erro_20130620`.`emitente_tipo` AS `emitente_tipo`,`19_org`.`nf_erro_20130620`.`emitente_id` AS `emitente_id`,`19_org`.`nf_erro_20130620`.`emitente_propriedade` AS `emitente_propriedade`,`19_org`.`nf_erro_20130620`.`nf_serie` AS `nf_serie`,`19_org`.`nf_erro_20130620`.`nf` AS `nf`,`19_org`.`nf_erro_20130620`.`id_item` AS `id_item`,`19_org`.`nf_erro_20130620`.`status` AS `status`,`19_org`.`nf_erro_20130620`.`unidade_id` AS `unidade_id`,`19_org`.`nf_erro_20130620`.`lote_tipo` AS `lote_tipo`,`19_org`.`nf_erro_20130620`.`lote_spa` AS `lote_spa`,`19_org`.`nf_erro_20130620`.`oe_tipo` AS `oe_tipo`,`19_org`.`nf_erro_20130620`.`oe` AS `oe`,`19_org`.`nf_erro_20130620`.`oe_seq` AS `oe_seq`,`19_org`.`nf_erro_20130620`.`item_id` AS `item_id`,`19_org`.`nf_erro_20130620`.`item_id_red` AS `item_id_red`,`19_org`.`nf_erro_20130620`.`item_codigo` AS `item_codigo`,`19_org`.`nf_erro_20130620`.`item_desc` AS `item_desc`,`19_org`.`nf_erro_20130620`.`servico` AS `servico`,`19_org`.`nf_erro_20130620`.`documento_auxiliar` AS `documento_auxiliar`,`19_org`.`nf_erro_20130620`.`cfop_id` AS `cfop_id`,`19_org`.`nf_erro_20130620`.`cfop_id_red` AS `cfop_id_red`,`19_org`.`nf_erro_20130620`.`cfop_numero` AS `cfop_numero`,`19_org`.`nf_erro_20130620`.`class_fiscal` AS `class_fiscal`,`19_org`.`nf_erro_20130620`.`sit_trib` AS `sit_trib`,`19_org`.`nf_erro_20130620`.`sit_trib_ipi` AS `sit_trib_ipi`,`19_org`.`nf_erro_20130620`.`sit_trib_pis` AS `sit_trib_pis`,`19_org`.`nf_erro_20130620`.`sit_trib_cofins` AS `sit_trib_cofins`,`19_org`.`nf_erro_20130620`.`sit_trib_iss` AS `sit_trib_iss`,`19_org`.`nf_erro_20130620`.`sit_trib_sn` AS `sit_trib_sn`,`19_org`.`nf_erro_20130620`.`icms_incluir_bc` AS `icms_incluir_bc`,`19_org`.`nf_erro_20130620`.`icms_subst_incluir_bc` AS `icms_subst_incluir_bc`,`19_org`.`nf_erro_20130620`.`ipi_incluir_bc` AS `ipi_incluir_bc`,`19_org`.`nf_erro_20130620`.`pis_inclur_bc` AS `pis_inclur_bc`,`19_org`.`nf_erro_20130620`.`cofins_incluir_bc` AS `cofins_incluir_bc`,`19_org`.`nf_erro_20130620`.`ii_incluir_bc` AS `ii_incluir_bc`,`19_org`.`nf_erro_20130620`.`sn_incluir_bc` AS `sn_incluir_bc`,`19_org`.`nf_erro_20130620`.`un_fat` AS `un_fat`,`19_org`.`nf_erro_20130620`.`quant` AS `quant`,`19_org`.`nf_erro_20130620`.`pecas` AS `pecas`,`19_org`.`nf_erro_20130620`.`pbruto` AS `pbruto`,`19_org`.`nf_erro_20130620`.`pliq` AS `pliq`,`19_org`.`nf_erro_20130620`.`vliq` AS `vliq`,`19_org`.`nf_erro_20130620`.`vbruto` AS `vbruto`,`19_org`.`nf_erro_20130620`.`valor_pauta` AS `valor_pauta`,`19_org`.`nf_erro_20130620`.`valor_pauta_grandeza` AS `valor_pauta_grandeza`,`19_org`.`nf_erro_20130620`.`valor_pauta_grandeza_quant` AS `valor_pauta_grandeza_quant`,`19_org`.`nf_erro_20130620`.`valor_produto_un` AS `valor_produto_un`,`19_org`.`nf_erro_20130620`.`valor_produto_grandeza` AS `valor_produto_grandeza`,`19_org`.`nf_erro_20130620`.`valor_produto_grandeza_quant` AS `valor_produto_grandeza_quant`,`19_org`.`nf_erro_20130620`.`valor_produto_tabela_un` AS `valor_produto_tabela_un`,`19_org`.`nf_erro_20130620`.`valor_produto_total` AS `valor_produto_total`,`19_org`.`nf_erro_20130620`.`valor_frete` AS `valor_frete`,`19_org`.`nf_erro_20130620`.`valor_seguro` AS `valor_seguro`,`19_org`.`nf_erro_20130620`.`valor_outras` AS `valor_outras`,`19_org`.`nf_erro_20130620`.`valor_estimado_impostos` AS `valor_estimado_impostos`,`19_org`.`nf_erro_20130620`.`valor_estimado_impostos_por` AS `valor_estimado_impostos_por`,`19_org`.`nf_erro_20130620`.`desconto` AS `desconto`,`19_org`.`nf_erro_20130620`.`icms_de_aliq` AS `icms_de_aliq`,`19_org`.`nf_erro_20130620`.`icms_de_red` AS `icms_de_red`,`19_org`.`nf_erro_20130620`.`icms_fe_aliq` AS `icms_fe_aliq`,`19_org`.`nf_erro_20130620`.`icms_fe_red` AS `icms_fe_red`,`19_org`.`nf_erro_20130620`.`icms_basecalculo` AS `icms_basecalculo`,`19_org`.`nf_erro_20130620`.`icms_valor` AS `icms_valor`,`19_org`.`nf_erro_20130620`.`icms_subst_ind_convenio` AS `icms_subst_ind_convenio`,`19_org`.`nf_erro_20130620`.`icms_subst_basecalculo` AS `icms_subst_basecalculo`,`19_org`.`nf_erro_20130620`.`icms_subst_valor` AS `icms_subst_valor`,`19_org`.`nf_erro_20130620`.`ipi_aliq` AS `ipi_aliq`,`19_org`.`nf_erro_20130620`.`ipi_red` AS `ipi_red`,`19_org`.`nf_erro_20130620`.`ipi_basecalculo` AS `ipi_basecalculo`,`19_org`.`nf_erro_20130620`.`ipi_valor` AS `ipi_valor`,`19_org`.`nf_erro_20130620`.`iss_aliq` AS `iss_aliq`,`19_org`.`nf_erro_20130620`.`iss_red` AS `iss_red`,`19_org`.`nf_erro_20130620`.`iss_basecalculo` AS `iss_basecalculo`,`19_org`.`nf_erro_20130620`.`iss_valor` AS `iss_valor`,`19_org`.`nf_erro_20130620`.`pis_aliq` AS `pis_aliq`,`19_org`.`nf_erro_20130620`.`pis_red` AS `pis_red`,`19_org`.`nf_erro_20130620`.`pis_basecalculo` AS `pis_basecalculo`,`19_org`.`nf_erro_20130620`.`pis_valor` AS `pis_valor`,`19_org`.`nf_erro_20130620`.`cofins_aliq` AS `cofins_aliq`,`19_org`.`nf_erro_20130620`.`cofins_red` AS `cofins_red`,`19_org`.`nf_erro_20130620`.`cofins_basecalculo` AS `cofins_basecalculo`,`19_org`.`nf_erro_20130620`.`cofins_valor` AS `cofins_valor`,`19_org`.`nf_erro_20130620`.`funrural_aliq` AS `funrural_aliq`,`19_org`.`nf_erro_20130620`.`funrural_red` AS `funrural_red`,`19_org`.`nf_erro_20130620`.`funrural_basecalculo` AS `funrural_basecalculo`,`19_org`.`nf_erro_20130620`.`funrural_valor` AS `funrural_valor`,`19_org`.`nf_erro_20130620`.`sn_aliq` AS `sn_aliq`,`19_org`.`nf_erro_20130620`.`sn_red` AS `sn_red`,`19_org`.`nf_erro_20130620`.`sn_basecalculo` AS `sn_basecalculo`,`19_org`.`nf_erro_20130620`.`sn_valor` AS `sn_valor`,`19_org`.`nf_erro_20130620`.`cide_aliq` AS `cide_aliq`,`19_org`.`nf_erro_20130620`.`cide_red` AS `cide_red`,`19_org`.`nf_erro_20130620`.`cide_basecalculo` AS `cide_basecalculo`,`19_org`.`nf_erro_20130620`.`cide_valor` AS `cide_valor`,`19_org`.`nf_erro_20130620`.`csll_aliq` AS `csll_aliq`,`19_org`.`nf_erro_20130620`.`csll_red` AS `csll_red`,`19_org`.`nf_erro_20130620`.`csll_basecalculo` AS `csll_basecalculo`,`19_org`.`nf_erro_20130620`.`csll_valor` AS `csll_valor`,`19_org`.`nf_erro_20130620`.`sit_trib_csll` AS `sit_trib_csll`,`19_org`.`nf_erro_20130620`.`inss_aliq` AS `inss_aliq`,`19_org`.`nf_erro_20130620`.`inss_red` AS `inss_red`,`19_org`.`nf_erro_20130620`.`inss_basecalculo` AS `inss_basecalculo`,`19_org`.`nf_erro_20130620`.`inss_valor` AS `inss_valor`,`19_org`.`nf_erro_20130620`.`sit_trib_inss` AS `sit_trib_inss`,`19_org`.`nf_erro_20130620`.`ir_aliq` AS `ir_aliq`,`19_org`.`nf_erro_20130620`.`ir_red` AS `ir_red`,`19_org`.`nf_erro_20130620`.`ir_basecalculo` AS `ir_basecalculo`,`19_org`.`nf_erro_20130620`.`ir_valor` AS `ir_valor`,`19_org`.`nf_erro_20130620`.`sit_trib_ir` AS `sit_trib_ir`,`19_org`.`nf_erro_20130620`.`ii_aliq` AS `ii_aliq`,`19_org`.`nf_erro_20130620`.`ii_red` AS `ii_red`,`19_org`.`nf_erro_20130620`.`ii_basecalculo` AS `ii_basecalculo`,`19_org`.`nf_erro_20130620`.`ii_valor` AS `ii_valor`,`19_org`.`nf_erro_20130620`.`sit_trib_ii` AS `sit_trib_ii`,`19_org`.`nf_erro_20130620`.`numero_pedido_compra` AS `numero_pedido_compra`,`19_org`.`nf_erro_20130620`.`numero_item_pedido` AS `numero_item_pedido`,`19_org`.`nf_erro_20130620`.`obs_item` AS `obs_item`,`19_org`.`nf_erro_20130620`.`quant_devolvida` AS `quant_devolvida`,`19_org`.`nf_erro_20130620`.`pecas_devolvida` AS `pecas_devolvida`,`19_org`.`nf_erro_20130620`.`pbruto_devolvida` AS `pbruto_devolvida`,`19_org`.`nf_erro_20130620`.`pliq_devolvida` AS `pliq_devolvida`,`19_org`.`nf_erro_20130620`.`vliq_devolvida` AS `vliq_devolvida`,`19_org`.`nf_erro_20130620`.`vbruto_devolvida` AS `vbruto_devolvida`,`19_org`.`nf_erro_20130620`.`ii_anterior_un` AS `ii_anterior_un`,`19_org`.`nf_erro_20130620`.`ipi_anterior_un` AS `ipi_anterior_un`,`19_org`.`nf_erro_20130620`.`pis_anterior_un` AS `pis_anterior_un`,`19_org`.`nf_erro_20130620`.`cofins_anterior_un` AS `cofins_anterior_un` from `19_org`.`nf_erro_20130620` where 0

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            rspadim roberto spadim
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.