diff options
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index 3fb39d0fc27..fbbe209eea4 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -3051,9 +3051,11 @@ bool sys_var_thd_storage_engine::check(THD *thd, set_var *var) if (var->value->result_type() == STRING_RESULT) { + enum db_type db_type; if (!(res=var->value->val_str(&str)) || !(var->save_result.ulong_value= - (ulong) ha_resolve_by_name(res->ptr(), res->length()))) + (ulong) db_type= ha_resolve_by_name(res->ptr(), res->length())) || + ha_checktype(db_type) != db_type) { value= res ? res->c_ptr() : "NULL"; goto err; |