Made mysql_drop_function a static function. Added comments about the function.
More readable code.

Replaced HA_LEX_CREATE_REPLACE and HA_LEX_CREATE_IF_NOT_EXISTS flags with is_create_or_replace() and is_create_if_not_exists() method invocations wherever possible.
Bug fix

CREATE DATABASE IF NOT EXISTS method was printing wrong message as output.
'Query OK, 1 row affected, 1 warning (0.01 sec)' instead of 'Query OK, 0 row affected, 1 warning (0.01 sec)'.