1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-12846 sql_mode=ORACLE: using Oracle-style placeholders in direct query execution makes the server crash

This commit is contained in:
Alexander Barkov
2017-11-15 14:18:46 +04:00
parent 765452dbef
commit b8f906dd4b
3 changed files with 39 additions and 0 deletions

View File

@ -6438,6 +6438,11 @@ Item *LEX::create_and_link_Item_trigger_field(THD *thd,
Item_param *LEX::add_placeholder(THD *thd, const LEX_CSTRING *name,
const char *start, const char *end)
{
if (!thd->m_parser_state->m_lip.stmt_prepare_mode)
{
thd->parse_error(ER_SYNTAX_ERROR, start);
return NULL;
}
if (!parsing_options.allows_variable)
{
my_error(ER_VIEW_SELECT_VARIABLE, MYF(0));