Fix for multiple test failures on some platforms.

This commit is contained in:
anozdrin@mysql.com 2006-03-09 03:10:39 +03:00
parent 0903941d05
commit be527f3070
2 changed files with 4 additions and 2 deletions

View File

@ -223,7 +223,7 @@ static int find_keyword(LEX *lex, uint len, bool function)
SYNOPSIS SYNOPSIS
is_keyword() is_keyword()
name checked name name checked name (must not be empty)
len length of checked name len length of checked name
RETURN VALUES RETURN VALUES
@ -233,6 +233,7 @@ static int find_keyword(LEX *lex, uint len, bool function)
bool is_keyword(const char *name, uint len) bool is_keyword(const char *name, uint len)
{ {
DBUG_ASSERT(len != 0);
return get_hash_symbol(name,len,0)!=0; return get_hash_symbol(name,len,0)!=0;
} }

View File

@ -713,7 +713,8 @@ append_identifier(THD *thd, String *packet, const char *name, uint length)
int get_quote_char_for_identifier(THD *thd, const char *name, uint length) int get_quote_char_for_identifier(THD *thd, const char *name, uint length)
{ {
if (!is_keyword(name,length) && if (!length ||
!is_keyword(name,length) &&
!require_quotes(name, length) && !require_quotes(name, length) &&
!(thd->options & OPTION_QUOTE_SHOW_CREATE)) !(thd->options & OPTION_QUOTE_SHOW_CREATE))
return EOF; return EOF;