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

MDEV-20734 Allow reserved keywords as user defined type names

This commit is contained in:
Alexander Barkov
2019-10-03 14:02:00 +04:00
parent 54606df1a3
commit d168601e83
10 changed files with 1275 additions and 671 deletions

View File

@@ -10433,3 +10433,30 @@ void Lex_field_type_st::set_handler_length_flags(const Type_handler *handler,
handler= handler->type_handler_unsigned();
set(handler, length, NULL);
}
bool LEX::set_field_type_udt(Lex_field_type_st *type,
const LEX_CSTRING &name,
const Lex_length_and_dec_st &attr)
{
const Type_handler *h;
if (!(h= Type_handler::handler_by_name_or_error(name)))
return true;
type->set(h, attr);
charset= &my_charset_bin;
return false;
}
bool LEX::set_cast_type_udt(Lex_cast_type_st *type,
const LEX_CSTRING &name)
{
const Type_handler *h;
if (!(h= Type_handler::handler_by_name_or_error(name)))
return true;
type->set(h);
charset= NULL;
return false;
}