1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix for bug #6572: SHOW ERRORS doesn't

This commit is contained in:
gluh@gluh.mysql.r18.ru
2005-02-23 20:18:21 +03:00
parent 2b5ee94a33
commit fc9c20995f
3 changed files with 46 additions and 0 deletions

View File

@ -58,6 +58,7 @@ void send_error(THD *thd, uint sql_errno, const char *err)
uint length;
char buff[MYSQL_ERRMSG_SIZE+2], *pos;
#endif
const char *orig_err= err;
NET *net= &thd->net;
DBUG_ENTER("send_error");
DBUG_PRINT("enter",("sql_errno: %d err: %s", sql_errno,
@ -82,6 +83,7 @@ void send_error(THD *thd, uint sql_errno, const char *err)
err=ER(sql_errno); /* purecov: inspected */
}
}
orig_err= err;
}
#ifdef EMBEDDED_LIBRARY
@ -120,6 +122,8 @@ void send_error(THD *thd, uint sql_errno, const char *err)
}
VOID(net_write_command(net,(uchar) 255, "", 0, (char*) err,length));
#endif /* EMBEDDED_LIBRARY*/
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, sql_errno,
orig_err ? orig_err : ER(sql_errno));
thd->is_fatal_error=0; // Error message is given
thd->net.report_error= 0;
@ -247,6 +251,8 @@ net_printf(THD *thd, uint errcode, ...)
strmake(net->last_error, text_pos, length);
strmake(net->sqlstate, mysql_errno_to_sqlstate(errcode), SQLSTATE_LENGTH);
#endif
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, errcode,
text_pos ? text_pos : ER(errcode));
thd->is_fatal_error=0; // Error message is given
DBUG_VOID_RETURN;
}