Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • 10.0.1
    • None
    • None
    • None
    • LINUX 64 BITS

    Description

      HI GUYS! i have a duplicated row with same primary keys in a ARIA table
      what could i do!? REPAIR don't find it, CHECK don't find it but in SELECT it's showed twice!

      CREATE TABLE `dig_lotes` (
      `lote_unidade` INT(11) NOT NULL DEFAULT '0',
      `lote_data` DATE NOT NULL DEFAULT '0000-00-00',
      `lote_numero` INT(11) NOT NULL DEFAULT '0',
      `lote_tipo` CHAR(1) NOT NULL DEFAULT 'p',
      `total_ocorrencias` INT(10) UNSIGNED NOT NULL DEFAULT '0',
      `total_documentos` INT(10) UNSIGNED NOT NULL DEFAULT '0',
      `total_baixas` INT(10) UNSIGNED NOT NULL DEFAULT '0',
      `total_bancos` INT(10) UNSIGNED NOT NULL DEFAULT '0',
      `moeda_total` CHAR(3) NOT NULL DEFAULT 'R$',
      `valor_total` DECIMAL(17,5) UNSIGNED NOT NULL DEFAULT '0.00000',
      `valor_baixas` DECIMAL(17,5) UNSIGNED NOT NULL DEFAULT '0.00000',
      `valor_bancos` DECIMAL(17,5) UNSIGNED NOT NULL DEFAULT '0.00000',
      `digitador_tipo` ENUM('f','j') NOT NULL DEFAULT 'f',
      `digitador_id` INT(11) NOT NULL DEFAULT '0',
      `sit_spa` ENUM('d','s','p','a','mov') NOT NULL DEFAULT 'd',
      `data_spa_d` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
      `data_spa_s` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
      `data_spa_p` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
      `data_spa_a` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
      `data_spa_mov` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
      `bordero` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
      `cessionario_tipo` ENUM('f','j') NOT NULL DEFAULT 'f',
      `cessionario_id` BIGINT(20) NOT NULL DEFAULT '0',
      `importado` VARCHAR(25) NOT NULL,
      `numero_remessa_boleto` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
      `arquivo_importacao_id` INT(10) UNSIGNED NOT NULL DEFAULT '0',
      `observacao` TEXT NOT NULL,
      `lote_data_origem` DATE NOT NULL DEFAULT '0000-00-00',
      `lote_numero_origem` INT(11) NOT NULL DEFAULT '0',
      `cobrador_padrao_tipo` ENUM('f','j') NOT NULL DEFAULT 'f',
      `cobrador_padrao_id` INT(11) NOT NULL DEFAULT '0',
      PRIMARY KEY (`lote_unidade`, `lote_data`, `lote_numero`),
      INDEX `lote_origem` (`lote_unidade`, `lote_data_origem`, `lote_numero_origem`)
      )
      ENGINE=Aria;

      what got wrong? well i made a INSERT IGNORE INTO with another table:

      insert ignore into dig_lotes
      (lote_unidade,lote_tipo,lote_data,lote_numero,importado,sit_spa)

      select lote_unidade,lote_tipo,lote_data,lote_numero,importado,'s'
      from dig_contas
      where (lote_unidade,lote_tipo,lote_data,lote_numero) not in (
      select lote_unidade,lote_tipo,lote_data,lote_numero
      from dig_lotes
      );

      it showed some warnings but no error, and after this it showed two values with same primary key!

      how could i export database to check?

      Attachments

        Activity

          :/ i didnt' found a backup before aria engine, just one old one but it have less information (2011)
          maybe we could remove the part of 'myisam to aria engine' error, and leave the partition repair/check didn't remove duplicated rows?

          rspadim roberto spadim added a comment - :/ i didnt' found a backup before aria engine, just one old one but it have less information (2011) maybe we could remove the part of 'myisam to aria engine' error, and leave the partition repair/check didn't remove duplicated rows?

          The problem is, I'm not getting duplicates on the table from your archive – are you? Could you please try to use these files and check if you still see any duplicates?

          elenst Elena Stepanova added a comment - The problem is, I'm not getting duplicates on the table from your archive – are you? Could you please try to use these files and check if you still see any duplicates?

          hum, could aria_log.000001 have some information? i just
          cp /old_backup/19_cashflow/dig_lotes* /mysql/data/test/
          and run the query again, no duplicates?! very strange

          i will try to copy the aria_log too and some files inside /old_backup/ to my test directory

          check the directory files could they change something of dig_lotes table?
          #sql_1186_0.MAD
          #sql_119a_0.MAD
          #sql_11ad_0.MAD
          aria_log_control
          #sql_1186_0.MAI
          #sql_119a_0.MAI
          #sql_11ad_0.MAI
          aria_log.00000001
          mysql_upgrade_info

          rspadim roberto spadim added a comment - hum, could aria_log.000001 have some information? i just cp /old_backup/19_cashflow/dig_lotes* /mysql/data/test/ and run the query again, no duplicates?! very strange i will try to copy the aria_log too and some files inside /old_backup/ to my test directory check the directory files could they change something of dig_lotes table? #sql_1186_0.MAD #sql_119a_0.MAD #sql_11ad_0.MAD aria_log_control #sql_1186_0.MAI #sql_119a_0.MAI #sql_11ad_0.MAI aria_log.00000001 mysql_upgrade_info

          hi, i cannot reproduce it anymore :/
          please close the issue
          if i can reproduce it again i will report again

          tnkx

          rspadim roberto spadim added a comment - hi, i cannot reproduce it anymore :/ please close the issue if i can reproduce it again i will report again tnkx

          Closing as Roberto suggested

          elenst Elena Stepanova added a comment - Closing as Roberto suggested

          People

            elenst Elena Stepanova
            rspadim roberto spadim
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.