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

SQL: default NULL for sys fields + misc fixes

* sys fields are NULL by default (with exceptions, see comment about NOT_NULL_FLAG in #77);
* error codes renamed, messages cleared out;
* SHOW CREATE TABLE fixed;
* set_max() fix;
* redundant flag setters/getters removed;
* flags are set in sql_yacc.yy, redundant copy_info_about_generated_fields() eliminated.
This commit is contained in:
Aleksey Midenkov
2016-11-20 18:17:28 +00:00
parent b98f09fcbf
commit a1c36f2e15
17 changed files with 77 additions and 147 deletions

View File

@ -7971,10 +7971,10 @@ fill_record(THD *thd, TABLE *table_arg, List<Item> &fields, List<Item> &values,
ER_THD(thd, ER_WARNING_NON_DEFAULT_VALUE_FOR_VIRTUAL_COLUMN),
rfield->field_name, table->s->table_name.str);
}
if (table->versioned() && rfield->is_generated() &&
if (table->versioned() && rfield->vers_sys_field() &&
!ignore_errors)
{
my_error(ER_GENERATED_FIELD_CANNOT_BE_SET_BY_USER, MYF(0));
my_error(ER_VERS_READONLY_FIELD, MYF(0), rfield->field_name);
goto err;
}
@ -8225,10 +8225,10 @@ fill_record(THD *thd, TABLE *table, Field **ptr, List<Item> &values,
}
}
if (table->versioned() && field->is_generated() &&
if (table->versioned() && field->vers_sys_field() &&
!ignore_errors)
{
my_error(ER_GENERATED_FIELD_CANNOT_BE_SET_BY_USER, MYF(0));
my_error(ER_VERS_READONLY_FIELD, MYF(0), field->field_name);
goto err;
}