~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to scripts/mysql_system_tables_fix.sql

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
 
2
 
3
# This program is free software; you can redistribute it and/or modify
 
4
# it under the terms of the GNU General Public License as published by
 
5
# the Free Software Foundation; version 2 of the License.
 
6
 
7
# This program is distributed in the hope that it will be useful,
 
8
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
# GNU General Public License for more details.
 
11
 
12
# You should have received a copy of the GNU General Public License
 
13
# along with this program; if not, write to the Free Software
 
14
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
15
 
1
16
# This part converts any old privilege tables to privilege tables suitable
2
17
# for current version of MySQL
3
18
 
58
73
    COLLATE utf8_general_ci DEFAULT '' NOT NULL,
59
74
  MODIFY Table_priv set('Select','Insert','Update','Delete','Create',
60
75
                        'Drop','Grant','References','Index','Alter',
61
 
                        'Create View','Show view')
 
76
                        'Create View','Show view','Trigger')
62
77
    COLLATE utf8_general_ci DEFAULT '' NOT NULL,
63
78
  COMMENT='Table privileges';
64
79
 
584
599
ALTER TABLE db ADD Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
585
600
ALTER TABLE db MODIFY Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
586
601
 
587
 
ALTER TABLE tables_priv MODIFY Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
588
 
 
589
602
UPDATE user SET Trigger_priv=Super_priv WHERE @hadTriggerPriv = 0;
590
603
 
591
604
# Activate the new, possible modified privilege tables