summaryrefslogtreecommitdiff
path: root/storage
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
commit162fa0059d5dc9aec5b9975e4b9b06b05b43f57e (patch)
tree9099ac244ad5b3c0233ab567682cbcf6e53e42f1 /storage
parentca3dbc91ed1fc14460b4e1ca37ac5abf7e6d39a6 (diff)
downloadmariadb-git-162fa0059d5dc9aec5b9975e4b9b06b05b43f57e.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.
Diffstat (limited to 'storage')
-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;