Commit 0a056c9b authored by Sergei Golubchik's avatar Sergei Golubchik

better ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED

parent 1b4f0962
This diff is collapsed.
......@@ -473,9 +473,9 @@ select collation(group_concat(a,_koi8r'test')) from t1;
collation(group_concat(a,_koi8r'test'))
cp1250_general_ci
select collation(group_concat(a,_koi8r 0xC1C2)) from t1;
ERROR HY000: Illegal mix of collations (cp1250_general_ci,IMPLICIT) and (koi8r_general_ci,COERCIBLE) for operation 'group_concat'
ERROR HY000: Illegal mix of collations (cp1250_general_ci,IMPLICIT) and (koi8r_general_ci,COERCIBLE) for operation 'group_concat('
select collation(group_concat(a,b)) from t1;
ERROR HY000: Illegal mix of collations (cp1250_general_ci,IMPLICIT) and (koi8r_general_ci,IMPLICIT) for operation 'group_concat'
ERROR HY000: Illegal mix of collations (cp1250_general_ci,IMPLICIT) and (koi8r_general_ci,IMPLICIT) for operation 'group_concat('
drop table t1;
drop table t2;
CREATE TABLE t1 (a CHAR(10) CHARACTER SET cp850);
......
......@@ -301,7 +301,7 @@ POLYGON((9 9,5 2,4 5,9 9))
# MDEV-10134 Add full support for DEFAULT
#
CREATE TABLE t1 (a INT DEFAULT ST_GIS_DEBUG(1));
ERROR HY000: Function or expression 'st_gis_debug' is not allowed for 'DEFAULT' of column/constraint 'a'
ERROR HY000: Function or expression 'st_gis_debug()' cannot be used in the DEFAULT clause of `a`
#
# End of 10.2 tests
#
......@@ -456,7 +456,7 @@ pk, c,
row_number() over (partition by c order by pk
range between unbounded preceding and current row) as r
from t1;
ERROR HY000: Window frame is not allowed with 'row_number'
ERROR HY000: Window frame is not allowed with 'row_number('
select
pk, c,
rank() over w1 as r
......
......@@ -562,7 +562,7 @@ include/rpl_end.inc
# MDEV-10134 Add full support for DEFAULT
#
CREATE TABLE t1 (a VARCHAR(100) DEFAULT BINLOG_GTID_POS("master-bin.000001", 600));
ERROR HY000: Function or expression 'binlog_gtid_pos' is not allowed for 'DEFAULT' of column/constraint 'a'
ERROR HY000: Function or expression 'binlog_gtid_pos()' cannot be used in the DEFAULT clause of `a`
#
# End of 10.2 tests
#
......@@ -4,22 +4,22 @@ set time_zone='+10:00';
set div_precision_increment=20;
create table t1 (a int, b int, v decimal(20,19) as (a/3));
create table t2 (a int, b int, v int as (a+@a));
ERROR HY000: Function or expression 'user_var' is not allowed for 'VIRTUAL' of column/constraint 'v'
ERROR HY000: Function or expression '@a' cannot be used in the GENERATED ALWAYS AS clause of `v`
create table t2 (a int, b int, v int as (a+@a) PERSISTENT);
ERROR HY000: Function or expression 'user_var' is not allowed for 'VIRTUAL' of column/constraint 'v'
ERROR HY000: Function or expression '@a' cannot be used in the GENERATED ALWAYS AS clause of `v`
create table t3_ok (a int, b int, v int as (a+@@error_count));
create table t3 (a int, b int, v int as (a+@@error_count) PERSISTENT);
ERROR HY000: Function or expression 'get_system_var' is not allowed for 'VIRTUAL' of column/constraint 'v'
ERROR HY000: Function or expression '@@error_count' cannot be used in the GENERATED ALWAYS AS clause of `v`
create table t4 (a int, b int, v int as (@a:=a));
ERROR HY000: Function or expression 'user_var' is not allowed for 'VIRTUAL' of column/constraint 'v'
ERROR HY000: Function or expression '@a' cannot be used in the GENERATED ALWAYS AS clause of `v`
create table t4 (a int, b int, v int as (@a:=a) PERSISTENT);
ERROR HY000: Function or expression 'user_var' is not allowed for 'VIRTUAL' of column/constraint 'v'
ERROR HY000: Function or expression '@a' cannot be used in the GENERATED ALWAYS AS clause of `v`
create table t5 (a int, b int, v varchar(100) as (monthname(a)));
ERROR HY000: Function or expression 'monthname' is not allowed for 'VIRTUAL' of column/constraint 'v'
ERROR HY000: Function or expression 'monthname()' cannot be used in the GENERATED ALWAYS AS clause of `v`
create table t6 (a int, b int, v varchar(100) as (dayname(a)));
ERROR HY000: Function or expression 'dayname' is not allowed for 'VIRTUAL' of column/constraint 'v'
ERROR HY000: Function or expression 'dayname()' cannot be used in the GENERATED ALWAYS AS clause of `v`
create table t7 (a int, b int, v varchar(100) as (date_format(a, '%W %a %M %b')));
ERROR HY000: Function or expression 'date_format' is not allowed for 'VIRTUAL' of column/constraint 'v'
ERROR HY000: Function or expression 'date_format()' cannot be used in the GENERATED ALWAYS AS clause of `v`
create table t8 (a int, b int, v varchar(100) as (from_unixtime(a)));
insert t1 (a,b) values (1,2);
insert t8 (a,b) values (1234567890,2);
......
......@@ -288,7 +288,7 @@ create or replace table t1 (a int as (b), b int default 1);
create or replace table t1 (a int as (b), b int default (1+1));
create or replace table t1 (a int default 1, b int as (c), c int default (a+1));
create or replace table t1 (a int default (1+1), b int as (c), c int default (a+1));
create or replace table t1 (a VARCHAR(128) DEFAULT @@version);
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 default (a+1));
......
......@@ -9798,7 +9798,7 @@ bool Column_definition::check(THD *thd)
if (vcol_info)
{
vcol_info->set_field_type(sql_type);
if (check_expression(vcol_info, "VIRTUAL", field_name,
if (check_expression(vcol_info, "GENERATED ALWAYS AS", field_name,
vcol_info->stored_in_db))
DBUG_RETURN(TRUE);
}
......
......@@ -1422,6 +1422,16 @@ bool mark_unsupported_function(const char *where, void *store, uint result)
return false;
}
/* convenience helper for mark_unsupported_function() above */
bool mark_unsupported_function(const char *w1, const char *w2,
void *store, uint result)
{
char *ptr= (char*)current_thd->alloc(strlen(w1) + strlen(w2) + 1);
if (ptr)
strxmov(ptr, w1, w2, NullS);
return mark_unsupported_function(ptr, store, result);
}
/*****************************************************************************
Item_sp_variable methods
*****************************************************************************/
......@@ -8583,6 +8593,13 @@ void Item_trigger_field::print(String *str, enum_query_type query_type)
}
bool Item_trigger_field::check_vcol_func_processor(void *arg)
{
const char *ver= row_version == NEW_ROW ? "NEW." : "OLD.";
return mark_unsupported_function(ver, field_name, arg, VCOL_IMPOSSIBLE);
}
void Item_trigger_field::cleanup()
{
want_privilege= original_privilege;
......
......@@ -62,6 +62,9 @@ char_to_byte_length_safe(uint32 char_length_arg, uint32 mbmaxlen_arg)
bool mark_unsupported_function(const char *where, void *store, uint result);
/* convenience helper for mark_unsupported_function() above */
bool mark_unsupported_function(const char *w1, const char *w2,
void *store, uint result);
/* Bits for the split_sum_func() function */
#define SPLIT_SUM_SKIP_REGISTERED 1 /* Skip registered funcs */
......@@ -2032,6 +2035,10 @@ class Item_sp_variable :public Item
inline int save_in_field(Field *field, bool no_conversions);
inline bool send(Protocol *protocol, String *str);
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(m_name.str, arg, VCOL_IMPOSSIBLE);
}
};
/*****************************************************************************
......@@ -2239,7 +2246,7 @@ class Item_name_const : public Item
}
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function("name_const", arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function("name_const()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -4936,7 +4943,7 @@ class Item_insert_value : public Item_field
bool check_partition_func_processor(void *int_arg) {return TRUE;}
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function("values", arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function("values()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -5023,10 +5030,7 @@ class Item_trigger_field : public Item_field,
*/
bool read_only;
public:
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function("trigger", arg, VCOL_IMPOSSIBLE);
}
bool check_vcol_func_processor(void *arg);
};
......
......@@ -4587,6 +4587,11 @@ longlong Item_func_sleep::val_int()
}
bool Item_func_user_var::check_vcol_func_processor(void *arg)
{
return mark_unsupported_function("@", name.str, arg, VCOL_IMPOSSIBLE);
}
#define extra_size sizeof(double)
user_var_entry *get_variable(HASH *hash, LEX_STRING &name,
......@@ -5847,6 +5852,10 @@ void Item_func_get_system_var::print(String *str, enum_query_type query_type)
str->append(name, name_length);
}
bool Item_func_get_system_var::check_vcol_func_processor(void *arg)
{
return mark_unsupported_function("@@", var->name.str, arg, VCOL_NON_DETERMINISTIC);
}
enum Item_result Item_func_get_system_var::result_type() const
{
......@@ -6850,6 +6859,10 @@ void Item_func_sp::update_used_tables()
}
}
bool Item_func_sp::check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
/*
uuid_short handling.
......
......@@ -614,7 +614,7 @@ class Item_func_connection_id :public Item_int_func
longlong val_int() { DBUG_ASSERT(fixed == 1); return value; }
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_NON_DETERMINISTIC);
return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
}
};
......@@ -1041,7 +1041,7 @@ class Item_func_rand :public Item_real_func
void cleanup() { first_eval= TRUE; Item_real_func::cleanup(); }
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_NON_DETERMINISTIC);
return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
}
private:
void seed_random (Item * val);
......@@ -1337,7 +1337,7 @@ class Item_func_last_insert_id :public Item_int_func
bool fix_fields(THD *thd, Item **ref);
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -1354,7 +1354,7 @@ class Item_func_benchmark :public Item_int_func
virtual void print(String *str, enum_query_type query_type);
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -1376,7 +1376,7 @@ class Item_func_sleep :public Item_int_func
longlong val_int();
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -1471,7 +1471,7 @@ class Item_udf_func :public Item_func
virtual void print(String *str, enum_query_type query_type);
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_UNKNOWN);
return mark_unsupported_function(func_name(), "()", arg, VCOL_UNKNOWN);
}
};
......@@ -1646,7 +1646,7 @@ class Item_func_get_lock :public Item_int_func
bool is_expensive() { return 1; }
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -1666,7 +1666,7 @@ class Item_func_release_lock :public Item_int_func
bool is_expensive() { return 1; }
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -1686,7 +1686,7 @@ class Item_master_pos_wait :public Item_int_func
void fix_length_and_dec() { max_length=21; maybe_null=1;}
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -1702,7 +1702,7 @@ class Item_master_gtid_wait :public Item_int_func
void fix_length_and_dec() { max_length=10+1+10+1+20+1; maybe_null=0;}
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -1728,10 +1728,7 @@ class Item_func_user_var :public Item_hybrid_func
Item_func_user_var(THD *thd, Item_func_user_var *item)
:Item_hybrid_func(thd, item),
m_var_entry(item->m_var_entry), name(item->name) { }
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function("user_var", arg, VCOL_IMPOSSIBLE);
}
bool check_vcol_func_processor(void *arg);
};
......@@ -1938,10 +1935,7 @@ class Item_func_get_system_var :public Item_func
bool eq(const Item *item, bool binary_cmp) const;
void cleanup();
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_NON_DETERMINISTIC);
}
bool check_vcol_func_processor(void *arg);
};
......@@ -1989,7 +1983,7 @@ class Item_func_match :public Item_real_func
void init_search(THD *thd, bool no_order);
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function("match ... against()", arg, VCOL_IMPOSSIBLE);
}
private:
/**
......@@ -2046,7 +2040,7 @@ class Item_func_is_free_lock :public Item_int_func
void fix_length_and_dec() { decimals=0; max_length=1; maybe_null=1;}
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -2060,7 +2054,7 @@ class Item_func_is_used_lock :public Item_int_func
void fix_length_and_dec() { decimals=0; max_length=10; maybe_null=1;}
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -2110,7 +2104,7 @@ class Item_func_row_count :public Item_int_func
void fix_length_and_dec() { decimals= 0; maybe_null=0; }
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -2234,10 +2228,7 @@ class Item_func_sp :public Item_func
return sp_result_field;
}
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
bool check_vcol_func_processor(void *arg);
bool limit_index_condition_pushdown_processor(void *opt_arg)
{
return TRUE;
......@@ -2254,7 +2245,7 @@ class Item_func_found_rows :public Item_int_func
void fix_length_and_dec() { decimals= 0; maybe_null=0; }
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -2272,7 +2263,7 @@ class Item_func_uuid_short :public Item_int_func
table_map used_tables() const { return RAND_TABLE_BIT; }
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_NON_DETERMINISTIC);
return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
}
};
......
......@@ -618,7 +618,7 @@ class Item_func_gis_debug: public Item_int_func
longlong val_int();
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
#endif
......
......@@ -763,7 +763,7 @@ class Item_func_binlog_gtid_pos :public Item_str_func
const char *func_name() const { return "binlog_gtid_pos"; }
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -923,7 +923,7 @@ class Item_load_file :public Item_str_func
}
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -1191,7 +1191,7 @@ class Item_func_uuid: public Item_str_func
String *val_str(String *);
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_NON_DETERMINISTIC);
return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
}
};
......
......@@ -222,7 +222,7 @@ class Item_subselect :public Item_result_field,
bool enumerate_field_refs_processor(void *arg);
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function("subselect", arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function("select ...", arg, VCOL_IMPOSSIBLE);
}
/**
Callback to test if an IN predicate is expensive.
......
......@@ -579,6 +579,12 @@ Item *Item_sum::result_item(THD *thd, Field *field)
return new (thd->mem_root) Item_field(thd, field);
}
bool Item_sum::check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), ")", arg, VCOL_IMPOSSIBLE);
}
/**
Compare keys consisting of single field that cannot be compared as binary.
......
......@@ -547,11 +547,7 @@ class Item_sum :public Item_func_or_sum
virtual void remove() { DBUG_ASSERT(0); }
virtual void cleanup();
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
bool check_vcol_func_processor(void *arg);
virtual void setup_window_func(THD *thd, Window_spec *window_spec) {}
};
......@@ -1555,7 +1551,7 @@ class Item_func_group_concat : public Item_sum
void cleanup();
enum Sumfunctype sum_func () const {return GROUP_CONCAT_FUNC;}
const char *func_name() const { return "group_concat"; }
const char *func_name() const { return "group_concat("; }
virtual Item_result result_type () const { return STRING_RESULT; }
virtual Item_result cmp_type () const { return STRING_RESULT; }
enum_field_types field_type() const
......
......@@ -196,7 +196,7 @@ class Item_func_monthname :public Item_str_func
}
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -411,7 +411,7 @@ class Item_func_dayname :public Item_func_weekday
bool check_partition_func_processor(void *int_arg) {return TRUE;}
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......@@ -464,7 +464,7 @@ class Item_func_unix_timestamp :public Item_func_seconds_hybrid
{
if (arg_count)
return FALSE;
return mark_unsupported_function(func_name(), arg, VCOL_TIME_FUNC);
return mark_unsupported_function(func_name(), "()", arg, VCOL_TIME_FUNC);
}
longlong int_op();
my_decimal *decimal_op(my_decimal* buf);
......@@ -614,7 +614,7 @@ class Item_func_curtime :public Item_timefunc
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time)=0;
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_TIME_FUNC);
return mark_unsupported_function(func_name(), "()", arg, VCOL_TIME_FUNC);
}
};
......@@ -649,7 +649,7 @@ class Item_func_curdate :public Item_datefunc
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time)=0;
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg,
return mark_unsupported_function(func_name(), "()", arg,
VCOL_TIME_FUNC);
}
};
......@@ -691,7 +691,7 @@ class Item_func_now :public Item_datetimefunc
NOW is safe for replication as slaves will run with same time as
master
*/
return mark_unsupported_function(func_name(), arg, VCOL_TIME_FUNC);
return mark_unsupported_function(func_name(), "()", arg, VCOL_TIME_FUNC);
}
};
......@@ -715,7 +715,7 @@ class Item_func_now_utc :public Item_func_now
virtual enum Functype functype() const { return NOW_UTC_FUNC; }
virtual bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg,
return mark_unsupported_function(func_name(), "()", arg,
VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC);
}
......@@ -737,7 +737,7 @@ class Item_func_sysdate_local :public Item_func_now
table_map used_tables() const { return RAND_TABLE_BIT; }
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg,
return mark_unsupported_function(func_name(), "()", arg,
VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC);
}
virtual enum Functype functype() const { return SYSDATE_FUNC; }
......@@ -776,7 +776,7 @@ class Item_func_date_format :public Item_str_func
bool eq(const Item *item, bool binary_cmp) const;
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
};
......
......@@ -117,7 +117,7 @@ class Item_sum_row_number: public Item_sum_int
}
const char*func_name() const
{
return "row_number";
return "row_number(";
}
};
......
......@@ -6970,7 +6970,7 @@ start-error-number 1900
ER_VCOL_BASED_ON_VCOL
eng "A computed column cannot be based on a computed column"
ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
eng "Function or expression '%s' is not allowed for '%s' of column/constraint '%s'"
eng "Function or expression '%s' cannot be used in the %s clause of %`s"
ER_DATA_CONVERSION_ERROR_FOR_VIRTUAL_COLUMN
eng "Generated value for computed column '%s' cannot be converted to type '%s'"
ER_PRIMARY_KEY_BASED_ON_VIRTUAL_COLUMN
......@@ -7209,7 +7209,7 @@ ER_CONSTRAINT_FAILED 23000
rus "проверка CONSTRAINT %`s для %`-.192s.%`-.192s провалилась"
ukr "Перевірка CONSTRAINT %`s для %`-.192s.%`-.192s не пройшла"
ER_EXPRESSION_IS_TOO_BIG
eng "%s expression is too big for '%s'"
eng "%s expression in the %s clause is too big"
ER_ERROR_EVALUATING_EXPRESSION
eng "Got an error evaluating stored expression %`s"
ER_CALCULATING_DEFAULT_VALUE
......
......@@ -2614,7 +2614,7 @@ static bool fix_vcol_expr(THD *thd,
if (error || (res.errors & VCOL_IMPOSSIBLE))
{
my_error(ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED, MYF(0), res.name,
field_name);
"???", field_name);
goto end;
}
#endif
......
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