List:Commits« Previous MessageNext Message »
From:knielsen Date:January 31 2008 2:11pm
Subject:bk commit into 5.1 tree (knielsen:1.2643)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of knielsen. When knielsen 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@stripped, 2008-01-31 15:11:40+01:00, knielsen@ymer.(none) +7 -0
  Minor fixes for mysql-test-run.pl to pass NdbRecord scan changes.

  mysql-test/suite/ndb/r/ndb_index_ordered.result@stripped, 2008-01-31 15:11:30+01:00, knielsen@ymer.(none) +0 -2
    Fix bad merge.

  sql/ha_ndbcluster.cc@stripped, 2008-01-31 15:11:30+01:00, knielsen@ymer.(none) +2 -2
    Fix register ordering.

  sql/ha_ndbcluster_cond.cc@stripped, 2008-01-31 15:11:31+01:00, knielsen@ymer.(none) +9 -9
    Fix handling of aborted, too-large scan filter.

  storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp@stripped, 2008-01-31 15:11:31+01:00, knielsen@ymer.(none) +2 -1
    Fix tiny blobs without parts table.

  storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp@stripped, 2008-01-31 15:11:31+01:00, knielsen@ymer.(none) +6 -0
    Fix tiny blobs without parts table.

  storage/ndb/src/ndbapi/NdbScanFilter.cpp@stripped, 2008-01-31 15:11:31+01:00, knielsen@ymer.(none) +1 -1
    Fix type.

  storage/ndb/src/ndbapi/ndberror.c@stripped, 2008-01-31 15:11:31+01:00, knielsen@ymer.(none) +1 -1
    Revert error message change (change was good, but real fix needed for
    mysqld abuse of NDB API message).

diff -Nrup a/mysql-test/suite/ndb/r/ndb_index_ordered.result b/mysql-test/suite/ndb/r/ndb_index_ordered.result
--- a/mysql-test/suite/ndb/r/ndb_index_ordered.result	2008-01-25 14:39:12 +01:00
+++ b/mysql-test/suite/ndb/r/ndb_index_ordered.result	2008-01-31 15:11:30 +01:00
@@ -645,8 +645,6 @@ select count(*) from t1;
 count(*)
 2
 ALTER TABLE t1 ADD COLUMN c int;
-Warnings:
-Warning	1475	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
 select a from t1 where b = 2;
 a
 2
diff -Nrup a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
--- a/sql/ha_ndbcluster.cc	2008-01-25 15:15:20 +01:00
+++ b/sql/ha_ndbcluster.cc	2008-01-31 15:11:30 +01:00
@@ -3579,7 +3579,7 @@ ha_ndbcluster::update_row_conflict_fn_ma
    * if RegNewValue > RegCurrentValue goto label_0
    * else raise error for this row
    */
-  r= code->branch_gt(RegCurrentValue, RegNewValue, label_0);
+  r= code->branch_gt(RegNewValue, RegCurrentValue, label_0);
   DBUG_ASSERT(r == 0);
   r= code->interpret_exit_nok(error_conflict_fn_max_violation);
   DBUG_ASSERT(r == 0);
@@ -3665,7 +3665,7 @@ ha_ndbcluster::update_row_conflict_fn_ol
    * if RegOldValue == RegCurrentValue goto label_0
    * else raise error for this row
    */
-  r= code->branch_eq(RegCurrentValue, RegOldValue, label_0);
+  r= code->branch_eq(RegOldValue, RegCurrentValue, label_0);
   DBUG_ASSERT(r == 0);
   r= code->interpret_exit_nok(error_conflict_fn_old_violation);
   DBUG_ASSERT(r == 0);
diff -Nrup a/sql/ha_ndbcluster_cond.cc b/sql/ha_ndbcluster_cond.cc
--- a/sql/ha_ndbcluster_cond.cc	2008-01-14 13:54:23 +01:00
+++ b/sql/ha_ndbcluster_cond.cc	2008-01-31 15:11:31 +01:00
@@ -1341,25 +1341,25 @@ ha_ndbcluster_cond::generate_scan_filter
   {
     NdbScanFilter filter(code);
     
-    int ret=generate_scan_filter_from_cond(filter);
+    int ret= generate_scan_filter_from_cond(filter);
     if (ret != 0)
     {
-      const NdbError& err=filter.getNdbError();
+      const NdbError& err= filter.getNdbError();
       if (err.code == NdbScanFilter::FilterTooLarge)
       {
         // err.message has static storage
         DBUG_PRINT("info", ("%s", err.message));
         push_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                      err.code, err.message);
-        ret=0;
       }
+      else
+        DBUG_RETURN(ret);
+    }
+    else
+    {
+      options->interpretedCode= code;
+      options->optionsPresent|= NdbScanOperation::ScanOptions::SO_INTERPRETED;
     }
-    if (ret != 0)
-      DBUG_RETURN(ret);
-
-    options->interpretedCode= code;
-    options->optionsPresent|= NdbScanOperation::ScanOptions::SO_INTERPRETED;
-
   }
   else
   {  
diff -Nrup a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2008-01-14 13:55:01 +01:00
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2008-01-31 15:11:31 +01:00
@@ -5163,8 +5163,9 @@ NdbDictionaryImpl::createDefaultNdbRecor
 
       /* If this column's a Blob then we need to create
        * a default NdbRecord for the Blob table too
+       * (unless it's a really small one with no parts table).
        */
-      if (col->getBlobType())
+      if (col->getBlobType() && col->getPartSize() != 0)
       {
         assert(col->m_blobTable != NULL);
 
diff -Nrup a/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp	2008-01-14 13:55:03 +01:00
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp	2008-01-31 15:11:31 +01:00
@@ -91,6 +91,12 @@ public:
   bool m_autoIncrement;
   Uint64 m_autoIncrementInitialValue;
   BaseString m_defaultValue;
+  /*
+   * Table holding the blob parts.
+   *
+   * Note that if getPartSize() is 0, there is no parts table, so
+   * m_blobTable==NULL.
+   */
   NdbTableImpl * m_blobTable;
 
   /**
diff -Nrup a/storage/ndb/src/ndbapi/NdbScanFilter.cpp b/storage/ndb/src/ndbapi/NdbScanFilter.cpp
--- a/storage/ndb/src/ndbapi/NdbScanFilter.cpp	2008-01-17 09:48:19 +01:00
+++ b/storage/ndb/src/ndbapi/NdbScanFilter.cpp	2008-01-31 15:11:31 +01:00
@@ -81,7 +81,7 @@ public:
   /* This method propagates an error code from NdbInterpretedCode
    * back to the NdbScanFilter object
    */
-  Uint32 propagateErrorFromCode()
+  int propagateErrorFromCode()
   {
     NdbError codeError= m_code->getNdbError();
 
diff -Nrup a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c
--- a/storage/ndb/src/ndbapi/ndberror.c	2008-01-14 13:55:29 +01:00
+++ b/storage/ndb/src/ndbapi/ndberror.c	2008-01-31 15:11:31 +01:00
@@ -665,7 +665,7 @@ ErrorBundle ErrorCodes[] = {
   { 4291, DMEC, AE, "Duplicate column specification in NdbDictionary::RecordSpecification" },
   { 4292, DMEC, AE, "NdbRecord for tuple access is not an index key NdbRecord" },
   { 4293, DMEC, AE, "Error returned from application scanIndex() callback" },
-  { 4294, DMEC, AE, "Scan filter is too large." },
+  { 4294, DMEC, AE, "Scan filter is too large, discarded" },
   { 4295, DMEC, AE, "Column is NULL in Get/SetValueSpec structure" },
   { 4296, DMEC, AE, "Invalid AbortOption" },
   { 4297, DMEC, AE, "Invalid or unsupported OperationOptions structure" },
Thread
bk commit into 5.1 tree (knielsen:1.2643)knielsen31 Jan