summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorunknown <anozdrin@mysql.com>2006-03-09 03:10:39 +0300
committerunknown <anozdrin@mysql.com>2006-03-09 03:10:39 +0300
commitbc6b7859ae61fa7977d8134c0e890e3f82a31848 (patch)
treef2751b5893235133e3a67a0cadb89e27a0a475c8 /sql/sql_lex.cc
parentbfa21dd1520b2f718a1f1aa8c6256f62c91cfff8 (diff)
downloadmariadb-git-bc6b7859ae61fa7977d8134c0e890e3f82a31848.tar.gz
Fix for multiple test failures on some platforms.
sql/sql_lex.cc: Added a debug assertion that the passed string is not empty. sql/sql_show.cc: Do not quote empty string.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 1ed8887a878..49b0c70ff03 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -223,7 +223,7 @@ static int find_keyword(LEX *lex, uint len, bool function)
SYNOPSIS
is_keyword()
- name checked name
+ name checked name (must not be empty)
len length of checked name
RETURN VALUES
@@ -233,6 +233,7 @@ static int find_keyword(LEX *lex, uint len, bool function)
bool is_keyword(const char *name, uint len)
{
+ DBUG_ASSERT(len != 0);
return get_hash_symbol(name,len,0)!=0;
}