diff options
author | tomas@poseidon.mysql.com <> | 2007-03-08 15:57:33 +0700 |
---|---|---|
committer | tomas@poseidon.mysql.com <> | 2007-03-08 15:57:33 +0700 |
commit | e4eb1c008726288143d9e97dfcb444502627e85e (patch) | |
tree | 020834aa3cfee644396157d996cd0b1ab4612d59 /storage/ndb/include/ndbapi/NdbRecAttr.hpp | |
parent | 12bf7fbee54d58271e15e1f7fa1490cdc10c0ac8 (diff) | |
parent | 30c58170fd627da7d37af95a08f509cc9c692efe (diff) | |
download | mariadb-git-e4eb1c008726288143d9e97dfcb444502627e85e.tar.gz |
Merge poseidon.mysql.com:/home/tomas/mysql-5.0-telco-gca-ndb_restore
into poseidon.mysql.com:/home/tomas/mysql-5.1-telco-gca-ndb_restore
Diffstat (limited to 'storage/ndb/include/ndbapi/NdbRecAttr.hpp')
-rw-r--r-- | storage/ndb/include/ndbapi/NdbRecAttr.hpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/storage/ndb/include/ndbapi/NdbRecAttr.hpp b/storage/ndb/include/ndbapi/NdbRecAttr.hpp index 8e6ca8ecd00..fe903de6498 100644 --- a/storage/ndb/include/ndbapi/NdbRecAttr.hpp +++ b/storage/ndb/include/ndbapi/NdbRecAttr.hpp @@ -131,6 +131,13 @@ public: /** * Get value stored in NdbRecAttr object. + * + * @return Medium value. + */ + Int32 medium_value() const; + + /** + * Get value stored in NdbRecAttr object. * * @return Short value. */ @@ -160,6 +167,13 @@ public: /** * Get value stored in NdbRecAttr object. * + * @return Unsigned medium value. + */ + Uint32 u_medium_value() const; + + /** + * Get value stored in NdbRecAttr object. + * * @return Unsigned short value. */ Uint16 u_short_value() const; @@ -288,6 +302,16 @@ NdbRecAttr::int32_value() const } inline +Int32 +NdbRecAttr::medium_value() const +{ + Uint32 tmp = *(Uint32*)theRef; + if (tmp & (0x1<<23)) + tmp|= (0xFF<<24); + return (Int32)tmp; +} + +inline short NdbRecAttr::short_value() const { @@ -309,6 +333,13 @@ NdbRecAttr::u_32_value() const } inline +Uint32 +NdbRecAttr::u_medium_value() const +{ + return *(Uint32*)theRef; +} + +inline Uint16 NdbRecAttr::u_short_value() const { |