List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:December 12 2008 3:09pm
Subject:bzr commit into mysql-5.1 branch (jonas:2778)
View as plain text  
#At file:///home/jonas/src/telco-6.2/

 2778 Jonas Oreland	2008-12-12 [merge]
      merge 62-main
modified:
  mysql-test/suite/ndb/r/ndb_alter_table_online.result
  mysql-test/suite/ndb/t/ndb_alter_table_online.test
  storage/ndb/tools/desc.cpp

=== modified file 'mysql-test/suite/ndb/r/ndb_alter_table_online.result'
--- a/mysql-test/suite/ndb/r/ndb_alter_table_online.result	2008-08-08 08:41:32 +0000
+++ b/mysql-test/suite/ndb/r/ndb_alter_table_online.result	2008-12-11 10:20:34 +0000
@@ -672,62 +672,14 @@ CREATE TABLE t1
 ENGINE=NDB;
 Warnings:
 Warning	1478	Row format FIXED incompatible with dynamic attribute b
--- t1 --
-Version: #
-Fragment type: 5
-K Value: 6
-Min load factor: 78
-Max load factor: 80
-Temporary table: no
-Number of attributes: 2
-Number of primary keys: 1
-Length of frm data: 257
-Row Checksum: 1
-Row GCI: 1
-SingleUserMode: 0
-ForceVarPart: 0
-TableStatus: Retrieved
--- Attributes -- 
 pk1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
 b Int NULL AT=FIXED ST=MEMORY DYNAMIC
-
--- Indexes -- 
-PRIMARY KEY(pk1) - UniqueHashIndex
-PRIMARY(pk1) - OrderedIndex
-
-
-NDBT_ProgramExit: 0 - OK
-
 DROP TABLE t1;
 CREATE TABLE t1
 (pk1 INT NOT NULL COLUMN_FORMAT FIXED PRIMARY KEY, 
 b INT COLUMN_FORMAT FIXED)ROW_FORMAT=DYNAMIC ENGINE=NDB;
--- t1 --
-Version: #
-Fragment type: 5
-K Value: 6
-Min load factor: 78
-Max load factor: 80
-Temporary table: no
-Number of attributes: 2
-Number of primary keys: 1
-Length of frm data: 257
-Row Checksum: 1
-Row GCI: 1
-SingleUserMode: 0
-ForceVarPart: 1
-TableStatus: Retrieved
--- Attributes -- 
 pk1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
 b Int NULL AT=FIXED ST=MEMORY
-
--- Indexes -- 
-PRIMARY KEY(pk1) - UniqueHashIndex
-PRIMARY(pk1) - OrderedIndex
-
-
-NDBT_ProgramExit: 0 - OK
-
 ********************
 * Cleanup Section
 ********************

=== modified file 'mysql-test/suite/ndb/t/ndb_alter_table_online.test'
--- a/mysql-test/suite/ndb/t/ndb_alter_table_online.test	2008-03-12 19:00:49 +0000
+++ b/mysql-test/suite/ndb/t/ndb_alter_table_online.test	2008-12-11 10:20:34 +0000
@@ -708,8 +708,7 @@ CREATE TABLE t1
 (pk1 INT NOT NULL PRIMARY KEY, b INT COLUMN_FORMAT DYNAMIC)ROW_FORMAT=FIXED
 ENGINE=NDB;
 
---replace_regex /Version: [0-9]+/Version: #/
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1
+--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'AT='
 
 DROP TABLE t1;
 
@@ -717,8 +716,7 @@ CREATE TABLE t1
 (pk1 INT NOT NULL COLUMN_FORMAT FIXED PRIMARY KEY, 
 b INT COLUMN_FORMAT FIXED)ROW_FORMAT=DYNAMIC ENGINE=NDB;
 
---replace_regex /Version: [0-9]+/Version: #/
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1
+--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'AT='
 
 --echo ********************
 --echo * Cleanup Section

=== modified file 'storage/ndb/tools/desc.cpp'
--- a/storage/ndb/tools/desc.cpp	2008-02-19 15:00:29 +0000
+++ b/storage/ndb/tools/desc.cpp	2008-12-11 14:09:06 +0000
@@ -354,9 +354,24 @@ void print_part_info(Ndb* pNdb, NDBT_Tab
     {
       for(i = 0; g_part_info[i].m_title != 0; i++)
       {
-	ndbout << *g_part_info[i].m_rec_attr << "\t";
+        NdbRecAttr &r= *g_part_info[i].m_rec_attr;
+        unsigned long long val;
+        switch (r.getType()) {
+        case NdbDictionary::Column::Bigunsigned:
+          val= r.u_64_value();
+          break;
+        case NdbDictionary::Column::Unsigned:
+          val= r.u_32_value();
+          break;
+        default:
+          abort();
+        }
+        if (val != 0)
+          printf("%-*.llu\t", (int)strlen(g_part_info[i].m_title), val);
+        else
+          printf("0%*.s\t", (int)strlen(g_part_info[i].m_title), "");
       }
-      ndbout << endl;
+      printf("\n");
     }
   } while(0);
   

Thread
bzr commit into mysql-5.1 branch (jonas:2778) Jonas Oreland12 Dec