mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
MDEV-18278 Misleading error message in error log upon failed table creation
If error_reported is not set upper caller open_table_from_share() throws error ER_NOT_FORM_FILE itself via open_table_error().
This commit is contained in:
@@ -3396,4 +3396,12 @@ CREATE OR REPLACE TABLE t1(i int);
|
||||
ALTER TABLE t1 ADD b CHAR(255) DEFAULT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`;
|
||||
ERROR 42S22: Unknown column 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' in 'DEFAULT'
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-18278 Misleading error message in error log upon failed table creation
|
||||
#
|
||||
create table t1 (a int as (a));
|
||||
ERROR 01000: Expression for field `a` is referring to uninitialized field `a`
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 4029 Expression for field `a` is referring to uninitialized field `a`
|
||||
# end of 10.2 test
|
||||
|
@@ -2109,5 +2109,11 @@ CREATE OR REPLACE TABLE t1(i int);
|
||||
ALTER TABLE t1 ADD b CHAR(255) DEFAULT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-18278 Misleading error message in error log upon failed table creation
|
||||
--echo #
|
||||
--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD
|
||||
create table t1 (a int as (a));
|
||||
show warnings;
|
||||
|
||||
--echo # end of 10.2 test
|
||||
|
@@ -1157,8 +1157,11 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
|
||||
if (check_vcol_forward_refs(field, field->vcol_info) ||
|
||||
check_vcol_forward_refs(field, field->check_constraint) ||
|
||||
check_vcol_forward_refs(field, field->default_value))
|
||||
{
|
||||
*error_reported= true;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
res=0;
|
||||
end:
|
||||
|
Reference in New Issue
Block a user