1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug#12518

"COLUMN_DEFAULT has wrong value if NOT NULL is set"
  Show NULL instead of empty string when no default value is set


mysql-test/r/information_schema.result:
  test for bug 12518
mysql-test/t/information_schema.test:
  test for bug 12518
sql/sql_show.cc:
  report NULL for information schema result when there is no default value
This commit is contained in:
unknown
2005-08-15 17:14:55 +01:00
parent 3b422187f6
commit 2fc78cb3fd
3 changed files with 20 additions and 0 deletions

View File

@ -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