]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_config_mysql: Fix broken column type checking 55/455/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:48 +0000 (06:40 -0500)
commit9370db107a7f5983e1ae642e5930406ba13ab5f7
treef9b5f945d70aaf4e4a84a7f21b090b3ac506f733
parent735d337d884d2b1f2ccce3224e4bb615c8a08429
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