summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 762c28b0fbf..8ee6ee02d68 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1033,6 +1033,7 @@ char *get_field(MEM_ROOT *mem, TABLE *table, uint fieldnr)
bool check_db_name(const char *name)
{
+ const char *start=end;
while (*name)
{
#if defined(USE_MB) && defined(USE_MB_IDENT)
@@ -1050,7 +1051,7 @@ bool check_db_name(const char *name)
return 1;
name++;
}
- return 0;
+ return (uint) (name - start) > NAME_LEN;
}