[Pkg-owncloud-maintainers] Bug#721645: [owncloud] PostgreSQL: null value in column "unencrypted_size" violates not-null constraint

Ingo Juergensmann ij at 2013.bluespice.org
Mon Sep 2 16:52:28 UTC 2013


Package: owncloud
Version: 5.0.10+dfsg-1
Severity: normal

--- Please enter the report below this line. ---

Hi!

There seems to be an error in the Owncloud database template for 
PostgreSQL. Using OC 5.0.10+dfsg-1 and uploading a new file I want to 
share, I get a hanging session/everlasting upload wheel in that 
uploading browser windows and a white screen in other browser windows.

The cause seems to be a violation of the not-null constraint, when 
looking at the pgsql database log:

2013-09-02 18:37:27.121 CEST owncloud owncloud DETAIL:  parameters: $1 = 
'image/png'
2013-09-02 18:37:27.121 CEST owncloud owncloud LOG:  execute 
pdo_stmt_0000001d: INSERT INTO "oc_filecache"("mimepart", "mimetype", 
"mtime", "size", "etag", "path_hash", "path", "parent", "name", 
"encrypted", "storage") VALUES($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)
2013-09-02 18:37:27.121 CEST owncloud owncloud DETAIL:  parameters: $1 = 
'3', $2 = '12', $3 = '1378137742', $4 = '68725', $5 = '5224bec6500cf', 
$6 = 'eb0cf64fdaefa162e63b55f9aa51a55c', $7 = 'files/Bildschirmfoto 
2013-09-02 um 18.01.30.png', $8 = '5', $9 = 'Bildschirmfoto 2013-09-02 
um 18.01.30.png', $10 = '0', $11 = '2'
2013-09-02 18:37:27.122 CEST owncloud owncloud ERROR:  null value in 
column "unencrypted_size" violates not-null constraint


When looking at the database schema you can find this:

CREATE TABLE oc_filecache
(
   fileid serial NOT NULL,
   storage integer NOT NULL,
   path character varying(512),
   path_hash character varying(32) NOT NULL DEFAULT NULL::character varying,
   parent integer NOT NULL,
   name character varying(250),
   mimetype integer NOT NULL,
   mimepart integer NOT NULL,
   size bigint NOT NULL,
   mtime integer NOT NULL,
   encrypted integer NOT NULL DEFAULT 0,
   unencrypted_size bigint NOT NULL,
   etag character varying(40) NOT NULL DEFAULT NULL::character varying,
   CONSTRAINT oc_filecache_pkey PRIMARY KEY (fileid),
   CONSTRAINT fs_storage_path_hash UNIQUE (storage, path_hash)
)
WITH (
   OIDS=FALSE
);

unencrypted_size is of type bigint with constraint NOT NULL, but missing 
the default value like it is for encrypted. Apparently, either the 
INSERT is missing a value for unencrypted_size or the template should 
contain

unencrypted_size bigint NOT NULL DEFAULT 0,

as it is for encrypted to avoid a NOT-NULL constraint violation.

Regards,
Ingo


--- System information. ---
Architecture: amd64
Kernel:       Linux 3.10-2-amd64

Debian Release: jessie/sid
   500 unstable        www.deb-multimedia.org
   500 unstable        ftp.de.debian.org

--- Package information. ---
Depends                              (Version) | Installed
==============================================-+-===================
apache2                                        | 2.4.6-3
  OR httpd                                      |
fonts-font-awesome                             | 3.0.2-1
libjs-chosen                                   | 0.9.11-1
libjs-jquery                      (>= 1.7.2-1) | 1.7.2+dfsg-3
libjs-jquery-fancybox                          | 8-2
libjs-jquery-jplayer                           | 2.3.4+dfsg-1
libjs-jquery-minicolors                (<< 2~) | 1.2.1-1
libjs-jquery-mousewheel                        | 8-2
libjs-jquery-timepicker                        | 1.2-1
libjs-jquery-ui                                | 1.10.1+dfsg-1
libjs-pdf                                      | 0.8.37+dfsg-1
libphp-phpmailer                               | 5.1-1
mediawiki                          (>= 1:1.19) | 1:1.19.7+dfsg-1
owncloud-doc                                   | 0~20130715-1
owncloud-mysql              (= 5.0.10+dfsg-1)  | 5.0.10+dfsg-1
  OR owncloud-pgsql          (= 5.0.10+dfsg-1)  |
  OR owncloud-sqlite          (= 5.0.10+dfsg-1) |
php-aws-sdk                            (<< 2~) | 1.5.6.2-1
php-crypt-blowfish                             | 1.1.0~RC2-1
php-getid3                        (>= 1.9.3-1) | 1.9.6-1
php-mdb2                                       | 2.5.0b5-1
php-mdb2-schema                                | 0.8.5-1
php-pear                                       | 5.5.1+dfsg-2
php-sabre-dav                        (<< 1.8~) | 1.7.6+dfsg-2
php-sabre-vobject                              | 2.0.7-1
php-seclib                                     | 0.3.5-2
php-symfony-routing                            | 2.0.19-1
php-xml-parser                                 | 1.3.4-6
php5                                           | 5.5.1+dfsg-2
php5-curl                                      | 5.5.1+dfsg-2
php5-gd                                        | 5.5.1+dfsg-2
php5-json                                      | 1.3.1+dfsg-2


Recommends                (Version) | Installed
===================================-+-===========
clamav                              | 0.97.8+dfsg-1
  OR clamav-daemon                   | 0.97.8+dfsg-1
curl                                | 7.32.0-1
exim4                               | 4.80-7
  OR mail-transport-agent            |
liboauth-php                        |
php-services-json                   |
php5-intl                           | 5.5.1+dfsg-2
php5-ldap                           | 5.5.1+dfsg-2
smbclient                           | 2:3.6.17-1
zendframework                       |


Suggests                      (Version) | Installed
=======================================-+-===========
libapache2-mod-xsendfile                |





-- 
Ciao...            //      Fon: 0381-2744150
       Ingo       \X/       http://blog.windfluechter.net
Please don't share this address with Facebook or Google!
gpg pubkey: http://www.juergensmann.de/ij_public_key.asc



More information about the Pkg-owncloud-maintainers mailing list