List:Commits« Previous MessageNext Message »
From:Pekka Nousiainen Date:January 9 2012 10:51am
Subject:bzr push into mysql-5.1-telco-7.0 branch (pekka.nousiainen:4771 to 4772)
Bug#13563280
View as plain text  
 4772 Pekka Nousiainen	2012-01-09
      bug#13563280 a01_patch.diff
      one more HIDDEN_PK + BLOB_FLAG -> NO_BINLOG

    added:
      mysql-test/suite/ndb/r/ndb_bug13563280.result
      mysql-test/suite/ndb/t/ndb_bug13563280.test
    modified:
      sql/ha_ndbcluster_binlog.cc
 4771 Pekka Nousiainen	2012-01-09 [merge]
      merge

    modified:
      storage/ndb/src/kernel/vm/mt.cpp
=== added file 'mysql-test/suite/ndb/r/ndb_bug13563280.result'
--- a/mysql-test/suite/ndb/r/ndb_bug13563280.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/r/ndb_bug13563280.result	2012-01-09 10:49:49 +0000
@@ -0,0 +1,13 @@
+create table t1 (a int, b text) engine=ndb;
+insert into t1 values (1,'xxx'),(2,'yyy'),(3,'zzz');
+select * from t1 order by a;
+a	b
+1	xxx
+2	yyy
+3	zzz
+select * from t1 order by a;
+a	b
+1	xxx
+2	yyy
+3	zzz
+drop table t1;

=== added file 'mysql-test/suite/ndb/t/ndb_bug13563280.test'
--- a/mysql-test/suite/ndb/t/ndb_bug13563280.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/t/ndb_bug13563280.test	2012-01-09 10:49:49 +0000
@@ -0,0 +1,15 @@
+--source include/have_ndb.inc
+--source include/have_log_bin.inc
+
+--disable_warnings
+create table t1 (a int, b text) engine=ndb;
+--enable_warnings
+
+insert into t1 values (1,'xxx'),(2,'yyy'),(3,'zzz');
+select * from t1 order by a;
+
+let $mysqld_name=mysqld.1.1;
+--source include/restart_mysqld.inc
+
+select * from t1 order by a;
+drop table t1;

=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2011-11-30 10:06:26 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2012-01-09 10:49:49 +0000
@@ -5241,6 +5241,13 @@ int ndbcluster_create_binlog_setup(THD *
     /*
       check if logging turned off for this table
     */
+    if ((share->flags & NSF_HIDDEN_PK) &&
+        (share->flags & NSF_BLOB_FLAG) &&
+        !(share->flags & NSF_NO_BINLOG))
+    {
+      DBUG_PRINT("NDB_SHARE", ("NSF_HIDDEN_PK && NSF_BLOB_FLAG -> NSF_NO_BINLOG"));
+      share->flags |= NSF_NO_BINLOG;
+    }
     if (get_binlog_nologging(share))
     {
       if (opt_ndb_extra_logging)

=== modified file 'storage/ndb/src/ndbapi/NdbDictionary.cpp'
--- a/storage/ndb/src/ndbapi/NdbDictionary.cpp	2011-07-04 13:37:56 +0000
+++ b/storage/ndb/src/ndbapi/NdbDictionary.cpp	2012-01-07 11:29:10 +0000
@@ -3189,10 +3189,10 @@ NdbDictionary::printFormattedValue(NdbOu
       NdbBlob::unpackBlobHead(head, (const char*) val_p, c->getBlobVersion());
       out << head.length << ":";
       const unsigned char* p = val_p + head.headsize;
-      if ((unsigned int) c->getLength() < head.headsize)
+      if ((unsigned int) c->getInlineSize() < head.headsize)
         out << "***error***"; // really cannot happen
       else {
-        unsigned n = c->getLength() - head.headsize;
+        unsigned n = c->getInlineSize() - head.headsize;
         for (unsigned k = 0; k < n && k < head.length; k++) {
           if (c->getType() == NdbDictionary::Column::Blob)
             out.print("%02X", (int)p[k]);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (pekka.nousiainen:4771 to 4772)Bug#13563280Pekka Nousiainen9 Jan