Bugs item #3306933, was opened at 2011-05-24 14:38
Message generated for change (Comment added) made by magick777
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=937964&aid=3306933&group_id=191583
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Database
Group: SVN (please specify revision!)
>Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Keith Dunnett (magick777)
Assigned to: Nobody/Anonymous (nobody)
Summary: edit-domain.php fails to handle disabled quota
Initial Comment:
(found in SVN 1061)
SQL query at line 110 of edit-domain.php fails with an error in SQL syntax.
quota=$fDomainquota needs to be in single quotes, i.e. quota='$fDomainquota', in order to accept a value of '-1'.
----------------------------------------------------------------------
>Comment By: Keith Dunnett (magick777)
Date: 2011-05-31 23:21
Message:
Database is MySQL 5.1.49-3, shipped with Debian 6.
Problem does not occur with other fields (mailboxes and aliases); these
seem to accept a value of -1 without having quoted them in the SQL query.
Doesn't make much sense.
Removed the single quotes again to check I'm not going mad. Having done
so, editing any domain now fails regardless of the quota value, with:
DEBUG INFORMATION:
Invalid query: You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'transport='virtual', backupmx='0',active='1',modified=NOW() WHERE
domain='cardre' at line 1
This applies regardless of the quota value specified, it turns out, which
confuses me more. But, I put the quotes back in and the query succeeds with
the quota correctly recorded - whether or not that quota is a positive or
negative integer. Colour me (very) confused; my description of the issue
now seems imperfect, but, it breaks as soon as I remove the quotes.
I'll hold off for a couple more days on 1064 in case there's any more
debugging I can usefully do, but, if the problem is fixed in latest SVN it
may or may not be worth spending too much debug time on it. Let me know if
I can usefully test anything else against 1061.
----------------------------------------------------------------------
Comment By: Christian Boltz (christian_boltz)
Date: 2011-05-31 22:51
Message:
Hmm, what database are you using? I can't reproduce it with MySQL.
Another question: does this bug also happen with the other fields, for
example the numer of mailboxes and aliases?
Please check this - it would be good to know if I decide to backport the
fix to the 2.3 branch.
Afterwards, please update to the latest SVN version. I replaced the query
to use db_update() in SVN r1064 which results in more readable code and, as
a side effect ;-) also fixes this bug.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=937964&aid=3306933&group_id=191583
|