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:
@ -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
|
||||
|
Reference in New Issue
Block a user