You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm guessing it's because of the empty string for the path and name for the root of the local storage. However, I haven't had this issue with MySQL myself. Could it be because you're using MariaDB?
I think an empty path represents the root folder (@icewind1991)?
Our db layer should be able to handle storing and returning an empty string. Oracle treats emptystring as NULL, and MDB2_PORTABILITY_EMPTY_TO_NULL makes other databases behave in the same way. So actually MDB2 emulates an IMHO broken Oracle behavior for all other DBs.
Activity
MorrisJobke commentedon May 10, 2013
cc @icewind1991 @MTGap
MTGap commentedon May 12, 2013
I'm guessing it's because of the empty string for the path and name for the root of the local storage. However, I haven't had this issue with MySQL myself. Could it be because you're using MariaDB?
@bartv2 @butonic
josh4trunks commentedon May 12, 2013
I'll try testing with mysql5.5 later today and report back
butonic commentedon May 12, 2013
@icewind1991 @bartv2 in db.php MDB2_PORTABILITY_EMPTY_TO_NULL is on by default for all dbs. Only for mssql @DeepDiver1975 deactivated it.
We can either deactivate it by default, which will break oracle, or we allow null values in the path column.
I vote for removing the not null contstraint.
Opinions?
Mysql docu: http://dev.mysql.com/doc/refman/5.0/en/problems-with-null.html
MDB2 docu: https://pear.php.net/manual/en/package.database.mdb2.intro-portability.php
tanghus commentedon May 12, 2013
Won't that just hide a bug which causes the values to be empty?
MTGap commentedon May 12, 2013
@tanghus It isn't a bug that the values in this case are empty.
@butonic I'm not sure why this isn't affecting me using MySQL if you say that it is only deactivated for mssql.
butonic commentedon May 12, 2013
I think an empty path represents the root folder (@icewind1991)?
Our db layer should be able to handle storing and returning an empty string. Oracle treats emptystring as NULL, and MDB2_PORTABILITY_EMPTY_TO_NULL makes other databases behave in the same way. So actually MDB2 emulates an IMHO broken Oracle behavior for all other DBs.
@MTGap I would have to examine the exact SQL statements, but I think MySQL knows the difference between NULL and ''. see http://dev.mysql.com/doc/refman/5.0/en/problems-with-null.html
butonic commentedon May 12, 2013
@MTGap default portability options: https://github.com/owncloud/core/blob/master/lib/db.php#L239
deactivated for MSSQL https://github.com/owncloud/core/blob/master/lib/db.php#L298
butonic commentedon May 12, 2013
the insert in https://github.com/owncloud/core/blob/master/lib/files/cache/cache.php#L194 always tries to insert the path as it is always added to the $data array: https://github.com/owncloud/core/blob/master/lib/files/cache/cache.php#L194
josh4trunks commentedon May 14, 2013
I can confirm the same problem on a fresh owncloud install using mysql5.5.21
karlitschek commentedon Oct 17, 2013
Can you try again with the newest ownCloud 6 alpha2 please?