1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

bug #20910 (NOT NULL reported as NULL for TIMESTAMP)

we intentionally reported that for TIMESTAMPS, which isn't right


mysql-test/r/type_timestamp.result:
  result fixed
mysql-test/t/type_timestamp.test:
  testcase added
sql/sql_show.cc:
  remove the check for TIMESTAMP type -
  all types will report 'NO' if they're defined as NOT NULL
This commit is contained in:
unknown
2006-08-08 13:34:27 +05:00
parent a517c2440e
commit 3bb35e0cba
3 changed files with 36 additions and 12 deletions

View File

@ -2713,9 +2713,7 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables,
table->field[5]->store("",0, cs);
table->field[5]->set_notnull();
}
pos=(byte*) ((flags & NOT_NULL_FLAG) &&
field->type() != FIELD_TYPE_TIMESTAMP ?
"NO" : "YES");
pos=(byte*) ((flags & NOT_NULL_FLAG) ? "NO" : "YES");
table->field[6]->store((const char*) pos,
strlen((const char*) pos), cs);
is_blob= (field->type() == FIELD_TYPE_BLOB);