List:Commits« Previous MessageNext Message »
From:tomas Date:April 21 2006 1:56am
Subject:bk commit into 5.1 tree (tomas:1.2375)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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.2375 06/04/21 01:56:15 tomas@stripped +1 -0
  Merge tulin@stripped:/home/bk/mysql-5.1-new
  into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new

  storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
    1.125 06/04/21 01:56:07 tomas@stripped +0 -0
    Auto merged

# 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:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-new/RESYNC

--- 1.124/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2006-04-21 01:39:27 +02:00
+++ 1.125/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2006-04-21 01:56:07 +02:00
@@ -2301,7 +2301,7 @@
 				     NdbTableImpl & impl,
 				     bool alter)
 {
-  unsigned i;
+  unsigned i, err;
   char *ts_names[MAX_NDB_PARTITIONS];
   DBUG_ENTER("NdbDictInterface::createOrAlterTable");
 
@@ -2602,8 +2602,10 @@
       DBUG_RETURN(-1);
     }
     // primary key type check
-    if (col->m_pk && ! NdbSqlUtil::usable_in_pk(col->m_type, col->m_cs))
{
-      m_error.code= (col->m_cs != 0 ? 743 : 739);
+    if (col->m_pk && 
+        (err = NdbSqlUtil::check_column_for_pk(col->m_type, col->m_cs)))
+    {
+      m_error.code= err;
       DBUG_RETURN(-1);
     }
     // distribution key not supported for Char attribute
@@ -3034,7 +3036,7 @@
 {
   //validate();
   //aggregate();
-  unsigned i;
+  unsigned i, err;
   UtilBufferWriter w(m_buffer);
   const size_t len = strlen(impl.m_externalName.c_str()) + 1;
   if(len > MAX_TAB_NAME_SIZE) {
@@ -3083,10 +3085,12 @@
 
     // index key type check
     if (it == DictTabInfo::UniqueHashIndex &&
-        ! NdbSqlUtil::usable_in_hash_index(col->m_type, col->m_cs) ||
+        (err = NdbSqlUtil::check_column_for_hash_index(col->m_type, col->m_cs))
+        ||
         it == DictTabInfo::OrderedIndex &&
-        ! NdbSqlUtil::usable_in_ordered_index(col->m_type, col->m_cs)) {
-      m_error.code = 743;
+        (err = NdbSqlUtil::check_column_for_ordered_index(col->m_type, col->m_cs)))
+    {
+      m_error.code = err;
       return -1;
     }
     // API uses external column number to talk to DICT
Thread
bk commit into 5.1 tree (tomas:1.2375)tomas21 Apr