summaryrefslogtreecommitdiff
path: root/storage/ibmdb2i
diff options
context:
space:
mode:
authorNarayanan V <v.narayanan@sun.com>2009-05-17 22:50:20 +0530
committerNarayanan V <v.narayanan@sun.com>2009-05-17 22:50:20 +0530
commit02b90ed9c36d0f76f38dee8d5a5d4ba3a2832d66 (patch)
tree9099ac244ad5b3c0233ab567682cbcf6e53e42f1 /storage/ibmdb2i
parenta8df3d3c90606b05b7655705517712c2cd418632 (diff)
downloadmariadb-git-02b90ed9c36d0f76f38dee8d5a5d4ba3a2832d66.tar.gz
Bug#44856 IBMDB2I gives misleading 2504 error
Occasionally, if both the partition_pruning and partition_range tests are run sequentially against the IBMDB2I engine, the partition_range test will fail. Compiler padding on a 64-bit build allowed garbage data in the hash key used for caching open iconv descriptors. As a result, cached descriptors were not found, and multiple duplicate iconv descriptors were opened for a single character set. Eventually, the maximum number of open iconv descriptors was reached, and further iconv_open() calls would fail, leading the storage engine to report incorrectly that the character set was not supported. This patch widens the 16-bit members of the hash key to 32 bits to eliminate compiler padding. The entire length of the hash key is now initialized correctly on both 32-bit and 64-bit builds. storage/ibmdb2i/db2i_charsetSupport.cc: Bug#44856 IBMDB2I gives misleading 2504 error widen the 16-bit members of the hash key to 32 bits to eliminate compiler padding.
Diffstat (limited to 'storage/ibmdb2i')
-rw-r--r--storage/ibmdb2i/db2i_charsetSupport.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/ibmdb2i/db2i_charsetSupport.cc b/storage/ibmdb2i/db2i_charsetSupport.cc
index 559b526b7fd..1479776d71a 100644
--- a/storage/ibmdb2i/db2i_charsetSupport.cc
+++ b/storage/ibmdb2i/db2i_charsetSupport.cc
@@ -129,8 +129,8 @@ struct IconvMap
{
struct HashKey
{
- uint16 direction; // This is a uint16 instead of a uchar to avoid garbage data in the key from compiler padding
- uint16 db2CCSID;
+ uint32 direction; // These are uint32s to avoid garbage data in the key from compiler padding
+ uint32 db2CCSID;
const CHARSET_INFO* myCharset;
} hashKey;
iconv_t iconvDesc;