diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-08-30 13:22:57 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-08-30 13:22:57 +0300 |
commit | 50d6966c503c7fdc7121eb1756b27c66b12fe0bb (patch) | |
tree | 16d6697182e6d9e7779606af3f95fe7b48cb993e /sql/field.cc | |
parent | d3099985fbd4b5e85564cc15de58a88916c16091 (diff) | |
parent | c8cd162a0a5daa17a8b6ca57f2dce44388b1b333 (diff) | |
download | mariadb-git-50d6966c503c7fdc7121eb1756b27c66b12fe0bb.tar.gz |
Merge 10.8 into 10.9
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sql/field.cc b/sql/field.cc index 98aeb6d892c..028a1961943 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -983,7 +983,8 @@ bool Field::check_assignability_from(const Type_handler *from, type_handler_for_item_field()); if (th.aggregate_for_result(from->type_handler_for_item_field())) { - bool error= !ignore && get_thd()->is_strict_mode(); + bool error= (!ignore && get_thd()->is_strict_mode()) || + (type_handler()->is_scalar_type() != from->is_scalar_type()); /* Display fully qualified column name for table columns. Display non-qualified names for other things, @@ -1492,15 +1493,6 @@ bool Field::sp_prepare_and_store_item(THD *thd, Item **value) if (!(expr_item= thd->sp_fix_func_item_for_assignment(this, value))) goto error; - /* - expr_item is now fixed, it's safe to call cmp_type() - */ - if (expr_item->cmp_type() == ROW_RESULT) - { - my_error(ER_OPERAND_COLUMNS, MYF(0), 1); - goto error; - } - /* Save the value in the field. Convert the value if needed. */ expr_item->save_in_field(this, 0); |