Issue information

Issue ID
#2707
Status
Confirmed
Severity
None
Started
Hercules Elf Bot
Jan 25, 2009 19:18
Last Post
Hercules Elf Bot
Jan 25, 2009 19:18
Confirmation
N/A

Hercules Elf Bot - Jan 25, 2009 19:18

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=2707

CODE
/// Changes the encoding of the connection.
int Sql_SetEncoding(Sql* self, const char* encoding)
{
    if( self && mysql_set_character_set(&self->handle, encoding) )
        return SQL_SUCCESS;
    return SQL_ERROR;
}
there are several problems with this:

1. does not print an error message, even though mysql_error() is available.

2. doesn't clear/fill the previous query buffer, so after this thing returns SQL_ERROR and the calling code uses Sql_ShowDebug(), the sql query from the previous statement will be printed, which is misleading.