Commit 1d32cbb1 authored by unknown's avatar unknown

Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0

into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-ndb


ndb/include/ndbapi/NdbConnection.hpp:
  Auto merged
ndb/include/ndbapi/NdbDictionary.hpp:
  Auto merged
parents 0d50d643 b58224a5
...@@ -532,7 +532,7 @@ os_mem_alloc_large( ...@@ -532,7 +532,7 @@ os_mem_alloc_large(
ibool assert_on_error) /* in: if TRUE, we crash mysqld if the memory ibool assert_on_error) /* in: if TRUE, we crash mysqld if the memory
cannot be allocated */ cannot be allocated */
{ {
#ifdef UNIV_LINUX #ifdef HAVE_LARGE_PAGES
ulint size; ulint size;
int shmid; int shmid;
void *ptr = NULL; void *ptr = NULL;
...@@ -542,6 +542,7 @@ os_mem_alloc_large( ...@@ -542,6 +542,7 @@ os_mem_alloc_large(
goto skip; goto skip;
} }
#ifdef UNIV_LINUX
/* Align block size to os_large_page_size */ /* Align block size to os_large_page_size */
size = ((n - 1) & ~(os_large_page_size - 1)) + os_large_page_size; size = ((n - 1) & ~(os_large_page_size - 1)) + os_large_page_size;
...@@ -561,6 +562,7 @@ os_mem_alloc_large( ...@@ -561,6 +562,7 @@ os_mem_alloc_large(
*/ */
shmctl(shmid, IPC_RMID, &buf); shmctl(shmid, IPC_RMID, &buf);
} }
#endif
if (ptr) { if (ptr) {
if (set_to_zero) { if (set_to_zero) {
...@@ -573,8 +575,8 @@ os_mem_alloc_large( ...@@ -573,8 +575,8 @@ os_mem_alloc_large(
} }
fprintf(stderr, "InnoDB HugeTLB: Warning: Using conventional memory pool\n"); fprintf(stderr, "InnoDB HugeTLB: Warning: Using conventional memory pool\n");
#endif
skip: skip:
#endif /* HAVE_LARGE_PAGES */
return(ut_malloc_low(n, set_to_zero, assert_on_error)); return(ut_malloc_low(n, set_to_zero, assert_on_error));
} }
...@@ -587,8 +589,12 @@ os_mem_free_large( ...@@ -587,8 +589,12 @@ os_mem_free_large(
/*=================*/ /*=================*/
void *ptr) /* in: number of bytes */ void *ptr) /* in: number of bytes */
{ {
#ifdef HAVE_LARGE_PAGES
if (os_use_large_pages && os_large_page_size
#ifdef UNIV_LINUX #ifdef UNIV_LINUX
if (os_use_large_pages && os_large_page_size && !shmdt(ptr)) { && !shmdt(ptr)
#endif
) {
return; return;
} }
#endif #endif
......
This diff is collapsed.
...@@ -31,6 +31,8 @@ class Ndb; ...@@ -31,6 +31,8 @@ class Ndb;
class NdbBlob; class NdbBlob;
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
// to be documented later
/** /**
* NdbAsynchCallback functions are used when executing asynchronous * NdbAsynchCallback functions are used when executing asynchronous
* transactions (using NdbConnection::executeAsynchPrepare, or * transactions (using NdbConnection::executeAsynchPrepare, or
...@@ -39,6 +41,7 @@ class NdbBlob; ...@@ -39,6 +41,7 @@ class NdbBlob;
* See @ref secAsync for more information. * See @ref secAsync for more information.
*/ */
typedef void (* NdbAsynchCallback)(int, NdbConnection*, void*); typedef void (* NdbAsynchCallback)(int, NdbConnection*, void*);
#endif
/** /**
* Commit type of transaction * Commit type of transaction
...@@ -184,7 +187,8 @@ public: ...@@ -184,7 +187,8 @@ public:
* @note All operations within the same transaction need to * @note All operations within the same transaction need to
* be initialized with this method. * be initialized with this method.
* *
* @param aTable A table object (fetched by NdbDictionary::Dictionary::getTable) * @param aTable
* A table object (fetched by NdbDictionary::Dictionary::getTable)
* @return Pointer to an NdbOperation object if successful, otherwise NULL. * @return Pointer to an NdbOperation object if successful, otherwise NULL.
*/ */
NdbOperation* getNdbOperation(const NdbDictionary::Table * aTable); NdbOperation* getNdbOperation(const NdbDictionary::Table * aTable);
...@@ -204,7 +208,8 @@ public: ...@@ -204,7 +208,8 @@ public:
* get the NdbConnection object which * get the NdbConnection object which
* was fetched by startTransaction pointing to this operation. * was fetched by startTransaction pointing to this operation.
* *
* @param aTable A table object (fetched by NdbDictionary::Dictionary::getTable) * @param aTable
* A table object (fetched by NdbDictionary::Dictionary::getTable)
* @return pointer to an NdbOperation object if successful, otherwise NULL * @return pointer to an NdbOperation object if successful, otherwise NULL
*/ */
NdbScanOperation* getNdbScanOperation(const NdbDictionary::Table * aTable); NdbScanOperation* getNdbScanOperation(const NdbDictionary::Table * aTable);
...@@ -226,11 +231,14 @@ public: ...@@ -226,11 +231,14 @@ public:
* get the NdbConnection object which * get the NdbConnection object which
* was fetched by startTransaction pointing to this operation. * was fetched by startTransaction pointing to this operation.
* *
* @param anIndex An index object (fetched by NdbDictionary::Dictionary::getIndex). * @param anIndex
* @param aTable A table object (fetched by NdbDictionary::Dictionary::getTable). An index object (fetched by NdbDictionary::Dictionary::getIndex).
* @param aTable
A table object (fetched by NdbDictionary::Dictionary::getTable).
* @return pointer to an NdbOperation object if successful, otherwise NULL * @return pointer to an NdbOperation object if successful, otherwise NULL
*/ */
NdbIndexScanOperation* getNdbIndexScanOperation(const NdbDictionary::Index * anIndex, NdbIndexScanOperation* getNdbIndexScanOperation
(const NdbDictionary::Index * anIndex,
const NdbDictionary::Table * aTable); const NdbDictionary::Table * aTable);
/** /**
...@@ -251,8 +259,10 @@ public: ...@@ -251,8 +259,10 @@ public:
* get the NdbConnection object that * get the NdbConnection object that
* was fetched by startTransaction pointing to this operation. * was fetched by startTransaction pointing to this operation.
* *
* @param anIndex An index object (fetched by NdbDictionary::Dictionary::getIndex). * @param anIndex
* @param aTable A table object (fetched by NdbDictionary::Dictionary::getTable). * An index object (fetched by NdbDictionary::Dictionary::getIndex).
* @param aTable
* A table object (fetched by NdbDictionary::Dictionary::getTable).
* @return Pointer to an NdbIndexOperation object if * @return Pointer to an NdbIndexOperation object if
* successful, otherwise NULL * successful, otherwise NULL
*/ */
...@@ -289,6 +299,8 @@ public: ...@@ -289,6 +299,8 @@ public:
AbortOption abortOption = AbortOnError, AbortOption abortOption = AbortOnError,
int force = 0 ); int force = 0 );
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
// to be documented later
/** /**
* Prepare an asynchronous transaction. * Prepare an asynchronous transaction.
* *
...@@ -334,7 +346,7 @@ public: ...@@ -334,7 +346,7 @@ public:
NdbAsynchCallback aCallback, NdbAsynchCallback aCallback,
void* anyObject, void* anyObject,
AbortOption abortOption = AbortOnError); AbortOption abortOption = AbortOnError);
#endif
/** /**
* Refresh * Refresh
* Update timeout counter of this transaction * Update timeout counter of this transaction
......
...@@ -166,7 +166,7 @@ public: ...@@ -166,7 +166,7 @@ public:
* The builtin column types * The builtin column types
*/ */
enum Type { enum Type {
Undefined=0,///< Undefined Undefined=0, ///< Undefined
Tinyint, ///< 8 bit. 1 byte signed integer, can be used in array Tinyint, ///< 8 bit. 1 byte signed integer, can be used in array
Tinyunsigned, ///< 8 bit. 1 byte unsigned integer, can be used in array Tinyunsigned, ///< 8 bit. 1 byte unsigned integer, can be used in array
Smallint, ///< 16 bit. 2 byte signed integer, can be used in array Smallint, ///< 16 bit. 2 byte signed integer, can be used in array
...@@ -374,16 +374,11 @@ public: ...@@ -374,16 +374,11 @@ public:
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
const Table * getBlobTable() const; const Table * getBlobTable() const;
/**
* @name ODBC Specific methods
* @{
*/
void setAutoIncrement(bool); void setAutoIncrement(bool);
bool getAutoIncrement() const; bool getAutoIncrement() const;
void setAutoIncrementInitialValue(Uint64 val); void setAutoIncrementInitialValue(Uint64 val);
void setDefaultValue(const char*); void setDefaultValue(const char*);
const char* getDefaultValue() const; const char* getDefaultValue() const;
/** @} *******************************************************************/
static const Column * FRAGMENT; static const Column * FRAGMENT;
static const Column * ROW_COUNT; static const Column * ROW_COUNT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment