#208 Quta's stored as integers, should be bigint.

v2.3.1
closed-fixed
nobody
Database (41)
5
2011-02-18
2010-09-01
oliver
No

This is a copy (re-opening) of 2986880.

I"m opening a new ticket because I can't seem to find an edit button.

From there:
"If you disagree or still have "small" integer quota fields with 2.3 or the
upcoming 2.3.1 release (don't forget to run setup.php after upgrade), feel
free to reopen this ticket ;-)"

I just did a fresh install of 2.3.2 and the issue is still not fixed (for pgsql).
postfix_new=> \d mailbox;
Table "public.mailbox"
Column | Type | Modifiers
------------+--------------------------+----------------------------------------
username | character varying(255) | not null
password | character varying(255) | not null default ''::character varying
name | character varying(255) | not null default ''::character varying
maildir | character varying(255) | not null default ''::character varying
quota | integer | not null default 0
created | timestamp with time zone | default now()
modified | timestamp with time zone | default now()
active | boolean | not null default true
domain | character varying(255) |
local_part | character varying(255) | not null
Indexes:
"mailbox_key" PRIMARY KEY, btree (username)
"mailbox_domain_idx" btree (domain)
"mailbox_username_active" btree (username, active)
Foreign-key constraints:
"mailbox_domain_fkey1" FOREIGN KEY (domain) REFERENCES domain(domain)

Adding a user with anything over a 4GiB mailbox gives the following error:

DEBUG INFORMATION:
Invalid query: ERROR: value "8589934592" is out of range for type integer LINE 1: ...','test','test.tld/test@test.tld/','test.tld','858993459... ^

Discussion

  • Christian Boltz

    Christian Boltz - 2011-02-17

    Ah, PostgreSQL - that explains it. My fix was for MySQL...

    David, can you give me an ALTER TABLE query to change the quota field in the mailbox table to bigint?
    (I'll then handle the needed changes in upgrade.php.)

     
  • GingerDog

    GingerDog - 2011-02-17

    alter table mailbox alter column quota type bigint;

     
  • Christian Boltz

    Christian Boltz - 2011-02-18

    For the records: quota and maxquota in the domain table also needed a change to bigint.

    Commited to SVN r968. I'll also backport it to the 2.3 branch later.

    Note that you have to run setup.php to do the database changes.

     
  • Christian Boltz

    Christian Boltz - 2011-02-18
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks