summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/mysql_system_tables.sql22
-rw-r--r--scripts/mysql_system_tables_fix.sql38
2 files changed, 39 insertions, 21 deletions
diff --git a/scripts/mysql_system_tables.sql b/scripts/mysql_system_tables.sql
index 69d6d6d7feb..b5ee4d6dd41 100644
--- a/scripts/mysql_system_tables.sql
+++ b/scripts/mysql_system_tables.sql
@@ -11,7 +11,7 @@
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--
-- The system tables of MySQL Server
@@ -161,26 +161,6 @@ EXECUTE stmt;
DROP PREPARE stmt;
--
--- Unlike 'performance_schema', the 'mysql' database is reserved already,
--- so no user procedure is supposed to be there
---
-drop procedure if exists mysql.die;
-create procedure mysql.die() signal sqlstate 'HY000' set message_text='Unexpected content found in the performance_schema database.';
-
---
--- For broken upgrades, SIGNAL the error
---
-
-SET @cmd="call mysql.die()";
-
-SET @str = IF(@broken_pfs > 0, @cmd, 'SET @dummy = 0');
-PREPARE stmt FROM @str;
-EXECUTE stmt;
-DROP PREPARE stmt;
-
-drop procedure mysql.die;
-
---
-- From this point, only create the performance schema tables
-- if the server is build with performance schema
--
diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql
index f91277a83f6..3b6f0cccf20 100644
--- a/scripts/mysql_system_tables_fix.sql
+++ b/scripts/mysql_system_tables_fix.sql
@@ -1,3 +1,18 @@
+-- Copyright (C) 2008, 2010 Oracle and/or its affiliates. All rights reserved.
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; version 2 of the License.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program; if not, write to the Free Software
+-- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
# This part converts any old privilege tables to privilege tables suitable
# for current version of MySQL
@@ -604,6 +619,29 @@ ALTER TABLE user MODIFY Create_tablespace_priv enum('N','Y') COLLATE utf8_genera
UPDATE user SET Create_tablespace_priv = Super_priv WHERE @hadCreateTablespacePriv = 0;
+--
+-- Unlike 'performance_schema', the 'mysql' database is reserved already,
+-- so no user procedure is supposed to be there.
+--
+-- NOTE: until upgrade is finished, stored routines are not available,
+-- because system tables (e.g. mysql.proc) might be not usable.
+--
+drop procedure if exists mysql.die;
+create procedure mysql.die() signal sqlstate 'HY000' set message_text='Unexpected content found in the performance_schema database.';
+
+--
+-- For broken upgrades, SIGNAL the error
+--
+
+SET @cmd="call mysql.die()";
+
+SET @str = IF(@broken_pfs > 0, @cmd, 'SET @dummy = 0');
+PREPARE stmt FROM @str;
+EXECUTE stmt;
+DROP PREPARE stmt;
+
+drop procedure mysql.die;
+
# Activate the new, possible modified privilege tables
# This should not be needed, but gives us some extra testing that the above
# changes was correct