summaryrefslogtreecommitdiff
path: root/configs/samples/func_odbc.conf.sample
diff options
context:
space:
mode:
authorAlexei Gradinari <alex2grad@gmail.com>2016-05-12 16:18:22 -0400
committerAlexei Gradinari <alex2grad@gmail.com>2016-05-20 13:46:03 -0400
commitc378b00a839e4a2457eae0510ef6ec992199b07a (patch)
treeff20d7f1b19cfe7f8df1b5a174a1d7d9c023deaa /configs/samples/func_odbc.conf.sample
parentdd354009d3c64499640a0297703f5619e2cd5007 (diff)
func_odbc: single database connection should be optional
func_odbc was changed in Asterisk 13.9.0 to make func_odbc use a single database connection per DSN because of reported bug ASTERISK-25938 with MySQL/MariaDB LAST_INSERT_ID(). This is drawback in performance when func_odbc is used very often in dialplan. Single database connection should be optional. ASTERISK-26010 Change-Id: I7091783a7150252de8eeb455115bd00514dfe843
Diffstat (limited to 'configs/samples/func_odbc.conf.sample')
-rw-r--r--configs/samples/func_odbc.conf.sample14
1 files changed, 14 insertions, 0 deletions
diff --git a/configs/samples/func_odbc.conf.sample b/configs/samples/func_odbc.conf.sample
index fd528d216..f4d90b799 100644
--- a/configs/samples/func_odbc.conf.sample
+++ b/configs/samples/func_odbc.conf.sample
@@ -1,6 +1,20 @@
;
; func_odbc.conf
;
+[general]
+;
+; Asterisk uses separate connections for every database operation.
+; If single_db_connection is enabled then func_odbc will use a single
+; database connection per DSN.
+; This option exists for those who expect that a second func_odbc call
+; works on the same connection. That allows you to do a LAST_INSERT_ID()
+; in a second func_odbc call.
+; Note that you'll need additional dialplan locks for this behaviour to work.
+; There are better ways: using stored procedures/functions instead.
+; This option is disabled by default.
+;single_db_connection=no
+;
+;
; Each context is a separately defined function. By convention, all
; functions are entirely uppercase, so the defined contexts should also
; be all-uppercase, but there is nothing that enforces this. All functions