summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-11-17 17:30:59 +0100
committerSergei Golubchik <serg@mariadb.org>2023-01-09 18:06:06 +0100
commit610cea3ddae5aa7756a3ec1409466c9e0c5fd5b3 (patch)
tree4446f506220dd9474db5602d9afc033dcbd6da15 /sql/item.cc
parentad27e95d542dfb2ad3a31e4fdf1063cc0685d1f2 (diff)
downloadmariadb-git-610cea3ddae5aa7756a3ec1409466c9e0c5fd5b3.tar.gz
cleanup
Helper class to swicth to relaxed checks during field copy. Temporarily.
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 630a408b13f..8af83f3a7f1 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1472,12 +1472,8 @@ int Item::save_in_field_no_warnings(Field *field, bool no_conversions)
{
int res;
TABLE *table= field->table;
- THD *thd= table->in_use;
- Check_level_instant_set check_level_save(thd, CHECK_FIELD_IGNORE);
- Sql_mode_save sql_mode(thd);
- thd->variables.sql_mode&= ~(MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE);
- thd->variables.sql_mode|= MODE_INVALID_DATES;
MY_BITMAP *old_map= dbug_tmp_use_all_columns(table, &table->write_set);
+ Use_relaxed_field_copy urfc(table->in_use);
res= save_in_field(field, no_conversions);
dbug_tmp_restore_column_map(&table->write_set, old_map);
return res;