Commit cc1e805c authored by jimw@mysql.com's avatar jimw@mysql.com

Merge bk-internal:/home/bk/mysql-4.1

into mysql.com:/home/jimw/my/mysql-4.1-clean
parents 51d6411e ed6c4ec9
#!/usr/bin/perl
#
# By Matt Wagner <matt@mysql.com> 2005
#
# This script generates HP Depot packages for MySQL Server.
# It basically repackages a binary tarball as a depot.
#
# Usage: ./Do-hpux-depot <untarred-binary-tarball>
#
$fullname = shift @ARGV;
$fullname or die "No package name was specified";
-d $fullname or die "That directory is not present!";
$fullname =~ s,/+$,,; # Remove ending slash if any
chomp($pwd= `pwd`);
%title= (
"mysql-standard" => "MySQL Community Edition - Standard (GPL)",
"mysql-debug" => "MySQL Community Edition - Debug (GPL)",
"mysql-max" => "MySQL Community Edition - Experimental (GPL)",
"mysql-pro" => "MySQL Pro (Commercial)",
"mysql-classic" => "MySQL Classic (Commercial)",
"mysql-cluster" => "MySQL Cluster (Commercial)",
);
%architecture= (
"hpux11.23" => "HP-UX_B.11.23",
"hpux11.11" => "HP-UX_B.11.11",
"hpux11.00" => "HP-UX_B.11.00",
);
%os_release= (
"hpux11.23" => "?.11.2?",
"hpux11.11" => "?.11.1?",
"hpux11.00" => "?.11.0?",
);
%machine_type= (
"ia64" => "ia64*",
"hppa2.0w" => "9000/*",
);
$fullname =~ m/^(mysql-\w+)-([\d\.]+)-hp-(hpux11\.\d\d)-(hppa2\.0w|(ia64))-?(64bit)?$/;
# print "title: $1\n";
# print "version: $2\n";
# print "os: $3\n";
# print "cpu: $4\n";
# print "64: $6\n";
$cpu64= ($6 ne "") ? "_64" : "";
open (PSF,">${fullname}.psf") or die "Unable to write PSF file ($!)\n";
print PSF <<EOF;
product
tag $1
vendor_tag "MySQL_AB"
title "$title{$1}"
description "MySQL Database Server and Clients"
revision $2
architecture $architecture{$3}$cpu64
machine_type $machine_type{$4}
os_name HP-UX
os_release $os_release{$3}
directory /usr/local
fileset
tag all
revision $2
directory $fullname=/usr/local/$fullname
file_permissions -u 222 -g bin -o bin
file *
end
end
EOF
close(PSF);
system("/usr/sbin/swpackage -v -d \"|gzip -c > $fullname.depot.gz\" -x target_type=tape -s ${pwd}/${fullname}.psf");
USE mysql;
CREATE TABLE db (Host char(60) binary DEFAULT '' NOT NULL,Db char(64) binary DEFAULT '' NOT NULL,User char(16) binary DEFAULT '' NOT NULL,Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,References_priv enum('N','Y') DEFAULT 'N' NOT NULL,Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,PRIMARY KEY Host (Host,Db,User),KEY User (User)) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
CREATE TABLE db (
Host char(60) binary DEFAULT '' NOT NULL,
Db char(64) binary DEFAULT '' NOT NULL,
User char(16) binary DEFAULT '' NOT NULL,
Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,
References_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,
PRIMARY KEY Host (Host,Db,User),
KEY User (User)
) engine=MyISAM
CHARACTER SET utf8 COLLATE utf8_bin
comment='Database privileges';
INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
INSERT INTO db VALUES ('%','test' ,'','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
CREATE TABLE host (Host char(60) binary DEFAULT '' NOT NULL,Db char(64) binary DEFAULT '' NOT NULL,Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,References_priv enum('N','Y') DEFAULT 'N' NOT NULL,Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,PRIMARY KEY Host (Host,Db)) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
CREATE TABLE host (
Host char(60) binary DEFAULT '' NOT NULL,
Db char(64) binary DEFAULT '' NOT NULL,
Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,
References_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,
PRIMARY KEY Host (Host,Db)
) engine=MyISAM
CHARACTER SET utf8 COLLATE utf8_bin
comment='Host privileges; Merged with database privileges';
CREATE TABLE user (Host char(60) binary DEFAULT '' NOT NULL,User char(16) binary DEFAULT '' NOT NULL,Password char(41) binary DEFAULT '' NOT NULL,Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,Reload_priv enum('N','Y') DEFAULT 'N' NOT NULL,Shutdown_priv enum('N','Y') DEFAULT 'N' NOT NULL,Process_priv enum('N','Y') DEFAULT 'N' NOT NULL,File_priv enum('N','Y') DEFAULT 'N' NOT NULL,Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,References_priv enum('N','Y') DEFAULT 'N' NOT NULL,Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,Show_db_priv enum('N','Y') DEFAULT 'N' NOT NULL,Super_priv enum('N','Y') DEFAULT 'N' NOT NULL,Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,Execute_priv enum('N','Y') DEFAULT 'N' NOT NULL,Repl_slave_priv enum('N','Y') DEFAULT 'N' NOT NULL,Repl_client_priv enum('N','Y') DEFAULT 'N' NOT NULL,ssl_type enum('','ANY','X509', 'SPECIFIED') DEFAULT '' NOT NULL,ssl_cipher BLOB NOT NULL,x509_issuer BLOB NOT NULL,x509_subject BLOB NOT NULL,max_questions int(11) unsigned DEFAULT 0 NOT NULL,max_updates int(11) unsigned DEFAULT 0 NOT NULL,max_connections int(11) unsigned DEFAULT 0 NOT NULL,PRIMARY KEY Host (Host,User)) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
INSERT INTO user VALUES ('%','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
INSERT INTO user VALUES ('localhost','','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
INSERT INTO user VALUES ('%','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0);
CREATE TABLE user (
Host char(60) binary DEFAULT '' NOT NULL,
User char(16) binary DEFAULT '' NOT NULL,
Password char(41) binary DEFAULT '' NOT NULL,
Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Reload_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Shutdown_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Process_priv enum('N','Y') DEFAULT 'N' NOT NULL,
File_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,
References_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Show_db_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Super_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Execute_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Repl_slave_priv enum('N','Y') DEFAULT 'N' NOT NULL,
Repl_client_priv enum('N','Y') DEFAULT 'N' NOT NULL,
ssl_type enum('','ANY','X509', 'SPECIFIED') DEFAULT '' NOT NULL,
ssl_cipher BLOB NOT NULL,
x509_issuer BLOB NOT NULL,
x509_subject BLOB NOT NULL,
max_questions int(11) unsigned DEFAULT 0 NOT NULL,
max_updates int(11) unsigned DEFAULT 0 NOT NULL,
max_connections int(11) unsigned DEFAULT 0 NOT NULL,
PRIMARY KEY Host (Host,User)
) engine=MyISAM
CHARACTER SET utf8 COLLATE utf8_bin
comment='Users and global privileges';
CREATE TABLE func (name char(64) binary DEFAULT '' NOT NULL,ret tinyint(1) DEFAULT '0' NOT NULL,dl char(128) DEFAULT '' NOT NULL,type enum ('function','aggregate') NOT NULL,PRIMARY KEY (name)) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
CREATE TABLE tables_priv (Host char(60) binary DEFAULT '' NOT NULL,Db char(64) binary DEFAULT '' NOT NULL,User char(16) binary DEFAULT '' NOT NULL,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') DEFAULT '' NOT NULL,Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL,PRIMARY KEY (Host,Db,User,Table_name),KEY Grantor (Grantor)) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
INSERT INTO user VALUES ('localhost' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
INSERT INTO user VALUES ('@HOSTNAME@%','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
REPLACE INTO user VALUES ('127.0.0.1' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
INSERT INTO user (host,user) VALUES ('localhost','');
INSERT INTO user (host,user) VALUES ('@HOSTNAME@%','');
CREATE TABLE columns_priv (Host char(60) binary DEFAULT '' NOT NULL,Db char(64) binary DEFAULT '' NOT NULL,User char(16) binary DEFAULT '' NOT NULL,Table_name char(64) binary DEFAULT '' NOT NULL,Column_name char(64) binary DEFAULT '' NOT NULL,Timestamp timestamp(14),Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL,PRIMARY KEY (Host,Db,User,Table_name,Column_name)) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
CREATE TABLE help_topic (help_topic_id int unsigned not null,name varchar(64) not null,help_category_id smallint unsigned not null,description text not null,example text not null,url varchar(128) not null,primary key (help_topic_id),unique index (name)) engine=MyISAM CHARACTER SET utf8 comment='help topics';
CREATE TABLE help_category (help_category_id smallint unsigned not null,name varchar(64) not null,parent_category_id smallint unsigned null,url varchar(128) not null,primary key (help_category_id),unique index (name)) engine=MyISAM CHARACTER SET utf8 comment='help categories';
CREATE TABLE func (
name char(64) binary DEFAULT '' NOT NULL,
ret tinyint(1) DEFAULT '0' NOT NULL,
dl char(128) DEFAULT '' NOT NULL,
type enum ('function','aggregate') NOT NULL,
PRIMARY KEY (name)
) engine=MyISAM
CHARACTER SET utf8 COLLATE utf8_bin
comment='User defined functions';
CREATE TABLE tables_priv (
Host char(60) binary DEFAULT '' NOT NULL,
Db char(64) binary DEFAULT '' NOT NULL,
User char(16) binary DEFAULT '' NOT NULL,
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') DEFAULT '' NOT NULL,
Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL,
PRIMARY KEY (Host,Db,User,Table_name),KEY Grantor (Grantor)
) engine=MyISAM
CHARACTER SET utf8 COLLATE utf8_bin
comment='Table privileges';
CREATE TABLE help_keyword (help_keyword_id int unsigned not null,name varchar(64) not null,primary key (help_keyword_id),unique index (name)) engine=MyISAM CHARACTER SET utf8 comment='help keywords';
CREATE TABLE columns_priv (
Host char(60) binary DEFAULT '' NOT NULL,
Db char(64) binary DEFAULT '' NOT NULL,
User char(16) binary DEFAULT '' NOT NULL,
Table_name char(64) binary DEFAULT '' NOT NULL,
Column_name char(64) binary DEFAULT '' NOT NULL,
Timestamp timestamp(14),
Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL,
PRIMARY KEY (Host,Db,User,Table_name,Column_name)
) engine=MyISAM
CHARACTER SET utf8 COLLATE utf8_bin
comment='Column privileges';
CREATE TABLE help_relation (help_topic_id int unsigned not null references help_topic,help_keyword_id int unsigned not null references help_keyword,primary key (help_keyword_id, help_topic_id)) engine=MyISAM CHARACTER SET utf8 comment='keyword-topic relation';
CREATE TABLE time_zone_name (Name char(64) NOT NULL,Time_zone_id int unsigned NOT NULL,PRIMARY KEY Name (Name)) engine=MyISAM CHARACTER SET utf8 comment='Time zone names';
CREATE TABLE help_topic (
help_topic_id int unsigned not null,
name varchar(64) not null,
help_category_id smallint unsigned not null,
description text not null,
example text not null,
url varchar(128) not null,
primary key (help_topic_id),
unique index (name)
) engine=MyISAM
CHARACTER SET utf8
comment='help topics';
INSERT INTO time_zone_name (Name, Time_Zone_id) VALUES ('MET', 1), ('UTC', 2), ('Universal', 2), ('Europe/Moscow',3), ('leap/Europe/Moscow',4), ('Japan', 5);
CREATE TABLE help_category (
help_category_id smallint unsigned not null,
name varchar(64) not null,
parent_category_id smallint unsigned null,
url varchar(128) not null,
primary key (help_category_id),unique index (name)
) engine=MyISAM
CHARACTER SET utf8
comment='help categories';
CREATE TABLE help_keyword (
help_keyword_id int unsigned not null,
name varchar(64) not null,
primary key (help_keyword_id),unique index (name)
) engine=MyISAM
CHARACTER SET utf8
comment='help keywords';
CREATE TABLE help_relation (
help_topic_id int unsigned not null references help_topic,
help_keyword_id int unsigned not null references help_keyword,
primary key (help_keyword_id, help_topic_id)
) engine=MyISAM
CHARACTER SET utf8
comment='keyword-topic relation';
CREATE TABLE time_zone_name (
Name char(64) NOT NULL,
Time_zone_id int unsigned NOT NULL,
PRIMARY KEY Name (Name)
) engine=MyISAM
CHARACTER SET utf8
comment='Time zone names';
CREATE TABLE time_zone (Time_zone_id int unsigned NOT NULL auto_increment,Use_leap_seconds enum('Y','N') DEFAULT 'N' NOT NULL,PRIMARY KEY TzId (Time_zone_id)) engine=MyISAM CHARACTER SET utf8 comment='Time zones';
INSERT INTO time_zone (Time_zone_id, Use_leap_seconds) VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y'), (5,'N');
INSERT INTO time_zone_name (Name, Time_Zone_id) VALUES
('MET', 1), ('UTC', 2), ('Universal', 2),
('Europe/Moscow',3), ('leap/Europe/Moscow',4),
('Japan', 5);
CREATE TABLE time_zone_transition (Time_zone_id int unsigned NOT NULL,Transition_time bigint signed NOT NULL,Transition_type_id int unsigned NOT NULL,PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time)) engine=MyISAM CHARACTER SET utf8 comment='Time zone transitions';
CREATE TABLE time_zone (
Time_zone_id int unsigned NOT NULL auto_increment,
Use_leap_seconds enum('Y','N') DEFAULT 'N' NOT NULL,
PRIMARY KEY TzId (Time_zone_id)
) engine=MyISAM
CHARACTER SET utf8
comment='Time zones';
INSERT INTO time_zone_transition (Time_zone_id, Transition_time, Transition_type_id) VALUES (1, -1693706400, 0) ,(1, -1680483600, 1),(1, -1663455600, 2) ,(1, -1650150000, 3),(1, -1632006000, 2) ,(1, -1618700400, 3),(1, -938905200, 2) ,(1, -857257200, 3),(1, -844556400, 2) ,(1, -828226800, 3),(1, -812502000, 2) ,(1, -796777200, 3),(1, 228877200, 2) ,(1, 243997200, 3),(1, 260326800, 2) ,(1, 276051600, 3),(1, 291776400, 2) ,(1, 307501200, 3),(1, 323830800, 2) ,(1, 338950800, 3),(1, 354675600, 2) ,(1, 370400400, 3),(1, 386125200, 2) ,(1, 401850000, 3),(1, 417574800, 2) ,(1, 433299600, 3),(1, 449024400, 2) ,(1, 465354000, 3),(1, 481078800, 2) ,(1, 496803600, 3),(1, 512528400, 2) ,(1, 528253200, 3),(1, 543978000, 2) ,(1, 559702800, 3),(1, 575427600, 2) ,(1, 591152400, 3),(1, 606877200, 2) ,(1, 622602000, 3),(1, 638326800, 2) ,(1, 654656400, 3),(1, 670381200, 2) ,(1, 686106000, 3),(1, 701830800, 2) ,(1, 717555600, 3),(1, 733280400, 2) ,(1, 749005200, 3),(1, 764730000, 2) ,(1, 780454800, 3),(1, 796179600, 2) ,(1, 811904400, 3),(1, 828234000, 2) ,(1, 846378000, 3),(1, 859683600, 2) ,(1, 877827600, 3),(1, 891133200, 2) ,(1, 909277200, 3),(1, 922582800, 2) ,(1, 941331600, 3),(1, 954032400, 2) ,(1, 972781200, 3),(1, 985482000, 2) ,(1, 1004230800, 3),(1, 1017536400, 2) ,(1, 1035680400, 3),(1, 1048986000, 2) ,(1, 1067130000, 3),(1, 1080435600, 2) ,(1, 1099184400, 3),(1, 1111885200, 2) ,(1, 1130634000, 3),(1, 1143334800, 2) ,(1, 1162083600, 3),(1, 1174784400, 2) ,(1, 1193533200, 3),(1, 1206838800, 2) ,(1, 1224982800, 3),(1, 1238288400, 2) ,(1, 1256432400, 3),(1, 1269738000, 2) ,(1, 1288486800, 3),(1, 1301187600, 2) ,(1, 1319936400, 3),(1, 1332637200, 2) ,(1, 1351386000, 3),(1, 1364691600, 2) ,(1, 1382835600, 3),(1, 1396141200, 2) ,(1, 1414285200, 3),(1, 1427590800, 2) ,(1, 1445734800, 3),(1, 1459040400, 2) ,(1, 1477789200, 3),(1, 1490490000, 2) ,(1, 1509238800, 3),(1, 1521939600, 2) ,(1, 1540688400, 3),(1, 1553994000, 2) ,(1, 1572138000, 3),(1, 1585443600, 2) ,(1, 1603587600, 3),(1, 1616893200, 2) ,(1, 1635642000, 3),(1, 1648342800, 2) ,(1, 1667091600, 3),(1, 1679792400, 2) ,(1, 1698541200, 3),(1, 1711846800, 2) ,(1, 1729990800, 3),(1, 1743296400, 2) ,(1, 1761440400, 3),(1, 1774746000, 2) ,(1, 1792890000, 3),(1, 1806195600, 2) ,(1, 1824944400, 3),(1, 1837645200, 2) ,(1, 1856394000, 3),(1, 1869094800, 2) ,(1, 1887843600, 3),(1, 1901149200, 2) ,(1, 1919293200, 3),(1, 1932598800, 2) ,(1, 1950742800, 3),(1, 1964048400, 2) ,(1, 1982797200, 3),(1, 1995498000, 2) ,(1, 2014246800, 3),(1, 2026947600, 2) ,(1, 2045696400, 3),(1, 2058397200, 2) ,(1, 2077146000, 3),(1, 2090451600, 2) ,(1, 2108595600, 3),(1, 2121901200, 2) ,(1, 2140045200, 3),(3, -1688265000, 2) ,(3, -1656819048, 1),(3, -1641353448, 2) ,(3, -1627965048, 3),(3, -1618716648, 1) ,(3, -1596429048, 3),(3, -1593829848, 5) ,(3, -1589860800, 4),(3, -1542427200, 5) ,(3, -1539493200, 6),(3, -1525323600, 5) ,(3, -1522728000, 4),(3, -1491188400, 7) ,(3, -1247536800, 4),(3, 354920400, 5) ,(3, 370728000, 4),(3, 386456400, 5) ,(3, 402264000, 4),(3, 417992400, 5) ,(3, 433800000, 4),(3, 449614800, 5) ,(3, 465346800, 8),(3, 481071600, 9) ,(3, 496796400, 8),(3, 512521200, 9) ,(3, 528246000, 8),(3, 543970800, 9) ,(3, 559695600, 8),(3, 575420400, 9) ,(3, 591145200, 8),(3, 606870000, 9) ,(3, 622594800, 8),(3, 638319600, 9) ,(3, 654649200, 8),(3, 670374000, 10) ,(3, 686102400, 11),(3, 695779200, 8) ,(3, 701812800, 5),(3, 717534000, 4) ,(3, 733273200, 9),(3, 748998000, 8) ,(3, 764722800, 9),(3, 780447600, 8) ,(3, 796172400, 9),(3, 811897200, 8) ,(3, 828226800, 9),(3, 846370800, 8) ,(3, 859676400, 9),(3, 877820400, 8) ,(3, 891126000, 9),(3, 909270000, 8) ,(3, 922575600, 9),(3, 941324400, 8) ,(3, 954025200, 9),(3, 972774000, 8) ,(3, 985474800, 9),(3, 1004223600, 8) ,(3, 1017529200, 9),(3, 1035673200, 8) ,(3, 1048978800, 9),(3, 1067122800, 8) ,(3, 1080428400, 9),(3, 1099177200, 8) ,(3, 1111878000, 9),(3, 1130626800, 8) ,(3, 1143327600, 9),(3, 1162076400, 8) ,(3, 1174777200, 9),(3, 1193526000, 8) ,(3, 1206831600, 9),(3, 1224975600, 8) ,(3, 1238281200, 9),(3, 1256425200, 8) ,(3, 1269730800, 9),(3, 1288479600, 8) ,(3, 1301180400, 9),(3, 1319929200, 8) ,(3, 1332630000, 9),(3, 1351378800, 8) ,(3, 1364684400, 9),(3, 1382828400, 8) ,(3, 1396134000, 9),(3, 1414278000, 8) ,(3, 1427583600, 9),(3, 1445727600, 8) ,(3, 1459033200, 9),(3, 1477782000, 8) ,(3, 1490482800, 9),(3, 1509231600, 8) ,(3, 1521932400, 9),(3, 1540681200, 8) ,(3, 1553986800, 9),(3, 1572130800, 8) ,(3, 1585436400, 9),(3, 1603580400, 8) ,(3, 1616886000, 9),(3, 1635634800, 8) ,(3, 1648335600, 9),(3, 1667084400, 8) ,(3, 1679785200, 9),(3, 1698534000, 8) ,(3, 1711839600, 9),(3, 1729983600, 8) ,(3, 1743289200, 9),(3, 1761433200, 8) ,(3, 1774738800, 9),(3, 1792882800, 8) ,(3, 1806188400, 9),(3, 1824937200, 8) ,(3, 1837638000, 9),(3, 1856386800, 8) ,(3, 1869087600, 9),(3, 1887836400, 8) ,(3, 1901142000, 9),(3, 1919286000, 8) ,(3, 1932591600, 9),(3, 1950735600, 8) ,(3, 1964041200, 9),(3, 1982790000, 8) ,(3, 1995490800, 9),(3, 2014239600, 8) ,(3, 2026940400, 9),(3, 2045689200, 8) ,(3, 2058390000, 9),(3, 2077138800, 8) ,(3, 2090444400, 9),(3, 2108588400, 8) ,(3, 2121894000, 9),(3, 2140038000, 8),(4, -1688265000, 2) ,(4, -1656819048, 1),(4, -1641353448, 2) ,(4, -1627965048, 3),(4, -1618716648, 1) ,(4, -1596429048, 3),(4, -1593829848, 5) ,(4, -1589860800, 4),(4, -1542427200, 5) ,(4, -1539493200, 6),(4, -1525323600, 5) ,(4, -1522728000, 4),(4, -1491188400, 7) ,(4, -1247536800, 4),(4, 354920409, 5) ,(4, 370728010, 4),(4, 386456410, 5) ,(4, 402264011, 4),(4, 417992411, 5) ,(4, 433800012, 4),(4, 449614812, 5) ,(4, 465346812, 8),(4, 481071612, 9) ,(4, 496796413, 8),(4, 512521213, 9) ,(4, 528246013, 8),(4, 543970813, 9) ,(4, 559695613, 8),(4, 575420414, 9) ,(4, 591145214, 8),(4, 606870014, 9) ,(4, 622594814, 8),(4, 638319615, 9) ,(4, 654649215, 8),(4, 670374016, 10) ,(4, 686102416, 11),(4, 695779216, 8) ,(4, 701812816, 5),(4, 717534017, 4) ,(4, 733273217, 9),(4, 748998018, 8) ,(4, 764722818, 9),(4, 780447619, 8) ,(4, 796172419, 9),(4, 811897219, 8) ,(4, 828226820, 9),(4, 846370820, 8) ,(4, 859676420, 9),(4, 877820421, 8) ,(4, 891126021, 9),(4, 909270021, 8) ,(4, 922575622, 9),(4, 941324422, 8) ,(4, 954025222, 9),(4, 972774022, 8) ,(4, 985474822, 9),(4, 1004223622, 8) ,(4, 1017529222, 9),(4, 1035673222, 8) ,(4, 1048978822, 9),(4, 1067122822, 8) ,(4, 1080428422, 9),(4, 1099177222, 8) ,(4, 1111878022, 9),(4, 1130626822, 8) ,(4, 1143327622, 9),(4, 1162076422, 8) ,(4, 1174777222, 9),(4, 1193526022, 8) ,(4, 1206831622, 9),(4, 1224975622, 8) ,(4, 1238281222, 9),(4, 1256425222, 8) ,(4, 1269730822, 9),(4, 1288479622, 8) ,(4, 1301180422, 9),(4, 1319929222, 8) ,(4, 1332630022, 9),(4, 1351378822, 8) ,(4, 1364684422, 9),(4, 1382828422, 8) ,(4, 1396134022, 9),(4, 1414278022, 8) ,(4, 1427583622, 9),(4, 1445727622, 8) ,(4, 1459033222, 9),(4, 1477782022, 8) ,(4, 1490482822, 9),(4, 1509231622, 8) ,(4, 1521932422, 9),(4, 1540681222, 8) ,(4, 1553986822, 9),(4, 1572130822, 8) ,(4, 1585436422, 9),(4, 1603580422, 8) ,(4, 1616886022, 9),(4, 1635634822, 8) ,(4, 1648335622, 9),(4, 1667084422, 8) ,(4, 1679785222, 9),(4, 1698534022, 8) ,(4, 1711839622, 9),(4, 1729983622, 8) ,(4, 1743289222, 9),(4, 1761433222, 8) ,(4, 1774738822, 9),(4, 1792882822, 8) ,(4, 1806188422, 9),(4, 1824937222, 8) ,(4, 1837638022, 9),(4, 1856386822, 8) ,(4, 1869087622, 9),(4, 1887836422, 8) ,(4, 1901142022, 9),(4, 1919286022, 8) ,(4, 1932591622, 9),(4, 1950735622, 8) ,(4, 1964041222, 9),(4, 1982790022, 8) ,(4, 1995490822, 9),(4, 2014239622, 8) ,(4, 2026940422, 9),(4, 2045689222, 8) ,(4, 2058390022, 9),(4, 2077138822, 8) ,(4, 2090444422, 9),(4, 2108588422, 8) ,(4, 2121894022, 9),(4, 2140038022, 8);
INSERT INTO time_zone (Time_zone_id, Use_leap_seconds)
VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y'), (5,'N');
CREATE TABLE time_zone_transition (
Time_zone_id int unsigned NOT NULL,
Transition_time bigint signed NOT NULL,
Transition_type_id int unsigned NOT NULL,
PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time)
) engine=MyISAM
CHARACTER SET utf8
comment='Time zone transitions';
CREATE TABLE time_zone_transition_type (Time_zone_id int unsigned NOT NULL,Transition_type_id int unsigned NOT NULL,Offset int signed DEFAULT 0 NOT NULL,Is_DST tinyint unsigned DEFAULT 0 NOT NULL,Abbreviation char(8) DEFAULT '' NOT NULL,PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id)) engine=MyISAM CHARACTER SET utf8 comment='Time zone transition types';
INSERT INTO time_zone_transition_type (Time_zone_id,Transition_type_id, Offset, Is_DST, Abbreviation) VALUES (1, 0, 7200, 1, 'MEST') ,(1, 1, 3600, 0, 'MET') ,(1, 2, 7200, 1, 'MEST') ,(1, 3, 3600, 0, 'MET') ,(2, 0, 0, 0, 'UTC') ,(3, 0, 9000, 0, 'MMT') ,(3, 1, 12648, 1, 'MST') ,(3, 2, 9048, 0, 'MMT') ,(3, 3, 16248, 1, 'MDST') ,(3, 4, 10800, 0, 'MSK') ,(3, 5, 14400, 1, 'MSD') ,(3, 6, 18000, 1, 'MSD') ,(3, 7, 7200, 0, 'EET') ,(3, 8, 10800, 0, 'MSK') ,(3, 9, 14400, 1, 'MSD') ,(3, 10, 10800, 1, 'EEST') ,(3, 11, 7200, 0, 'EET') ,(4, 0, 9000, 0, 'MMT') ,(4, 1, 12648, 1, 'MST') ,(4, 2, 9048, 0, 'MMT') ,(4, 3, 16248, 1, 'MDST') ,(4, 4, 10800, 0, 'MSK') ,(4, 5, 14400, 1, 'MSD') ,(4, 6, 18000, 1, 'MSD') ,(4, 7, 7200, 0, 'EET') ,(4, 8, 10800, 0, 'MSK') ,(4, 9, 14400, 1, 'MSD') ,(4, 10, 10800, 1, 'EEST') ,(4, 11, 7200, 0, 'EET') ,(5, 0, 32400, 0, 'CJT') ,(5, 1, 32400, 0, 'JST');
INSERT INTO time_zone_transition
(Time_zone_id, Transition_time, Transition_type_id)
VALUES
(1, -1693706400, 0) ,(1, -1680483600, 1)
,(1, -1663455600, 2) ,(1, -1650150000, 3)
,(1, -1632006000, 2) ,(1, -1618700400, 3)
,(1, -938905200, 2) ,(1, -857257200, 3)
,(1, -844556400, 2) ,(1, -828226800, 3)
,(1, -812502000, 2) ,(1, -796777200, 3)
,(1, 228877200, 2) ,(1, 243997200, 3)
,(1, 260326800, 2) ,(1, 276051600, 3)
,(1, 291776400, 2) ,(1, 307501200, 3)
,(1, 323830800, 2) ,(1, 338950800, 3)
,(1, 354675600, 2) ,(1, 370400400, 3)
,(1, 386125200, 2) ,(1, 401850000, 3)
,(1, 417574800, 2) ,(1, 433299600, 3)
,(1, 449024400, 2) ,(1, 465354000, 3)
,(1, 481078800, 2) ,(1, 496803600, 3)
,(1, 512528400, 2) ,(1, 528253200, 3)
,(1, 543978000, 2) ,(1, 559702800, 3)
,(1, 575427600, 2) ,(1, 591152400, 3)
,(1, 606877200, 2) ,(1, 622602000, 3)
,(1, 638326800, 2) ,(1, 654656400, 3)
,(1, 670381200, 2) ,(1, 686106000, 3)
,(1, 701830800, 2) ,(1, 717555600, 3)
,(1, 733280400, 2) ,(1, 749005200, 3)
,(1, 764730000, 2) ,(1, 780454800, 3)
,(1, 796179600, 2) ,(1, 811904400, 3)
,(1, 828234000, 2) ,(1, 846378000, 3)
,(1, 859683600, 2) ,(1, 877827600, 3)
,(1, 891133200, 2) ,(1, 909277200, 3)
,(1, 922582800, 2) ,(1, 941331600, 3)
,(1, 954032400, 2) ,(1, 972781200, 3)
,(1, 985482000, 2) ,(1, 1004230800, 3)
,(1, 1017536400, 2) ,(1, 1035680400, 3)
,(1, 1048986000, 2) ,(1, 1067130000, 3)
,(1, 1080435600, 2) ,(1, 1099184400, 3)
,(1, 1111885200, 2) ,(1, 1130634000, 3)
,(1, 1143334800, 2) ,(1, 1162083600, 3)
,(1, 1174784400, 2) ,(1, 1193533200, 3)
,(1, 1206838800, 2) ,(1, 1224982800, 3)
,(1, 1238288400, 2) ,(1, 1256432400, 3)
,(1, 1269738000, 2) ,(1, 1288486800, 3)
,(1, 1301187600, 2) ,(1, 1319936400, 3)
,(1, 1332637200, 2) ,(1, 1351386000, 3)
,(1, 1364691600, 2) ,(1, 1382835600, 3)
,(1, 1396141200, 2) ,(1, 1414285200, 3)
,(1, 1427590800, 2) ,(1, 1445734800, 3)
,(1, 1459040400, 2) ,(1, 1477789200, 3)
,(1, 1490490000, 2) ,(1, 1509238800, 3)
,(1, 1521939600, 2) ,(1, 1540688400, 3)
,(1, 1553994000, 2) ,(1, 1572138000, 3)
,(1, 1585443600, 2) ,(1, 1603587600, 3)
,(1, 1616893200, 2) ,(1, 1635642000, 3)
,(1, 1648342800, 2) ,(1, 1667091600, 3)
,(1, 1679792400, 2) ,(1, 1698541200, 3)
,(1, 1711846800, 2) ,(1, 1729990800, 3)
,(1, 1743296400, 2) ,(1, 1761440400, 3)
,(1, 1774746000, 2) ,(1, 1792890000, 3)
,(1, 1806195600, 2) ,(1, 1824944400, 3)
,(1, 1837645200, 2) ,(1, 1856394000, 3)
,(1, 1869094800, 2) ,(1, 1887843600, 3)
,(1, 1901149200, 2) ,(1, 1919293200, 3)
,(1, 1932598800, 2) ,(1, 1950742800, 3)
,(1, 1964048400, 2) ,(1, 1982797200, 3)
,(1, 1995498000, 2) ,(1, 2014246800, 3)
,(1, 2026947600, 2) ,(1, 2045696400, 3)
,(1, 2058397200, 2) ,(1, 2077146000, 3)
,(1, 2090451600, 2) ,(1, 2108595600, 3)
,(1, 2121901200, 2) ,(1, 2140045200, 3)
,(3, -1688265000, 2) ,(3, -1656819048, 1)
,(3, -1641353448, 2) ,(3, -1627965048, 3)
,(3, -1618716648, 1) ,(3, -1596429048, 3)
,(3, -1593829848, 5) ,(3, -1589860800, 4)
,(3, -1542427200, 5) ,(3, -1539493200, 6)
,(3, -1525323600, 5) ,(3, -1522728000, 4)
,(3, -1491188400, 7) ,(3, -1247536800, 4)
,(3, 354920400, 5) ,(3, 370728000, 4)
,(3, 386456400, 5) ,(3, 402264000, 4)
,(3, 417992400, 5) ,(3, 433800000, 4)
,(3, 449614800, 5) ,(3, 465346800, 8)
,(3, 481071600, 9) ,(3, 496796400, 8)
,(3, 512521200, 9) ,(3, 528246000, 8)
,(3, 543970800, 9) ,(3, 559695600, 8)
,(3, 575420400, 9) ,(3, 591145200, 8)
,(3, 606870000, 9) ,(3, 622594800, 8)
,(3, 638319600, 9) ,(3, 654649200, 8)
,(3, 670374000, 10) ,(3, 686102400, 11)
,(3, 695779200, 8) ,(3, 701812800, 5)
,(3, 717534000, 4) ,(3, 733273200, 9)
,(3, 748998000, 8) ,(3, 764722800, 9)
,(3, 780447600, 8) ,(3, 796172400, 9)
,(3, 811897200, 8) ,(3, 828226800, 9)
,(3, 846370800, 8) ,(3, 859676400, 9)
,(3, 877820400, 8) ,(3, 891126000, 9)
,(3, 909270000, 8) ,(3, 922575600, 9)
,(3, 941324400, 8) ,(3, 954025200, 9)
,(3, 972774000, 8) ,(3, 985474800, 9)
,(3, 1004223600, 8) ,(3, 1017529200, 9)
,(3, 1035673200, 8) ,(3, 1048978800, 9)
,(3, 1067122800, 8) ,(3, 1080428400, 9)
,(3, 1099177200, 8) ,(3, 1111878000, 9)
,(3, 1130626800, 8) ,(3, 1143327600, 9)
,(3, 1162076400, 8) ,(3, 1174777200, 9)
,(3, 1193526000, 8) ,(3, 1206831600, 9)
,(3, 1224975600, 8) ,(3, 1238281200, 9)
,(3, 1256425200, 8) ,(3, 1269730800, 9)
,(3, 1288479600, 8) ,(3, 1301180400, 9)
,(3, 1319929200, 8) ,(3, 1332630000, 9)
,(3, 1351378800, 8) ,(3, 1364684400, 9)
,(3, 1382828400, 8) ,(3, 1396134000, 9)
,(3, 1414278000, 8) ,(3, 1427583600, 9)
,(3, 1445727600, 8) ,(3, 1459033200, 9)
,(3, 1477782000, 8) ,(3, 1490482800, 9)
,(3, 1509231600, 8) ,(3, 1521932400, 9)
,(3, 1540681200, 8) ,(3, 1553986800, 9)
,(3, 1572130800, 8) ,(3, 1585436400, 9)
,(3, 1603580400, 8) ,(3, 1616886000, 9)
,(3, 1635634800, 8) ,(3, 1648335600, 9)
,(3, 1667084400, 8) ,(3, 1679785200, 9)
,(3, 1698534000, 8) ,(3, 1711839600, 9)
,(3, 1729983600, 8) ,(3, 1743289200, 9)
,(3, 1761433200, 8) ,(3, 1774738800, 9)
,(3, 1792882800, 8) ,(3, 1806188400, 9)
,(3, 1824937200, 8) ,(3, 1837638000, 9)
,(3, 1856386800, 8) ,(3, 1869087600, 9)
,(3, 1887836400, 8) ,(3, 1901142000, 9)
,(3, 1919286000, 8) ,(3, 1932591600, 9)
,(3, 1950735600, 8) ,(3, 1964041200, 9)
,(3, 1982790000, 8) ,(3, 1995490800, 9)
,(3, 2014239600, 8) ,(3, 2026940400, 9)
,(3, 2045689200, 8) ,(3, 2058390000, 9)
,(3, 2077138800, 8) ,(3, 2090444400, 9)
,(3, 2108588400, 8) ,(3, 2121894000, 9)
,(3, 2140038000, 8)
,(4, -1688265000, 2) ,(4, -1656819048, 1)
,(4, -1641353448, 2) ,(4, -1627965048, 3)
,(4, -1618716648, 1) ,(4, -1596429048, 3)
,(4, -1593829848, 5) ,(4, -1589860800, 4)
,(4, -1542427200, 5) ,(4, -1539493200, 6)
,(4, -1525323600, 5) ,(4, -1522728000, 4)
,(4, -1491188400, 7) ,(4, -1247536800, 4)
,(4, 354920409, 5) ,(4, 370728010, 4)
,(4, 386456410, 5) ,(4, 402264011, 4)
,(4, 417992411, 5) ,(4, 433800012, 4)
,(4, 449614812, 5) ,(4, 465346812, 8)
,(4, 481071612, 9) ,(4, 496796413, 8)
,(4, 512521213, 9) ,(4, 528246013, 8)
,(4, 543970813, 9) ,(4, 559695613, 8)
,(4, 575420414, 9) ,(4, 591145214, 8)
,(4, 606870014, 9) ,(4, 622594814, 8)
,(4, 638319615, 9) ,(4, 654649215, 8)
,(4, 670374016, 10) ,(4, 686102416, 11)
,(4, 695779216, 8) ,(4, 701812816, 5)
,(4, 717534017, 4) ,(4, 733273217, 9)
,(4, 748998018, 8) ,(4, 764722818, 9)
,(4, 780447619, 8) ,(4, 796172419, 9)
,(4, 811897219, 8) ,(4, 828226820, 9)
,(4, 846370820, 8) ,(4, 859676420, 9)
,(4, 877820421, 8) ,(4, 891126021, 9)
,(4, 909270021, 8) ,(4, 922575622, 9)
,(4, 941324422, 8) ,(4, 954025222, 9)
,(4, 972774022, 8) ,(4, 985474822, 9)
,(4, 1004223622, 8) ,(4, 1017529222, 9)
,(4, 1035673222, 8) ,(4, 1048978822, 9)
,(4, 1067122822, 8) ,(4, 1080428422, 9)
,(4, 1099177222, 8) ,(4, 1111878022, 9)
,(4, 1130626822, 8) ,(4, 1143327622, 9)
,(4, 1162076422, 8) ,(4, 1174777222, 9)
,(4, 1193526022, 8) ,(4, 1206831622, 9)
,(4, 1224975622, 8) ,(4, 1238281222, 9)
,(4, 1256425222, 8) ,(4, 1269730822, 9)
,(4, 1288479622, 8) ,(4, 1301180422, 9)
,(4, 1319929222, 8) ,(4, 1332630022, 9)
,(4, 1351378822, 8) ,(4, 1364684422, 9)
,(4, 1382828422, 8) ,(4, 1396134022, 9)
,(4, 1414278022, 8) ,(4, 1427583622, 9)
,(4, 1445727622, 8) ,(4, 1459033222, 9)
,(4, 1477782022, 8) ,(4, 1490482822, 9)
,(4, 1509231622, 8) ,(4, 1521932422, 9)
,(4, 1540681222, 8) ,(4, 1553986822, 9)
,(4, 1572130822, 8) ,(4, 1585436422, 9)
,(4, 1603580422, 8) ,(4, 1616886022, 9)
,(4, 1635634822, 8) ,(4, 1648335622, 9)
,(4, 1667084422, 8) ,(4, 1679785222, 9)
,(4, 1698534022, 8) ,(4, 1711839622, 9)
,(4, 1729983622, 8) ,(4, 1743289222, 9)
,(4, 1761433222, 8) ,(4, 1774738822, 9)
,(4, 1792882822, 8) ,(4, 1806188422, 9)
,(4, 1824937222, 8) ,(4, 1837638022, 9)
,(4, 1856386822, 8) ,(4, 1869087622, 9)
,(4, 1887836422, 8) ,(4, 1901142022, 9)
,(4, 1919286022, 8) ,(4, 1932591622, 9)
,(4, 1950735622, 8) ,(4, 1964041222, 9)
,(4, 1982790022, 8) ,(4, 1995490822, 9)
,(4, 2014239622, 8) ,(4, 2026940422, 9)
,(4, 2045689222, 8) ,(4, 2058390022, 9)
,(4, 2077138822, 8) ,(4, 2090444422, 9)
,(4, 2108588422, 8) ,(4, 2121894022, 9)
,(4, 2140038022, 8)
,(5, -1009875600, 1);
CREATE TABLE time_zone_transition_type (
Time_zone_id int unsigned NOT NULL,
Transition_type_id int unsigned NOT NULL,
Offset int signed DEFAULT 0 NOT NULL,
Is_DST tinyint unsigned DEFAULT 0 NOT NULL,
Abbreviation char(8) DEFAULT '' NOT NULL,
PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id)
) engine=MyISAM
CHARACTER SET utf8
comment='Time zone transition types';
CREATE TABLE time_zone_leap_second (Transition_time bigint signed NOT NULL,Correction int signed NOT NULL,PRIMARY KEY TranTime (Transition_time)) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
INSERT INTO time_zone_leap_second (Transition_time, Correction) VALUES (78796800, 1) ,(94694401, 2) ,(126230402, 3) ,(157766403, 4) ,(189302404, 5) ,(220924805, 6) ,(252460806, 7) ,(283996807, 8) ,(315532808, 9) ,(362793609, 10) ,(394329610, 11) ,(425865611, 12) ,(489024012, 13) ,(567993613, 14) ,(631152014, 15) ,(662688015, 16) ,(709948816, 17) ,(741484817, 18) ,(773020818, 19) ,(820454419, 20) ,(867715220, 21) ,(915148821, 22);
INSERT INTO time_zone_transition_type (
Time_zone_id,Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
(1, 0, 7200, 1, 'MEST') ,(1, 1, 3600, 0, 'MET')
,(1, 2, 7200, 1, 'MEST') ,(1, 3, 3600, 0, 'MET')
,(2, 0, 0, 0, 'UTC')
,(3, 0, 9000, 0, 'MMT') ,(3, 1, 12648, 1, 'MST')
,(3, 2, 9048, 0, 'MMT') ,(3, 3, 16248, 1, 'MDST')
,(3, 4, 10800, 0, 'MSK') ,(3, 5, 14400, 1, 'MSD')
,(3, 6, 18000, 1, 'MSD') ,(3, 7, 7200, 0, 'EET')
,(3, 8, 10800, 0, 'MSK') ,(3, 9, 14400, 1, 'MSD')
,(3, 10, 10800, 1, 'EEST') ,(3, 11, 7200, 0, 'EET')
,(4, 0, 9000, 0, 'MMT') ,(4, 1, 12648, 1, 'MST')
,(4, 2, 9048, 0, 'MMT') ,(4, 3, 16248, 1, 'MDST')
,(4, 4, 10800, 0, 'MSK') ,(4, 5, 14400, 1, 'MSD')
,(4, 6, 18000, 1, 'MSD') ,(4, 7, 7200, 0, 'EET')
,(4, 8, 10800, 0, 'MSK') ,(4, 9, 14400, 1, 'MSD')
,(4, 10, 10800, 1, 'EEST') ,(4, 11, 7200, 0, 'EET')
,(5, 0, 32400, 0, 'CJT') ,(5, 1, 32400, 0, 'JST');
CREATE TABLE time_zone_leap_second (
Transition_time bigint signed NOT NULL,
Correction int signed NOT NULL,
PRIMARY KEY TranTime (Transition_time)
) engine=MyISAM
CHARACTER SET utf8
comment='Leap seconds information for time zones';
INSERT INTO time_zone_leap_second (
Transition_time, Correction) VALUES
(78796800, 1) ,(94694401, 2) ,(126230402, 3)
,(157766403, 4) ,(189302404, 5) ,(220924805, 6)
,(252460806, 7) ,(283996807, 8) ,(315532808, 9)
,(362793609, 10) ,(394329610, 11) ,(425865611, 12)
,(489024012, 13) ,(567993613, 14) ,(631152014, 15)
,(662688015, 16) ,(709948816, 17) ,(741484817, 18)
,(773020818, 19) ,(820454419, 20) ,(867715220, 21)
,(915148821, 22);
......@@ -123,6 +123,17 @@ sub spawn_impl ($$$$$$$) {
$SIG{INT}= 'DEFAULT'; # Parent do some stuff, we don't
if ( $::glob_cygwin_shell and $mode eq 'test' )
{
# Programs started from mysqltest under Cygwin, are to
# execute them within Cygwin. Else simple things in test
# files like
# --system "echo 1 > file"
# will fail.
# FIXME not working :-(
# $ENV{'COMSPEC'}= "$::glob_cygwin_shell -c";
}
if ( $output )
{
if ( ! open(STDOUT,">",$output) )
......@@ -130,6 +141,7 @@ sub spawn_impl ($$$$$$$) {
mtr_error("can't redirect STDOUT to \"$output\": $!");
}
}
if ( $error )
{
if ( $output eq $error )
......@@ -147,6 +159,7 @@ sub spawn_impl ($$$$$$$) {
}
}
}
if ( $input )
{
if ( ! open(STDIN,"<",$input) )
......@@ -154,7 +167,11 @@ sub spawn_impl ($$$$$$$) {
mtr_error("can't redirect STDIN to \"$input\": $!");
}
}
exec($path,@$arg_list_t);
if ( ! exec($path,@$arg_list_t) )
{
mtr_error("failed to execute \"$path\": $!");
}
}
}
}
......@@ -569,7 +586,7 @@ sub mtr_stop_mysqld_servers ($) {
sub mtr_mysqladmin_shutdown () {
my $spec= shift;
my @mysql_admin_pids;
my %mysql_admin_pids;
my @to_kill_specs;
foreach my $srv ( @$spec )
......@@ -611,13 +628,19 @@ sub mtr_mysqladmin_shutdown () {
# We don't wait for termination of mysqladmin
my $pid= mtr_spawn($::exe_mysqladmin, $args,
"", $::path_manager_log, $::path_manager_log, "");
push(@mysql_admin_pids, $pid);
$mysql_admin_pids{$pid}= 1;
}
# We wait blocking, we wait for the last one anyway
foreach my $pid (@mysql_admin_pids)
while (keys %mysql_admin_pids)
{
waitpid($pid,0); # FIXME no need to check -1 or 0?
foreach my $pid (keys %mysql_admin_pids)
{
if ( waitpid($pid,0) > 0 )
{
delete $mysql_admin_pids{$pid};
}
}
}
# If we trusted "mysqladmin --shutdown_timeout= ..." we could just
......
......@@ -50,12 +50,14 @@ sub mtr_show_failed_diff ($) {
$result_file= "$result_file$::opt_result_ext";
}
my $diffopts= $::opt_udiff ? "-u" : "-c";
if ( -f $reject_file )
{
print "Below are the diffs between actual and expected results:\n";
print "-------------------------------------------------------\n";
# FIXME check result code?!
mtr_run("diff",["-c",$result_file,$reject_file], "", "", "", "");
mtr_run("diff",[$diffopts,$result_file,$reject_file], "", "", "", "");
print "-------------------------------------------------------\n";
print "Please follow the instructions outlined at\n";
print "http://www.mysql.com/doc/en/Reporting_mysqltest_bugs.html\n";
......
......@@ -156,13 +156,13 @@ our @mysqld_src_dirs=
our $glob_win32= 0; # OS and native Win32 executables
our $glob_win32_perl= 0; # ActiveState Win32 Perl
our $glob_cygwin_perl= 0; # Cygwin Perl
our $glob_cygwin_shell= undef;
our $glob_mysql_test_dir= undef;
our $glob_mysql_bench_dir= undef;
our $glob_hostname= undef;
our $glob_scriptname= undef;
our $glob_use_running_server= 0;
our $glob_use_running_ndbcluster= 0;
our $glob_user= 'test';
our $glob_use_embedded_server= 0;
our $glob_basedir;
......@@ -281,6 +281,8 @@ our $opt_wait_timeout= 10;
our $opt_warnings;
our $opt_udiff;
our $opt_with_ndbcluster;
our $opt_with_openssl;
......@@ -358,6 +360,10 @@ sub main () {
if ( $opt_start_and_exit )
{
if ( ndbcluster_start() )
{
mtr_error("Can't start ndbcluster");
}
if ( mysqld_start('master',0,[],[]) )
{
mtr_report("Servers started, exiting");
......@@ -422,7 +428,9 @@ sub initial_setup () {
{
# Windows programs like 'mysqld' needs Windows paths
$glob_mysql_test_dir= `cygpath -m $glob_mysql_test_dir`;
$glob_cygwin_shell= `cygpath -w $ENV{'SHELL'}`; # The Windows path c:\...
chomp($glob_mysql_test_dir);
chomp($glob_cygwin_shell);
}
$glob_basedir= dirname($glob_mysql_test_dir);
$glob_mysql_bench_dir= "$glob_basedir/mysql-bench"; # FIXME make configurable
......@@ -524,6 +532,7 @@ sub command_line_setup () {
'start-from=s' => \$opt_start_from,
'timer' => \$opt_timer,
'tmpdir=s' => \$opt_tmpdir,
'unified-diff|udiff' => \$opt_udiff,
'user-test=s' => \$opt_user_test,
'user=s' => \$opt_user,
'verbose' => \$opt_verbose,
......@@ -712,17 +721,16 @@ sub command_line_setup () {
# }
#}
if ( $opt_user )
{
$glob_user= $opt_user;
}
elsif ( $glob_use_running_server )
if ( ! $opt_user )
{
$glob_user= "test";
}
else
{
$glob_user= "root"; # We want to do FLUSH xxx commands
if ( $glob_use_running_server )
{
$opt_user= "test";
}
else
{
$opt_user= "root"; # We want to do FLUSH xxx commands
}
}
}
......@@ -837,7 +845,7 @@ sub executable_setup () {
}
else
{
error("Cannot find embedded server 'mysqltest_embedded'");
mtr_error("Cannot find embedded server 'mysqltest_embedded'");
}
if ( -d "$path_tests_bindir/mysql_client_test_embedded" )
{
......@@ -860,9 +868,6 @@ sub executable_setup () {
$exe_ndb_mgm= "$glob_basedir/bin/ndb_mgm";
}
# FIXME special $exe_master_mysqld and $exe_slave_mysqld
# are not used that much....
if ( ! $exe_master_mysqld )
{
$exe_master_mysqld= $exe_mysqld;
......@@ -1054,7 +1059,7 @@ sub ndbcluster_start () {
"--data-dir=$glob_mysql_test_dir/var"],
"", "/dev/null", "", "") )
{
mtr_error("Error ndbcluster_install");
mtr_error("Error ndbcluster_start");
return 1;
}
......@@ -1102,7 +1107,7 @@ sub run_benchmarks ($) {
mtr_init_args(\$args);
mtr_add_arg($args, "--socket=%s", $master->[0]->{'path_mysock'});
mtr_add_arg($args, "--user=root");
mtr_add_arg($args, "--user=%s", $opt_user);
if ( $opt_small_bench )
{
......@@ -1226,15 +1231,41 @@ sub install_db ($$) {
my $type= shift;
my $data_dir= shift;
my $init_db_sql= "lib/init_db.sql"; # FIXME this is too simple maybe
my $init_db_sql= "lib/init_db.sql";
my $init_db_sql_tmp= "/tmp/init_db.sql$$";
my $args;
mtr_report("Installing \u$type Databases");
open(IN, $init_db_sql)
or error("Can't open $init_db_sql: $!");
open(OUT, ">", $init_db_sql_tmp)
or error("Can't write to $init_db_sql_tmp: $!");
while (<IN>)
{
chomp;
s/\@HOSTNAME\@/$glob_hostname/;
if ( /^\s*$/ )
{
print OUT "\n";
}
elsif (/;$/)
{
print OUT "$_\n";
}
else
{
print OUT "$_ ";
}
}
close OUT;
close IN;
mtr_init_args(\$args);
mtr_add_arg($args, "--no-defaults");
mtr_add_arg($args, "--bootstrap");
mtr_add_arg($args, "--console");
mtr_add_arg($args, "--skip-grant-tables");
mtr_add_arg($args, "--basedir=%s", $path_my_basedir);
mtr_add_arg($args, "--datadir=%s", $data_dir);
......@@ -1248,12 +1279,14 @@ sub install_db ($$) {
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
}
if ( mtr_run($exe_mysqld, $args, $init_db_sql,
if ( mtr_run($exe_mysqld, $args, $init_db_sql_tmp,
$path_manager_log, $path_manager_log, "") != 0 )
{
unlink($init_db_sql_tmp);
mtr_error("Error executing mysqld --bootstrap\n" .
"Could not install $type test DBs");
}
unlink($init_db_sql_tmp);
}
......@@ -1491,8 +1524,8 @@ sub report_failure_and_restart ($) {
# but stop before actually running mysqld or anything.
sub do_before_start_master ($$) {
my $tname= shift;
my $master_init_script= shift;
my $tname= shift;
my $init_script= shift;
# FIXME what about second master.....
......@@ -1502,8 +1535,8 @@ sub do_before_start_master ($$) {
$tname ne "rpl_crash_binlog_ib_3b")
{
# FIXME we really want separate dir for binlogs
`rm -fr $glob_mysql_test_dir/var/log/master-bin.*`;
# unlink("$glob_mysql_test_dir/var/log/master-bin.*");
`rm -f $glob_mysql_test_dir/var/log/master-bin*`;
# unlink("$glob_mysql_test_dir/var/log/master-bin*");
}
# Remove old master.info and relay-log.info files
......@@ -1512,23 +1545,19 @@ sub do_before_start_master ($$) {
unlink("$glob_mysql_test_dir/var/master1-data/master.info");
unlink("$glob_mysql_test_dir/var/master1-data/relay-log.info");
#run master initialization shell script if one exists
if ( $master_init_script and
mtr_run($master_init_script, [], "", "", "", "") != 0 )
# Run master initialization shell script if one exists
if ( $init_script )
{
mtr_error("Can't run $master_init_script");
# We ignore the return code
mtr_run("/bin/sh", ["-c",$init_script], "", "", "", "");
}
# for gcov FIXME needed? If so we need more absolute paths
# chdir($glob_basedir);
}
sub do_before_start_slave ($$) {
my $tname= shift;
my $slave_init_script= shift;
# When testing fail-safe replication, we will have more than one slave
# in this case, we start secondary slaves with an argument
my $tname= shift;
my $init_script= shift;
# Remove stale binary logs and old master.info files
# except for too tests which need them
......@@ -1544,14 +1573,15 @@ sub do_before_start_slave ($$) {
unlink("$glob_mysql_test_dir/var/slave-data/relay-log.info");
}
#run slave initialization shell script if one exists
if ( $slave_init_script and
mtr_run($slave_init_script, [], "", "", "", "") != 0 )
# Run slave initialization shell script if one exists
if ( $init_script )
{
mtr_error("Can't run $slave_init_script");
# We ignore the return code
mtr_run("/bin/sh", ["-c",$init_script], "", "", "", "");
}
unlink("$glob_mysql_test_dir/var/slave-data/log.*");
`rm -f $glob_mysql_test_dir/var/slave-data/log.*`;
# unlink("$glob_mysql_test_dir/var/slave-data/log.*");
}
sub mysqld_arguments ($$$$$) {
......@@ -1579,6 +1609,7 @@ sub mysqld_arguments ($$$$$) {
mtr_add_arg($args, "%s--no-defaults", $prefix);
}
mtr_add_arg($args, "%s--console", $prefix);
mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir);
mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir);
mtr_add_arg($args, "%s--core", $prefix);
......@@ -1669,12 +1700,12 @@ sub mysqld_arguments ($$$$$) {
{
if ( $type eq 'master' )
{
mtr_add_arg($args, "--debug=d:t:i:A,%s/var/log/master%s.trace",
mtr_add_arg($args, "%s--debug=d:t:i:A,%s/var/log/master%s.trace",
$prefix, $glob_mysql_test_dir, $sidx);
}
if ( $type eq 'slave' )
{
mtr_add_arg($args, "--debug=d:t:i:A,%s/var/log/slave%s.trace",
mtr_add_arg($args, "%s--debug=d:t:i:A,%s/var/log/slave%s.trace",
$prefix, $glob_mysql_test_dir, $sidx);
}
}
......@@ -1789,18 +1820,17 @@ sub mysqld_start ($$$$) {
my $exe;
my $pid;
# FIXME code duplication, make up your mind....
if ( $opt_source_dist )
if ( $type eq 'master' )
{
$exe= "$glob_basedir/sql/mysqld";
$exe= $exe_master_mysqld;
}
elsif ( $type eq 'slave' )
{
$exe= $exe_slave_mysqld;
}
else
{
$exe ="$glob_basedir/libexec/mysqld";
if ( ! -x $exe )
{
$exe ="$glob_basedir/bin/mysqld";
}
$exe= $exe_mysqld;
}
mtr_init_args(\$args);
......@@ -1983,7 +2013,7 @@ sub run_mysqltest ($$) {
mtr_add_arg($args, "--no-defaults");
mtr_add_arg($args, "--socket=%s", $master->[0]->{'path_mysock'});
mtr_add_arg($args, "--database=test");
mtr_add_arg($args, "--user=%s", $glob_user);
mtr_add_arg($args, "--user=%s", $opt_user);
mtr_add_arg($args, "--password=");
mtr_add_arg($args, "--silent");
mtr_add_arg($args, "-v");
......@@ -2054,7 +2084,7 @@ sub run_mysqltest ($$) {
mysqld_arguments($args,'master',0,$tinfo->{'master_opt'},[]);
}
return mtr_run($exe_mysqltest,$args,$tinfo->{'path'},"",$path_timefile,"");
return mtr_run_test($exe_mysqltest,$args,$tinfo->{'path'},"",$path_timefile,"");
}
##############################################################################
......@@ -2136,6 +2166,7 @@ Misc options
start-and-exit Only initiate and start the "mysqld" servers
fast Don't try to cleanup from earlier runs
help Get this help text
unified-diff | udiff When presenting differences, use unified diff
Options not yet described, or that I want to look into more
......
......@@ -21,17 +21,17 @@ INSERT INTO t2 VALUES (5,2,'um copo de Vodka');
INSERT INTO t2 VALUES (6,2,'um chocolate Snickers');
INSERT INTO t2 VALUES (7,1,'Bife');
INSERT INTO t2 VALUES (8,1,'Pizza de Salmao');
SELECT t1.q, t2.item, t2.id, round(MATCH t2.item AGAINST ('sushi'),8)
SELECT t1.q, t2.item, t2.id, round(MATCH t2.item AGAINST ('sushi'),6)
as x FROM t1, t2 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
q item id x
aaaaaaaaa dsaass de sushi 1 1.92378664
aaaaaaaaa dsaass de Bolo de Chocolate 2 0.00000000
aaaaaaaaa dsaass de Feijoada 3 0.00000000
aaaaaaaaa dsaass de Mousse de Chocolate 4 0.00000000
ssde df s fsda sad er um copo de Vodka 5 0.00000000
ssde df s fsda sad er um chocolate Snickers 6 0.00000000
aaaaaaaaa dsaass de Bife 7 0.00000000
aaaaaaaaa dsaass de Pizza de Salmao 8 0.00000000
aaaaaaaaa dsaass de sushi 1 1.923787
aaaaaaaaa dsaass de Bolo de Chocolate 2 0.000000
aaaaaaaaa dsaass de Feijoada 3 0.000000
aaaaaaaaa dsaass de Mousse de Chocolate 4 0.000000
ssde df s fsda sad er um copo de Vodka 5 0.000000
ssde df s fsda sad er um chocolate Snickers 6 0.000000
aaaaaaaaa dsaass de Bife 7 0.000000
aaaaaaaaa dsaass de Pizza de Salmao 8 0.000000
SELECT t1.q, t2.item, t2.id, MATCH t2.item AGAINST ('sushi' IN BOOLEAN MODE)
as x FROM t1, t2 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
q item id x
......@@ -43,17 +43,17 @@ ssde df s fsda sad er um copo de Vodka 5 0
ssde df s fsda sad er um chocolate Snickers 6 0
aaaaaaaaa dsaass de Bife 7 0
aaaaaaaaa dsaass de Pizza de Salmao 8 0
SELECT t1.q, t2.item, t2.id, round(MATCH t2.item AGAINST ('sushi'),8)
SELECT t1.q, t2.item, t2.id, round(MATCH t2.item AGAINST ('sushi'),6)
as x FROM t2, t1 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
q item id x
aaaaaaaaa dsaass de sushi 1 1.92378664
aaaaaaaaa dsaass de Bolo de Chocolate 2 0.00000000
aaaaaaaaa dsaass de Feijoada 3 0.00000000
aaaaaaaaa dsaass de Mousse de Chocolate 4 0.00000000
ssde df s fsda sad er um copo de Vodka 5 0.00000000
ssde df s fsda sad er um chocolate Snickers 6 0.00000000
aaaaaaaaa dsaass de Bife 7 0.00000000
aaaaaaaaa dsaass de Pizza de Salmao 8 0.00000000
aaaaaaaaa dsaass de sushi 1 1.923787
aaaaaaaaa dsaass de Bolo de Chocolate 2 0.000000
aaaaaaaaa dsaass de Feijoada 3 0.000000
aaaaaaaaa dsaass de Mousse de Chocolate 4 0.000000
ssde df s fsda sad er um copo de Vodka 5 0.000000
ssde df s fsda sad er um chocolate Snickers 6 0.000000
aaaaaaaaa dsaass de Bife 7 0.000000
aaaaaaaaa dsaass de Pizza de Salmao 8 0.000000
SELECT t1.q, t2.item, t2.id, MATCH t2.item AGAINST ('sushi' IN BOOLEAN MODE)
as x FROM t2, t1 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
q item id x
......
......@@ -2400,3 +2400,25 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1 SIMPLE t2 ref a a 23 test.t1.a 2
DROP TABLE t1, t2;
CREATE TABLE t1 ( city char(30) );
INSERT INTO t1 VALUES ('London');
INSERT INTO t1 VALUES ('Paris');
SELECT * FROM t1 WHERE city='London';
city
London
SELECT * FROM t1 WHERE city='london';
city
London
EXPLAIN SELECT * FROM t1 WHERE city='London' AND city='london';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
SELECT * FROM t1 WHERE city='London' AND city='london';
city
London
EXPLAIN SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
city
London
DROP TABLE t1;
......@@ -482,3 +482,8 @@ SET GLOBAL MYISAM_DATA_POINTER_SIZE= 8;
SHOW VARIABLES LIKE 'MYISAM_DATA_POINTER_SIZE';
Variable_name Value
myisam_data_pointer_size 8
SET GLOBAL table_cache=-1;
SHOW VARIABLES LIKE 'table_cache';
Variable_name Value
table_cache 1
SET GLOBAL table_cache=DEFAULT;
......@@ -29,13 +29,13 @@ INSERT INTO t2 VALUES (6,2,'um chocolate Snickers');
INSERT INTO t2 VALUES (7,1,'Bife');
INSERT INTO t2 VALUES (8,1,'Pizza de Salmao');
SELECT t1.q, t2.item, t2.id, round(MATCH t2.item AGAINST ('sushi'),8)
SELECT t1.q, t2.item, t2.id, round(MATCH t2.item AGAINST ('sushi'),6)
as x FROM t1, t2 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
SELECT t1.q, t2.item, t2.id, MATCH t2.item AGAINST ('sushi' IN BOOLEAN MODE)
as x FROM t1, t2 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
SELECT t1.q, t2.item, t2.id, round(MATCH t2.item AGAINST ('sushi'),8)
SELECT t1.q, t2.item, t2.id, round(MATCH t2.item AGAINST ('sushi'),6)
as x FROM t2, t1 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
SELECT t1.q, t2.item, t2.id, MATCH t2.item AGAINST ('sushi' IN BOOLEAN MODE)
......
......@@ -599,6 +599,7 @@ drop table t2;
prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ;
create table t5 (a int) ;
# rename must fail, t7 does not exist
--replace_result \\ /
--error 1017
execute stmt1 ;
create table t7 (a int) ;
......
......@@ -6,7 +6,7 @@ connection master;
drop database if exists mysqltest;
sync_slave_with_master;
# can't read dir
--replace_result "Errcode: 1" "Errcode: X" "Errcode: 2" "Errcode: X"
--replace_result "Errcode: 1" "Errcode: X" "Errcode: 2" "Errcode: X" \\ /
--error 12
show tables from mysqltest;
......
......@@ -1945,3 +1945,22 @@ EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a;
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a;
DROP TABLE t1, t2;
#
# Test case for bug 7098: substitution of a constant for a string field
#
CREATE TABLE t1 ( city char(30) );
INSERT INTO t1 VALUES ('London');
INSERT INTO t1 VALUES ('Paris');
SELECT * FROM t1 WHERE city='London';
SELECT * FROM t1 WHERE city='london';
EXPLAIN SELECT * FROM t1 WHERE city='London' AND city='london';
SELECT * FROM t1 WHERE city='London' AND city='london';
EXPLAIN SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
DROP TABLE t1;
......@@ -362,3 +362,11 @@ drop table t1;
SET GLOBAL MYISAM_DATA_POINTER_SIZE= 8;
SHOW VARIABLES LIKE 'MYISAM_DATA_POINTER_SIZE';
#
# Bug #6958: negative arguments to integer options wrap around
#
SET GLOBAL table_cache=-1;
SHOW VARIABLES LIKE 'table_cache';
SET GLOBAL table_cache=DEFAULT;
......@@ -376,6 +376,7 @@ extern "C" {
int ndb_mgm_set_connectstring(NdbMgmHandle handle,
const char *connect_string);
int ndb_mgm_set_configuration_nodeid(NdbMgmHandle handle, int nodeid);
int ndb_mgm_get_configuration_nodeid(NdbMgmHandle handle);
int ndb_mgm_get_connected_port(NdbMgmHandle handle);
const char *ndb_mgm_get_connected_host(NdbMgmHandle handle);
......
......@@ -55,6 +55,8 @@ public:
*/
Uint32 allocNodeId(int no_retries, int retry_delay_in_seconds);
int setNodeId(Uint32 nodeid);
/**
* Get config using socket
*/
......
......@@ -316,6 +316,12 @@ ConfigRetriever::verifyConfig(const struct ndb_mgm_configuration * conf, Uint32
return true;
}
int
ConfigRetriever::setNodeId(Uint32 nodeid)
{
return ndb_mgm_set_configuration_nodeid(m_handle, nodeid);
}
Uint32
ConfigRetriever::allocNodeId(int no_retries, int retry_delay_in_seconds)
{
......
......@@ -141,6 +141,8 @@ Configuration::init(int argc, char** argv)
else
_programName = strdup("");
globalData.ownId= 0;
return true;
}
......@@ -215,6 +217,13 @@ Configuration::fetch_configuration(){
ConfigRetriever &cr= *m_config_retriever;
/**
* if we have a nodeid set (e.g in a restart situation)
* reuse it
*/
if (globalData.ownId)
cr.setNodeId(globalData.ownId);
globalData.ownId = cr.allocNodeId(2 /*retry*/,3 /*delay*/);
if(globalData.ownId == 0){
......
......@@ -1720,6 +1720,15 @@ ndb_mgm_destroy_configuration(struct ndb_mgm_configuration *cfg)
}
}
extern "C"
int
ndb_mgm_set_configuration_nodeid(NdbMgmHandle handle, int nodeid)
{
CHECK_HANDLE(handle, -1);
handle->cfg._ownNodeId= nodeid;
return 0;
}
extern "C"
int
ndb_mgm_get_configuration_nodeid(NdbMgmHandle handle)
......
......@@ -1069,16 +1069,19 @@ print_nodes(ndb_mgm_cluster_state *state, ndb_mgm_configuration_iterator *it,
}
ndbout << ")" << endl;
} else {
if(ndb_mgm_find(it, CFG_NODE_ID, node_id) != 0){
ndb_mgm_first(it);
if(ndb_mgm_find(it, CFG_NODE_ID, node_id) == 0){
const char *config_hostname= 0;
ndb_mgm_get_string_parameter(it, CFG_NODE_HOST, &config_hostname);
if (config_hostname == 0 || config_hostname[0] == 0)
config_hostname= "any host";
ndbout_c(" (not connected, accepting connect from %s)",
config_hostname);
}
else
{
ndbout_c("Unable to find node with id: %d", node_id);
return;
}
const char *config_hostname= 0;
ndb_mgm_get_string_parameter(it, CFG_NODE_HOST, &config_hostname);
if (config_hostname == 0 || config_hostname[0] == 0)
config_hostname= "any host";
ndbout << " (not connected, accepting connect from "
<< config_hostname << ")" << endl;
}
}
}
......
......@@ -742,7 +742,7 @@ class Item_string :public Item
Item *new_item()
{
return new Item_string(name, str_value.ptr(),
str_value.length(), &my_charset_bin);
str_value.length(), collation.collation);
}
Item *safe_charset_converter(CHARSET_INFO *tocs);
String *const_string() { return &str_value; }
......
......@@ -1223,6 +1223,12 @@ static void fix_server_id(THD *thd, enum_var_type type)
server_id_supplied = 1;
}
bool sys_var_long_ptr::check(THD *thd, set_var *var)
{
longlong v= var->value->val_int();
var->save_result.ulonglong_value= v < 0 ? 0 : v;
return 0;
}
bool sys_var_long_ptr::update(THD *thd, set_var *var)
{
......
......@@ -93,6 +93,7 @@ class sys_var_long_ptr :public sys_var
sys_var_long_ptr(const char *name_arg, ulong *value_ptr,
sys_after_update_func func)
:sys_var(name_arg,func), value(value_ptr) {}
bool check(THD *thd, set_var *var);
bool update(THD *thd, set_var *var);
void set_default(THD *thd, enum_var_type type);
SHOW_TYPE type() { return SHOW_LONG; }
......
......@@ -276,7 +276,6 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \
--includedir=%{_includedir} \
--mandir=%{_mandir} \
--enable-thread-safe-client \
--with-comment=\"Official MySQL RPM\" \
--with-readline ;
# Add this for more debugging support
# --with-debug
......@@ -333,6 +332,7 @@ BuildMySQL "--enable-shared \
--with-csv-storage-engine \
--with-example-storage-engine \
--with-embedded-server \
--with-comment=\"MySQL Community Edition - Max (GPL)\" \
--with-server-suffix='-Max'"
# Save everything for debug
......@@ -379,6 +379,7 @@ BuildMySQL "--disable-shared \
--with-client-ldflags='-all-static' \
$USE_OTHER_LIBC_DIR \
%endif
--with-comment=\"MySQL Community Edition - Standard (GPL)\" \
--with-server-suffix='%{server_suffix}' \
--without-embedded-server \
--without-berkeley-db \
......@@ -694,7 +695,12 @@ fi
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
* Monday Feb 7 2005 Tomas Ulin <tomas@mysql.com>
* Mon Feb 14 2005 Lenz Grimmer <lenz@mysql.com>
* Fixed the compilation comments and moved them into the separate build sections
for Max and Standard
* Mon Feb 7 2005 Tomas Ulin <tomas@mysql.com>
- enabled the "Ndbcluster" storage engine for the max binary
- added extra make install in ndb subdir after Max build to get ndb binaries
......
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