Commit 0a8fd20a authored by Aleksey Midenkov's avatar Aleksey Midenkov

SQL: NOT NULL for implicit fields (fixes #46)

parent 31e296c5
......@@ -6567,20 +6567,21 @@ static bool create_sys_trx_field(THD *thd, const char *field_name,
if (!f)
return true;
memset(f, 0, sizeof(*f));
f->field_name= field_name;
f->charset= system_charset_info;
if (integer_fields)
{
f->sql_type= MYSQL_TYPE_LONGLONG;
f->flags= UNSIGNED_FLAG;
f->flags= UNSIGNED_FLAG | NOT_NULL_FLAG;
f->length= MY_INT64_NUM_DECIMAL_DIGITS;
}
else
{
f->sql_type= MYSQL_TYPE_TIMESTAMP2;
f->flags= NOT_NULL_FLAG;
f->length= 6;
}
f->decimals= 0;
if (f->check(thd))
return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment