List:Commits« Previous MessageNext Message »
From:Chuck Bell Date:November 16 2009 6:41pm
Subject:bzr commit into mysql-6.0-backup branch (charles.bell:2890) Bug#47956
View as plain text  
#At file:///Users/cbell/source/bzr/mysql-6.0-bug-47956/ based on revid:charles.bell@stripped

 2890 Chuck Bell	2009-11-16 [merge]
      local merge before push of BUG#47956

    modified:
      mysql-test/collections/default.experimental
      mysql-test/suite/backup/include/backup_ext.inc
      mysql-test/suite/backup/r/backup_logs.result
      mysql-test/suite/backup/t/backup_external_non_win.test
      mysql-test/suite/backup/t/backup_external_non_win_not_falcon.test
      mysql-test/suite/backup/t/backup_logs.test
      sql/backup/stream_v1_transport.c
      unittest/backup/bstr_callback_errors-t.c
      unittest/backup/bstr_eos-t.c
      unittest/backup/bstr_io_errors-t.c
      unittest/backup/bstr_random_chunks-t.c
=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental	2009-11-02 14:05:19 +0000
+++ b/mysql-test/collections/default.experimental	2009-11-13 12:10:39 +0000
@@ -3,8 +3,6 @@
 
 backup.backup_dbname_lctn2  @windows  @darwin   # Bug#46933 2009-08-26 alik backup_*_lctn2 tests fail on windows
 backup.backup_events                     # Bug#47211 2009-09-25 alik backup_events.test fails randomly
-backup.backup_external_non_win*          # BUG#45877
-backup.backup_logs                       # Bug#47698 2009-09-29 alik backup.backup_logs fails under valgrind
 backup.backup_xpfm_compat_backup_lctn2 @windows # Bug#46933 2009-08-26 alik backup_*_lctn2 tests fail on windows
 
 binlog.binlog_multi_engine               # joro : NDB tests marked as experimental as agreed with bochklin

=== modified file 'mysql-test/suite/backup/include/backup_ext.inc'
--- a/mysql-test/suite/backup/include/backup_ext.inc	2009-03-25 22:17:35 +0000
+++ b/mysql-test/suite/backup/include/backup_ext.inc	2009-11-13 12:10:39 +0000
@@ -28,3 +28,6 @@ my $F = IO::File->new("$vardir/tmp/mctf.
 print $F "let \$MYSQL_CONVERT_TABLE_FORMAT = $location;";
 
 EOF
+
+--source $MYSQLTEST_VARDIR/tmp/mctf.inc
+

=== modified file 'mysql-test/suite/backup/r/backup_logs.result'
--- a/mysql-test/suite/backup/r/backup_logs.result	2009-11-04 14:18:21 +0000
+++ b/mysql-test/suite/backup/r/backup_logs.result	2009-11-10 17:24:18 +0000
@@ -205,12 +205,6 @@ Turn off debugging session.
 SET SESSION debug="-d";
 SET time_zone='+0:00';
 SELECT now() INTO @stop_backup;
-We calculate the timedifference between backup start time and stop
-time. If this difference is '0', then backup start time and stop time
-are same.
-SELECT timediff(@stop_backup, @start_backup) > 5;
-timediff(@stop_backup, @start_backup) > 5
-0
 
 Now verify actual start time / stop time of backup and start time /
 stop time from backup_history table. If the both times are same, 

=== modified file 'mysql-test/suite/backup/t/backup_external_non_win.test'
--- a/mysql-test/suite/backup/t/backup_external_non_win.test	2009-06-13 10:12:02 +0000
+++ b/mysql-test/suite/backup/t/backup_external_non_win.test	2009-11-13 12:10:39 +0000
@@ -12,6 +12,11 @@
 --source suite/backup/include/backup_ext.inc
 --source suite/backup/include/have_dbi.inc
 
+if(`select "$MYSQL_CONVERT_TABLE_FORMAT" NOT LIKE '%convert_table_format%'`)
+{
+--skip Could not find mysql_convert_table_format utility.
+}
+
 let $MYSQLD_BACKUPDIR = `select @@backupdir`;
 let $MYSQLD_DATADIR= `select @@datadir`;
 
@@ -75,7 +80,6 @@ INSERT INTO db2.t1(b,c) VALUES
 # Changing the storage engine for db1
 SHOW CREATE TABLE db1.t1;
 
-source $MYSQLTEST_VARDIR/tmp/mctf.inc;
 --exec perl $MYSQL_CONVERT_TABLE_FORMAT --user=root -S $MASTER_MYSOCK --port=$MASTER_MYPORT  --type=innodb db1
 
 --echo
@@ -96,7 +100,6 @@ RESTORE FROM 'db1.bak';
 SHOW CREATE TABLE db1.t1;
 
 --echo # Changing the storage engine back to myisam
-source $MYSQLTEST_VARDIR/tmp/mctf.inc;
 --exec perl $MYSQL_CONVERT_TABLE_FORMAT -u root -S $MASTER_MYSOCK --port=$MASTER_MYPORT  db1
 
 SHOW CREATE TABLE db1.t1;
@@ -156,7 +159,6 @@ BACKUP DATABASE db1 TO 'db1.bak';
 --echo # tables in db1
 
 --disable_warnings
-source $MYSQLTEST_VARDIR/tmp/mctf.inc;
 --exec perl $MYSQL_CONVERT_TABLE_FORMAT -u root -S $MASTER_MYSOCK --port=$MASTER_MYPORT  --type=myisam db1
 --enable_warnings
 
@@ -191,7 +193,6 @@ RESTORE FROM 'db1.bak' OVERWRITE;
 --echo # Verify that tablespace is restored from db1.t2
 SHOW CREATE TABLE db1.t2;
 
-source $MYSQLTEST_VARDIR/tmp/mctf.inc;
 --exec perl $MYSQL_CONVERT_TABLE_FORMAT -u root -S $MASTER_MYSOCK --port=$MASTER_MYPORT  --type=falcon db1
 
 SHOW CREATE TABLE db1.tpl;
@@ -224,7 +225,6 @@ DROP VIEW db2.v1;
 --remove_file $MYSQLD_BACKUPDIR/db1.bak
 
 --echo # Changing the storage engine back to myisam after restore
-source $MYSQLTEST_VARDIR/tmp/mctf.inc;
 --exec perl $MYSQL_CONVERT_TABLE_FORMAT -u root -S $MASTER_MYSOCK --port=$MASTER_MYPORT db1
 
 SHOW CREATE TABLE db1.t1;

=== modified file 'mysql-test/suite/backup/t/backup_external_non_win_not_falcon.test'
--- a/mysql-test/suite/backup/t/backup_external_non_win_not_falcon.test	2009-06-30 07:51:04 +0000
+++ b/mysql-test/suite/backup/t/backup_external_non_win_not_falcon.test	2009-11-13 12:10:39 +0000
@@ -9,6 +9,11 @@
 --source suite/backup/include/backup_ext.inc
 --source suite/backup/include/have_dbi.inc
 
+if(`select "$MYSQL_CONVERT_TABLE_FORMAT" NOT LIKE '%convert_table_format%'`)
+{
+--skip Could not find mysql_convert_table_format utility.
+}
+
 let $MYSQLD_BACKUPDIR = `select @@backupdir`;
 let $MYSQLD_DATADIR= `select @@datadir`;
 
@@ -69,7 +74,6 @@ INSERT INTO db2.t1(b,c) VALUES
 # Changing the storage engine for db1
 SHOW CREATE TABLE db1.t1;
 
-source $MYSQLTEST_VARDIR/tmp/mctf.inc;
 --exec $MYSQL_CONVERT_TABLE_FORMAT --user=root -S $MASTER_MYSOCK --port=$MASTER_MYPORT  --type=innodb db1
 
 --echo
@@ -90,7 +94,6 @@ RESTORE FROM 'db1.bak';
 SHOW CREATE TABLE db1.t1;
 
 --echo # Changing the storage engine back to myisam
-source $MYSQLTEST_VARDIR/tmp/mctf.inc;
 --exec $MYSQL_CONVERT_TABLE_FORMAT -u root -S $MASTER_MYSOCK --port=$MASTER_MYPORT  db1
 
 SHOW CREATE TABLE db1.t1;
@@ -149,7 +152,6 @@ BACKUP DATABASE db1 TO 'db1.bak';
 --echo # tables in db1
 
 --disable_warnings
-source $MYSQLTEST_VARDIR/tmp/mctf.inc;
 --exec $MYSQL_CONVERT_TABLE_FORMAT -u root -S $MASTER_MYSOCK --port=$MASTER_MYPORT  --type=myisam db1
 --enable_warnings
 
@@ -182,7 +184,6 @@ RESTORE FROM 'db1.bak' OVERWRITE;
 
 SHOW CREATE TABLE db1.t2;
 
-source $MYSQLTEST_VARDIR/tmp/mctf.inc;
 --exec $MYSQL_CONVERT_TABLE_FORMAT -u root -S $MASTER_MYSOCK --port=$MASTER_MYPORT  --type=innodb db1
 
 SHOW CREATE TABLE db1.tpl;
@@ -215,7 +216,6 @@ DROP VIEW db2.v1;
 --remove_file $MYSQLD_BACKUPDIR/db1.bak
 
 --echo # Changing the storage engine back to myisam after restore
-source $MYSQLTEST_VARDIR/tmp/mctf.inc;
 --exec $MYSQL_CONVERT_TABLE_FORMAT -u root -S $MASTER_MYSOCK --port=$MASTER_MYPORT db1
 
 SHOW CREATE TABLE db1.t1;

=== modified file 'mysql-test/suite/backup/t/backup_logs.test'
--- a/mysql-test/suite/backup/t/backup_logs.test	2009-10-12 09:08:34 +0000
+++ b/mysql-test/suite/backup/t/backup_logs.test	2009-11-10 17:24:18 +0000
@@ -289,12 +289,6 @@ connection con1;
 SET time_zone='+0:00';
 SELECT now() INTO @stop_backup;
 
---echo We calculate the timedifference between backup start time and stop
---echo time. If this difference is '0', then backup start time and stop time
---echo are same.
-
-SELECT timediff(@stop_backup, @start_backup) > 5;
-
 --echo
 --echo Now verify actual start time / stop time of backup and start time /
 --echo stop time from backup_history table. If the both times are same, 

=== modified file 'sql/backup/stream_v1_transport.c'
--- a/sql/backup/stream_v1_transport.c	2009-10-22 08:08:43 +0000
+++ b/sql/backup/stream_v1_transport.c	2009-11-16 07:36:42 +0000
@@ -2022,7 +2022,7 @@ int bstream_next_chunk(backup_stream *s)
         empty the buffer so that the next fragment will be loaded into it when
         the buffer is re-filled below.
       */
-      if (s->buf.header < s->buf.pos)
+      if (s->buf.header <= s->buf.pos)
         s->buf.begin= s->buf.header;
       else
       {

=== modified file 'unittest/backup/bstr_callback_errors-t.c'
--- a/unittest/backup/bstr_callback_errors-t.c	2009-10-23 06:24:37 +0000
+++ b/unittest/backup/bstr_callback_errors-t.c	2009-11-16 07:36:42 +0000
@@ -30,14 +30,21 @@ void run_test()
 {
   uint i;
   uint planned;
+  uint read_planned, write_planned;
+  
+  write_planned= 1 + global_count + 4 + db_count
+                   + 1 + global_count + perdb_count;
+ 
+  read_planned= 3 + global_count + perdb_count + 2;
+
+  planned = read_planned+write_planned;
+
+  plan(planned);
 
   init_catalog(&img_header);
 
   diag("Testing callback failures during writing of backup image");
 
-  planned= 1 + global_count + 4 + db_count
-           + 1 + global_count + perdb_count + 1;
-
   /*
     Do a clean write of backup image to fill callback_counts structure holding
     counters for callback functions.
@@ -89,7 +96,6 @@ void run_test()
 
   diag("Testing callback failures during reading of backup image");
 
-  planned+= 3 + global_count + perdb_count + 2;
 
   /* Do a clean read of the backup image to set the callback counters. */
   reset_counts();
@@ -124,8 +130,6 @@ void run_test()
   /* test errors in memory allocation */
   ok(fail_alloc(RD), "Errors in memory allocation");
 
-  /* Plan (1..n) must be at the beginning or end of the TAP output. */
-  plan(planned);
 }
 
 

=== modified file 'unittest/backup/bstr_eos-t.c'
--- a/unittest/backup/bstr_eos-t.c	2009-10-12 09:08:34 +0000
+++ b/unittest/backup/bstr_eos-t.c	2009-11-16 07:36:42 +0000
@@ -60,6 +60,10 @@ void run_test()
   image_header  hdr;
   int  i;
   byte header;
+ /*
+   Number of tests to be planned are not known at this point.
+ */
+  plan(NO_PLAN);
 
   init_catalog(&hdr);
 
@@ -135,8 +139,6 @@ void run_test()
     *chunk[i]= header;
   }
 
-  /* Plan (1..n) must be at the beginning or end of the TAP output. */
-  plan(1 + 2*chunk_count + 3*(chunk_count-3));
 }
 
 

=== modified file 'unittest/backup/bstr_io_errors-t.c'
--- a/unittest/backup/bstr_io_errors-t.c	2009-10-12 09:08:34 +0000
+++ b/unittest/backup/bstr_io_errors-t.c	2009-11-16 07:36:42 +0000
@@ -16,7 +16,11 @@ void run_test()
 {
   int i;
   int  can_pass;
-  uint planned;
+  
+  /*
+    Number of tests to be planned are not known at this point.
+  */
+  plan(NO_PLAN);
 
   init_catalog(&img_header);
 
@@ -29,7 +33,6 @@ void run_test()
   diag("Made %lu write calls", io_counts.write);
   diag("Wrote %lu bytes", (long unsigned)io_counts.write_bytes);
 
-  planned= 1 + 2*io_counts.write;
 
   /*
     Errors during last 2 write calls (which happen during closing of a stream)
@@ -61,7 +64,6 @@ void run_test()
   diag("Made %lu read calls", io_counts.read);
   diag("Read %lu bytes", (long unsigned)io_counts.read_bytes);
 
-  planned+= 1 + io_counts.read;
 
   for(i= io_counts.read; i > 0 ; --i)
   {
@@ -71,7 +73,4 @@ void run_test()
        "Failing %d-th read call", i);
   }
 
-  /* Plan (1..n) must be at the beginning or end of the TAP output. */
-  plan(planned);
 }
-

=== modified file 'unittest/backup/bstr_random_chunks-t.c'
--- a/unittest/backup/bstr_random_chunks-t.c	2009-10-12 09:08:34 +0000
+++ b/unittest/backup/bstr_random_chunks-t.c	2009-11-16 07:36:42 +0000
@@ -44,9 +44,12 @@ void run_test()
   size_t byte_count;
   size_t csize;
   int    ret;
-  uint   planned;
 
   stream_block_size= BSIZE;
+ /*
+   Number of tests to be planned are not known at this point.
+  */
+  plan(NO_PLAN);
 
   diag("Writing");
 
@@ -79,7 +82,6 @@ void run_test()
 
   diag("Reading");
 
-  planned= 2*chunk_count + 2;
 
   ret= backup_stream_open_rd(&stream, "random.bst"); 
   if (ret)
@@ -111,8 +113,6 @@ void run_test()
   ok(BSTREAM_EOS == ret,"Moving to next chunk after EOS was hit");
 
  end:
-  /* Plan (1..n) must be at the beginning or end of the TAP output. */
-  plan(planned);
 
   backup_stream_close(&stream);
 }


Attachment: [text/bzr-bundle] bzr/charles.bell@sun.com-20091116184113-q9b6mi7dhzmpvc29.bundle
Thread
bzr commit into mysql-6.0-backup branch (charles.bell:2890) Bug#47956Chuck Bell16 Nov