Summary:ASTERISK-25955: Make single-connection per dns for func_odbc optional
Reporter:Walter Doekes (wdoekes)Labels:
Date Opened:2016-04-25 06:38:25Date Closed:2016-05-10 14:41:51
Versions:13.8.2 Frequency of
is caused byASTERISK-25938 res_odbc: MySQL/MariaDB statement LAST_INSERT_ID() always returns zero.
is duplicated byASTERISK-26010 [patch]func_odbc: single database connection should be optional
Description:Change Iac961fe79154c6211569afcdfec843c0c24c46dc (https://github.com/asterisk/asterisk/commit/7f8d83fef42f4b1d2240ea543f61a5a70754e862 ) fixes ASTERISK-25938 where a dialplan user was expecting a single connection for his func_odbc calls.

The changeset fixes that a single ODBC connection is used for all func_odbc calls. I.e. no concurrent requests.

In the report, the reporter was doing something like this:

The above only makes sense if you surround that with an exclusive lock; which the user did.

Using a lock like that is not the common case. So I'd like the aforementioned fix to be optional -- possibly even disabled by default in master. That would give new users the benefits of concurrent access, while leaving asterisk-13 users (and those who explicitly choose to) with a single connection so the esoteric dialplan above works.


Yes, this is an RFE without patch. I'll get to that, but first when we start moving some machines to 13.
Comments:By: Asterisk Team (asteriskteam) 2016-04-25 06:38:26.379-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: Rusty Newton (rnewton) 2016-04-25 15:56:49.750-0500

I'll open it up so you can tackle it at your leisure.

By: Joshua C. Colp (jcolp) 2016-05-10 14:41:51.554-0500

Someone else has submitted a fix for this on ASTERISK-26010 so tracking it there instead.