asterisk/funcs
Mark Michelson 924738e950 func_odbc: Use one connection per DSN.
res_odbc was changed in Asterisk 13.8.0 to remove connection management,
opting instead to let unixodbc maintain open connections and return
those to Asterisk as requested.

This was a boon for realtime, since it meant that multiple threads could
potentially run parallel queries since they could each be using their
own database connections.

However, on the user-facing side, func_odbc, there were some inherent
behaviors being relied on that no longer hold true after the change.
One such reported behavior was that MySQL's LAST_INSERTED_ID() works
per-connection. This means that if Asterisk uses separate connections
for every database operation, whereas before it used one connection for
everything, we have broken expectations and functionality.

The fix provided in this patch is to make func_odbc use a single
database connection per DSN. This way, user-facing database usage will
have the same behavior as it did pre-13.8.0. However, realtime, which is
the real workhorse of database interaction, will continue to let
unixodbc manage connections.

ASTERISK-25938 #close
Reported by Edwin Vandamme

Change-Id: Iac961fe79154c6211569afcdfec843c0c24c46dc
2016-04-22 14:31:54 -05:00
..
func_aes.c func_aes: fix misuse of strlen on binary data 2016-03-18 22:04:18 -05:00
func_audiohookinherit.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
func_base64.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_blacklist.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_callcompletion.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_callerid.c func_callerid.c: Update REDIRECTING reason documentation. 2016-03-01 20:22:06 -06:00
func_cdr.c funcs/func_cdr: Correctly report high precision values for duration and billsec 2016-01-20 08:11:44 -06:00
func_channel.c func_channel: Add help text for undocumented CHANNEL function arguments 2016-01-14 09:26:15 -06:00
func_config.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_curl.c funcs/func_curl: Add the ability for CURL to download and store files 2016-03-23 11:46:32 -03:00
func_cut.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_db.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_devstate.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_dialgroup.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_dialplan.c AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro. 2015-05-13 16:34:23 -05:00
func_enum.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_env.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_extstate.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_frame_trace.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_global.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_groupcount.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_hangupcause.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_holdintercept.c funcs/func_holdintercept: Actually add the HOLD_INTERCEPT function 2015-10-20 22:24:00 -05:00
func_iconv.c func_iconv: Ensure output strings are properly terminated. 2016-02-11 11:26:03 -06:00
func_jitterbuffer.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_lock.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_logic.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_math.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_md5.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_module.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_odbc.c func_odbc: Use one connection per DSN. 2016-04-22 14:31:54 -05:00
func_periodic_hook.c Fix potential crash after unload of func_periodic_hook or test_message. 2015-05-14 05:41:30 -05:00
func_periodic_hook.exports.in Fix error loading res_monitor. 2014-04-23 15:02:39 +00:00
func_pitchshift.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_pjsip_aor.c func_pjsip_aor: Fix leaked contact from iterator. 2015-06-15 17:14:56 -05:00
func_pjsip_contact.c pjsip_options: Fix non-qualified contacts showing as unavailable 2015-04-19 20:07:45 -05:00
func_pjsip_endpoint.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_presencestate.c func_presencestate: Return "not_set" when no data is set in AstDB 2015-10-07 09:24:31 +03:00
func_rand.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_realtime.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_sha1.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_shell.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_sorcery.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_speex.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_sprintf.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_srv.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_strings.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_sysinfo.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_talkdetect.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_timeout.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_uri.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_version.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_vmcount.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
func_volume.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
Makefile Title update 2012-10-14 21:56:13 +00:00