Commit 06f97a0b authored by marko@hundin.mysql.fi's avatar marko@hundin.mysql.fi

Merge marko@build.mysql.com:/home/bk/mysql-4.1

into hundin.mysql.fi:/home/marko/k/mysql-4.1
parents f77a89c3 f37df2fd
...@@ -18,71 +18,71 @@ user ...@@ -18,71 +18,71 @@ user
show create table db; show create table db;
Table Create Table Table Create Table
db CREATE TABLE `db` ( db CREATE TABLE `db` (
`Host` char(60) character set latin1 collate latin1_bin NOT NULL default '', `Host` char(60) collate utf8_bin NOT NULL default '',
`Db` char(64) character set latin1 collate latin1_bin NOT NULL default '', `Db` char(64) collate utf8_bin NOT NULL default '',
`User` char(16) character set latin1 collate latin1_bin NOT NULL default '', `User` char(16) collate utf8_bin NOT NULL default '',
`Select_priv` enum('N','Y') NOT NULL default 'N', `Select_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Insert_priv` enum('N','Y') NOT NULL default 'N', `Insert_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Update_priv` enum('N','Y') NOT NULL default 'N', `Update_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Delete_priv` enum('N','Y') NOT NULL default 'N', `Delete_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Create_priv` enum('N','Y') NOT NULL default 'N', `Create_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Drop_priv` enum('N','Y') NOT NULL default 'N', `Drop_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Grant_priv` enum('N','Y') NOT NULL default 'N', `Grant_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`References_priv` enum('N','Y') NOT NULL default 'N', `References_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Index_priv` enum('N','Y') NOT NULL default 'N', `Index_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Alter_priv` enum('N','Y') NOT NULL default 'N', `Alter_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Create_tmp_table_priv` enum('N','Y') NOT NULL default 'N', `Create_tmp_table_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Lock_tables_priv` enum('N','Y') NOT NULL default 'N', `Lock_tables_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
PRIMARY KEY (`Host`,`Db`,`User`), PRIMARY KEY (`Host`,`Db`,`User`),
KEY `User` (`User`) KEY `User` (`User`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Database privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'
show create table host; show create table host;
Table Create Table Table Create Table
host CREATE TABLE `host` ( host CREATE TABLE `host` (
`Host` char(60) character set latin1 collate latin1_bin NOT NULL default '', `Host` char(60) collate utf8_bin NOT NULL default '',
`Db` char(64) character set latin1 collate latin1_bin NOT NULL default '', `Db` char(64) collate utf8_bin NOT NULL default '',
`Select_priv` enum('N','Y') NOT NULL default 'N', `Select_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Insert_priv` enum('N','Y') NOT NULL default 'N', `Insert_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Update_priv` enum('N','Y') NOT NULL default 'N', `Update_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Delete_priv` enum('N','Y') NOT NULL default 'N', `Delete_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Create_priv` enum('N','Y') NOT NULL default 'N', `Create_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Drop_priv` enum('N','Y') NOT NULL default 'N', `Drop_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Grant_priv` enum('N','Y') NOT NULL default 'N', `Grant_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`References_priv` enum('N','Y') NOT NULL default 'N', `References_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Index_priv` enum('N','Y') NOT NULL default 'N', `Index_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Alter_priv` enum('N','Y') NOT NULL default 'N', `Alter_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Create_tmp_table_priv` enum('N','Y') NOT NULL default 'N', `Create_tmp_table_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Lock_tables_priv` enum('N','Y') NOT NULL default 'N', `Lock_tables_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
PRIMARY KEY (`Host`,`Db`) PRIMARY KEY (`Host`,`Db`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Host privileges; Merged with database privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges'
show create table user; show create table user;
Table Create Table Table Create Table
user CREATE TABLE `user` ( user CREATE TABLE `user` (
`Host` varchar(60) character set latin1 collate latin1_bin NOT NULL default '', `Host` varchar(60) collate utf8_bin NOT NULL default '',
`User` varchar(16) character set latin1 collate latin1_bin NOT NULL default '', `User` varchar(16) collate utf8_bin NOT NULL default '',
`Password` varchar(41) character set latin1 collate latin1_bin NOT NULL default '', `Password` varchar(41) collate utf8_bin NOT NULL default '',
`Select_priv` enum('N','Y') NOT NULL default 'N', `Select_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Insert_priv` enum('N','Y') NOT NULL default 'N', `Insert_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Update_priv` enum('N','Y') NOT NULL default 'N', `Update_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Delete_priv` enum('N','Y') NOT NULL default 'N', `Delete_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Create_priv` enum('N','Y') NOT NULL default 'N', `Create_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Drop_priv` enum('N','Y') NOT NULL default 'N', `Drop_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Reload_priv` enum('N','Y') NOT NULL default 'N', `Reload_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Shutdown_priv` enum('N','Y') NOT NULL default 'N', `Shutdown_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Process_priv` enum('N','Y') NOT NULL default 'N', `Process_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`File_priv` enum('N','Y') NOT NULL default 'N', `File_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Grant_priv` enum('N','Y') NOT NULL default 'N', `Grant_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`References_priv` enum('N','Y') NOT NULL default 'N', `References_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Index_priv` enum('N','Y') NOT NULL default 'N', `Index_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Alter_priv` enum('N','Y') NOT NULL default 'N', `Alter_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Show_db_priv` enum('N','Y') NOT NULL default 'N', `Show_db_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Super_priv` enum('N','Y') NOT NULL default 'N', `Super_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Create_tmp_table_priv` enum('N','Y') NOT NULL default 'N', `Create_tmp_table_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Lock_tables_priv` enum('N','Y') NOT NULL default 'N', `Lock_tables_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Execute_priv` enum('N','Y') NOT NULL default 'N', `Execute_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Repl_slave_priv` enum('N','Y') NOT NULL default 'N', `Repl_slave_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`Repl_client_priv` enum('N','Y') NOT NULL default 'N', `Repl_client_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') NOT NULL default '', `ssl_type` enum('','ANY','X509','SPECIFIED') collate utf8_bin NOT NULL default '',
`ssl_cipher` blob NOT NULL, `ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL, `x509_issuer` blob NOT NULL,
`x509_subject` blob NOT NULL, `x509_subject` blob NOT NULL,
...@@ -90,41 +90,41 @@ user CREATE TABLE `user` ( ...@@ -90,41 +90,41 @@ user CREATE TABLE `user` (
`max_updates` int(11) unsigned NOT NULL default '0', `max_updates` int(11) unsigned NOT NULL default '0',
`max_connections` int(11) unsigned NOT NULL default '0', `max_connections` int(11) unsigned NOT NULL default '0',
PRIMARY KEY (`Host`,`User`) PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Users and global privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
show create table func; show create table func;
Table Create Table Table Create Table
func CREATE TABLE `func` ( func CREATE TABLE `func` (
`name` char(64) character set latin1 collate latin1_bin NOT NULL default '', `name` char(64) collate utf8_bin NOT NULL default '',
`ret` tinyint(1) NOT NULL default '0', `ret` tinyint(1) NOT NULL default '0',
`dl` char(128) NOT NULL default '', `dl` char(128) collate utf8_bin NOT NULL default '',
`type` enum('function','aggregate') NOT NULL default 'function', `type` enum('function','aggregate') collate utf8_bin NOT NULL default 'function',
PRIMARY KEY (`name`) PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='User defined functions' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions'
show create table tables_priv; show create table tables_priv;
Table Create Table Table Create Table
tables_priv CREATE TABLE `tables_priv` ( tables_priv CREATE TABLE `tables_priv` (
`Host` char(60) character set latin1 collate latin1_bin NOT NULL default '', `Host` char(60) collate utf8_bin NOT NULL default '',
`Db` char(64) character set latin1 collate latin1_bin NOT NULL default '', `Db` char(64) collate utf8_bin NOT NULL default '',
`User` char(16) character set latin1 collate latin1_bin NOT NULL default '', `User` char(16) collate utf8_bin NOT NULL default '',
`Table_name` char(64) character set latin1 collate latin1_bin NOT NULL default '', `Table_name` char(64) collate utf8_bin NOT NULL default '',
`Grantor` char(77) NOT NULL default '', `Grantor` char(77) collate utf8_bin NOT NULL default '',
`Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') NOT NULL default '', `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') collate utf8_bin NOT NULL default '',
`Column_priv` set('Select','Insert','Update','References') NOT NULL default '', `Column_priv` set('Select','Insert','Update','References') collate utf8_bin NOT NULL default '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
KEY `Grantor` (`Grantor`) KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Table privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges'
show create table columns_priv; show create table columns_priv;
Table Create Table Table Create Table
columns_priv CREATE TABLE `columns_priv` ( columns_priv CREATE TABLE `columns_priv` (
`Host` char(60) character set latin1 collate latin1_bin NOT NULL default '', `Host` char(60) collate utf8_bin NOT NULL default '',
`Db` char(64) character set latin1 collate latin1_bin NOT NULL default '', `Db` char(64) collate utf8_bin NOT NULL default '',
`User` char(16) character set latin1 collate latin1_bin NOT NULL default '', `User` char(16) collate utf8_bin NOT NULL default '',
`Table_name` char(64) character set latin1 collate latin1_bin NOT NULL default '', `Table_name` char(64) collate utf8_bin NOT NULL default '',
`Column_name` char(64) character set latin1 collate latin1_bin NOT NULL default '', `Column_name` char(64) collate utf8_bin NOT NULL default '',
`Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`Column_priv` set('Select','Insert','Update','References') NOT NULL default '', `Column_priv` set('Select','Insert','Update','References') collate utf8_bin NOT NULL default '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Column privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'
show tables; show tables;
Tables_in_test Tables_in_test
...@@ -69,6 +69,7 @@ then ...@@ -69,6 +69,7 @@ then
c_d="$c_d PRIMARY KEY Host (Host,Db,User)," c_d="$c_d PRIMARY KEY Host (Host,Db,User),"
c_d="$c_d KEY User (User)" c_d="$c_d KEY User (User)"
c_d="$c_d )" c_d="$c_d )"
c_d="$c_d CHARACTER SET utf8 COLLATE utf8_bin"
c_d="$c_d comment='Database privileges';" c_d="$c_d comment='Database privileges';"
i_d="INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y'); i_d="INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
...@@ -98,6 +99,7 @@ then ...@@ -98,6 +99,7 @@ then
c_h="$c_h Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL," c_h="$c_h Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
c_h="$c_h PRIMARY KEY Host (Host,Db)" c_h="$c_h PRIMARY KEY Host (Host,Db)"
c_h="$c_h )" c_h="$c_h )"
c_h="$c_h CHARACTER SET utf8 COLLATE utf8_bin"
c_h="$c_h comment='Host privileges; Merged with database privileges';" c_h="$c_h comment='Host privileges; Merged with database privileges';"
fi fi
...@@ -141,6 +143,7 @@ then ...@@ -141,6 +143,7 @@ then
c_u="$c_u max_connections int(11) unsigned DEFAULT 0 NOT NULL," c_u="$c_u max_connections int(11) unsigned DEFAULT 0 NOT NULL,"
c_u="$c_u PRIMARY KEY Host (Host,User)" c_u="$c_u PRIMARY KEY Host (Host,User)"
c_u="$c_u )" c_u="$c_u )"
c_u="$c_u CHARACTER SET utf8 COLLATE utf8_bin"
c_u="$c_u comment='Users and global privileges';" c_u="$c_u comment='Users and global privileges';"
if test "$1" = "test" if test "$1" = "test"
...@@ -180,6 +183,7 @@ then ...@@ -180,6 +183,7 @@ then
c_f="$c_f type enum ('function','aggregate') NOT NULL," c_f="$c_f type enum ('function','aggregate') NOT NULL,"
c_f="$c_f PRIMARY KEY (name)" c_f="$c_f PRIMARY KEY (name)"
c_f="$c_f )" c_f="$c_f )"
c_f="$c_f CHARACTER SET utf8 COLLATE utf8_bin"
c_f="$c_f comment='User defined functions';" c_f="$c_f comment='User defined functions';"
fi fi
...@@ -201,6 +205,7 @@ then ...@@ -201,6 +205,7 @@ then
c_t="$c_t PRIMARY KEY (Host,Db,User,Table_name)," c_t="$c_t PRIMARY KEY (Host,Db,User,Table_name),"
c_t="$c_t KEY Grantor (Grantor)" c_t="$c_t KEY Grantor (Grantor)"
c_t="$c_t )" c_t="$c_t )"
c_t="$c_t CHARACTER SET utf8 COLLATE utf8_bin"
c_t="$c_t comment='Table privileges';" c_t="$c_t comment='Table privileges';"
fi fi
...@@ -220,6 +225,7 @@ then ...@@ -220,6 +225,7 @@ then
c_c="$c_c Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL," c_c="$c_c Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL,"
c_c="$c_c PRIMARY KEY (Host,Db,User,Table_name,Column_name)" c_c="$c_c PRIMARY KEY (Host,Db,User,Table_name,Column_name)"
c_c="$c_c )" c_c="$c_c )"
c_c="$c_c CHARACTER SET utf8 COLLATE utf8_bin"
c_c="$c_c comment='Column privileges';" c_c="$c_c comment='Column privileges';"
fi fi
...@@ -231,14 +237,15 @@ then ...@@ -231,14 +237,15 @@ then
c_ht="$c_ht CREATE TABLE help_topic (" c_ht="$c_ht CREATE TABLE help_topic ("
c_ht="$c_ht help_topic_id int unsigned not null," c_ht="$c_ht help_topic_id int unsigned not null,"
c_ht="$c_ht name nvarchar(64) not null," c_ht="$c_ht name varchar(64) not null,"
c_ht="$c_ht help_category_id smallint unsigned not null," c_ht="$c_ht help_category_id smallint unsigned not null,"
c_ht="$c_ht description text not null," c_ht="$c_ht description text not null,"
c_ht="$c_ht example text not null," c_ht="$c_ht example text not null,"
c_ht="$c_ht url nvarchar(128) not null," c_ht="$c_ht url varchar(128) not null,"
c_ht="$c_ht primary key (help_topic_id)," c_ht="$c_ht primary key (help_topic_id),"
c_ht="$c_ht unique index (name)" c_ht="$c_ht unique index (name)"
c_ht="$c_ht )" c_ht="$c_ht )"
c_ht="$c_ht CHARACTER SET utf8"
c_ht="$c_ht comment='help topics';" c_ht="$c_ht comment='help topics';"
fi fi
...@@ -252,12 +259,13 @@ then ...@@ -252,12 +259,13 @@ then
c_hc="$c_hc CREATE TABLE help_category (" c_hc="$c_hc CREATE TABLE help_category ("
c_hc="$c_hc help_category_id smallint unsigned not null," c_hc="$c_hc help_category_id smallint unsigned not null,"
c_hc="$c_hc name nvarchar(64) not null," c_hc="$c_hc name varchar(64) not null,"
c_hc="$c_hc parent_category_id smallint unsigned null," c_hc="$c_hc parent_category_id smallint unsigned null,"
c_hc="$c_hc url nvarchar(128) not null," c_hc="$c_hc url varchar(128) not null,"
c_hc="$c_hc primary key (help_category_id)," c_hc="$c_hc primary key (help_category_id),"
c_hc="$c_hc unique index (name)" c_hc="$c_hc unique index (name)"
c_hc="$c_hc )" c_hc="$c_hc )"
c_hc="$c_hc CHARACTER SET utf8"
c_hc="$c_hc comment='help categories';" c_hc="$c_hc comment='help categories';"
fi fi
...@@ -269,10 +277,11 @@ then ...@@ -269,10 +277,11 @@ then
c_hk="$c_hk CREATE TABLE help_keyword (" c_hk="$c_hk CREATE TABLE help_keyword ("
c_hk="$c_hk help_keyword_id int unsigned not null," c_hk="$c_hk help_keyword_id int unsigned not null,"
c_hk="$c_hk name nvarchar(64) not null," c_hk="$c_hk name varchar(64) not null,"
c_hk="$c_hk primary key (help_keyword_id)," c_hk="$c_hk primary key (help_keyword_id),"
c_hk="$c_hk unique index (name)" c_hk="$c_hk unique index (name)"
c_hk="$c_hk )" c_hk="$c_hk )"
c_hk="$c_hk CHARACTER SET utf8"
c_hk="$c_hk comment='help keywords';" c_hk="$c_hk comment='help keywords';"
fi fi
...@@ -287,6 +296,7 @@ then ...@@ -287,6 +296,7 @@ then
c_hr="$c_hr help_keyword_id int unsigned not null references help_keyword," c_hr="$c_hr help_keyword_id int unsigned not null references help_keyword,"
c_hr="$c_hr primary key (help_keyword_id, help_topic_id)" c_hr="$c_hr primary key (help_keyword_id, help_topic_id)"
c_hr="$c_hr )" c_hr="$c_hr )"
c_hr="$c_hr CHARACTER SET utf8"
c_hr="$c_hr comment='keyword-topic relation';" c_hr="$c_hr comment='keyword-topic relation';"
fi fi
...@@ -300,7 +310,8 @@ then ...@@ -300,7 +310,8 @@ then
c_tzn="$c_tzn Name char(64) NOT NULL," c_tzn="$c_tzn Name char(64) NOT NULL,"
c_tzn="$c_tzn Time_zone_id int unsigned NOT NULL," c_tzn="$c_tzn Time_zone_id int unsigned NOT NULL,"
c_tzn="$c_tzn PRIMARY KEY Name (Name)" c_tzn="$c_tzn PRIMARY KEY Name (Name)"
c_tzn="$c_tzn ) DEFAULT CHARACTER SET latin1" c_tzn="$c_tzn )"
c_tzn="$c_tzn CHARACTER SET utf8"
c_tzn="$c_tzn comment='Time zone names';" c_tzn="$c_tzn comment='Time zone names';"
if test "$1" = "test" if test "$1" = "test"
...@@ -322,7 +333,8 @@ then ...@@ -322,7 +333,8 @@ then
c_tz="$c_tz Time_zone_id int unsigned NOT NULL auto_increment," c_tz="$c_tz Time_zone_id int unsigned NOT NULL auto_increment,"
c_tz="$c_tz Use_leap_seconds enum('Y','N') DEFAULT 'N' NOT NULL," c_tz="$c_tz Use_leap_seconds enum('Y','N') DEFAULT 'N' NOT NULL,"
c_tz="$c_tz PRIMARY KEY TzId (Time_zone_id)" c_tz="$c_tz PRIMARY KEY TzId (Time_zone_id)"
c_tz="$c_tz ) DEFAULT CHARACTER SET latin1" c_tz="$c_tz )"
c_tz="$c_tz CHARACTER SET utf8"
c_tz="$c_tz comment='Time zones';" c_tz="$c_tz comment='Time zones';"
if test "$1" = "test" if test "$1" = "test"
...@@ -343,7 +355,8 @@ then ...@@ -343,7 +355,8 @@ then
c_tzt="$c_tzt Transition_time bigint signed NOT NULL," c_tzt="$c_tzt Transition_time bigint signed NOT NULL,"
c_tzt="$c_tzt Transition_type_id int unsigned NOT NULL," c_tzt="$c_tzt Transition_type_id int unsigned NOT NULL,"
c_tzt="$c_tzt PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time)" c_tzt="$c_tzt PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time)"
c_tzt="$c_tzt ) DEFAULT CHARACTER SET latin1" c_tzt="$c_tzt )"
c_tzt="$c_tzt CHARACTER SET utf8"
c_tzt="$c_tzt comment='Time zone transitions';" c_tzt="$c_tzt comment='Time zone transitions';"
if test "$1" = "test" if test "$1" = "test"
...@@ -565,7 +578,8 @@ then ...@@ -565,7 +578,8 @@ then
c_tztt="$c_tztt Is_DST tinyint unsigned DEFAULT 0 NOT NULL," c_tztt="$c_tztt Is_DST tinyint unsigned DEFAULT 0 NOT NULL,"
c_tztt="$c_tztt Abbreviation char(8) DEFAULT '' NOT NULL," c_tztt="$c_tztt Abbreviation char(8) DEFAULT '' NOT NULL,"
c_tztt="$c_tztt PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id)" c_tztt="$c_tztt PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id)"
c_tztt="$c_tztt ) DEFAULT CHARACTER SET latin1" c_tztt="$c_tztt )"
c_tztt="$c_tztt CHARACTER SET utf8"
c_tztt="$c_tztt comment='Time zone transition types';" c_tztt="$c_tztt comment='Time zone transition types';"
if test "$1" = "test" if test "$1" = "test"
...@@ -601,7 +615,8 @@ then ...@@ -601,7 +615,8 @@ then
c_tzls="$c_tzls Transition_time bigint signed NOT NULL," c_tzls="$c_tzls Transition_time bigint signed NOT NULL,"
c_tzls="$c_tzls Correction int signed NOT NULL," c_tzls="$c_tzls Correction int signed NOT NULL,"
c_tzls="$c_tzls PRIMARY KEY TranTime (Transition_time)" c_tzls="$c_tzls PRIMARY KEY TranTime (Transition_time)"
c_tzls="$c_tzls ) DEFAULT CHARACTER SET latin1" c_tzls="$c_tzls )"
c_tzts="$c_tzts CHARACTER SET utf8"
c_tzls="$c_tzls comment='Leap seconds information for time zones';" c_tzls="$c_tzls comment='Leap seconds information for time zones';"
if test "$1" = "test" if test "$1" = "test"
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
-- this sql script. -- this sql script.
-- On windows you should do 'mysql --force mysql < mysql_fix_privilege_tables.sql' -- On windows you should do 'mysql --force mysql < mysql_fix_privilege_tables.sql'
ALTER TABLE user type=MyISAM; ALTER TABLE user type=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE db type=MyISAM; ALTER TABLE db type=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE host type=MyISAM; ALTER TABLE host type=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE func type=MyISAM; ALTER TABLE func type=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE columns_priv type=MyISAM; ALTER TABLE columns_priv type=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE tables_priv type=MyISAM; ALTER TABLE tables_priv type=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE user change Password Password char(41) binary not null; ALTER TABLE user change Password Password char(41) binary not null;
ALTER TABLE user add File_priv enum('N','Y') NOT NULL; ALTER TABLE user add File_priv enum('N','Y') NOT NULL;
CREATE TABLE IF NOT EXISTS func ( CREATE TABLE IF NOT EXISTS func (
...@@ -23,7 +23,7 @@ CREATE TABLE IF NOT EXISTS func ( ...@@ -23,7 +23,7 @@ CREATE TABLE IF NOT EXISTS func (
dl char(128) DEFAULT '' NOT NULL, dl char(128) DEFAULT '' NOT NULL,
type enum ('function','aggregate') NOT NULL, type enum ('function','aggregate') NOT NULL,
PRIMARY KEY (name) PRIMARY KEY (name)
); ) CHARACTER SET utf8 COLLATE utf8_bin;
-- Detect whether or not we had the Grant_priv column -- Detect whether or not we had the Grant_priv column
SET @hadGrantPriv:=0; SET @hadGrantPriv:=0;
...@@ -63,7 +63,7 @@ CREATE TABLE IF NOT EXISTS tables_priv ( ...@@ -63,7 +63,7 @@ CREATE TABLE IF NOT EXISTS tables_priv (
Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') DEFAULT '' NOT NULL, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') DEFAULT '' NOT NULL,
Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL,
PRIMARY KEY (Host,Db,User,Table_name) PRIMARY KEY (Host,Db,User,Table_name)
); ) CHARACTER SET utf8 COLLATE utf8_bin;
CREATE TABLE IF NOT EXISTS columns_priv ( CREATE TABLE IF NOT EXISTS columns_priv (
Host char(60) DEFAULT '' NOT NULL, Host char(60) DEFAULT '' NOT NULL,
...@@ -74,7 +74,7 @@ CREATE TABLE IF NOT EXISTS columns_priv ( ...@@ -74,7 +74,7 @@ CREATE TABLE IF NOT EXISTS columns_priv (
Timestamp timestamp(14), Timestamp timestamp(14),
Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL,
PRIMARY KEY (Host,Db,User,Table_name,Column_name) PRIMARY KEY (Host,Db,User,Table_name,Column_name)
); ) CHARACTER SET utf8 COLLATE utf8_bin;
-- --
...@@ -156,7 +156,7 @@ description text not null, ...@@ -156,7 +156,7 @@ description text not null,
example text not null, example text not null,
url varchar(128) not null, url varchar(128) not null,
primary key (help_topic_id), unique index (name) primary key (help_topic_id), unique index (name)
) comment='help topics'; ) CHARACTER SET utf8 comment='help topics';
CREATE TABLE IF NOT EXISTS help_category ( CREATE TABLE IF NOT EXISTS help_category (
help_category_id smallint unsigned not null, help_category_id smallint unsigned not null,
...@@ -165,20 +165,20 @@ parent_category_id smallint unsigned null, ...@@ -165,20 +165,20 @@ parent_category_id smallint unsigned null,
url varchar(128) not null, url varchar(128) not null,
primary key (help_category_id), primary key (help_category_id),
unique index (name) unique index (name)
) comment='help categories'; ) CHARACTER SET utf8 comment='help categories';
CREATE TABLE IF NOT EXISTS help_relation ( CREATE TABLE IF NOT EXISTS help_relation (
help_topic_id int unsigned not null references help_topic, help_topic_id int unsigned not null references help_topic,
help_keyword_id int unsigned not null references help_keyword, help_keyword_id int unsigned not null references help_keyword,
primary key (help_keyword_id, help_topic_id) primary key (help_keyword_id, help_topic_id)
) comment='keyword-topic relation'; ) CHARACTER SET utf8 comment='keyword-topic relation';
CREATE TABLE IF NOT EXISTS help_keyword ( CREATE TABLE IF NOT EXISTS help_keyword (
help_keyword_id int unsigned not null, help_keyword_id int unsigned not null,
name varchar(64) not null, name varchar(64) not null,
primary key (help_keyword_id), primary key (help_keyword_id),
unique index (name) unique index (name)
) comment='help keywords'; ) CHARACTER SET utf8 comment='help keywords';
# #
# Create missing time zone related tables # Create missing time zone related tables
...@@ -188,20 +188,20 @@ CREATE TABLE IF NOT EXISTS time_zone_name ( ...@@ -188,20 +188,20 @@ CREATE TABLE IF NOT EXISTS time_zone_name (
Name char(64) NOT NULL, Name char(64) NOT NULL,
Time_zone_id int unsigned NOT NULL, Time_zone_id int unsigned NOT NULL,
PRIMARY KEY Name (Name) PRIMARY KEY Name (Name)
) DEFAULT CHARACTER SET latin1 comment='Time zone names'; ) CHARACTER SET utf8 comment='Time zone names';
CREATE TABLE IF NOT EXISTS time_zone ( CREATE TABLE IF NOT EXISTS time_zone (
Time_zone_id int unsigned NOT NULL auto_increment, Time_zone_id int unsigned NOT NULL auto_increment,
Use_leap_seconds enum('Y','N') DEFAULT 'N' NOT NULL, Use_leap_seconds enum('Y','N') DEFAULT 'N' NOT NULL,
PRIMARY KEY TzId (Time_zone_id) PRIMARY KEY TzId (Time_zone_id)
) DEFAULT CHARACTER SET latin1 comment='Time zones'; ) CHARACTER SET utf8 comment='Time zones';
CREATE TABLE IF NOT EXISTS time_zone_transition ( CREATE TABLE IF NOT EXISTS time_zone_transition (
Time_zone_id int unsigned NOT NULL, Time_zone_id int unsigned NOT NULL,
Transition_time bigint signed NOT NULL, Transition_time bigint signed NOT NULL,
Transition_type_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL,
PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time) PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time)
) DEFAULT CHARACTER SET latin1 comment='Time zone transitions'; ) CHARACTER SET utf8 comment='Time zone transitions';
CREATE TABLE IF NOT EXISTS time_zone_transition_type ( CREATE TABLE IF NOT EXISTS time_zone_transition_type (
Time_zone_id int unsigned NOT NULL, Time_zone_id int unsigned NOT NULL,
...@@ -210,11 +210,11 @@ Offset int signed DEFAULT 0 NOT NULL, ...@@ -210,11 +210,11 @@ Offset int signed DEFAULT 0 NOT NULL,
Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL,
Abbreviation char(8) DEFAULT '' NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL,
PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id) PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id)
) DEFAULT CHARACTER SET latin1 comment='Time zone transition types'; ) CHARACTER SET utf8 comment='Time zone transition types';
CREATE TABLE IF NOT EXISTS time_zone_leap_second ( CREATE TABLE IF NOT EXISTS time_zone_leap_second (
Transition_time bigint signed NOT NULL, Transition_time bigint signed NOT NULL,
Correction int signed NOT NULL, Correction int signed NOT NULL,
PRIMARY KEY TranTime (Transition_time) PRIMARY KEY TranTime (Transition_time)
) DEFAULT CHARACTER SET latin1 comment='Leap seconds information for time zones'; ) CHARACTER SET utf8 comment='Leap seconds information for time zones';
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment