mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-22756 SQL Error (1364): Field 'DB_ROW_HASH_1' doesn't have a default value
exclude generated columns from the "has default value" check
This commit is contained in:
@ -448,5 +448,11 @@ a b
|
|||||||
1 xxx
|
1 xxx
|
||||||
drop table t1;
|
drop table t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-22756 SQL Error (1364): Field 'DB_ROW_HASH_1' doesn't have a default value
|
||||||
|
#
|
||||||
|
create table t1 (f text not null, unique (f));
|
||||||
|
insert into t1 (f) select 'f';
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
# End of 10.4 tests
|
# End of 10.4 tests
|
||||||
#
|
#
|
||||||
|
@ -442,6 +442,13 @@ insert into t1 (a,b) select 1,'xxx' from seq_1_to_5;
|
|||||||
select * from t1;
|
select * from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-22756 SQL Error (1364): Field 'DB_ROW_HASH_1' doesn't have a default value
|
||||||
|
--echo #
|
||||||
|
create table t1 (f text not null, unique (f));
|
||||||
|
insert into t1 (f) select 'f';
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.4 tests
|
--echo # End of 10.4 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -2134,7 +2134,7 @@ int check_that_all_fields_are_given_values(THD *thd, TABLE *entry, TABLE_LIST *t
|
|||||||
for (Field **field=entry->field ; *field ; field++)
|
for (Field **field=entry->field ; *field ; field++)
|
||||||
{
|
{
|
||||||
if (!bitmap_is_set(write_set, (*field)->field_index) &&
|
if (!bitmap_is_set(write_set, (*field)->field_index) &&
|
||||||
!(*field)->vers_sys_field() &&
|
!(*field)->vers_sys_field() && !(*field)->vcol_info &&
|
||||||
has_no_default_value(thd, *field, table_list) &&
|
has_no_default_value(thd, *field, table_list) &&
|
||||||
((*field)->real_type() != MYSQL_TYPE_ENUM))
|
((*field)->real_type() != MYSQL_TYPE_ENUM))
|
||||||
err=1;
|
err=1;
|
||||||
|
Reference in New Issue
Block a user