diff options
author | unknown <monty@mysql.com> | 2005-01-15 14:09:45 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-01-15 14:09:45 +0200 |
commit | 0cbd58c52b3810da467ec04e5d578ce3c845f125 (patch) | |
tree | e8856cd37d5a43bd18c06a8834fbfff83c0f4998 /innobase/include | |
parent | 5168d25f3509cd205b3db8222446b16d34c45781 (diff) | |
parent | 193eae3bece02daa473f0e264d235ea3e407a88d (diff) | |
download | mariadb-git-0cbd58c52b3810da467ec04e5d578ce3c845f125.tar.gz |
Merge with 4.1
BitKeeper/etc/ignore:
auto-union
Build-tools/Do-compile:
Auto merged
client/mysqladmin.cc:
Auto merged
heap/hp_create.c:
Auto merged
heap/hp_write.c:
Auto merged
include/my_sys.h:
Auto merged
innobase/data/data0type.c:
Auto merged
innobase/include/row0mysql.h:
Auto merged
innobase/os/os0file.c:
Auto merged
innobase/rem/rem0cmp.c:
Auto merged
innobase/row/row0sel.c:
Auto merged
innobase/srv/srv0start.c:
Auto merged
mysql-test/r/ctype_latin1_de.result:
Auto merged
mysql-test/r/ctype_tis620.result:
Auto merged
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/r/ctype_ujis.result:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/func_sapdb.result:
Auto merged
mysql-test/r/show_check.result:
Auto merged
mysql-test/r/type_float.result.es:
Auto merged
mysql-test/r/type_float.result:
Auto merged
mysql-test/r/type_timestamp.result:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
mysql-test/t/func_sapdb.test:
Auto merged
mysql-test/t/show_check.test:
Auto merged
mysql-test/t/type_float.test:
Auto merged
mysql-test/t/type_timestamp.test:
Auto merged
mysys/mf_iocache.c:
Auto merged
ndb/src/kernel/vm/Configuration.cpp:
Auto merged
scripts/mysql_install_db.sh:
Auto merged
sql/field.cc:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
strings/ctype-big5.c:
Auto merged
strings/ctype-bin.c:
Auto merged
strings/ctype-czech.c:
Auto merged
strings/ctype-gbk.c:
Auto merged
strings/ctype-latin1.c:
Auto merged
strings/ctype-mb.c:
Auto merged
strings/ctype-simple.c:
Auto merged
strings/ctype-sjis.c:
Auto merged
strings/ctype-tis620.c:
Auto merged
strings/ctype-uca.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
strings/ctype-utf8.c:
Auto merged
strings/ctype-win1250ch.c:
Auto merged
configure.in:
Use local values
mysql-test/r/ps_1general.result:
Update results
mysql-test/t/func_gconcat.test:
no changes
mysql-test/t/ps_1general.test:
Use local code
ndb/src/common/util/version.c:
Use local code
sql/filesort.cc:
Empty line changes
sql/ha_heap.cc:
Merge
sql/item_timefunc.cc:
Keep local code
sql/mysql_priv.h:
Update to 5.0
sql/sql_show.cc:
Hand merge
support-files/mysql.spec.sh:
No changes
Diffstat (limited to 'innobase/include')
-rw-r--r-- | innobase/include/data0type.h | 7 | ||||
-rw-r--r-- | innobase/include/row0mysql.h | 2 | ||||
-rw-r--r-- | innobase/include/row0mysql.ic | 31 | ||||
-rw-r--r-- | innobase/include/srv0start.h | 4 |
4 files changed, 39 insertions, 5 deletions
diff --git a/innobase/include/data0type.h b/innobase/include/data0type.h index c263d2bf613..02c874836fd 100644 --- a/innobase/include/data0type.h +++ b/innobase/include/data0type.h @@ -234,6 +234,13 @@ dtype_get_prtype( dtype_t* type); /************************************************************************* Gets the MySQL charset-collation code for MySQL string types. */ + +ulint +dtype_get_charset_coll_noninline( +/*=============================*/ + ulint prtype);/* in: precise data type */ +/************************************************************************* +Gets the MySQL charset-collation code for MySQL string types. */ UNIV_INLINE ulint dtype_get_charset_coll( diff --git a/innobase/include/row0mysql.h b/innobase/include/row0mysql.h index 575d8ee67bb..f0dc4630475 100644 --- a/innobase/include/row0mysql.h +++ b/innobase/include/row0mysql.h @@ -447,6 +447,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 */ diff --git a/innobase/include/row0mysql.ic b/innobase/include/row0mysql.ic index 4ecd66e06ec..fc922b52d0a 100644 --- a/innobase/include/row0mysql.ic +++ b/innobase/include/row0mysql.ic @@ -91,12 +91,33 @@ row_mysql_store_col_in_innobase_format( } } else if (type == DATA_VARCHAR || type == DATA_VARMYSQL || type == DATA_BINARY) { + /* Remove trailing spaces. */ + + /* Handle UCS2 strings differently. As no new + collations will be introduced in 4.1, we hardcode the + charset-collation codes here. In 5.0, the logic will + be based on mbminlen. */ + ulint cset = dtype_get_charset_coll( + dtype_get_prtype(dfield_get_type(dfield))); ptr = row_mysql_read_var_ref(&col_len, mysql_data); - - /* Remove trailing spaces */ - while (col_len > 0 && ptr[col_len - 1] == ' ') { - col_len--; - } + if (cset == 35/*ucs2_general_ci*/ + || cset == 90/*ucs2_bin*/ + || (cset >= 128/*ucs2_unicode_ci*/ + && cset <= 144/*ucs2_persian_ci*/)) { + /* space=0x0020 */ + /* Trim "half-chars", just in case. */ + col_len &= ~1; + + while (col_len >= 2 && ptr[col_len - 2] == 0x00 + && ptr[col_len - 1] == 0x20) { + col_len -= 2; + } + } else { + /* space=0x20 */ + while (col_len > 0 && ptr[col_len - 1] == 0x20) { + col_len--; + } + } } else if (type == DATA_BLOB) { ptr = row_mysql_read_blob_ref(&col_len, mysql_data, col_len); } diff --git a/innobase/include/srv0start.h b/innobase/include/srv0start.h index 75af1a212b4..8df0f97c4ff 100644 --- a/innobase/include/srv0start.h +++ b/innobase/include/srv0start.h @@ -75,6 +75,10 @@ extern dulint srv_start_lsn; void set_panic_flag_for_netware(void); #endif +#ifdef HAVE_DARWIN_THREADS +extern ibool srv_have_fullfsync; +#endif + extern ulint srv_sizeof_trx_t_in_ha_innodb_cc; extern ibool srv_is_being_started; |