1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

1. New data types, from the user point of view:

BINARY(N) and VARBIBARY(N)
2. More 4.0 compatibility and more BINARY keyword consistency:
2a. CREATE TABLE a (a CHAR(N) BINARY) 
    is now synonym for
    CREATE TABLE a (a CHAR(N) COLLATE xxxx_bin)
2b. SELECT BINARY x
    is still synonin for
    SELECT x COLLATE xxxxx_bin.
This commit is contained in:
unknown
2004-03-26 16:11:46 +04:00
parent c1e76fc060
commit 3eff43162b
18 changed files with 78 additions and 67 deletions

View File

@@ -476,6 +476,18 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
*/
if (create_info->table_charset && sql_field->charset != &my_charset_bin)
sql_field->charset= create_info->table_charset;
CHARSET_INFO *savecs= sql_field->charset;
if ((sql_field->flags & BINCMP_FLAG) &&
!(sql_field->charset= get_charset_by_csname(sql_field->charset->csname,
MY_CS_BINSORT,MYF(0))))
{
char tmp[64];
strmake(strmake(tmp, savecs->csname, sizeof(tmp)-4), "_bin", 4);
my_error(ER_UNKNOWN_COLLATION, MYF(0), tmp);
DBUG_RETURN(-1);
}
sql_field->create_length_to_internal_length();
/* Don't pack keys in old tables if the user has requested this */