List:Commits« Previous MessageNext Message »
From:Pekka Nousiainen Date:November 19 2011 7:57am
Subject:bzr push into mysql-5.1-telco-7.0 branch (pekka.nousiainen:4675 to 4676)
Bug#13407848
View as plain text  
 4676 Pekka Nousiainen	2011-11-19
      bug#13407848 a01_patch.diff
      signed char in compute length bytes caused ndbrequire

    modified:
      mysql-test/suite/ndb/r/ndb_index_stat.result
      mysql-test/suite/ndb/t/ndb_index_stat.test
      storage/ndb/src/kernel/blocks/trix/Trix.cpp
 4675 Mauritz Sundell	2011-11-17
      ndb - separating table ptr-i-value from schema file id in dict
      
      including removal of pre-allocated array of table-records.

    modified:
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
=== modified file 'mysql-test/suite/ndb/r/ndb_index_stat.result'
--- a/mysql-test/suite/ndb/r/ndb_index_stat.result	2011-11-09 08:27:32 +0000
+++ b/mysql-test/suite/ndb/r/ndb_index_stat.result	2011-11-19 07:56:25 +0000
@@ -548,6 +548,23 @@ SELECT count(*) as Count FROM t1 WHERE L
 Count
 256
 drop table t1;
+create table t1 (
+a int unsigned not null,
+b char(180) not null,
+primary key using hash (a),
+index (b)
+) engine=ndb charset=binary;
+insert into t1 values (1,'a'),(2,'b'),(3,'c');
+analyze table t1;
+Table	Op	Msg_type	Msg_text
+test.t1	analyze	status	OK
+analyze table t1;
+Table	Op	Msg_type	Msg_text
+test.t1	analyze	status	OK
+analyze table t1;
+Table	Op	Msg_type	Msg_text
+test.t1	analyze	status	OK
+drop table t1;
 set @is_enable = @is_enable_default;
 set @is_enable = NULL;
 # is_enable_on=0 is_enable_off=1

=== modified file 'mysql-test/suite/ndb/t/ndb_index_stat.test'
--- a/mysql-test/suite/ndb/t/ndb_index_stat.test	2011-09-02 06:43:38 +0000
+++ b/mysql-test/suite/ndb/t/ndb_index_stat.test	2011-11-19 07:56:25 +0000
@@ -374,5 +374,20 @@ SELECT count(*) as Count FROM t1 WHERE L
 
 drop table t1;
 
+# bug#13407848
+# signed char in compute length bytes caused ndbrequire in Trix.cpp
+
+create table t1 (
+  a int unsigned not null,
+  b char(180) not null,
+  primary key using hash (a),
+  index (b)
+) engine=ndb charset=binary;
+insert into t1 values (1,'a'),(2,'b'),(3,'c');
+analyze table t1;
+analyze table t1;
+analyze table t1;
+drop table t1;
+
 set @is_enable = @is_enable_default;
 source ndb_index_stat_enable.inc;

=== modified file 'storage/ndb/src/kernel/blocks/trix/Trix.cpp'
--- a/storage/ndb/src/kernel/blocks/trix/Trix.cpp	2011-07-04 13:37:56 +0000
+++ b/storage/ndb/src/kernel/blocks/trix/Trix.cpp	2011-11-19 07:56:25 +0000
@@ -2462,7 +2462,7 @@ Trix::statCleanExecute(Signal* signal, S
   ndbrequire(data.m_indexVersion == av[1]);
   data.m_sampleVersion = av[2];
   data.m_statKey = &av[3];
-  const char* kp = (const char*)data.m_statKey;
+  const unsigned char* kp = (const unsigned char*)data.m_statKey;
   const Uint32 kb = kp[0] + (kp[1] << 8);
   // key is not empty
   ndbrequire(kb != 0);
@@ -2633,8 +2633,8 @@ Trix::statScanExecute(Signal* signal, St
   ::copy(av, ptr1);
   data.m_statKey = &av[0];
   data.m_statValue = &av[kz];
-  const char* kp = (const char*)data.m_statKey;
-  const char* vp = (const char*)data.m_statValue;
+  const unsigned char* kp = (const unsigned char*)data.m_statKey;
+  const unsigned char* vp = (const unsigned char*)data.m_statValue;
   const Uint32 kb = kp[0] + (kp[1] << 8);
   const Uint32 vb = vp[0] + (vp[1] << 8);
   // key and value are not empty

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (pekka.nousiainen:4675 to 4676)Bug#13407848Pekka Nousiainen21 Nov