[asterisk-bugs] [Asterisk 0015170]: [patch] MySQL ENUM Type Not Detected
Asterisk Bug Tracker
noreply at bugs.digium.com
Thu Aug 20 16:26:41 CDT 2009
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=15170
======================================================================
Reported By: leobrown
Assigned To: lmadsen
======================================================================
Project: Asterisk
Issue ID: 15170
Category: Addons/cdr_addon_mysql
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
Asterisk Version: SVN
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-05-21 07:45 CDT
Last Modified: 2009-08-20 16:26 CDT
======================================================================
Summary: [patch] MySQL ENUM Type Not Detected
Description:
The raw values for the AMAFLAGS column are detected by a switch case that
checks all numeric types. Unfortunately ENUM is not in the list. ENUM is
technically a numeric type. So if you have the column definition:
amaflags ENUM('DOCUMENTATION','BILLING','OMIT')
This will work. However, if you have the definition:
amaflags ENUM('info','outbound','inbound')
This will *not* work and the column will be set to NULL due to an
unparsable value. By adding the ENUM column type instead, both syntaxes
will work!
======================================================================
----------------------------------------------------------------------
(0109420) tilghman (administrator) - 2009-08-20 16:26
https://issues.asterisk.org/view.php?id=15170#c109420
----------------------------------------------------------------------
<i>Finally, from your point that "if the enum specifies the possible values
out of order" there will be an issue, I really don't think this should be
considered an issue. The CREATE TABLE syntax is given with the module and
this is what is used.</i>
It could be used, but it is not necessarily the only option.
<i>Why, if your point is valid, is there a test in the module for numeric
types in the AMAFLAGS field?</i>
For legacy reasons; the amaflags was once specified by this backend as an
integer field, and we want to remain compatible with that implementation.
Issue History
Date Modified Username Field Change
======================================================================
2009-08-20 16:26 tilghman Note Added: 0109420
======================================================================
More information about the asterisk-bugs
mailing list