Skip to content

External Storage with mysql backend #3298

Closed

Description

@josh4trunks

I cannot successful mount 'Local Storage' using the webgui when my database for owncloud is mysql. This works as expected with sqlite.

I see this issue was solved for postgresql over here #2371

ERROR LOG
Insert to cache failed: MDB2 Error: null value violates not-null constraint

SPECS

  • owncloud = 5.0.5
  • php = 5.4.13
  • database = MariaDB 5.5.30
  • OS = FreeBSD 8.3-RELEASE-p4 (Jail)

Activity

  1. MorrisJobke commented on May 10, 2013

    @MorrisJobke
    Contributor
  2. MTGap commented on May 12, 2013

    @MTGap
    Contributor

    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

  3. josh4trunks commented on May 12, 2013

    @josh4trunks
    ContributorAuthor

    I'll try testing with mysql5.5 later today and report back

  4. butonic commented on May 12, 2013

    @butonic
    Contributor

    @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

  5. tanghus commented on May 12, 2013

    @tanghus
    Contributor

    I vote for removing the not null constraint.

    Won't that just hide a bug which causes the values to be empty?

  6. MTGap commented on May 12, 2013

    @MTGap
    Contributor

    @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.

  7. butonic commented on May 12, 2013

    @butonic
    Contributor

    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

  8. josh4trunks commented on May 14, 2013

    @josh4trunks
    ContributorAuthor

    I can confirm the same problem on a fresh owncloud install using mysql5.5.21

  9. karlitschek commented on Oct 17, 2013

    @karlitschek
    Contributor

    Can you try again with the newest ownCloud 6 alpha2 please?

  10. locked as resolved and limited conversation to collaborators on Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions