1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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
This commit is contained in:
unknown
2004-12-17 18:35:11 +02:00
parent 7b592c9e24
commit 7b06313785
7 changed files with 110 additions and 27 deletions

View File

@ -454,6 +454,8 @@ struct mysql_row_templ_struct {
zero if column cannot be NULL */
ulint type; /* column type in Innobase mtype
numbers DATA_CHAR... */
ulint charset; /* MySQL charset-collation code
of the column, or zero */
ulint is_unsigned; /* if a column type is an integer
type and this field is != 0, then
it is an unsigned integer type */