diff options
author | unknown <joreland@mysql.com> | 2005-06-07 17:09:47 +0200 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2005-06-07 17:09:47 +0200 |
commit | 8c80400cd2eeb62a9ea84dcebfbc4c8ab5ab2279 (patch) | |
tree | c5491f990e1681bcd1ead9a6692476649f8521e6 /ndb | |
parent | f44acb04a94e4def6cb08d64f7f8f262b6b1748c (diff) | |
parent | fff8ff08d0166a0ad260785492982c64f6b1fc65 (diff) | |
download | mariadb-git-8c80400cd2eeb62a9ea84dcebfbc4c8ab5ab2279.tar.gz |
Merge mysql.com:/home/jonas/src/mysql-5.0
into mysql.com:/home/jonas/src/mysql-5.0-ndb
BitKeeper/etc/logging_ok:
auto-union
configure.in:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
ndb/src/ndbapi/DictCache.cpp:
Auto merged
ndb/src/ndbapi/DictCache.hpp:
Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
strings/ctype-big5.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/include/mgmapi/mgmapi.h | 2 | ||||
-rw-r--r-- | ndb/src/kernel/blocks/dbtux/Dbtux.hpp | 1 | ||||
-rw-r--r-- | ndb/src/mgmclient/CommandInterpreter.cpp | 3 | ||||
-rw-r--r-- | ndb/src/mgmsrv/Services.cpp | 3 | ||||
-rw-r--r-- | ndb/src/ndbapi/DictCache.cpp | 3 | ||||
-rw-r--r-- | ndb/src/ndbapi/DictCache.hpp | 2 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbDictionaryImpl.cpp | 14 |
7 files changed, 17 insertions, 11 deletions
diff --git a/ndb/include/mgmapi/mgmapi.h b/ndb/include/mgmapi/mgmapi.h index dca88e4950e..018e554de7c 100644 --- a/ndb/include/mgmapi/mgmapi.h +++ b/ndb/include/mgmapi/mgmapi.h @@ -915,6 +915,8 @@ extern "C" { * @param backup_id Backup ID is returned from function. * @param reply Reply message. * @return -1 on error. + * @note backup_id will not be returned if + * wait_completed == 0 */ int ndb_mgm_start_backup(NdbMgmHandle handle, int wait_completed, unsigned int* backup_id, diff --git a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp index 5c12472a0f7..d4a44b9e641 100644 --- a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp +++ b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp @@ -342,7 +342,6 @@ private: * Complete metadata for one index. The array of attributes has * variable size. */ - struct DescEnt; friend struct DescEnt; struct DescEnt { DescHead m_descHead; diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp index 389fc08b97c..3b57e6d4860 100644 --- a/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/ndb/src/mgmclient/CommandInterpreter.cpp @@ -1190,7 +1190,8 @@ CommandInterpreter::executeShow(char* parameters) api_nodes++; break; case NDB_MGM_NODE_TYPE_NDB: - if (state->node_states[i].dynamic_id < master_id) + if (state->node_states[i].dynamic_id && + state->node_states[i].dynamic_id < master_id) master_id= state->node_states[i].dynamic_id; ndb_nodes++; break; diff --git a/ndb/src/mgmsrv/Services.cpp b/ndb/src/mgmsrv/Services.cpp index bbd3db1e734..1a5101702a0 100644 --- a/ndb/src/mgmsrv/Services.cpp +++ b/ndb/src/mgmsrv/Services.cpp @@ -671,7 +671,8 @@ MgmApiSession::startBackup(Parser<MgmApiSession>::Context &, } else{ m_output->println("result: Ok"); - m_output->println("id: %d", backupId); + if (completed) + m_output->println("id: %d", backupId); } m_output->println(""); DBUG_VOID_RETURN; diff --git a/ndb/src/ndbapi/DictCache.cpp b/ndb/src/ndbapi/DictCache.cpp index 3d0ed466e7b..3d14df908a0 100644 --- a/ndb/src/ndbapi/DictCache.cpp +++ b/ndb/src/ndbapi/DictCache.cpp @@ -24,7 +24,8 @@ Ndb_local_table_info * Ndb_local_table_info::create(NdbTableImpl *table_impl, Uint32 sz) { - Uint32 tot_size= sizeof(NdbTableImpl *) + ((sz+7) & ~7); // round to Uint64 + Uint32 tot_size= sizeof(Ndb_local_table_info) - sizeof(Uint64) + + ((sz+7) & ~7); // round to Uint64 void *data= malloc(tot_size); if (data == 0) return 0; diff --git a/ndb/src/ndbapi/DictCache.hpp b/ndb/src/ndbapi/DictCache.hpp index 88ecc35b2f3..d9bf810a685 100644 --- a/ndb/src/ndbapi/DictCache.hpp +++ b/ndb/src/ndbapi/DictCache.hpp @@ -33,7 +33,7 @@ public: static Ndb_local_table_info *create(NdbTableImpl *table_impl, Uint32 sz=0); static void destroy(Ndb_local_table_info *); NdbTableImpl *m_table_impl; - Uint64 m_local_data[1]; + Uint64 m_local_data[1]; // Must be last member. Used to access extra space. private: Ndb_local_table_info(NdbTableImpl *table_impl); ~Ndb_local_table_info(); diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp index 6b4dec9a62c..34d1614d043 100644 --- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -1599,6 +1599,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb, bool haveAutoIncrement = false; Uint64 autoIncrementValue = 0; + Uint32 distKeys= 0; for(i = 0; i<sz; i++){ const NdbColumnImpl * col = impl.m_columns[i]; if(col == 0) @@ -1610,7 +1611,9 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb, } haveAutoIncrement = true; autoIncrementValue = col->m_autoIncrementInitialValue; - } + } + if (col->m_distributionKey) + distKeys++; } // Check max length of frm data @@ -1643,11 +1646,10 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb, abort(); } - int distKeys= impl.m_noOfDistributionKeys && - impl.m_noOfDistributionKeys < impl.m_noOfKeys; + if (distKeys == impl.m_noOfKeys) + distKeys= 0; + impl.m_noOfDistributionKeys= distKeys; - assert(distKeys == 0 || distKeys == 1); - for(i = 0; i<sz; i++){ const NdbColumnImpl * col = impl.m_columns[i]; if(col == 0) @@ -1659,7 +1661,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb, tmpAttr.AttributeId = i; tmpAttr.AttributeKeyFlag = col->m_pk; tmpAttr.AttributeNullableFlag = col->m_nullable; - tmpAttr.AttributeDKey = distKeys * col->m_distributionKey; + tmpAttr.AttributeDKey = distKeys ? col->m_distributionKey : 0; tmpAttr.AttributeExtType = (Uint32)col->m_type; tmpAttr.AttributeExtPrecision = ((unsigned)col->m_precision & 0xFFFF); |