Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-11-23 18:50:52+01:00, msvensson@neptunus.(none) +1 -0
Merge neptunus.(none):/home/msvensson/mysql/bug20589/my50-bug20589
into neptunus.(none):/home/msvensson/mysql/bug20589/my51-bug20589
MERGE: 1.1810.2304.7
scripts/mysql_fix_privilege_tables.sql@stripped, 2006-11-23 18:50:49+01:00,
msvensson@neptunus.(none) +0 -1
Manual merge
MERGE: 1.9.1.30
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/bug20589/my51-bug20589/RESYNC
--- 1.49/scripts/mysql_fix_privilege_tables.sql 2006-11-23 18:50:58 +01:00
+++ 1.50/scripts/mysql_fix_privilege_tables.sql 2006-11-23 18:50:58 +01:00
@@ -52,9 +52,8 @@ ADD x509_subject BLOB NOT NULL;
ALTER TABLE user MODIFY ssl_type enum('','ANY','X509', 'SPECIFIED') NOT NULL;
--
--- Create tables_priv and columns_priv if they don't exists
+-- tables_priv
--
-
CREATE TABLE IF NOT EXISTS tables_priv (
Host char(60) binary DEFAULT '' NOT NULL,
Db char(64) binary DEFAULT '' NOT NULL,
@@ -62,22 +61,40 @@ CREATE TABLE IF NOT EXISTS tables_priv (
Table_name char(64) binary DEFAULT '' NOT NULL,
Grantor char(77) DEFAULT '' NOT NULL,
Timestamp timestamp(14),
- Table_priv
set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter')
COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci
DEFAULT '' NOT NULL,
+ Table_priv set('Select','Insert','Update','Delete','Create',
+ 'Drop','Grant','References','Index','Alter')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL,
+ Column_priv set('Select','Insert','Update','References')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL,
PRIMARY KEY (Host,Db,User,Table_name)
) CHARACTER SET utf8 COLLATE utf8_bin;
--- Fix collation of set fields
+
ALTER TABLE tables_priv
- modify Table_priv
set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter')
COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- modify Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci
DEFAULT '' NOT NULL;
-ALTER TABLE procs_priv ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
-ALTER TABLE procs_priv
- modify Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT
'' NOT NULL;
-ALTER TABLE procs_priv
- add Routine_type enum('FUNCTION','PROCEDURE') COLLATE utf8_general_ci NOT NULL AFTER
Routine_name;
-ALTER TABLE procs_priv
- modify Timestamp timestamp(14) AFTER Proc_priv;
+ ADD KEY Grantor (Grantor);
+
+ALTER TABLE tables_priv comment='Table privileges';
+ALTER TABLE tables_priv
+ MODIFY Host char(60) NOT NULL default '',
+ MODIFY Db char(64) NOT NULL default '',
+ MODIFY User char(16) NOT NULL default '',
+ MODIFY Table_name char(64) NOT NULL default '',
+ MODIFY Grantor char(77) NOT NULL default '',
+ ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
+
+ALTER TABLE tables_priv
+ MODIFY Column_priv set('Select','Insert','Update','References')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL;
+
+ALTER TABLE tables_priv
+ MODIFY Table_priv set('Select','Insert','Update','Delete','Create',
+ 'Drop','Grant','References','Index','Alter',
+ 'Create View','Show view')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL;
+
+--
+-- columns_priv
+--
CREATE TABLE IF NOT EXISTS columns_priv (
Host char(60) DEFAULT '' NOT NULL,
Db char(64) DEFAULT '' NOT NULL,
@@ -88,16 +105,26 @@ CREATE TABLE IF NOT EXISTS columns_priv
Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci
DEFAULT '' NOT NULL,
PRIMARY KEY (Host,Db,User,Table_name,Column_name)
) CHARACTER SET utf8 COLLATE utf8_bin;
--- Fix collation of set fields
+
+-- Name change of Type -> Column_priv from MySQL 3.22.12
ALTER TABLE columns_priv
- MODIFY Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci
DEFAULT '' NOT NULL;
+ CHANGE Type Column_priv set('Select','Insert','Update','References')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL;
+ALTER TABLE columns_priv comment='Column privileges';
---
--- Name change of Type -> Column_priv from MySQL 3.22.12
---
+ALTER TABLE columns_priv
+ MODIFY Host char(60) NOT NULL default '',
+ MODIFY Db char(64) NOT NULL default '',
+ MODIFY User char(16) NOT NULL default '',
+ MODIFY Table_name char(64) NOT NULL default '',
+ MODIFY Column_name char(64) NOT NULL default '',
+ ENGINE=MyISAM,
+ CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
-ALTER TABLE columns_priv change Type Column_priv
set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
+ALTER TABLE columns_priv
+ MODIFY Column_priv set('Select','Insert','Update','References')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL;
--
-- Add the new 'type' column to the func table.
@@ -106,7 +133,7 @@ ALTER TABLE columns_priv change Type Col
ALTER TABLE func add type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL;
--
--- Change the user,db and host tables to MySQL 4.0 format
+-- Change the user,db and host tables to current format
--
# Detect whether we had Show_db_priv
@@ -147,14 +174,12 @@ ADD Create_tmp_table_priv enum('N','Y')
ADD Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL;
alter table user change max_questions max_questions int(11) unsigned DEFAULT 0 NOT NULL;
-alter table tables_priv add KEY Grantor (Grantor);
+
alter table db comment='Database privileges';
alter table host comment='Host privileges; Merged with database privileges';
alter table user comment='Users and global privileges';
alter table func comment='User defined functions';
-alter table tables_priv comment='Table privileges';
-alter table columns_priv comment='Column privileges';
-- Convert all tables to UTF-8 with binary collation
-- and reset all char columns to correct width
@@ -228,25 +253,6 @@ ALTER TABLE func
ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE func
MODIFY type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL;
-ALTER TABLE columns_priv
- MODIFY Host char(60) NOT NULL default '',
- MODIFY Db char(64) NOT NULL default '',
- MODIFY User char(16) NOT NULL default '',
- MODIFY Table_name char(64) NOT NULL default '',
- MODIFY Column_name char(64) NOT NULL default '',
- ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
-ALTER TABLE columns_priv
- MODIFY Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci
DEFAULT '' NOT NULL;
-ALTER TABLE tables_priv
- MODIFY Host char(60) NOT NULL default '',
- MODIFY Db char(64) NOT NULL default '',
- MODIFY User char(16) NOT NULL default '',
- MODIFY Table_name char(64) NOT NULL default '',
- MODIFY Grantor char(77) NOT NULL default '',
- ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
-ALTER TABLE tables_priv
- MODIFY Table_priv
set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter')
COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- MODIFY Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci
DEFAULT '' NOT NULL;
#
# Detect whether we had Create_view_priv
@@ -279,11 +285,6 @@ ALTER TABLE user ADD Show_view_priv enum
ALTER TABLE user MODIFY Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N'
NOT NULL AFTER Create_view_priv;
#
-# Show/Create views table privileges (v5.0)
-#
-ALTER TABLE tables_priv MODIFY Table_priv
set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create
View','Show view') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
-
-#
# Assign create/show view privileges to people who have create provileges
#
UPDATE user SET Create_view_priv=Create_priv, Show_view_priv=Create_priv where
user<>"" AND @hadCreateViewPriv = 0;
@@ -349,22 +350,41 @@ UPDATE user LEFT JOIN db USING (Host,Use
WHERE @hadCreateUserPriv = 0 AND
(user.Grant_priv = 'Y' OR db.Grant_priv = 'Y');
-#
-# Create some possible missing tables
-#
+--
+-- procs_priv
+--
CREATE TABLE IF NOT EXISTS procs_priv (
-Host char(60) binary DEFAULT '' NOT NULL,
-Db char(64) binary DEFAULT '' NOT NULL,
-User char(16) binary DEFAULT '' NOT NULL,
-Routine_name char(64) binary DEFAULT '' NOT NULL,
-Routine_type enum('FUNCTION','PROCEDURE') NOT NULL,
-Grantor char(77) DEFAULT '' NOT NULL,
-Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT
NULL,
-Timestamp timestamp(14),
-PRIMARY KEY (Host,Db,User,Routine_name,Routine_type),
-KEY Grantor (Grantor)
+ Host char(60) binary DEFAULT '' NOT NULL,
+ Db char(64) binary DEFAULT '' NOT NULL,
+ User char(16) binary DEFAULT '' NOT NULL,
+ Routine_name char(64) binary DEFAULT '' NOT NULL,
+ Routine_type enum('FUNCTION','PROCEDURE') NOT NULL,
+ Grantor char(77) DEFAULT '' NOT NULL,
+ Proc_priv set('Execute','Alter Routine','Grant')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL,
+ Timestamp timestamp(14),
+ PRIMARY KEY (Host, Db, User, Routine_name, Routine_type),
+ KEY Grantor (Grantor)
) CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
+ALTER TABLE procs_priv
+ ENGINE=MyISAM,
+ CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
+
+ALTER TABLE procs_priv
+ MODIFY Proc_priv set('Execute','Alter Routine','Grant')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL;
+
+ALTER TABLE procs_priv
+ ADD Routine_type enum('FUNCTION','PROCEDURE')
+ COLLATE utf8_general_ci NOT NULL AFTER Routine_name;
+
+ALTER TABLE procs_priv
+ modify Timestamp timestamp(14) AFTER Proc_priv;
+
+--
+-- help_topic
+--
CREATE TABLE IF NOT EXISTS help_topic (
help_topic_id int unsigned not null,
name varchar(64) not null,
| Thread |
|---|
| • bk commit into 5.1 tree (msvensson:1.2388) | msvensson | 23 Nov |