From: Mathieu Parent Date: Tue, 26 Mar 2013 21:16:44 +0000 (+0100) Subject: MIN is an aggregate function on MySQL X-Git-Tag: v1.3.17-final~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c3b30a88e391c21b3110d7d6f73349cc1451bc56;p=thirdparty%2Ffreeswitch.git MIN is an aggregate function on MySQL Closes: FS-5218 (Thanks to Nathan Neulinger for the patch) --- diff --git a/src/mod/endpoints/mod_skinny/skinny_server.c b/src/mod/endpoints/mod_skinny/skinny_server.c index 0f0b18d7f2..7558c88f91 100644 --- a/src/mod/endpoints/mod_skinny/skinny_server.c +++ b/src/mod/endpoints/mod_skinny/skinny_server.c @@ -1508,11 +1508,10 @@ switch_status_t skinny_handle_button_template_request(listener_t *listener, skin /* Add buttons */ if ((sql = switch_mprintf( - "SELECT device_name, device_instance, position, MIN(type, %d) AS type " + "SELECT device_name, device_instance, position, type " "FROM skinny_buttons " "WHERE device_name='%s' AND device_instance=%d " "ORDER BY position", - SKINNY_BUTTON_UNDEFINED, listener->device_name, listener->device_instance ))) { skinny_execute_sql_callback(profile, profile->sql_mutex, sql, skinny_handle_button_template_request_callback, &helper);