3102 John David Duncan 2009-11-07 [merge]
Merge changes from Martin
added:
storage/ndb/ndbjtie/src/ndbjtie_defs.hpp
modified:
storage/ndb/ndbjtie/jtie/include/jtie_gcalls.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_array_impl.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_enum.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_enum_impl.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_impl.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_object_impl.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_ptrbybb_impl.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_ptrbyval.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_ptrbyval_impl.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_refbybb_impl.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_refbyval.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_refbyval_impl.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_string_impl.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_value.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_value_impl.hpp
storage/ndb/ndbjtie/jtie/include/jtie_tconv_vwidth.hpp
storage/ndb/ndbjtie/jtie/test/myjapi/Makefile.am
storage/ndb/ndbjtie/jtie/test/myjapi/myjapi_MyJapi.hpp
storage/ndb/ndbjtie/jtie/test/myjapi/myjapi_MyJapiCtypes.hpp
storage/ndb/ndbjtie/jtie/test/myjapi/myjapi_lib.cpp
storage/ndb/ndbjtie/src/mysql_jtie.hpp
storage/ndb/ndbjtie/src/ndbapi_jtie.hpp
storage/ndb/ndbjtie/utils/helpers.hpp
=== modified file 'storage/ndb/ndbjtie/mysql/include/CharsetMap.h'
--- a/storage/ndb/ndbjtie/mysql/include/CharsetMap.h 2009-10-27 23:59:24 +0000
+++ b/storage/ndb/ndbjtie/mysql/include/CharsetMap.h 2009-11-05 06:19:14 +0000
@@ -40,10 +40,10 @@ public:
or it may return the name of an uncommon, rarely-used MySQL character set
such as "keybcs2" or "dec8".
*/
- const char * getName(int cs_number) const;
+ const char * getName(unsigned int cs_number) const;
/* getMysqlName() returns just the internal mysql name of the charset */
- const char * getMysqlName(int cs_number) const;
+ const char * getMysqlName(unsigned int cs_number) const;
/* get a character set number by name. This uses the mysql name,
not the standardized name.
=== modified file 'storage/ndb/ndbjtie/mysql/src/CharsetMap.cpp'
--- a/storage/ndb/ndbjtie/mysql/src/CharsetMap.cpp 2009-11-05 05:10:16 +0000
+++ b/storage/ndb/ndbjtie/mysql/src/CharsetMap.cpp 2009-11-05 06:19:14 +0000
@@ -49,12 +49,12 @@ CharsetMap::CharsetMap()
}
}
-const char * CharsetMap::getName(int csnum) const
+const char * CharsetMap::getName(unsigned int csnum) const
{
return m_map.getName(csnum);
}
-const char * CharsetMap::getMysqlName(int csnum) const
+const char * CharsetMap::getMysqlName(unsigned int csnum) const
{
CHARSET_INFO *cs = get_charset(csnum, MYF(0));
return cs->csname;
=== modified file 'storage/ndb/ndbjtie/mysql/src/CharsetMapImpl.cpp'
--- a/storage/ndb/ndbjtie/mysql/src/CharsetMapImpl.cpp 2009-11-05 05:10:16 +0000
+++ b/storage/ndb/ndbjtie/mysql/src/CharsetMapImpl.cpp 2009-11-05 06:19:14 +0000
@@ -89,7 +89,7 @@ void CharsetMapImpl::build_map()
put("macce", "MacCentralEurope");
/* Build the fixed map */
- for(int i = 0 ; i < 255 ; i++)
+ for(unsigned int i = 0 ; i < 255 ; i++)
{
CHARSET_INFO *cs = get_charset(i, MYF(0));
register const char *mysql_name = 0;
=== modified file 'storage/ndb/ndbjtie/mysql/test/mysql_utils_test.cpp'
--- a/storage/ndb/ndbjtie/mysql/test/mysql_utils_test.cpp 2009-10-28 05:30:09 +0000
+++ b/storage/ndb/ndbjtie/mysql/test/mysql_utils_test.cpp 2009-11-05 06:19:14 +0000
@@ -105,10 +105,10 @@ int main()
but in the UTF-8 representation it is 0xC3 0xBC.
*/
- const char my_word_latin1[6] = { 0xFC , 'l' , 'k' , 'e' , 'r', 0};
- const char my_word_utf8[7] = { 0xC3 , 0xBC , 'l' , 'k' , 'e' , 'r', 0};
- const char my_word_truncated[5] = { 0xC3 , 0xBC , 'l' , 'k', 0};
- const char my_bad_utf8[5] = { 'l' , 0xBC , 'a' , 'd' , 0};
+ const unsigned char my_word_latin1[6] = { 0xFC, 'l', 'k', 'e', 'r', 0};
+ const unsigned char my_word_utf8[7] = { 0xC3, 0xBC, 'l', 'k', 'e', 'r', 0};
+ const unsigned char my_word_truncated[5] = { 0xC3, 0xBC, 'l', 'k', 0};
+ const unsigned char my_bad_utf8[5] = { 'l' , 0xBC, 'a', 'd', 0};
char result_buff_1[32];
char result_buff_2[32];
char result_buff_too_small[4];
@@ -158,9 +158,8 @@ int main()
assert(rr3 == RECODE_BUFF_TOO_SMALL);
assert(lengths[0] == 3);
assert(lengths[1] == 4);
- /* Note that the buffer size was 4, but the comparison string including
- terminator is length 5 */
- assert(!(strcmp(result_buff_too_small, my_word_truncated)));
+ /* Confirm that the first four characters were indeed recoded: */
+ assert(!(strncmp(result_buff_too_small, my_word_truncated, 4)));
/* RECODE TEST 4: recode with an invalid character set */
int rr4 = csmap.recode(lengths, 0, 999, my_word_latin1, result_buff_2);
Attachment: [text/bzr-bundle] bzr/jdd@sun.com-20091107164242-nghwi8ppfozlafmb.bundle
| Thread |
|---|
| • bzr push into mysql-5.1-telco-6.3-ndbjtie branch (jdd:3102) | John David Duncan | 7 Nov 2009 |