View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006888||OXID eShop (all versions)||4.01. Database handling||public||2018-08-17 12:03||2018-10-25 10:12|
|Target Version||Fixed in Version|
|Summary||0006888: Wrong default value of columns is read on mariadb 10.2.7 and higher|
|Description||Due to a change in mariadb 10.2.7 ( https://mariadb.com/kb/en/library/mariadb-1027-release-notes/ , MDEV-13132 ) now empty default values (no value, not null) are quoted. This leads to unexpected behaviour while reading the default value of a column by the oxid shop.|
In our test-installation, for example, this leads to oxparentid fields in the oxarticles table which are filled with '' (two single quotes) instead of nothing. Every field that is empty but not null is affected by this problem.
This problem seems to be in the class Database (Core\Database\Adapter\Doctrine\Database) in the method metaColumns($table):
Here is checked if the column has a default value by the syntax:
('' === $default || is_null($default))
Obviously this will not work if the field has the default value ''.
|Steps To Reproduce||- Install oxid with mariadb database version 10.2.7 or higher.|
- Create an article in the backend (It will disappear due to filled oxparentid field after save).
- Now inspect the entry in the oxarticles table. It should have a '' in several fields.
- If you look up the columns of the oxarticles table, for example, in the table COLUMNS in the information_schema you will see that the default value for empty fields is ''.
|Additional Information||Tested Versions: OXID 6.0.3 and OXID 6.1.0 (I think every version of OXID 6)|
|Tags||No tags attached.|
MariaDB isn't officially supported by OXID eShop. You can find the system requirements in our docs:
Nevertheless, if you want, you might create a pull request at our oxideshop_ce repository on GitHub: