1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Remove some usage of Check_level_instant_set and Sql_mode_save

The reason for the removal are:
- Generates more code
  - Storing and retreving THD
  - Causes extra code and daata to be generated to handle possible throw
    exceptions (which never happens in MariaDB code)
- Uses more stack space

Other things:
- Changed convert_const_to_int() to use item->save_in_field_no_warnings(),
  which made the code shorter and simpler.
- Removed not needed code in Sp_handler::sp_create_routine()
- Added thd as argument to store_key.copy() to make function simpler
- Added thd as argument to some subselect* constructor that inherites
  from Item_subselect.
This commit is contained in:
Monty
2021-01-30 14:03:23 +02:00
committed by Sergei Golubchik
parent d754d3d951
commit 08bc062e3c
9 changed files with 71 additions and 47 deletions

View File

@ -9712,10 +9712,12 @@ do_continue:;
Set the truncated column values of thd as warning
for alter table.
*/
Check_level_instant_set check_level_save(thd, CHECK_FIELD_WARN);
enum_check_fields org_count_cuted_fields= thd->count_cuted_fields;
thd->count_cuted_fields= CHECK_FIELD_WARN;
int res= mysql_inplace_alter_table(thd, table_list, table, &altered_table,
&ha_alter_info,
&target_mdl_request, &alter_ctx);
thd->count_cuted_fields= org_count_cuted_fields;
my_free(const_cast<uchar*>(frm.str));
if (res)