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?
:/ 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?