added support for TYPE_MEDIUM_BLOB to queries