1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

* Added comments and one assert

* Backport of safety measures from 5.0: make numeorous replaces:
    s/item->fix_fields()/if (!item->fixed) item->fix_fields()
This commit is contained in:
sergefp@mysql.com
2004-12-14 03:36:19 +03:00
parent 3ceb04a5d8
commit 3c8f48d2e3
12 changed files with 35 additions and 19 deletions

View File

@@ -2799,7 +2799,8 @@ int set_var::check(THD *thd)
return 0;
}
if (value->fix_fields(thd, 0, &value) || value->check_cols(1))
if ((!value->fixed &&
value->fix_fields(thd, 0, &value)) || value->check_cols(1))
return -1;
if (var->check_update_type(value->result_type()))
{
@@ -2834,7 +2835,8 @@ int set_var::light_check(THD *thd)
if (type == OPT_GLOBAL && check_global_access(thd, SUPER_ACL))
return 1;
if (value && (value->fix_fields(thd, 0, &value) || value->check_cols(1)))
if (value && ((!value->fixed && value->fix_fields(thd, 0, &value)) ||
value->check_cols(1)))
return -1;
return 0;
}