Commit 9cbc8565 authored by unknown's avatar unknown

Code cleanup


client/mysql.cc:
  Don't call mysql_close() on not initialized object
sql/field.cc:
  code cleanup
parent 28a0c8c6
......@@ -2228,8 +2228,11 @@ static int
sql_real_connect(char *host,char *database,char *user,char *password,
uint silent)
{
mysql_close(&mysql);
connected= 0;
if (connected)
{
connected= 0;
mysql_close(&mysql);
}
mysql_init(&mysql);
if (opt_connect_timeout)
{
......
......@@ -4721,7 +4721,7 @@ String *Field_enum::val_str(String *val_buffer __attribute__((unused)),
{
uint tmp=(uint) Field_enum::val_int();
if (!tmp || tmp > typelib->count)
val_ptr->set((const char*)"",0);
val_ptr->set("",0);
else
val_ptr->set((const char*) typelib->type_names[tmp-1],
(uint) strlen(typelib->type_names[tmp-1]));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment