Hy, is a way to fully disabled transactional (autocommit) statement in DBCP
?
Using Database Connection Pools with
org.apache.commons.dbcp2.BasicDataSource give me statements :
SET autocommit=1
SET autocommit=0
SET SQL_SELECT_LIMIT=1
select
date,logger,level,message,exception,pid,idUtilisateur,version,ip,markerSimpleName,sqlLastInsertId,sqlTimeMillis
from log4j2 where 1=0
SET SQL_SELECT_LIMIT=DEFAULT
insert into log4j2
(date,logger,level,message,exception,pid,idUtilisateur,version,ip,markerSimpleName,sqlLastInsertId,sqlTimeMillis)
values
('2022-06-01','timertask','TRACE','WaitInitService','','45964','123','null','','','','0')
commit
rollback
SET autocommit=1
But it's for MySQL MyISAM table, and I didn't need transactions, I whish
only :
select
date,logger,level,message,exception,pid,idUtilisateur,version,ip,markerSimpleName,sqlLastInsertId,sqlTimeMillis
from log4j2 where 1=0
SET SQL_SELECT_LIMIT=DEFAULT
insert into log4j2
(date,logger,level,message,exception,pid,idUtilisateur,version,ip,markerSimpleName,sqlLastInsertId,sqlTimeMillis)
values
('2022-06-01','timertask','TRACE','WaitInitService','','45964','123','null','','','','0')
Thanks for you replys.