row0mysql.c:

Fix crash in InnoDB RENAME TABLE if 'databasename/tablename' is shorter than 5 characters (Bug #2689); reported by Sergey Petrunia
This commit is contained in:
heikki@hundin.mysql.fi 2004-02-09 18:56:39 +02:00
parent 3d039e4986
commit d2d1e6f726

View File

@ -2185,7 +2185,7 @@ row_is_mysql_tmp_table_name(
{
ulint i;
for (i = 0; i <= ut_strlen(name) - 5; i++) {
for (i = 0; i + 5 <= ut_strlen(name); i++) {
if (ut_memcmp(name + i, (char*)"/#sql", 5) == 0) {
return(TRUE);