summaryrefslogtreecommitdiff
path: root/scripts/mysql_create_system_tables.sh
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2004-09-02 12:34:27 +0500
committerunknown <bar@mysql.com>2004-09-02 12:34:27 +0500
commit36a4e21c07d719d75e0d04b1b1724c3173c58af2 (patch)
tree40abbe29bf148a6abad21b98a2f4b22d8e97aab3 /scripts/mysql_create_system_tables.sh
parent0ceb4ddc9f9212a1f9caf6b2179c59158677a91f (diff)
downloadmariadb-git-36a4e21c07d719d75e0d04b1b1724c3173c58af2.tar.gz
Bug#4338 mysql-test-run fails if compiled with non-latin1 character set
Diffstat (limited to 'scripts/mysql_create_system_tables.sh')
-rw-r--r--scripts/mysql_create_system_tables.sh35
1 files changed, 25 insertions, 10 deletions
diff --git a/scripts/mysql_create_system_tables.sh b/scripts/mysql_create_system_tables.sh
index 5a6ea6025f2..e95d65a1224 100644
--- a/scripts/mysql_create_system_tables.sh
+++ b/scripts/mysql_create_system_tables.sh
@@ -69,6 +69,7 @@ then
c_d="$c_d PRIMARY KEY Host (Host,Db,User),"
c_d="$c_d KEY User (User)"
c_d="$c_d )"
+ c_d="$c_d CHARACTER SET utf8 COLLATE utf8_bin"
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');
@@ -98,6 +99,7 @@ then
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 )"
+ c_h="$c_h CHARACTER SET utf8 COLLATE utf8_bin"
c_h="$c_h comment='Host privileges; Merged with database privileges';"
fi
@@ -141,6 +143,7 @@ then
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 )"
+ c_u="$c_u CHARACTER SET utf8 COLLATE utf8_bin"
c_u="$c_u comment='Users and global privileges';"
if test "$1" = "test"
@@ -180,6 +183,7 @@ then
c_f="$c_f type enum ('function','aggregate') NOT NULL,"
c_f="$c_f PRIMARY KEY (name)"
c_f="$c_f )"
+ c_f="$c_f CHARACTER SET utf8 COLLATE utf8_bin"
c_f="$c_f comment='User defined functions';"
fi
@@ -201,6 +205,7 @@ then
c_t="$c_t PRIMARY KEY (Host,Db,User,Table_name),"
c_t="$c_t KEY Grantor (Grantor)"
c_t="$c_t )"
+ c_t="$c_t CHARACTER SET utf8 COLLATE utf8_bin"
c_t="$c_t comment='Table privileges';"
fi
@@ -220,6 +225,7 @@ then
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 )"
+ c_c="$c_c CHARACTER SET utf8 COLLATE utf8_bin"
c_c="$c_c comment='Column privileges';"
fi
@@ -231,14 +237,15 @@ then
c_ht="$c_ht CREATE TABLE help_topic ("
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 description 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 unique index (name)"
c_ht="$c_ht )"
+ c_ht="$c_ht CHARACTER SET utf8"
c_ht="$c_ht comment='help topics';"
fi
@@ -252,12 +259,13 @@ then
c_hc="$c_hc CREATE TABLE help_category ("
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 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 unique index (name)"
c_hc="$c_hc )"
+ c_hc="$c_hc CHARACTER SET utf8"
c_hc="$c_hc comment='help categories';"
fi
@@ -269,10 +277,11 @@ then
c_hk="$c_hk CREATE TABLE help_keyword ("
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 unique index (name)"
c_hk="$c_hk )"
+ c_hk="$c_hk CHARACTER SET utf8"
c_hk="$c_hk comment='help keywords';"
fi
@@ -287,6 +296,7 @@ then
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 )"
+ c_hr="$c_hr CHARACTER SET utf8"
c_hr="$c_hr comment='keyword-topic relation';"
fi
@@ -300,7 +310,8 @@ then
c_tzn="$c_tzn Name char(64) 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 ) DEFAULT CHARACTER SET latin1"
+ c_tzn="$c_tzn )"
+ c_tzn="$c_tzn CHARACTER SET utf8"
c_tzn="$c_tzn comment='Time zone names';"
if test "$1" = "test"
@@ -322,7 +333,8 @@ then
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 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';"
if test "$1" = "test"
@@ -343,7 +355,8 @@ then
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 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';"
if test "$1" = "test"
@@ -565,7 +578,8 @@ then
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 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';"
if test "$1" = "test"
@@ -601,7 +615,8 @@ then
c_tzls="$c_tzls Transition_time bigint 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 ) 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';"
if test "$1" = "test"