mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Added version of lex_string_eq that compares with const char *
Change all my_stcasecmp() calls that uses lexical keywords to use lex_string_eq. This is faster as we only call strcasecmp() for strings of different lengths. Removed not used function lex_string_syseq()
This commit is contained in:
@ -7038,9 +7038,9 @@ Item *LEX::create_item_ident_sp(THD *thd, Lex_ident_sys_st *name,
|
||||
|
||||
if (thd->variables.sql_mode & MODE_ORACLE)
|
||||
{
|
||||
if (!my_strcasecmp(system_charset_info, name->str, "SQLCODE"))
|
||||
if (lex_string_eq(name, STRING_WITH_LEN("SQLCODE")))
|
||||
return new (thd->mem_root) Item_func_sqlcode(thd);
|
||||
if (!my_strcasecmp(system_charset_info, name->str, "SQLERRM"))
|
||||
if (lex_string_eq(name, STRING_WITH_LEN("SQLERRM")))
|
||||
return new (thd->mem_root) Item_func_sqlerrm(thd);
|
||||
}
|
||||
return create_item_ident_nosp(thd, name);
|
||||
|
Reference in New Issue
Block a user