UNION doesn't return DISTINCT result for multi-byte characters
hp_hash.c:
This piece of code was pretty wrong, looks
like no necessary changes were made after
cut-and-paste from fixed length segment processing.
Itroduced two new variables safe_length1 and
safe_length2 to remember the original lengths.
Fixing my_charpos and set_if_smaller calls
to pass correct parameters.
ctype_utf8.result, ctype_utf8.test:
adding test case
Added a test case for bug #11484.
hp_hash.c:
Fixed bug #11484.
This bug in the function hp_rec_key_cmp resulted in wrong
comparison of varchar multibyte keys if the bytes after
string values happened to be different. This caused wrong
results for queries returning DISTINCT varchar fields in
multibyte charsets (e.g. in utf8).
Add support for VARCHAR with 1 or 2 length bytes
Enable VARCHAR packing in MyISAM files (previous patch didn't pack data properly)
Give error if we got problems in temporary tables during a SELECT
Don't use new table generated by ALTER TABLE if index generation fails
Fixed wrong call by range_end() (Could cause an ASSERT in debug mode)
Renamed HA_VAR_LENGTH to HA_VAR_LENGTH_PART
Renamed in all files FIELD_TYPE_STRING and FIELD_TYPE_VAR_STRING to MYSQL_TYPE_STRING and MYSQL_TYPE_VAR_STRING to make it easy to catch all possible errors
Added support for VARCHAR KEYS to heap
Removed support for ISAM
Now only long VARCHAR columns are changed to TEXT on demand (not CHAR)
Internal temporary files can now use fixed length tables if the used VARCHAR columns are short
New records_in_range() interface (similar to read_range())
Macros for faster bitmap handling
Simplify read_range() code (#WL1786)
New general key_cmp() function to compare keys
Don't read character set files if we are using only the default charset. In most cases the user will not anymore get a warning about missing character set files
Compare strings with space extend instead of space strip. Now the following comparisons holds: "a" == "a " and "a\t" < "a". (Bug #3152).
Note: Because of the above fix, one has to do a REPAIR on any table that has an ascii character < 32 last in a CHAR/VARCHAR/TEXT columns.
Signed auto_increment keys for HASH tables (like for MyISAM tables in 4.0)
nitialize system_charset_info() early. Fixes core dump when starting windows service
CREATE TABLE t1 (s1 CHAR(5) CHARACTER SET latin1 COLLATE latin1_german2_ci);
INSERT INTO t1 VALUES ('Ü');
INSERT INTO t1 VALUES ('ue');
SELECT DISTINCT s1 FROM t1;
The above returned two rows in error.
Now it returns one row, in latin1_german2_ci: Ü == ue