[Home]

Summary:ASTERISK-27782: cdr_mysql: Missing MYSQL_PORT definition
Reporter:Evandro César Arruda (ecarruda)Labels:patch
Date Opened:2018-03-29 08:45:30Date Closed:2018-04-12 05:21:11
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Addons/cdr_mysql
Versions:15.3.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:( 0) asterisk_addon_mysql.patch
Description:Missing MYSQL_PORT define instead of 0 changed on ASTERISK-27366.

  [CC] cdr_mysql.c -> cdr_mysql.o
cdr_mysql.c: In function ‘my_load_module’:
cdr_mysql.c:504:63: error: ‘MYSQL_PORT’ undeclared (first use in this function)
 res |= my_load_config_number(cfg, "global", "port", &dbport, MYSQL_PORT);
                                                              ^~~~~~~~~~
cdr_mysql.c:504:63: note: each undeclared identifier is reported only once for each function it appears in
/opt/install/asterisk/asterisk-15.3.0/Makefile.rules:149: recipe for target 'cdr_mysql.o' failed

I searched in Asterisk directory and I checked on mysql.h included, booth not have any reference to MYSQL_PORT definition.
Comments:By: Asterisk Team (asteriskteam) 2018-03-29 08:45:31.324-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].

By: Evandro César Arruda (ecarruda) 2018-03-29 08:47:08.095-0500

I'm sending used patch to compile Asterisk 15.3.0


By: Joshua C. Colp (jcolp) 2018-03-29 08:53:14.727-0500

What system were you doing the install on? Distribution and version of MySQL client. As well - do you plan on going through the code review process for that?

By: Evandro César Arruda (ecarruda) 2018-03-29 08:59:09.917-0500

Hello Joshua,

I tested on Debian 9.3 with MariaDB Server version 10.2.14+maria~stretch and same version of MariaDB client with libmysqlclient18 and libmariadb-dev 10.2.10+maria~stretch.

I tried to search on google, git hub and others about any reference to MYSQL_PORT definition and i didn't find it on Mysql/MariaDB project.

Yes i want to going to code review process if my report is ok.


By: Joshua C. Colp (jcolp) 2018-04-02 06:46:51.110-0500

Your report is fine. I've accepted this issue, so you can put the change up for code review if you wish.

By: Evandro César Arruda (ecarruda) 2018-04-02 06:53:41.798-0500

Thanks Joshua! I'm going to do it

By: Friendly Automation (friendly-automation) 2018-04-12 05:21:12.992-0500

Change 8767 merged by Jenkins2:
cdr_mysql: Compile error because MYSQL_PORT definition is missing

[https://gerrit.asterisk.org/8767|https://gerrit.asterisk.org/8767]

By: Friendly Automation (friendly-automation) 2018-04-12 05:26:44.105-0500

Change 8768 merged by Jenkins2:
cdr_mysql: Compile error because MYSQL_PORT definition is missing

[https://gerrit.asterisk.org/8768|https://gerrit.asterisk.org/8768]

By: Friendly Automation (friendly-automation) 2018-04-12 05:35:44.764-0500

Change 8708 merged by Joshua Colp:
cdr_mysql: Compile error because MYSQL_PORT definition is missing

[https://gerrit.asterisk.org/8708|https://gerrit.asterisk.org/8708]

By: Sean Bright (seanbright) 2018-04-12 09:14:21.391-0500

[~ecarruda], please provide the complete output of the following command on your machine:

{noformat}
dpkg --get-selections | grep -i '\(maria\|mysql\)'
{noformat}

By: Evandro César Arruda (ecarruda) 2018-04-12 09:18:42.158-0500

{noformat}
libdbd-mysql-perl install
libmariadb-dev install
libmariadb2:amd64 install
libmariadb3 install
libmariadbclient18 install
libmysqlclient18 install
mariadb-client-10.2 install
mariadb-client-core-10.2 install
mariadb-common install
mariadb-server-10.2 install
mariadb-server-core-10.2 install
mysql-common install
php7.0-mysql install
python-mysqldb install
python-pymysql install
python3-mysqldb install
python3-pymysql install
{noformat}


By: Sean Bright (seanbright) 2018-04-12 09:27:03.285-0500

I'm not able to find {{libmysqlclient18}} on a freshly installed debian 9.4. Do you have additional repositories configured? Or will I need to find a 9.3 installer?

By: Evandro César Arruda (ecarruda) 2018-04-12 09:29:20.820-0500

Sean,

I use MariaDB Official Debian repository to install:

Package: libmysqlclient18
Source: mariadb-10.2
Version: 10.2.14+maria~stretch
Architecture: amd64
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>


# MariaDB 10.2 repository list
deb [arch=amd64,i386] http://mirror.edatel.net.co/mariadb/repo/10.2/debian stretch main


By: Sean Bright (seanbright) 2018-04-12 09:56:02.265-0500

Closing (again). Figuring out the correct fix for this will take way more time that it is worth, so I am giving up.