Commit 2d6e627a authored by Chris Calender's avatar Chris Calender Committed by Sergey Vojtovich

Fix for MDEV-18276, typo in error message + all other occurrences of refering

parent 07c3e902
...@@ -434,7 +434,7 @@ drop table t1; ...@@ -434,7 +434,7 @@ drop table t1;
# #
create table t1 (a int); create table t1 (a int);
create or replace table t1 (a int default b, b int default a); create or replace table t1 (a int default b, b int default a);
ERROR 01000: Expression for field `a` is refering to uninitialized field `b` ERROR 01000: Expression for field `a` is referring to uninitialized field `b`
show create table t1; show create table t1;
ERROR 42S02: Table 'test.t1' doesn't exist ERROR 42S02: Table 'test.t1' doesn't exist
# #
...@@ -451,16 +451,16 @@ create or replace table t1 (a varchar(128) default @@version); ...@@ -451,16 +451,16 @@ create or replace table t1 (a varchar(128) default @@version);
create or replace table t1 (a int not null, b int as (a)); create or replace table t1 (a int not null, b int as (a));
create or replace table t1 (a int not null, b int default (a+1)); create or replace table t1 (a int not null, b int default (a+1));
create or replace table t1 (a int default a); create or replace table t1 (a int default a);
ERROR 01000: Expression for field `a` is refering to uninitialized field `a` ERROR 01000: Expression for field `a` is referring to uninitialized field `a`
create or replace table t1 (a int default b, b int default (1+1)); create or replace table t1 (a int default b, b int default (1+1));
create or replace table t1 (a int default 1, b int as (c), c int as (a+1)); create or replace table t1 (a int default 1, b int as (c), c int as (a+1));
ERROR 01000: Expression for field `b` is refering to uninitialized field `c` ERROR 01000: Expression for field `b` is referring to uninitialized field `c`
CREATE TABLE t1 (a INT DEFAULT (DEFAULT(a))); CREATE TABLE t1 (a INT DEFAULT (DEFAULT(a)));
ERROR 01000: Expression for field `a` is refering to uninitialized field `a` ERROR 01000: Expression for field `a` is referring to uninitialized field `a`
CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT(DEFAULT(a))); CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT(DEFAULT(a)));
ERROR 01000: Expression for field `a` is refering to uninitialized field `b` ERROR 01000: Expression for field `a` is referring to uninitialized field `b`
CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)) NOT NULL, b INT DEFAULT(DEFAULT(a)) NOT NULL); CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)) NOT NULL, b INT DEFAULT(DEFAULT(a)) NOT NULL);
ERROR 01000: Expression for field `a` is refering to uninitialized field `b` ERROR 01000: Expression for field `a` is referring to uninitialized field `b`
# #
# Allow defaults to refer to not default fields # Allow defaults to refer to not default fields
# #
...@@ -519,7 +519,7 @@ Got one of the listed errors ...@@ -519,7 +519,7 @@ Got one of the listed errors
CREATE TABLE t1 (a INT DEFAULT(?)); CREATE TABLE t1 (a INT DEFAULT(?));
Got one of the listed errors Got one of the listed errors
CREATE TABLE t1 (a INT DEFAULT (b), b INT DEFAULT(a)); CREATE TABLE t1 (a INT DEFAULT (b), b INT DEFAULT(a));
ERROR 01000: Expression for field `a` is refering to uninitialized field `b` ERROR 01000: Expression for field `a` is referring to uninitialized field `b`
CREATE TABLE t1 (a INT DEFAULT(NAME_CONST('xxx', 'yyy')); CREATE TABLE t1 (a INT DEFAULT(NAME_CONST('xxx', 'yyy'));
ERROR HY000: Function or expression 'name_const()' cannot be used in the DEFAULT clause of `a` ERROR HY000: Function or expression 'name_const()' cannot be used in the DEFAULT clause of `a`
CREATE TABLE t1 (a INT DEFAULT COUNT(*)); CREATE TABLE t1 (a INT DEFAULT COUNT(*));
...@@ -3378,7 +3378,7 @@ a b t ...@@ -3378,7 +3378,7 @@ a b t
4 5 5 the value of the DEFAULT(a), that is b 4 5 5 the value of the DEFAULT(a), that is b
drop table t1; drop table t1;
create table t1 (col1 int default(-(default(col1)))); create table t1 (col1 int default(-(default(col1))));
ERROR 01000: Expression for field `col1` is refering to uninitialized field `col1` ERROR 01000: Expression for field `col1` is referring to uninitialized field `col1`
create table t1 (col int default (yearweek((exp(710))))); create table t1 (col int default (yearweek((exp(710)))));
ERROR 22003: DOUBLE value is out of range in 'exp(710)' ERROR 22003: DOUBLE value is out of range in 'exp(710)'
# #
......
...@@ -255,9 +255,9 @@ a b c ...@@ -255,9 +255,9 @@ a b c
4 -4 -3 4 -4 -3
drop table t1; drop table t1;
create table t1 (a int, b int generated always as(-b) virtual, c int generated always as (b + 1) virtual); create table t1 (a int, b int generated always as(-b) virtual, c int generated always as (b + 1) virtual);
ERROR 01000: Expression for field `b` is refering to uninitialized field `b` ERROR 01000: Expression for field `b` is referring to uninitialized field `b`
create table t1 (a int, b int generated always as(-c) virtual, c int generated always as (b + 1) virtual); create table t1 (a int, b int generated always as(-c) virtual, c int generated always as (b + 1) virtual);
ERROR 01000: Expression for field `b` is refering to uninitialized field `c` ERROR 01000: Expression for field `b` is referring to uninitialized field `c`
create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) stored, col_int_key int); create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) stored, col_int_key int);
ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `pk` ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `pk`
# Bug#20339347: FAIL TO USE CREATE ....SELECT STATEMENT TO CREATE A NEW TABLE # Bug#20339347: FAIL TO USE CREATE ....SELECT STATEMENT TO CREATE A NEW TABLE
...@@ -277,7 +277,7 @@ drop table t1,tt; ...@@ -277,7 +277,7 @@ drop table t1,tt;
# THD->CHANGE_LIST.IS_EMPTY() # THD->CHANGE_LIST.IS_EMPTY()
# #
CREATE TABLE t1(a bigint AS (a between 1 and 1)); CREATE TABLE t1(a bigint AS (a between 1 and 1));
ERROR 01000: Expression for field `a` is refering to uninitialized field `a` ERROR 01000: Expression for field `a` is referring to uninitialized field `a`
# Bug#20757211: GENERATED COLUMNS: ALTER TABLE CRASHES # Bug#20757211: GENERATED COLUMNS: ALTER TABLE CRASHES
# IN FIND_FIELD_IN_TABLE # IN FIND_FIELD_IN_TABLE
# #
......
...@@ -255,9 +255,9 @@ a b c ...@@ -255,9 +255,9 @@ a b c
4 -4 -3 4 -4 -3
drop table t1; drop table t1;
create table t1 (a int, b int generated always as(-b) virtual, c int generated always as (b + 1) virtual); create table t1 (a int, b int generated always as(-b) virtual, c int generated always as (b + 1) virtual);
ERROR 01000: Expression for field `b` is refering to uninitialized field `b` ERROR 01000: Expression for field `b` is referring to uninitialized field `b`
create table t1 (a int, b int generated always as(-c) virtual, c int generated always as (b + 1) virtual); create table t1 (a int, b int generated always as(-c) virtual, c int generated always as (b + 1) virtual);
ERROR 01000: Expression for field `b` is refering to uninitialized field `c` ERROR 01000: Expression for field `b` is referring to uninitialized field `c`
create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) stored, col_int_key int); create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) stored, col_int_key int);
ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `pk` ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `pk`
# Bug#20339347: FAIL TO USE CREATE ....SELECT STATEMENT TO CREATE A NEW TABLE # Bug#20339347: FAIL TO USE CREATE ....SELECT STATEMENT TO CREATE A NEW TABLE
...@@ -277,7 +277,7 @@ drop table t1,tt; ...@@ -277,7 +277,7 @@ drop table t1,tt;
# THD->CHANGE_LIST.IS_EMPTY() # THD->CHANGE_LIST.IS_EMPTY()
# #
CREATE TABLE t1(a bigint AS (a between 1 and 1)); CREATE TABLE t1(a bigint AS (a between 1 and 1));
ERROR 01000: Expression for field `a` is refering to uninitialized field `a` ERROR 01000: Expression for field `a` is referring to uninitialized field `a`
# Bug#20757211: GENERATED COLUMNS: ALTER TABLE CRASHES # Bug#20757211: GENERATED COLUMNS: ALTER TABLE CRASHES
# IN FIND_FIELD_IN_TABLE # IN FIND_FIELD_IN_TABLE
# #
......
...@@ -316,7 +316,7 @@ drop table t1; ...@@ -316,7 +316,7 @@ drop table t1;
# MDEV-5611: self-referencing virtual column # MDEV-5611: self-referencing virtual column
# #
create table t1 (a int, b int as (b is null) virtual); create table t1 (a int, b int as (b is null) virtual);
ERROR 01000: Expression for field `b` is refering to uninitialized field `b` ERROR 01000: Expression for field `b` is referring to uninitialized field `b`
create table t1 (a int as (1+1), b int as (a is null) virtual); create table t1 (a int as (1+1), b int as (a is null) virtual);
drop table t1; drop table t1;
# end of 5.3 tests # end of 5.3 tests
......
...@@ -1006,7 +1006,7 @@ bool Item_field::register_field_in_write_map(void *arg) ...@@ -1006,7 +1006,7 @@ bool Item_field::register_field_in_write_map(void *arg)
} }
/** /**
Check that we are not refering to any not yet initialized fields Check that we are not referring to any not yet initialized fields
Fields are initialized in this order: Fields are initialized in this order:
- All fields that have default value as a constant are initialized first. - All fields that have default value as a constant are initialized first.
......
...@@ -7623,7 +7623,7 @@ ER_ERROR_EVALUATING_EXPRESSION ...@@ -7623,7 +7623,7 @@ ER_ERROR_EVALUATING_EXPRESSION
ER_CALCULATING_DEFAULT_VALUE ER_CALCULATING_DEFAULT_VALUE
eng "Got an error when calculating default value for %`s" eng "Got an error when calculating default value for %`s"
ER_EXPRESSION_REFERS_TO_UNINIT_FIELD 01000 ER_EXPRESSION_REFERS_TO_UNINIT_FIELD 01000
eng "Expression for field %`-.64s is refering to uninitialized field %`s" eng "Expression for field %`-.64s is referring to uninitialized field %`s"
ER_PARTITION_DEFAULT_ERROR ER_PARTITION_DEFAULT_ERROR
eng "Only one DEFAULT partition allowed" eng "Only one DEFAULT partition allowed"
ukr "Припустимо мати тільки один DEFAULT розділ" ukr "Припустимо мати тільки один DEFAULT розділ"
......
...@@ -1129,7 +1129,7 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table, ...@@ -1129,7 +1129,7 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
if (check_constraint_ptr) if (check_constraint_ptr)
*check_constraint_ptr= 0; *check_constraint_ptr= 0;
/* Check that expressions aren't refering to not yet initialized fields */ /* Check that expressions aren't referring to not yet initialized fields */
for (field_ptr= table->field; *field_ptr; field_ptr++) for (field_ptr= table->field; *field_ptr; field_ptr++)
{ {
Field *field= *field_ptr; Field *field= *field_ptr;
......
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