I'm running a local MariaDB database in a Macbook. Was testing a table to receive a lot of rows and, at 12million it stopped inserting. Now I can't insert, delete or truncate the table. The process never ends and eventually stops : "Lock wait timeout exceeded; try restarting transaction"
I event tried to drop the table, but the result is the same.
Anyone knows what is happening and how to solve it? I'm afraid that this happens in my server, because this table is going to have away more then 12million
table definition:
create table _stats_leads_servicos
(
id_lead int null,
id_servico int null,
id_tipo char(5) not null comment '''live'' - real time
''final'' - final',
id_subtipo char(10) null comment 'id_tipo = live
arquivo - já existe novo
live - atualizado
id_tipo = final
arquivo - encerrado
live - ainda aberto',
sf_data datetime not null,
sf_id_utilizador int null comment 'null - geral ; id_utilizador ut a que diz respeito',
sf_id_cargo char(100) null,
sf_tipo_processo char(100) not null,
sf_id_tipo char(100) not null,
sf_id_subtipo char(100) not null,
sf_id_ramo char(100) not null,
sf_id_seguradora int not null,
sf_id_fraude char(100) null,
sf_id_estado char(100) not null,
data date not null,
hora time null,
n_diligencias_1 int null,
n_diligencias_0 int null,
sla_diligencias_1 int null comment 'segundos',
n_informacoes_1 int null,
n_informacoes_fp int null,
n_informacoes_0 int null,
sla decimal(11, 2) null,
sla_fp decimal(11, 2) null,
estados_fp tinyint(1) null
);
create index lead_servico
on _stats_leads_servicos (id_lead, id_servico);
create index seguradora
on _stats_leads_servicos (sf_id_seguradora);
create index `sf_tipo-sf_subtipo`
on _stats_leads_servicos (sf_id_tipo, sf_id_subtipo);
create index tipo
on _stats_leads_servicos (id_tipo);
create index tipo_data
on _stats_leads_servicos (id_tipo, data);
create index utilizador_cargo
on _stats_leads_servicos (sf_id_utilizador, sf_id_cargo);