summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay.choubey@oracle.com>2013-03-21 22:51:40 +0530
committerNirbhay Choubey <nirbhay.choubey@oracle.com>2013-03-21 22:51:40 +0530
commitf735e50b626103b1f6d6d9daf93ca8c516219233 (patch)
treee2ac7a849c51e7bd193ca985b2680ceb36f65e5c /sql
parentb6bd1998502ca53a33f0d28a9f5df0c5cbc0b5f1 (diff)
downloadmariadb-git-f735e50b626103b1f6d6d9daf93ca8c516219233.tar.gz
Bug#16500013 : ADD VERSION CHECK TO MYSQL_UPGRADE
(Based on Sinisa's patch) Added a version checking facility to mysql_upgrade. The versions used for checking is the version of the server that mysql_upgrade is going to upgrade and the server version that mysql_upgrade was build/distributed with. Also added an option '--version-check' to enable/disable the version checking.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_show.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 4a6568b605a..2811483a0b1 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2311,6 +2311,14 @@ static bool show_status_array(THD *thd, const char *wild,
{
if (!(pos= *(char**) value))
pos= "";
+
+ DBUG_EXECUTE_IF("alter_server_version_str",
+ if (!my_strcasecmp(system_charset_info,
+ variables->name,
+ "version")) {
+ pos= "some-other-version";
+ });
+
end= strend(pos);
break;
}