1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge mysql.com:/opt/local/work/mysql-4.1-root

into  mysql.com:/opt/local/work/mysql-5.0-root
This commit is contained in:
konstantin@mysql.com
2005-07-14 20:02:34 +04:00
2 changed files with 57 additions and 0 deletions

View File

@ -1869,6 +1869,16 @@ static void net_clear_error(NET *net)
}
}
static void stmt_clear_error(MYSQL_STMT *stmt)
{
if (stmt->last_errno)
{
stmt->last_errno= 0;
stmt->last_error[0]= '\0';
strmov(stmt->sqlstate, not_error_sqlstate);
}
}
/*
Set statement error code, sqlstate, and error message
from given errcode and sqlstate.
@ -4959,6 +4969,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags)
stmt->state= MYSQL_STMT_INIT_DONE;
return 1;
}
stmt_clear_error(stmt);
}
}
stmt->state= MYSQL_STMT_PREPARE_DONE;