Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/my/mysql-4.1
This commit is contained in:
commit
3f4b1023d7
@ -1636,3 +1636,13 @@ t1 CREATE TABLE `t1` (
|
||||
`a` enum('','a','b') NOT NULL default 'b'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 (a enum(0xE4, '1', '2') not null default 0xE4);
|
||||
show columns from t1;
|
||||
Field Type Null Key Default Extra
|
||||
a enum('ä','1','2') ä
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` enum('ä','1','2') NOT NULL default '?'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
|
@ -24,3 +24,13 @@ drop table t1;
|
||||
create table t1 (a enum (' ','a','b ') not null default 'b ');
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #2077
|
||||
#
|
||||
|
||||
create table t1 (a enum(0xE4, '1', '2') not null default 0xE4);
|
||||
show columns from t1;
|
||||
# should be fixed ASAP
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
@ -688,14 +688,14 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
|
||||
{
|
||||
byte *pos;
|
||||
uint flags=field->flags;
|
||||
String type(tmp,sizeof(tmp), system_charset_info);
|
||||
String type(tmp,sizeof(tmp), field->charset());
|
||||
uint col_access;
|
||||
bool null_default_value=0;
|
||||
|
||||
protocol->prepare_for_resend();
|
||||
protocol->store(field->field_name, system_charset_info);
|
||||
field->sql_type(type);
|
||||
protocol->store(type.ptr(), type.length(), system_charset_info);
|
||||
protocol->store(type.ptr(), type.length(), type.charset());
|
||||
if (verbose)
|
||||
protocol->store(field->has_charset() ? field->charset()->name : "NULL",
|
||||
system_charset_info);
|
||||
@ -713,7 +713,7 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
|
||||
null_default_value=1;
|
||||
if (!null_default_value && !field->is_null())
|
||||
{ // Not null by default
|
||||
type.set(tmp,sizeof(tmp),system_charset_info);
|
||||
type.set(tmp, sizeof(tmp), field->charset());
|
||||
field->val_str(&type,&type);
|
||||
protocol->store(type.ptr(),type.length(),type.charset());
|
||||
}
|
||||
@ -1114,7 +1114,7 @@ store_create_info(THD *thd, TABLE *table, String *packet)
|
||||
packet->append(" default ", 9);
|
||||
if (!field->is_null())
|
||||
{ // Not null by default
|
||||
type.set(tmp,sizeof(tmp),&my_charset_bin);
|
||||
type.set(tmp, sizeof(tmp), field->charset());
|
||||
field->val_str(&type,&type);
|
||||
if (type.length())
|
||||
append_unescaped(packet, type.ptr(), type.length());
|
||||
|
Loading…
x
Reference in New Issue
Block a user