2698 Rafal Somla 2008-10-01
PB fixes after last push.
modified:
mysql-test/r/backup.result
mysql-test/t/backup.test
sql/backup/image_info.h
2697 Rafal Somla 2008-09-30 [merge]
BUG#35240 - merge into team tree.
modified:
mysql-test/r/backup.result
mysql-test/t/backup.test
sql/backup/data_backup.cc
sql/backup/image_info.h
sql/backup/kernel.cc
sql/backup/logger.h
sql/backup/stream_v1.c
sql/si_logs.cc
sql/si_logs.h
=== modified file 'mysql-test/r/backup.result'
--- a/mysql-test/r/backup.result 2008-09-30 07:51:48 +0000
+++ b/mysql-test/r/backup.result 2008-10-01 11:15:47 +0000
@@ -10,17 +10,13 @@ CREATE TABLE `building` (
`dir_code` char(4),
`building` char(6)
) ENGINE=MYISAM DEFAULT CHARSET=latin1;
-LOCK TABLES `building` WRITE;
INSERT INTO `building` VALUES
('N41','1300'),('N01','1453'),('M00','1000'),('N41','1301'),('N41','1305');
-UNLOCK TABLES;
CREATE TABLE `directorate` (
`dir_code` char(4),
`dir_name` char(30),
`dir_head_id` char(9)
) ENGINE=MYISAM DEFAULT CHARSET=latin1;
-LOCK TABLES `directorate` WRITE;
INSERT INTO `directorate` VALUES ('N41','Development','333445555'),('N01','Human
Resources','123654321'),('M00','Management','333444444');
-UNLOCK TABLES;
USE db2;
CREATE TABLE `staff` (
`id` char(9),
@@ -31,17 +27,13 @@ CREATE TABLE `staff` (
`salary` int(11),
`mgr_id` char(9)
) ENGINE=MYISAM DEFAULT CHARSET=latin1;
-LOCK TABLES `staff` WRITE;
INSERT INTO `staff` VALUES
('333445555','John','Q','Smith','M',30000,'333444444'),('123763153','William','E','Walters','M',25000,'123654321'),('333444444','Alicia','F','St.Cruz','F',25000,NULL),('921312388','Goy','X','Hong','F',40000,'123654321'),('800122337','Rajesh','G','Kardakarna','M',38000,'333445555'),('820123637','Monty','C','Smythe','M',38000,'333445555'),('830132335','Richard','E','Jones','M',38000,'333445555'),('333445665','Edward','E','Engles','M',25000,'333445555'),('123654321','Beware','D','Borg','F',55000,'333444444'),('123456789','Wilma','N','Maxima','F',43000,'333445555');
-UNLOCK TABLES;
CREATE TABLE `tasking` (
`id` char(9),
`project_number` char(9),
`hours_worked` double(10,2)
) ENGINE=blackhole DEFAULT CHARSET=latin1;
-LOCK TABLES `tasking` WRITE;
INSERT INTO `tasking` VALUES
('333445555','405',23),('123763153','405',33.5),('921312388','601',44),('800122337','300',13),('820123637','300',9.5),('830132335','401',8.5),('333445555','300',11),('921312388','500',13),('800122337','300',44),('820123637','401',500.5),('830132335','400',12),('333445665','600',300.25),('123654321','607',444.75),('123456789','300',1000);
-UNLOCK TABLES;
backup: Activate synchronization points for BACKUP.
Depending on the driver used, one of the sync points is used,
and the result differs in PROCESSLIST state and info.
=== modified file 'mysql-test/t/backup.test'
--- a/mysql-test/t/backup.test 2008-09-30 07:51:48 +0000
+++ b/mysql-test/t/backup.test 2008-10-01 11:15:47 +0000
@@ -33,9 +33,7 @@ CREATE TABLE `building` (
# Dumping data for table `building`
#
-LOCK TABLES `building` WRITE;
INSERT INTO `building` VALUES
('N41','1300'),('N01','1453'),('M00','1000'),('N41','1301'),('N41','1305');
-UNLOCK TABLES;
#
@@ -52,9 +50,7 @@ CREATE TABLE `directorate` (
# Dumping data for table `directorate`
#
-LOCK TABLES `directorate` WRITE;
INSERT INTO `directorate` VALUES ('N41','Development','333445555'),('N01','Human
Resources','123654321'),('M00','Management','333444444');
-UNLOCK TABLES;
USE db2;
@@ -76,9 +72,7 @@ CREATE TABLE `staff` (
# Dumping data for table `staff`
#
-LOCK TABLES `staff` WRITE;
INSERT INTO `staff` VALUES
('333445555','John','Q','Smith','M',30000,'333444444'),('123763153','William','E','Walters','M',25000,'123654321'),('333444444','Alicia','F','St.Cruz','F',25000,NULL),('921312388','Goy','X','Hong','F',40000,'123654321'),('800122337','Rajesh','G','Kardakarna','M',38000,'333445555'),('820123637','Monty','C','Smythe','M',38000,'333445555'),('830132335','Richard','E','Jones','M',38000,'333445555'),('333445665','Edward','E','Engles','M',25000,'333445555'),('123654321','Beware','D','Borg','F',55000,'333444444'),('123456789','Wilma','N','Maxima','F',43000,'333445555');
-UNLOCK TABLES;
#
# Table structure for table `tasking`
@@ -94,9 +88,7 @@ CREATE TABLE `tasking` (
# Dumping data for table `tasking`
#
-LOCK TABLES `tasking` WRITE;
INSERT INTO `tasking` VALUES
('333445555','405',23),('123763153','405',33.5),('921312388','601',44),('800122337','300',13),('820123637','300',9.5),('830132335','401',8.5),('333445555','300',11),('921312388','500',13),('800122337','300',44),('820123637','401',500.5),('830132335','400',12),('333445665','600',300.25),('123654321','607',444.75),('123456789','300',1000);
-UNLOCK TABLES;
#
# Get a lock to check for locking thread in process list
=== modified file 'sql/backup/image_info.h'
--- a/sql/backup/image_info.h 2008-09-30 07:51:48 +0000
+++ b/sql/backup/image_info.h 2008-10-01 11:15:47 +0000
@@ -743,11 +743,18 @@ Image_info::Ts* Image_info::get_ts(uint
return m_ts_map[pos];
}
-
inline
time_t Image_info::get_vp_time() const
{
struct tm time;
+ long tz_offset;
+
+ bzero(&time,sizeof(time));
+
+ // Determine system timezone offset by calculating offset of the Epoch date.
+ time.tm_year=70;
+ time.tm_mday=1;
+ tz_offset= mktime(&time);
time.tm_year= vp_time.year;
time.tm_mon= vp_time.mon;
@@ -757,10 +764,10 @@ time_t Image_info::get_vp_time() const
time.tm_sec= vp_time.sec;
/*
- Note: mktime() assumes that time is expressed as local time hence
- we must correct the result to get UTC time.
+ Note: mktime() assumes that time is expressed as local time and vp_time is
+ in UTC. Hence we must correct the result to get it right.
*/
- return mktime(&time) - timezone;
+ return mktime(&time) - tz_offset;
}
/**
| Thread |
|---|
| • bzr push into mysql-6.0-backup branch (Rafal.Somla:2697 to 2698) | Rafal Somla | 1 Oct |