1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-10840 sql_mode=ORACLE: RAISE statement for predefined exceptions

This commit is contained in:
Alexander Barkov
2016-09-27 13:22:38 +04:00
parent 76714a5c9a
commit 7fa1ad14dc
12 changed files with 434 additions and 45 deletions

View File

@@ -30,6 +30,7 @@
#include "sp.h"
#include "sql_select.h"
#include "sql_cte.h"
#include "sql_signal.h"
void LEX::parse_error()
@@ -5903,6 +5904,24 @@ Item_param *LEX::add_placeholder(THD *thd, char *name,
}
bool LEX::add_signal_statement(THD *thd, const sp_condition_value *v)
{
Yacc_state *state= &thd->m_parser_state->m_yacc;
sql_command= SQLCOM_SIGNAL;
m_sql_cmd= new (thd->mem_root) Sql_cmd_signal(v, state->m_set_signal_info);
return m_sql_cmd == NULL;
}
bool LEX::add_resignal_statement(THD *thd, const sp_condition_value *v)
{
Yacc_state *state= &thd->m_parser_state->m_yacc;
sql_command= SQLCOM_RESIGNAL;
m_sql_cmd= new (thd->mem_root) Sql_cmd_resignal(v, state->m_set_signal_info);
return m_sql_cmd == NULL;
}
#ifdef MYSQL_SERVER
uint binlog_unsafe_map[256];