summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-04-08 00:16:17 +0300
committerunknown <bell@sanja.is.com.ua>2004-04-08 00:16:17 +0300
commitc9d856c8b78812dd402b89c62bcea23cc7dbe2a1 (patch)
treefd9a8f8f063a77fbde120e4c655eda322010feeb /sql/set_var.cc
parentffb47ca01e00cffd3546ed055f3220166d618a21 (diff)
downloadmariadb-git-c9d856c8b78812dd402b89c62bcea23cc7dbe2a1.tar.gz
new error for unsupported command in PS
fixed IN subselect with basic constant left expression SQLCOM_CREATE_TABLE, SQLCOM_UPDATE_MULTI, SQLCOM_REPLACE_SELECT, SQLCOM_INSERT_SELECT, QLCOM_DELETE_MULTI fixed to be compatible with PS (BUG#3398, BUG#3406) fixed multiupdate privelege check (BUG#3408) fixed multiupdate tables check (BUG#3411) unchecked commands now is rejected by PS protocol to avoid serever crash fixed cleunup procedure to be compatible sith DO/SET (BUG#3393) include/mysqld_error.h: new error for unsupported command in PS mysql-test/r/multi_update.result: test sutes (BUG#3408, BUG#3411) mysql-test/t/multi_update.test: test sutes (BUG#3408, BUG#3411) sql/item_cmpfunc.cc: fixed IN subselect with basic constant left expression sql/mysql_priv.h: some function frop sql_parse.h become public sql/set_var.cc: check for SET command via PS sql/set_var.h: check for SET command via PS sql/share/czech/errmsg.txt: new error for unsupported command in PS sql/share/danish/errmsg.txt: new error for unsupported command in PS sql/share/dutch/errmsg.txt: new error for unsupported command in PS sql/share/english/errmsg.txt: new error for unsupported command in PS sql/share/estonian/errmsg.txt: new error for unsupported command in PS sql/share/french/errmsg.txt: new error for unsupported command in PS sql/share/german/errmsg.txt: new error for unsupported command in PS sql/share/greek/errmsg.txt: new error for unsupported command in PS sql/share/hungarian/errmsg.txt: new error for unsupported command in PS sql/share/italian/errmsg.txt: new error for unsupported command in PS sql/share/japanese/errmsg.txt: new error for unsupported command in PS sql/share/korean/errmsg.txt: new error for unsupported command in PS sql/share/norwegian-ny/errmsg.txt: new error for unsupported command in PS sql/share/norwegian/errmsg.txt: new error for unsupported command in PS sql/share/polish/errmsg.txt: new error for unsupported command in PS sql/share/portuguese/errmsg.txt: new error for unsupported command in PS sql/share/romanian/errmsg.txt: new error for unsupported command in PS sql/share/russian/errmsg.txt: new error for unsupported command in PS sql/share/serbian/errmsg.txt: new error for unsupported command in PS sql/share/slovak/errmsg.txt: new error for unsupported command in PS sql/share/spanish/errmsg.txt: new error for unsupported command in PS sql/share/swedish/errmsg.txt: new error for unsupported command in PS sql/share/ukrainian/errmsg.txt: new error for unsupported command in PS sql/sql_lex.cc: first table unlincking procedures for CREATE command sql/sql_lex.h: first table unlincking procedures for CREATE command sql/sql_parse.cc: used function to exclude first table from list SQLCOM_CREATE_TABLE, SQLCOM_UPDATE_MULTI, SQLCOM_REPLACE_SELECT, SQLCOM_INSERT_SELECT, QLCOM_DELETE_MULTI fixed to be compatible with PS (BUG#3398, BUG#3406) fixed multiupdate privelege check (BUG#3408) fixed multiupdate tables check (BUG#3411) sql/sql_prepare.cc: fixed a lot of commands to be compatible with PS unchecked commands now is rejected to avoid serever crash sql/sql_select.cc: allow empty result for PS preparing sql/sql_union.cc: fixed cleunup procedure to be compatible sith DO/SET (BUG#3393) sql/sql_update.cc: fixed update to use correct tables lists (BUG#3408) sql/table.h: flag to support multi update tables check (BUG#3408) tests/client_test.c: removed unsupported tables fixed show table test added new tests
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index e3ed2a4cbd8..b357c0c96f2 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -2528,6 +2528,24 @@ int set_var::check(THD *thd)
}
+int set_var::light_check(THD *thd)
+{
+ if (var->check_type(type))
+ {
+ my_error(type == OPT_GLOBAL ? ER_LOCAL_VARIABLE : ER_GLOBAL_VARIABLE,
+ MYF(0),
+ var->name);
+ return -1;
+ }
+ if ((type == OPT_GLOBAL && check_global_access(thd, SUPER_ACL)))
+ return 1;
+
+ if (value && (value->fix_fields(thd, 0, &value) || value->check_cols(1)))
+ return -1;
+ return 0;
+}
+
+
int set_var::update(THD *thd)
{
if (!value)
@@ -2555,6 +2573,16 @@ int set_var_user::check(THD *thd)
}
+int set_var_user::light_check(THD *thd)
+{
+ /*
+ Item_func_set_user_var can't substitute something else on its place =>
+ 0 can be passed as last argument (reference on item)
+ */
+ return (user_var_item->fix_fields(thd, 0, (Item**) 0));
+}
+
+
int set_var_user::update(THD *thd)
{
if (user_var_item->update())