1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-29159 Patch for MDEV-28918 introduces more inconsistency than it solves, breaks usability

1. Store assignment failures on incompatible data types now raise errors if:
- STRICT_ALL_TABLES or STRICT_TRANS_TABLES sql_mode is used, and
- IGNORE is not used

Otherwise, only a warning is raised and the statement continues.

2. Changing the error/warning test as follows:

-ERROR HY000: Illegal parameter data types inet6 and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'inet6' in assignment of `db`.`t`.`col`

so in case of a big table it's easier to see which column has the problem.
The new error text is also applied to SP variables.
This commit is contained in:
Alexander Barkov
2022-08-02 16:23:08 +04:00
parent 97d16c7544
commit 3ebbfd88a0
43 changed files with 1599 additions and 613 deletions

View File

@ -11084,7 +11084,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
if (!(*ptr)->vcol_info)
{
bitmap_set_bit(from->read_set, def->field->field_index);
if ((*ptr)->check_assignability_from(def->field))
if ((*ptr)->check_assignability_from(def->field, ignore))
goto err;
(copy_end++)->set(*ptr,def->field,0);
}