-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
External storage SMB/CIFS share doesn't show in files app when using postgresql #2371
Comments
Hi Lukas, thanks for responding - are you suggesting there might be a fix in MTGap's repo's/commits? |
No - but MTGap is the responsible developer and with this comment he got notified of this issue :-) |
I had the same issue with mssql where empty strings have been converted to null by mdb2. In general we need to be more accurate in checking db errors. |
Excellent - thanks DeepDiver1975 :) I've added "$options['portability'] = $options['portability'] - MDB2_PORTABILITY_EMPTY_TO_NULL;" @ line 273 in db.php in the pgsql case block; copied from the mssql block as suggested - and now it's working. |
@sodnpoo Could you please open a pull request? |
Remove MDB2_PORTABILITY_EMPTY_TO_NULL from MDB2 options; fixes issue owncloud#2371
@MTGap done :) |
I'll try and get a unit test together this week (sorry been unavailable for a few days). |
@sodnpoo this should be fixed in master and stable5. can you confirm? |
Expected behaviour
SMB/CIFS share should appear in files app
Actual behaviour
Files app shows 'Nothing in here. Upload something!'
Steps to reproduce
Server configuration
Operating system: FreeBSD 9
Web server: Apache 2
Database: Postgres
PHP version: 5.3.8
ownCloud version: 5
Client configuration
Browser: Chromium
Operating system: Mint
Logs
Web server error log
Nothing significant in the default logs, however code modified to show failing SQL:
[Sat Mar 16 09:25:39 2013] [error] [client 213.249.189.99] query: INSERT INTO
*PREFIX*filecache
(mimepart
,mimetype
,mtime
,size
,etag
,path_hash
,path
,parent
,name
,encrypted
,storage
) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), referer: http://xxxx/index.php/settings/admin[Sat Mar 16 09:25:39 2013] [error] [client 213.249.189.99] params: array (\n 0 => '1',\n 1 => '2',\n 2 => 1356257702,\n 3 => -1,\n 4 => '51443a932ff1d',\n 5 => 'd41d8cd98f00b204e9800998ecf8427e',\n 6 => '',\n 7 => -1,\n 8 => '',\n 9 => 0,\n 10 => '2',\n), referer: http://xxxx/index.php/settings/admin
ownCloud log (data/owncloud.log)
{"app":"cache","message":"Insert to cache failed: MDB2 Error: null value violates not-null constraint","level":3,"time":1363423632}
Additional information
Exactly the same system configured to use sqlite instead works as expected.
The text was updated successfully, but these errors were encountered: