List:Internals« Previous MessageNext Message »
From:pekka Date:April 17 2005 7:01pm
Subject:bk commit into 5.0 tree (pekka:1.1797)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of pekka. When pekka does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1797 05/04/17 19:01:18 pekka@stripped +4 -0
  ndb - use words not pages in schemafile table entry (5.1 compatible)

  ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
    1.8 05/04/17 18:51:07 pekka@stripped +4 -1
    use words not pages in schemafile table entry (5.1 compatible)

  ndb/src/kernel/blocks/dbdict/SchemaFile.hpp
    1.3 05/04/17 18:51:07 pekka@stripped +1 -1
    use words not pages in schemafile table entry (5.1 compatible)

  ndb/src/kernel/blocks/dbdict/Dbdict.cpp
    1.42 05/04/17 18:51:07 pekka@stripped +10 -9
    use words not pages in schemafile table entry (5.1 compatible)

  ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
    1.12 05/04/17 18:51:06 pekka@stripped +0 -1
    use words not pages in schemafile table entry (5.1 compatible)

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	pekka
# Host:	tuna.ndb.mysql.com
# Root:	/orca/space/pekka/ndb/version/my50-ndb

--- 1.11/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp	2005-03-10 13:04:16 +01:00
+++ 1.12/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp	2005-04-17 18:51:06 +02:00
@@ -227,7 +227,6 @@
                     &mlpqOperPtr,
                     &queOperPtr,
                     &readWriteOpPtr,
-                    &tgnptMainOpPtr,
                     &iopOverflowRecPtr,
                     &tfoOverflowRecPtr,
                     &porOverflowRecPtr,

--- 1.41/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2005-04-10 22:32:02 +02:00
+++ 1.42/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2005-04-17 18:51:07 +02:00
@@ -1132,20 +1132,23 @@
   Uint32 noOfPages = 1;
   Uint32 n, i, j;
   for (n = 0; n < xsf->noOfPages; n++) {
+    jam();
     for (i = 0; i < NDB_SF_PAGE_ENTRIES; i++) {
       j = n * NDB_SF_PAGE_ENTRIES + i;
       if (j >= sf_old->NoOfTableEntries)
         continue;
       const SchemaFile::TableEntry_old & te_old = sf_old->TableEntries_old[j];
       if (te_old.m_tableState == SchemaFile::INIT ||
-          te_old.m_tableState == SchemaFile::DROP_TABLE_COMMITTED)
+          te_old.m_tableState == SchemaFile::DROP_TABLE_COMMITTED ||
+          te_old.m_noOfPages == 0)
         continue;
       SchemaFile * sf = &xsf->schemaPage[n];
       SchemaFile::TableEntry & te = sf->TableEntries[i];
       te.m_tableState = te_old.m_tableState;
       te.m_tableVersion = te_old.m_tableVersion;
       te.m_tableType = te_old.m_tableType;
-      te.m_noOfPages = te_old.m_noOfPages;
+      te.m_info_words = te_old.m_noOfPages * ZSIZE_OF_PAGES_IN_WORDS -
+                        ZPAGE_HEADER_SIZE;
       te.m_gcp = te_old.m_gcp;
       if (noOfPages < n)
         noOfPages = n;
@@ -2503,7 +2506,8 @@
   if(file && !ERROR_INSERTED(6002)){
     jam();
     
-    c_readTableRecord.noOfPages = te->m_noOfPages;
+    c_readTableRecord.noOfPages =
+      DIV(te->m_info_words + ZPAGE_HEADER_SIZE, ZSIZE_OF_PAGES_IN_WORDS);
     c_readTableRecord.pageId = 0;
     c_readTableRecord.m_callback.m_callbackData = createTabPtr.p->key;
     c_readTableRecord.m_callback.m_callbackFunction = 
@@ -3291,8 +3295,7 @@
     tabEntry.m_tableType    = tablePtr.p->tableType;
     tabEntry.m_tableState   = SchemaFile::ALTER_TABLE_COMMITTED;
     tabEntry.m_gcp          = gci;
-    tabEntry.m_noOfPages    = 
-      DIV(tabInfoPtr.sz + ZPAGE_HEADER_SIZE, ZSIZE_OF_PAGES_IN_WORDS);
+    tabEntry.m_info_words   = tabInfoPtr.sz;
     memset(tabEntry.m_unused, 0, sizeof(tabEntry.m_unused));
     
     Callback callback;
@@ -4114,8 +4117,7 @@
   tabEntry.m_tableType    = tabPtr.p->tableType;
   tabEntry.m_tableState   = SchemaFile::ADD_STARTED;
   tabEntry.m_gcp          = gci;
-  tabEntry.m_noOfPages    = 
-    DIV(tabInfoPtr.sz + ZPAGE_HEADER_SIZE, ZSIZE_OF_PAGES_IN_WORDS);
+  tabEntry.m_info_words   = tabInfoPtr.sz;
   memset(tabEntry.m_unused, 0, sizeof(tabEntry.m_unused));
   
   Callback callback;
@@ -4571,8 +4573,7 @@
   tabEntry.m_tableType    = tabPtr.p->tableType;
   tabEntry.m_tableState   = SchemaFile::TABLE_ADD_COMMITTED;
   tabEntry.m_gcp          = tabPtr.p->gciTableCreated;
-  tabEntry.m_noOfPages    = 
-    DIV(tabPtr.p->packedSize + ZPAGE_HEADER_SIZE, ZSIZE_OF_PAGES_IN_WORDS);
+  tabEntry.m_info_words   = tabPtr.p->packedSize;
   memset(tabEntry.m_unused, 0, sizeof(tabEntry.m_unused));
   
   Callback callback;

--- 1.2/ndb/src/kernel/blocks/dbdict/SchemaFile.hpp	2005-04-10 22:32:02 +02:00
+++ 1.3/ndb/src/kernel/blocks/dbdict/SchemaFile.hpp	2005-04-17 18:51:07 +02:00
@@ -62,7 +62,7 @@
     Uint32 m_tableState;
     Uint32 m_tableVersion;
     Uint32 m_tableType;
-    Uint32 m_noOfPages;
+    Uint32 m_info_words;
     Uint32 m_gcp;
     Uint32 m_unused[3];
     

--- 1.7/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp	2005-04-10 22:32:02 +02:00
+++ 1.8/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp	2005-04-17 18:51:07 +02:00
@@ -2,6 +2,9 @@
 make -f Makefile -f - printSchemaFile <<'_eof_'
 printSchemaFile: printSchemaFile.cpp SchemaFile.hpp
 	$(CXXCOMPILE) -o $@ $@.cpp -L../../../common/util/.libs -lgeneral
+ifneq ($(MYSQL_HOME),)
+	ln -sf `pwd`/$@ $(MYSQL_HOME)/bin/$@
+endif
 _eof_
 exit $?
 #endif
@@ -134,7 +137,7 @@
                  << " State = " << te.m_tableState 
                  << " version = " << te.m_tableVersion
                  << " type = " << te.m_tableType
-                 << " noOfPages = " << te.m_noOfPages
+                 << " noOfWords = " << te.m_info_words
                  << " gcp: " << te.m_gcp << endl;
       }
       if (te.m_unused[0] != 0 || te.m_unused[1] != 0 || te.m_unused[2] != 0) {
Thread
bk commit into 5.0 tree (pekka:1.1797)pekka17 Apr