summaryrefslogtreecommitdiff
path: root/client/mysql_upgrade.c
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-07-20 16:30:10 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2010-07-20 16:30:10 -0300
commit6c15f6718f96cf2a712f1ea1ccf6e057ada5aa5f (patch)
treec02d7fe89f0e9d9cbd05e83dd77ceeed812eb293 /client/mysql_upgrade.c
parent8d407c5f704c523205d52eabd89ca7fd366cf6eb (diff)
parentc96b249fc3912f7a86f885cc62da1a3eeed537c6 (diff)
downloadmariadb-git-6c15f6718f96cf2a712f1ea1ccf6e057ada5aa5f.tar.gz
Merge of mysql-5.1-bugteam into mysql-trunk-merge.
Diffstat (limited to 'client/mysql_upgrade.c')
-rw-r--r--client/mysql_upgrade.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 20436200c7e..eeab3611913 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -596,7 +596,10 @@ static int upgrade_already_done(void)
my_fclose(in, MYF(0));
- return (strncmp(buf, MYSQL_SERVER_VERSION,
+ if (!res)
+ return 0; /* Could not read from file => not sure */
+
+ return (strncmp(res, MYSQL_SERVER_VERSION,
sizeof(MYSQL_SERVER_VERSION)-1)==0);
}