]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_config_odbc/res_odbc: Fix handling of non-text columns updates with empty values.
authorMatthew Jordan <mjordan@digium.com>
Fri, 28 Mar 2014 16:48:32 +0000 (16:48 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 28 Mar 2014 16:48:32 +0000 (16:48 +0000)
commit016c672852e1de5c2200cbdd4181627a35dd1c0b
tree889b00358388273f37f99a215e83e7dc1d235009
parented2452a9a53a0d371cb7a34f858e21593a3ac1b8
res_config_odbc/res_odbc: Fix handling of non-text columns updates with empty values.

This patch fixes setting nullable integer columns to NULL instead of an empty
string, which fails for PostgreSQL, for example. The current code is supposed
to do so, but the check is broken. The patch also allows the first column in
the list to be a nullable integer.

This patch also adds a compatibility setting in res_odbc.conf,
allow_empty_string_in_nontext. It is enabled by default. It should be disabled
for database backends (such as PostgreSQL) that require NULL instead of an
empty string for Integer columns.

Review: https://reviewboard.asterisk.org/r/3375

(issue ASTERISK-23459)
Reported by: zvision
patches:
  res_config_odbc.diff uploaded by zvision (License 5755)
........

Merged revisions 411399 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 411408 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
UPGRADE.txt
configs/res_odbc.conf.sample
include/asterisk/res_odbc.h
res/res_config_odbc.c
res/res_odbc.c
res/res_odbc.exports.in