summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authortsmith@maint2.mysql.com <>2006-09-13 09:03:52 +0200
committertsmith@maint2.mysql.com <>2006-09-13 09:03:52 +0200
commit6a31ec2cadb56ca70acffc30a706fbcae614181f (patch)
treef08cbab5b66362c84b62621037950058412d7f9b /sql/table.cc
parenta1c4a48b7e2bc72526019b78c31291c1072565c3 (diff)
parente38f04a09f3c5fbc261273cb50bbf06434830fa3 (diff)
downloadmariadb-git-6a31ec2cadb56ca70acffc30a706fbcae614181f.tar.gz
Merge maint2.mysql.com:/data/localhome/tsmith/bk/mrg50/50
into maint2.mysql.com:/data/localhome/tsmith/bk/mrg50/51
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/table.cc b/sql/table.cc
index fe83398115d..bcc17fd805b 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -2257,7 +2257,7 @@ char *get_field(MEM_ROOT *mem, Field *field)
bool check_db_name(char *name)
{
- char *start=name;
+ uint name_length= 0; // name length in symbols
/* Used to catch empty names and names with end space */
bool last_char_is_space= TRUE;
@@ -2277,13 +2277,15 @@ bool check_db_name(char *name)
name += len;
continue;
}
+ name_length++;
}
#else
last_char_is_space= *name==' ';
#endif
+ name_length++;
name++;
}
- return last_char_is_space || (uint) (name - start) > NAME_LEN;
+ return last_char_is_space || name_length > NAME_LEN;
}