MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Luis Soares Date:October 22 2009 1:46pm
Subject:bzr commit into mysql-5.1-rep+2 branch (luis.soares:3148) WL#5096
View as plain text  
#At file:///home/lsoares/Workspace/bzr/work/features/wl5092/mysql-5.1-rep%2B2/ based on revid:luis.soares@stripped

 3148 Luis Soares	2009-10-22
      WL#5096: (WORK-IN-PROGRESS)
      
      Extended test cases for saniy checks on image fields.
      
      WL#5092: (WORK-IN-PROGRESS)
      
      Fixed issue that would prevent insert delayed from logging
      according binlog-row-image.

    modified:
      mysql-test/suite/rpl/r/rpl_row_img_full_sanity.result
      mysql-test/suite/rpl/r/rpl_row_img_min_sanity.result
      mysql-test/suite/rpl/r/rpl_row_img_noblob_sanity.result
      mysql-test/suite/rpl/t/rpl_row_img_full_sanity.test
      mysql-test/suite/rpl/t/rpl_row_img_min_sanity.test
      mysql-test/suite/rpl/t/rpl_row_img_noblob_sanity.test
      sql/sql_insert.cc
=== modified file 'mysql-test/suite/rpl/r/rpl_row_img_full_sanity.result'
--- a/mysql-test/suite/rpl/r/rpl_row_img_full_sanity.result	2009-10-17 22:43:40 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_img_full_sanity.result	2009-10-22 13:45:58 +0000
@@ -15,6 +15,8 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int, c2 int, c3 int);
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -29,6 +31,8 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int, c2 int, c3 int, key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -43,6 +47,8 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int, c2 int, c3 int, unique key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -57,6 +63,8 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int, c2 int, c3 int, primary key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -71,6 +79,8 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int NOT NULL, c2 int, c3 int, unique key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;

=== modified file 'mysql-test/suite/rpl/r/rpl_row_img_min_sanity.result'
--- a/mysql-test/suite/rpl/r/rpl_row_img_min_sanity.result	2009-10-17 22:43:40 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_img_min_sanity.result	2009-10-22 13:45:58 +0000
@@ -15,6 +15,8 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int, c2 int, c3 int);
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -29,6 +31,8 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int, c2 int, c3 int, key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -43,6 +47,8 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int, c2 int, c3 int, unique key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -57,6 +63,8 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int, c2 int, c3 int, primary key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -71,6 +79,8 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int NOT NULL, c2 int, c3 int, unique key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;

=== modified file 'mysql-test/suite/rpl/r/rpl_row_img_noblob_sanity.result'
--- a/mysql-test/suite/rpl/r/rpl_row_img_noblob_sanity.result	2009-10-22 08:33:42 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_img_noblob_sanity.result	2009-10-22 13:45:58 +0000
@@ -15,6 +15,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int, c2 int, c3 blob);
 INSERT INTO t VALUES (1,2,"a");
+INSERT INTO t(c1,c3) VALUES (10,"a");
+INSERT DELAYED INTO t(c1,c3) VALUES (100,"a");
+INSERT INTO t(c1) VALUES (1000);
+INSERT DELAYED INTO t(c1) VALUES (10000);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -29,6 +33,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int, c2 int, c3 blob, key(c1));
 INSERT INTO t VALUES (1,2,"a");
+INSERT INTO t(c1,c3) VALUES (10,"a");
+INSERT DELAYED INTO t(c1,c3) VALUES (100,"a");
+INSERT INTO t(c1) VALUES (1000);
+INSERT DELAYED INTO t(c1) VALUES (10000);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -43,6 +51,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int, c2 int, c3 blob, unique key(c1));
 INSERT INTO t VALUES (1,2,"a");
+INSERT INTO t(c1,c3) VALUES (10,"a");
+INSERT DELAYED INTO t(c1,c3) VALUES (100,"a");
+INSERT INTO t(c1) VALUES (1000);
+INSERT DELAYED INTO t(c1) VALUES (10000);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -57,6 +69,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int, c2 int, c3 blob, primary key(c1));
 INSERT INTO t VALUES (1,2,"a");
+INSERT INTO t(c1,c3) VALUES (10,"a");
+INSERT DELAYED INTO t(c1,c3) VALUES (100,"a");
+INSERT INTO t(c1) VALUES (1000);
+INSERT DELAYED INTO t(c1) VALUES (10000);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -71,6 +87,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int NOT NULL, c2 int, c3 blob, unique key(c1));
 INSERT INTO t VALUES (1,2,"a");
+INSERT INTO t(c1,c3) VALUES (10,"a");
+INSERT DELAYED INTO t(c1,c3) VALUES (100,"a");
+INSERT INTO t(c1) VALUES (1000);
+INSERT DELAYED INTO t(c1) VALUES (10000);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -85,6 +105,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int, c2 int, c3 blob, primary key(c1,c3(512)));
 INSERT INTO t VALUES (1,2,"a");
+INSERT INTO t(c1,c3) VALUES (10,"a");
+INSERT DELAYED INTO t(c1,c3) VALUES (100,"a");
+INSERT INTO t(c1) VALUES (1000);
+INSERT DELAYED INTO t(c1) VALUES (10000);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -99,6 +123,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
 start slave;
 CREATE TABLE t (c1 int, c2 int, c3 blob, primary key(c1,c2));
 INSERT INTO t VALUES (1,2,"a");
+INSERT INTO t(c1,c3) VALUES (10,"a");
+INSERT DELAYED INTO t(c1,c3) VALUES (100,"a");
+INSERT INTO t(c1) VALUES (1000);
+INSERT DELAYED INTO t(c1) VALUES (10000);
 UPDATE t SET c3='b' WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;

=== modified file 'mysql-test/suite/rpl/t/rpl_row_img_full_sanity.test'
--- a/mysql-test/suite/rpl/t/rpl_row_img_full_sanity.test	2009-10-17 22:43:40 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_img_full_sanity.test	2009-10-22 13:45:58 +0000
@@ -35,6 +35,8 @@
 
 CREATE TABLE t (c1 int, c2 int, c3 int);
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -50,6 +52,10 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3=3\n# at/m);
+  print "master: Unexpected columns in binlog (partial write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n###   \@3=NULL\n# at/m);
+  print "master: Unexpected columns in binlog (delayed write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n###   \@3=NULL\n# at/m);
+
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -65,6 +71,9 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3=3\n# at/m);
+  print "slave: Unexpected columns in binlog (partial write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n###   \@3=NULL\n# at/m);
+  print "slave: Unexpected columns in binlog (delayed write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n###   \@3=NULL\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -79,6 +88,8 @@ EOF
 
 CREATE TABLE t (c1 int, c2 int, c3 int, key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -94,6 +105,9 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3=3\n# at/m);
+  print "master: Unexpected columns in binlog (partial write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n###   \@3=NULL\n# at/m);
+  print "master: Unexpected columns in binlog (delayed write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n###   \@3=NULL\n# at/m);
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -109,6 +123,9 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3=3\n# at/m);
+  print "slave: Unexpected columns in binlog (partial write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n###   \@3=NULL\n# at/m);
+  print "slave: Unexpected columns in binlog (delayed write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n###   \@3=NULL\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -123,6 +140,8 @@ EOF
 
 CREATE TABLE t (c1 int, c2 int, c3 int, unique key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -138,6 +157,9 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3=3\n# at/m);
+  print "master: Unexpected columns in binlog (partial write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n###   \@3=NULL\n# at/m);
+  print "master: Unexpected columns in binlog (delayed write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n###   \@3=NULL\n# at/m);
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -153,6 +175,9 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3=3\n# at/m);
+  print "slave: Unexpected columns in binlog (partial write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n###   \@3=NULL\n# at/m);
+  print "slave: Unexpected columns in binlog (delayed write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n###   \@3=NULL\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -167,6 +192,8 @@ EOF
 
 CREATE TABLE t (c1 int, c2 int, c3 int, primary key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -182,6 +209,9 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3=3\n# at/m);
+  print "master: Unexpected columns in binlog (partial write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n###   \@3=NULL\n# at/m);
+  print "master: Unexpected columns in binlog (delayed write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n###   \@3=NULL\n# at/m);
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -197,6 +227,9 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3=3\n# at/m);
+  print "slave: Unexpected columns in binlog (partial write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n###   \@3=NULL\n# at/m);
+  print "slave: Unexpected columns in binlog (delayed write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n###   \@3=NULL\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -211,6 +244,8 @@ EOF
 
 CREATE TABLE t (c1 int NOT NULL, c2 int, c3 int, unique key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -226,6 +261,9 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3=3\n# at/m);
+  print "master: Unexpected columns in binlog (partial write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n###   \@3=NULL\n# at/m);
+  print "master: Unexpected columns in binlog (delayed write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n###   \@3=NULL\n# at/m);
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -241,6 +279,9 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3=3\n# at/m);
+  print "slave: Unexpected columns in binlog (partial write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n###   \@3=NULL\n# at/m);
+  print "slave: Unexpected columns in binlog (delayed write row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n###   \@3=NULL\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);

=== modified file 'mysql-test/suite/rpl/t/rpl_row_img_min_sanity.test'
--- a/mysql-test/suite/rpl/t/rpl_row_img_min_sanity.test	2009-10-22 08:33:42 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_img_min_sanity.test	2009-10-22 13:45:58 +0000
@@ -36,6 +36,8 @@
 
 CREATE TABLE t (c1 int, c2 int, c3 int);
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -51,6 +53,8 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n# at/m);
+  print "master: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n# at/m);
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -66,6 +70,8 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n# at/m);
+  print "slave: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -80,6 +86,8 @@ EOF
 
 CREATE TABLE t (c1 int, c2 int, c3 int, key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -95,6 +103,8 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n# at/m);
+  print "master: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n# at/m);
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -110,6 +120,8 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n# at/m);
+  print "slave: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -124,6 +136,8 @@ EOF
 
 CREATE TABLE t (c1 int, c2 int, c3 int, unique key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -139,6 +153,8 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n# at/m);
+  print "master: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n# at/m);
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -154,6 +170,8 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n# at/m);
+  print "slave: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3=3\n### SET\n###   \@1=2\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3=3\n# at/m);
   close(FILE);
@@ -168,6 +186,8 @@ EOF
 
 CREATE TABLE t (c1 int, c2 int, c3 int, primary key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -183,6 +203,8 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n# at/m);
+  print "master: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n# at/m);
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n### SET\n###   \@1=2\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n# at/m);
   close(FILE);
@@ -198,6 +220,8 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n# at/m);
+  print "slave: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n### SET\n###   \@1=2\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n# at/m);
   close(FILE);
@@ -212,6 +236,8 @@ EOF
 
 CREATE TABLE t (c1 int NOT NULL, c2 int, c3 int, unique key(c1));
 INSERT INTO t VALUES (1,2,3);
+INSERT INTO t(c1,c2) VALUES (10,20);
+INSERT DELAYED INTO t(c1,c2) VALUES (100,200);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -227,6 +253,8 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n# at/m);
+  print "master: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n# at/m);
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n### SET\n###   \@1=2\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n# at/m);
   close(FILE);
@@ -242,6 +270,8 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=20\n# at/m);
+  print "slave: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=200\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n### SET\n###   \@1=2\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n# at/m);
   close(FILE);

=== modified file 'mysql-test/suite/rpl/t/rpl_row_img_noblob_sanity.test'
--- a/mysql-test/suite/rpl/t/rpl_row_img_noblob_sanity.test	2009-10-22 08:33:42 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_img_noblob_sanity.test	2009-10-22 13:45:58 +0000
@@ -36,6 +36,10 @@
 
 CREATE TABLE t (c1 int, c2 int, c3 blob);
 INSERT INTO t VALUES (1,2,"a");
+INSERT INTO t(c1,c3) VALUES (10,"a");
+INSERT DELAYED INTO t(c1,c3) VALUES (100,"a");
+INSERT INTO t(c1) VALUES (1000);
+INSERT DELAYED INTO t(c1) VALUES (10000);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -51,6 +55,12 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1000\n###   \@2=NULL\n# at/m);
+  print "master: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10000\n###   \@2=NULL\n# at/m);
+
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n### SET\n###   \@1=2\n###   \@2=2\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3='a'\n/m);
   close(FILE);
@@ -66,6 +76,12 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1000\n###   \@2=NULL\n# at/m);
+  print "slave: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10000\n###   \@2=NULL\n# at/m);
+
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n### SET\n###   \@1=2\n###   \@2=2\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3='a'\n/m);
   close(FILE);
@@ -80,6 +96,10 @@ EOF
 
 CREATE TABLE t (c1 int, c2 int, c3 blob, key(c1));
 INSERT INTO t VALUES (1,2,"a");
+INSERT INTO t(c1,c3) VALUES (10,"a");
+INSERT DELAYED INTO t(c1,c3) VALUES (100,"a");
+INSERT INTO t(c1) VALUES (1000);
+INSERT DELAYED INTO t(c1) VALUES (10000);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -95,6 +115,12 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1000\n###   \@2=NULL\n# at/m);
+  print "master: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10000\n###   \@2=NULL\n# at/m);
+
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n### SET\n###   \@1=2\n###   \@2=2\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3='a'\n/m);
   close(FILE);
@@ -110,6 +136,11 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1000\n###   \@2=NULL\n# at/m);
+  print "slave: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10000\n###   \@2=NULL\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n### SET\n###   \@1=2\n###   \@2=2\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3='a'\n/m);
   close(FILE);
@@ -124,6 +155,10 @@ EOF
 
 CREATE TABLE t (c1 int, c2 int, c3 blob, unique key(c1));
 INSERT INTO t VALUES (1,2,"a");
+INSERT INTO t(c1,c3) VALUES (10,"a");
+INSERT DELAYED INTO t(c1,c3) VALUES (100,"a");
+INSERT INTO t(c1) VALUES (1000);
+INSERT DELAYED INTO t(c1) VALUES (10000);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -139,6 +174,11 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1000\n###   \@2=NULL\n# at/m);
+  print "master: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10000\n###   \@2=NULL\n# at/m);
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n### SET\n###   \@1=2\n###   \@2=2\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3='a'\n/m);
   close(FILE);
@@ -154,6 +194,11 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1000\n###   \@2=NULL\n# at/m);
+  print "slave: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10000\n###   \@2=NULL\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n### SET\n###   \@1=2\n###   \@2=2\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3='a'\n/m);
   close(FILE);
@@ -168,6 +213,10 @@ EOF
 
 CREATE TABLE t (c1 int, c2 int, c3 blob, primary key(c1));
 INSERT INTO t VALUES (1,2,"a");
+INSERT INTO t(c1,c3) VALUES (10,"a");
+INSERT DELAYED INTO t(c1,c3) VALUES (100,"a");
+INSERT INTO t(c1) VALUES (1000);
+INSERT DELAYED INTO t(c1) VALUES (10000);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -183,6 +232,11 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1000\n###   \@2=NULL\n# at/m);
+  print "master: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10000\n###   \@2=NULL\n# at/m);
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n### SET\n###   \@1=2\n###   \@2=2\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n# at/m);
   close(FILE);
@@ -198,6 +252,11 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1000\n###   \@2=NULL\n# at/m);
+  print "slave: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10000\n###   \@2=NULL\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n### SET\n###   \@1=2\n###   \@2=2\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n# at/m);
   close(FILE);
@@ -212,6 +271,10 @@ EOF
 
 CREATE TABLE t (c1 int NOT NULL, c2 int, c3 blob, unique key(c1));
 INSERT INTO t VALUES (1,2,"a");
+INSERT INTO t(c1,c3) VALUES (10,"a");
+INSERT DELAYED INTO t(c1,c3) VALUES (100,"a");
+INSERT INTO t(c1) VALUES (1000);
+INSERT DELAYED INTO t(c1) VALUES (10000);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -227,6 +290,11 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1000\n###   \@2=NULL\n# at/m);
+  print "master: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10000\n###   \@2=NULL\n# at/m);
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n### SET\n###   \@1=2\n###   \@2=2\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n# at/m);
   close(FILE);
@@ -242,6 +310,11 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1000\n###   \@2=NULL\n# at/m);
+  print "slave: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10000\n###   \@2=NULL\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n### SET\n###   \@1=2\n###   \@2=2\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n# at/m);
   close(FILE);
@@ -256,6 +329,10 @@ EOF
 
 CREATE TABLE t (c1 int, c2 int, c3 blob, primary key(c1,c3(512)));
 INSERT INTO t VALUES (1,2,"a");
+INSERT INTO t(c1,c3) VALUES (10,"a");
+INSERT DELAYED INTO t(c1,c3) VALUES (100,"a");
+INSERT INTO t(c1) VALUES (1000);
+INSERT DELAYED INTO t(c1) VALUES (10000);
 UPDATE t SET c1=2 WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -271,6 +348,11 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1000\n###   \@2=NULL\n# at/m);
+  print "master: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10000\n###   \@2=NULL\n# at/m);
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n### SET\n###   \@1=2\n###   \@2=2\n# at/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3='a'\n# at/m);
   close(FILE);
@@ -286,6 +368,11 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=NULL\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1000\n###   \@2=NULL\n# at/m);
+  print "slave: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10000\n###   \@2=NULL\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n### SET\n###   \@1=2\n###   \@2=2\n# at/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=2\n###   \@2=2\n###   \@3='a'\n# at/m);
   close(FILE);
@@ -300,6 +387,10 @@ EOF
 
 CREATE TABLE t (c1 int, c2 int, c3 blob, primary key(c1,c2));
 INSERT INTO t VALUES (1,2,"a");
+INSERT INTO t(c1,c3) VALUES (10,"a");
+INSERT DELAYED INTO t(c1,c3) VALUES (100,"a");
+INSERT INTO t(c1) VALUES (1000);
+INSERT DELAYED INTO t(c1) VALUES (10000);
 UPDATE t SET c3='b' WHERE c1=1;
 DELETE FROM t WHERE c2=2;
 DROP TABLE t;
@@ -315,6 +406,11 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=0\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=0\n###   \@3='a'\n# at/m);
+  print "master: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1000\n###   \@2=0\n# at/m);
+  print "master: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10000\n###   \@2=0\n# at/m);
   print "master: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='b'\n/m);
   print "master: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n/m);
   close(FILE);
@@ -331,6 +427,11 @@ perl;
   $binlog= $ENV{'BINLOG_CONTENTS'};
   open(FILE, "$binlog") or die("Unable to open $log_error: $!\n");
   my $contents = do { local $/; <FILE> };
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10\n###   \@2=0\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=100\n###   \@2=0\n###   \@3='a'\n# at/m);
+  print "slave: Unexpected columns in binlog (insert row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=1000\n###   \@2=0\n# at/m);
+  print "slave: Unexpected columns in binlog (insert delayed row event)\n" if not ($contents =~ /### INSERT INTO test\.t\n### SET\n###   \@1=10000\n###   \@2=0\n# at/m);
   print "slave: Unexpected columns in binlog (update row event)\n" if not ($contents =~ /### UPDATE test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n### SET\n###   \@1=1\n###   \@2=2\n###   \@3='b'\n/m);
   print "slave: Unexpected columns in binlog (delete row event)\n" if not ($contents =~ /### DELETE FROM test\.t\n### WHERE\n###   \@1=1\n###   \@2=2\n/m);
   close(FILE);
@@ -338,4 +439,4 @@ EOF
 
 -- remove_file $TMP_FILE
 
-exit;
+

=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2009-08-31 14:09:09 +0000
+++ b/sql/sql_insert.cc	2009-10-22 13:45:58 +0000
@@ -2202,6 +2202,10 @@ int write_delayed(THD *thd, TABLE *table
     DBUG_PRINT("delayed", ("transmitting auto_inc: %lu",
                            (ulong) row->forced_insert_id));
   }
+  
+  /* Copy the original write set */
+  bitmap_clear_all(di->table->write_set);
+  bitmap_union(di->table->write_set, table->write_set);
 
   di->rows.push_back(row);
   di->stacked_inserts++;
@@ -2568,7 +2572,6 @@ bool Delayed_insert::handle_inserts(void
   pthread_mutex_unlock(&mutex);
 
   table->next_number_field=table->found_next_number_field;
-  table->use_all_columns();
 
   thd_proc_info(&thd, "upgrading lock");
   if (thr_upgrade_write_delay_lock(*thd.lock->locks, delayed_lock))


Attachment: [text/bzr-bundle] bzr/luis.soares@sun.com-20091022134558-qnjvblysnslaao6v.bundle
Thread
bzr commit into mysql-5.1-rep+2 branch (luis.soares:3148) WL#5096Luis Soares22 Oct