Nice work, approved!
On 03.12.10 11.28, Alexander Barkov wrote:
> #At file:///home/bar/mysql-bzr/mysql-trunk-bugfixing.w4616v2/ based on
> 3409 Alexander Barkov 2010-12-03
> WL#4616 UTF16-LE
> @ mysql-test/include/ctype_heap.inc
> @ mysql-test/r/ctype_utf16le.result
> @ mysql-test/t/ctype_utf16le.test
> Adding rests
> @ cmake/character_sets.cmake
> Adding utf16le into the list of the possible default character sets
> and into the list of complex character sets.
> @ include/m_ctype.h
> Adding prototype for global variables
> @ mysql-test/r/ctype_utf16.result
> Conversion from binary to utf16 did not work well.
> Recording new results
> @ mysys/charset-def.c
> Adding initialization for utf16le collations
> @ sql/item_func.cc
> Error message about bad truncated number in CAST(string AS SIGNED)
> did not work well (a missing part of "WL#751 Error message construction").
> @ sql/sql_string.cc
> Conversion from binary to utf16 and utf16le did not work well.
> 0x61 was incorrectly extended to 0x00000061 instead of 0x0061.
> @ sql/sys_vars.cc
> "SET collation_connection=utf16_general_ci" followed by
> "SET NAMES 'latin1'" did not work well,
> because get_charset_by_csname('latin1') was called with utf16
> of 'latin1' string. Fixing val_str() to val_str_ascii() to always call
> get_charset_by_csname() with 8-bit representation.
> Fixing the similar problem for get_charset_by_name().
> @ strings/ctype-ucs2.c
> - Changing my_strtoll10_mb2 from accessing memory directly using
> s and s to mb_wc() method, to reuse the same code for utf16le.
> - Adding useful macro for surrogate high/low first/last values.
> - Adding macros MY_UTF16_WC2 and MY_UTF16_WC4, to make some utf16
> routines more readable.
> - Fixing my_caseup_utf16, my_hash_sort_utf16, my_ismbchar_utf16,
> my_strnncoll_utf16_bin, my_hash_sort_utf16_bin to use
> instead of dirrect call to my_utf16_uni, to reuse the code.
> - Fixing my_hash_sort_utf16 and my_hash_sort_utf16_bin to use lengthsp()
> instead of direct memory access to reuse the code for utf16le.
> - Adding low level utf16le functions my_utf16le_uni, my_uni_utf16le,
> my_lengthsp_utf16le. These are the only three new functions.
> All other functions reuse utf16/ucs2 code.
> - Adding utf16le structures.