View Issue Details

IDProjectCategoryView StatusLast Update
0007799OXID eShop (all versions)2.7. Customer infopublic2025-06-04 16:11
Reporterb.blasius Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version7.1.0 
Summary0007799: Media gallery picture upload fails on master/slave setup
Descriptionoxid-esales/media-library-module (all versions)

vendor/oxid-esales/media-library-module/src/Media/Repository/MediaRepository.php
uses executeQuery instead of executeStatement for insert, update and delete statements.
this leads to the following error on master/slave setups.

SQLSTATE[HY000]: General error: 1290 The MySQL server is running with the --read-only option so it cannot execute this statement [] []
Steps To ReproduceQA -SG- addition:

1. have a server with replication database (master + slave)
2. have replication server with read only (e.g. read_only=1 in .cnf file of database)
3. have shop connected to both databases (master per normal config, slave per aSlaveHost)
4. have modul media-library active
5. try to create a folder in the media gallery (Customer Info -> Media Gallery -> New folder)

Additional InformationIn vendor/oxid-esales/oxideshop-ce/source/Core/Database/Adapter/Doctrine/Database.php:608:

Be aware that Connection::executeQuery is a method specifically for READ operations only.
This is especially important in master-slave Connection
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

QA

2025-06-04 16:05

administrator   ~0017970

Dear Mr. Blasius,

thank you for reporting this issue.

I tested the behavior and checked the source code and confirm, that this function shouldn't be used in not read context.

Best Regards
QA -SG-