diff options
author | unknown <bar@mysql.com> | 2004-11-04 08:50:07 +0400 |
---|---|---|
committer | unknown <bar@mysql.com> | 2004-11-04 08:50:07 +0400 |
commit | d4a3d5017074eb555022fdc4983caa0947163d88 (patch) | |
tree | be1f7ab5613e5379368f4145490211273c7be194 /sql/field.cc | |
parent | 66191b2244b081faee6a00a5c5e7a1bbbf8efaf8 (diff) | |
download | mariadb-git-d4a3d5017074eb555022fdc4983caa0947163d88.tar.gz |
field.cc, sql_mode.result, sql_mode.test:
"SHOW CREATE TABLE" mysql-4.0 and mysql-3.23
compatibiliry mode change:
Check that a binary collation adds 'binary'
suffix into a char() column definition in
mysql40 and mysql2323 modes. This allows
not to lose the column's case sensitivity
when loading the dump in pre-4.1 servers.
mysql-test/t/sql_mode.test:
"SHOW CREATE TABLE" mysql-4.0 and mysql-3.23
compatibiliry mode change:
mysql-test/r/sql_mode.result:
"SHOW CREATE TABLE" mysql-4.0 and mysql-3.23
compatibiliry mode change:
Check that a binary collation adds 'binary'
suffix into a char() column definition in
mysql40 and mysql2323 modes. This allows
not to lose the column's case sensitivity
when loading the dump in pre-4.1 servers.
sql/field.cc:
"SHOW CREATE TABLE" mysql-4.0 and mysql-3.23
compatibiliry mode change:
Check that a binary collation adds 'binary'
suffix into a char() column definition in
mysql40 and mysql2323 modes. This allows
not to lose the column's case sensitivity
when loading the dump in pre-4.1 servers.
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/field.cc b/sql/field.cc index 4b833874221..24bd0c48c92 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -4417,6 +4417,7 @@ void Field_string::sort_string(char *to,uint length) void Field_string::sql_type(String &res) const { + THD *thd= table->in_use; CHARSET_INFO *cs=res.charset(); ulong length= cs->cset->snprintf(cs,(char*) res.ptr(), res.alloced_length(), "%s(%d)", @@ -4427,6 +4428,9 @@ void Field_string::sql_type(String &res) const (has_charset() ? "char" : "binary")), (int) field_length / charset()->mbmaxlen); res.length(length); + if ((thd->variables.sql_mode & (MODE_MYSQL323 | MODE_MYSQL40)) && + has_charset() && (charset()->state & MY_CS_BINSORT)) + res.append(" binary"); } char *Field_string::pack(char *to, const char *from, uint max_length) |