MySQL: autocommit is required
Hi,
I have a MariaDB running with autocommit=0 (because of another application, so I can't change) and owncloud is not working because we're expecting autocommit is on. I think we should explicitely commit or rollback every transaction.
As a quick workaround I added
358 $this->executeQuery('SET SESSION AUTOCOMMIT=1;', '');
to
3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
Regards, Florian
sounds like a good idea. @DeepDiver1975 what do you think?
sounds like a good idea. @DeepDiver1975 what do you think?
FULL ACK - we indeed rely on auto commit - actually we shall double check on all databases we support :fire_engine:
Additional initializations are to be added here: https://github.com/owncloud/core/blob/master/lib/private/db/connectionfactory.php#L87
SQL can be injected via the class Doctrine\DBAL\Event\Listeners\SQLSessionInit
@th3fallen another one for you?
@DeepDiver1975 I have no way to test all supported databases to verify this fix, im not sure this is a good one for me.
Who else can look into that?
@DeepDiver1975 I have no way to test all supported databases to verify this fix, im not sure this is a good one for me.
Missed your comment - sorry - there are two solutions to the issue:
- install all databases locally
- at least test this on MySQL locally and let Jenkins do the rest for you
Anyway - someone else can take over this task
I believe this might already be fixed through https://github.com/owncloud/core/pull/12695 from @icewind1991
oops wrong ticket, sorry
Btw I couldn't find any code that uses beginTransaction without commit() or rollback()
Btw I couldn't find any code that uses beginTransaction without commit() or rollback()
quite expected - what are you trying to tell us? :speak_no_evil: