]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_config_mysql: Fix broken column type checking 56/456/1
authorAlexandre Fournier <alexandre.fournier@kiplink.fr>
Fri, 8 May 2015 23:01:26 +0000 (01:01 +0200)
committerAlexandre Fournier <alexandre.fournier@kiplink.fr>
Wed, 13 May 2015 11:40:57 +0000 (06:40 -0500)
commite67e8d5c7ff2ca83a9ec8a32513f4963971a0001
tree0c27381db5defc2eeaa7c90ab82917ff77f7f8ea
parent62422712f7d8916fdbb5e388bf5212a1ca00598a
res_config_mysql: Fix broken column type checking

MySQL configuration engine contains a bug in require_mysql(). This
function is used for column type checking in tables. This bug only
affects DATETIME, DATE and FLOAT types.

It came from mixing the first condition (switch-case-like
if/then/else), to check the expected column type, with the second
condition, to check the actual column type against the expected column
type. Both conditions must be checked separately in order to avoid the
execution of the wrong block.

ASTERISK-18252 #comment This patch might fix the issue
Reported by: Gareth Blades

ASTERISK-25041 #close
Reported by: Alexandre Fournier
Tested by: Alexandre Fournier

Change-Id: I0b8bf7e68ab938be8e6525a249260cb648cb0bfa
addons/res_config_mysql.c