summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-11-01 15:54:30 +0200
committerunknown <monty@mysql.com>2005-11-01 15:54:30 +0200
commitee380a077782f87d80aae7a8c9c9ead51dfd8e7b (patch)
treea19fa82d4c5fc0f845231b5d75a45a0c36e0494d /sql/table.cc
parentf9dbcd558a52652692c4593c93656431e4cbf043 (diff)
downloadmariadb-git-ee380a077782f87d80aae7a8c9c9ead51dfd8e7b.tar.gz
Reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort
Fix for bug #14536: SELECT @a,@a:=... fails with prepared statements mysql-test/r/func_sapdb.result: Correct tests after reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort) mysql-test/r/type_newdecimal.result: Correct tests after reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort) mysql-test/r/user_var.result: More test with SELECT @a:= mysql-test/t/disabled.def: Enable user_var.test for mysql-test/t/user_var.test: More test with SELECT @a:= sql/item.cc: Simple optimization during review of new code sql/item_func.cc: Reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort) sql/item_timefunc.h: timediff() can return NULL for not NULL arguments sql/sql_base.cc: Remove usage of current_thd() in mysql_make_view() sql/sql_lex.h: Remove usage of current_thd() in mysql_make_view() sql/sql_select.cc: Fix for bug #14536: SELECT @a,@a:=... fails with prepared statements sql/sql_view.cc: Remove usage of current_thd() in mysql_make_view() Simple optimization of new code sql/sql_view.h: Remove usage of current_thd() in mysql_make_view() sql/table.cc: Simple optimization of new code
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 75c04389411..a18ff4397d1 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -2654,7 +2654,7 @@ Natural_join_column::check_grants(THD *thd, const char *name, uint length)
GRANT_INFO *grant;
const char *db_name;
const char *table_name;
- Security_context *save_security_ctx= 0;
+ Security_context *save_security_ctx;
Security_context *new_sctx= table_ref->security_ctx;
bool res;
@@ -2673,14 +2673,11 @@ Natural_join_column::check_grants(THD *thd, const char *name, uint length)
table_name= table_ref->table->s->table_name;
}
+ save_security_ctx= thd->security_ctx;
if (new_sctx)
- {
- save_security_ctx= thd->security_ctx;
thd->security_ctx= new_sctx;
- }
res= check_grant_column(thd, grant, db_name, table_name, name, length);
- if (save_security_ctx)
- thd->security_ctx= save_security_ctx;
+ thd->security_ctx= save_security_ctx;
return res;
}
#endif