[Home]

Summary:ASTERISK-28133: Realtime iaxfriends table 'port' definition causing issues
Reporter:xrobau (xrobau)Labels:
Date Opened:2018-10-25 15:09:40Date Closed:
Priority:TrivialRegression?No
Status:Open/NewComponents:Resources/General
Versions:16.0.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Using the database definition as supplied with Asterisk 16, the iaxfriends table is created with port as an int.  However, various queries are updating that with an empty string ('') which causes an error on newer MySQL versions

{code}
[Oct 26 05:43:10] WARNING[50802]: res_config_mysql.c:636 update_mysql: MySQL RealTime: Failed to update database: Incorrect integer value: '' for column 'port' at row 1
   -- Registered IAX2 '12345678' (AUTHENTICATED) at 99.99.99.99:4569
{code}

This should either be inserted as an integer, or as a NULL, but not as an empty string.  This, historically, wasn't an issue with MySQL until version 5.6 or so, but now it is much stricter about data being given to it, and (legitimately) complains.

The hack workaround is to change the definition of the port col to a char, but the correct fix would be to insert valid data.

Comments:By: Asterisk Team (asteriskteam) 2018-10-25 15:09:41.607-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].