Commit 219c84fa authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into  mysql.com:/home/my/mysql-5.0


sql/sql_show.cc:
  Auto merged
parents 51919db0 2fc78cb3
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -958,3 +958,12 @@ trigger_schema trigger_name
test	tr1
use test;
drop table t1;
create table t1 (a int not null, b int);
use information_schema;
select column_name, column_default from columns
where table_schema='test' and table_name='t1';
column_name	column_default
a	NULL
b	NULL
use test;
drop table t1;
+10 −0
Original line number Diff line number Diff line
@@ -639,3 +639,13 @@ select trigger_schema, trigger_name from triggers where
trigger_name='tr1';
use test;
drop table t1;

#
# Bug#12518 COLUMN_DEFAULT has wrong value if NOT NULL is set
#
create table t1 (a int not null, b int);
use information_schema;
select column_name, column_default from columns
  where table_schema='test' and table_name='t1';
use test;
drop table t1;
+1 −0
Original line number Diff line number Diff line
@@ -2462,6 +2462,7 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables,
        table->field[5]->set_notnull();
      }
      else if (field->unireg_check == Field::NEXT_NUMBER ||
               lex->orig_sql_command != SQLCOM_SHOW_FIELDS ||
               field->maybe_null())
        table->field[5]->set_null();                // Null as default
      else