diff options
author | unknown <marko@hundin.mysql.fi> | 2004-12-17 18:35:11 +0200 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-12-17 18:35:11 +0200 |
commit | 7b063137855ed2dd72f661260e9d157c8779b360 (patch) | |
tree | c409114526e80bf5c0378ea758cd06c7cc3ba8c4 /innobase/rem | |
parent | 7b592c9e2416792fd17997a8f44eadb939c2629a (diff) | |
download | mariadb-git-7b063137855ed2dd72f661260e9d157c8779b360.tar.gz |
InnoDB: Fixed bugs in the padding and trimming of trailing spaces
that affected the UCS2 character set. (Bug #7350)
innobase/data/data0type.c:
Added dtype_get_charset_coll_noninline()
innobase/include/data0type.h:
Added dtype_get_charset_coll_noninline()
innobase/include/row0mysql.h:
Added charset field to mysql_row_templ_struct.
innobase/include/row0mysql.ic:
row_mysql_store_col_in_innobase_format():
When removing trailing spaces, treat the UCS2 character set properly.
innobase/rem/rem0cmp.c:
cmp_whole_field(): Do not remove trailing 0x20 bytes, as
innobase_mysql_cmp() implicitly pads the strings with trailing
spaces as necessary.
innobase/row/row0sel.c:
row_sel_field_store_in_mysql_format(): Do not pad with 0x20 bytes.
row_sel_store_mysql_rec(): Pad VARCHARs with trailing spaces
(0x20, or 0x0020 in UCS2).
sql/ha_innodb.cc:
build_template(): Initialize templ->charset
Diffstat (limited to 'innobase/rem')
-rw-r--r-- | innobase/rem/rem0cmp.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/innobase/rem/rem0cmp.c b/innobase/rem/rem0cmp.c index 041fb7914e2..cf549284acc 100644 --- a/innobase/rem/rem0cmp.c +++ b/innobase/rem/rem0cmp.c @@ -261,22 +261,6 @@ cmp_whole_field( "InnoDB: comparison!\n"); } - /* MySQL does not pad the ends of strings with spaces in a - comparison. That would cause a foreign key check to fail for - non-latin1 character sets if we have different length columns. - To prevent that we remove trailing spaces here before doing - the comparison. NOTE that if we in the future map more MySQL - types to DATA_MYSQL or DATA_VARMYSQL, we have to change this - code. */ - - while (a_length > 0 && a[a_length - 1] == ' ') { - a_length--; - } - - while (b_length > 0 && b[b_length - 1] == ' ') { - b_length--; - } - return(innobase_mysql_cmp( (int)(type->prtype & DATA_MYSQL_TYPE_MASK), (uint)dtype_get_charset_coll(type->prtype), |