| 762 | */ |
| 763 | |
| 764 | void push_warning(THD *thd, Sql_condition::enum_warning_level level, |
| 765 | uint code, const char *msg) |
| 766 | { |
| 767 | DBUG_ENTER("push_warning"); |
| 768 | DBUG_PRINT("enter", ("code: %d, msg: %s", code, msg)); |
| 769 | |
| 770 | /* |
| 771 | Calling push_warning/push_warning_printf with a level of |
| 772 | WARN_LEVEL_ERROR *is* a bug. Either use my_printf_error(), |
| 773 | my_error(), or WARN_LEVEL_WARN. |
| 774 | */ |
| 775 | DBUG_ASSERT(level != Sql_condition::WARN_LEVEL_ERROR); |
| 776 | |
| 777 | if (level == Sql_condition::WARN_LEVEL_ERROR) |
| 778 | level= Sql_condition::WARN_LEVEL_WARN; |
| 779 | |
| 780 | (void) thd->raise_condition(code, NULL, level, msg); |
| 781 | |
| 782 | DBUG_VOID_RETURN; |
| 783 | } |
| 784 | |
| 785 | |
| 786 | /* |
no test coverage detected