[Home]

Summary:ASTERISK-27572: cdr_mysql creates empty records if reconnects when mysql was not up on module load
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2018-01-10 11:14:43.000-0600Date Closed:2018-06-06 08:13:43
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Addons/cdr_mysql
Versions:13.18.5 15.1.5 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Setup: configure the system to use mysql as a CDR backend.

1. asterisk -rx 'module unload cdr_mysql.so'
1. Stop mysqld (or mariadb, or whatever)
1. asterisk -rx 'module load cdr_mysql.so'
1. Start mysqld
1. Make a call that generates a CDR.
1. The MySQL CDR backend will try to reconnect each time it has a record to generate and there's no existing connection.

Expected: A normal record for the call.

Actual: The record for the call has no field set.

The reason for that is that when reconnecting (on mysql_log()), the content of the columns list is not created.

Tested on branch 13 (commit 8e0f2c7379c1a39b5416878e36515b6ff97aaa9d). Code looks the same on master.
Comments:By: Asterisk Team (asteriskteam) 2018-01-10 11:14:43.466-0600

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: Kevin Harwell (kharwell) 2018-01-10 15:56:59.872-0600

Unfortunately, the cdr_mysql module is currently deprecated and currently has no official maintainer. As such, if you'd like to see this fixed you'll either need to submit a patch yourself or find someone in the community that is willing and able to work on it.

By: Friendly Automation (friendly-automation) 2018-06-06 08:13:44.329-0500

Change 8919 merged by George Joseph:
cdr_mysql: split mysql init out of my_load_module

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

By: Friendly Automation (friendly-automation) 2018-06-06 08:13:53.225-0500

Change 8920 merged by George Joseph:
cdr_mysql: my_connect_db(): reduce indentation

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