diff options
author | unknown <dlenev@mysql.com> | 2004-12-09 13:33:12 +0300 |
---|---|---|
committer | unknown <dlenev@mysql.com> | 2004-12-09 13:33:12 +0300 |
commit | af07ef79d40175cff51a3740208bc531c7168d44 (patch) | |
tree | 6a7ebc1a5815ac0b8548b282c7a77aea2eac03d6 /sql | |
parent | cbd5d91c087213a8215895c7fa03ee706b084581 (diff) | |
parent | 9ad51c631c7ef6d5ed4bea0b6171a98502844c81 (diff) | |
download | mariadb-git-af07ef79d40175cff51a3740208bc531c7168d44.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg6765
sql/item_strfunc.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_geofunc.cc | 1 | ||||
-rw-r--r-- | sql/item_strfunc.cc | 1 | ||||
-rw-r--r-- | sql/log.cc | 1 | ||||
-rw-r--r-- | sql/mysql_priv.h | 3 | ||||
-rw-r--r-- | sql/mysqld.cc | 1 | ||||
-rw-r--r-- | sql/repl_failsafe.cc | 1 | ||||
-rw-r--r-- | sql/set_var.cc | 1 | ||||
-rw-r--r-- | sql/sql_acl.cc | 1 | ||||
-rw-r--r-- | sql/sql_base.cc | 1 | ||||
-rw-r--r-- | sql/sql_cache.cc | 1 | ||||
-rw-r--r-- | sql/sql_class.cc | 1 | ||||
-rw-r--r-- | sql/sql_db.cc | 1 | ||||
-rw-r--r-- | sql/sql_derived.cc | 1 | ||||
-rw-r--r-- | sql/sql_do.cc | 1 | ||||
-rw-r--r-- | sql/sql_insert.cc | 1 | ||||
-rw-r--r-- | sql/sql_parse.cc | 10 | ||||
-rw-r--r-- | sql/sql_prepare.cc | 1 | ||||
-rw-r--r-- | sql/sql_repl.cc | 1 | ||||
-rw-r--r-- | sql/sql_show.cc | 1 | ||||
-rw-r--r-- | sql/sql_update.cc | 1 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 1 | ||||
-rw-r--r-- | sql/tztime.h | 6 |
22 files changed, 12 insertions, 26 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index 7c3319bbfea..2f00416bddf 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -24,7 +24,6 @@ #include "mysql_priv.h" #ifdef HAVE_SPATIAL -#include "sql_acl.h" #include <m_ctype.h> void Item_geometry_func::fix_length_and_dec() diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 893126b7fe6..a58e00a1b39 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -25,7 +25,6 @@ #endif #include "mysql_priv.h" -#include "sql_acl.h" #include <m_ctype.h> #ifdef HAVE_OPENSSL #include <openssl/des.h> diff --git a/sql/log.cc b/sql/log.cc index 6c3ba68165c..3a420866025 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -23,7 +23,6 @@ #endif #include "mysql_priv.h" -#include "sql_acl.h" #include "sql_repl.h" #include "ha_innodb.h" // necessary to cut the binlog when crash recovery diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index cefc77cb5d4..8350122c4e2 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -350,7 +350,6 @@ inline THD *_current_thd(void) #include "sql_udf.h" class user_var_entry; #include "item.h" -#include "tztime.h" typedef Comp_creator* (*chooser_compare_func_creator)(bool invert); /* sql_parse.cc */ void free_items(Item *item); @@ -371,6 +370,8 @@ int create_table_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *create_table); Item *negate_expression(THD *thd, Item *expr); #include "sql_class.h" +#include "sql_acl.h" +#include "tztime.h" #include "opt_range.h" #ifdef HAVE_QUERY_CACHE diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 607dd6a101a..9343c79c9f0 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -17,7 +17,6 @@ #include "mysql_priv.h" #include <m_ctype.h> #include <my_dir.h> -#include "sql_acl.h" #include "slave.h" #include "sql_repl.h" #include "repl_failsafe.h" diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 356ec80608c..85a51ba9b51 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -20,7 +20,6 @@ #include "repl_failsafe.h" #include "sql_repl.h" #include "slave.h" -#include "sql_acl.h" #include "log_event.h" #include <mysql.h> diff --git a/sql/set_var.cc b/sql/set_var.cc index 79be4dc1c46..b92ceadf15f 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -55,7 +55,6 @@ #include "mysql_priv.h" #include <mysql.h> #include "slave.h" -#include "sql_acl.h" #include <my_getopt.h> #include <thr_alarm.h> #include <myisam.h> diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 8cc4bf7ea43..bfecec90237 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -26,7 +26,6 @@ */ #include "mysql_priv.h" -#include "sql_acl.h" #include "hash_filo.h" #ifdef HAVE_REPLICATION #include "sql_repl.h" //for tables_ok() diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 64e616e872f..05b11646cd7 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -18,7 +18,6 @@ /* Basic functions needed by many modules */ #include "mysql_priv.h" -#include "sql_acl.h" #include "sql_select.h" #include <m_ctype.h> #include <my_dir.h> diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 1bf8d179770..0e2058d73e9 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -300,7 +300,6 @@ TODO list: #include <m_ctype.h> #include <my_dir.h> #include <hash.h> -#include "sql_acl.h" #include "ha_myisammrg.h" #ifndef MASTER #include "../srclib/myisammrg/myrg_def.h" diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 65dbde2a225..7512e661ea7 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -27,7 +27,6 @@ #endif #include "mysql_priv.h" -#include "sql_acl.h" #include <m_ctype.h> #include <sys/stat.h> #include <thr_alarm.h> diff --git a/sql/sql_db.cc b/sql/sql_db.cc index e3ca0328382..ccf3b55d2fb 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -19,7 +19,6 @@ #include "mysql_priv.h" #include <mysys_err.h> -#include "sql_acl.h" #include <my_dir.h> #include <m_ctype.h> #ifdef __WIN__ diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 3259e0a4f22..9475ec08c96 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -23,7 +23,6 @@ #include "mysql_priv.h" #include "sql_select.h" -#include "sql_acl.h" static int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *s, TABLE_LIST *t); diff --git a/sql/sql_do.cc b/sql/sql_do.cc index 0d4529fb29e..af72632199f 100644 --- a/sql/sql_do.cc +++ b/sql/sql_do.cc @@ -18,7 +18,6 @@ /* Execute DO statement */ #include "mysql_priv.h" -#include "sql_acl.h" int mysql_do(THD *thd, List<Item> &values) { diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index d53ad4a8102..768acb0cf9e 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -18,7 +18,6 @@ /* Insert of records */ #include "mysql_priv.h" -#include "sql_acl.h" static int check_null_fields(THD *thd,TABLE *entry); #ifndef EMBEDDED_LIBRARY diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index d160da102ce..e73c3d95b42 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -15,7 +15,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "mysql_priv.h" -#include "sql_acl.h" #include "sql_repl.h" #include "repl_failsafe.h" #include <m_ctype.h> @@ -3591,7 +3590,7 @@ error: /* Check grants for commands which work only with one table and all other - tables belong to subselects. + tables belonging to subselects or implicitly opened tables. SYNOPSIS check_one_table_access() @@ -3613,7 +3612,7 @@ int check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *tables) if (grant_option && check_grant(thd, privilege, tables, 0, 1, 0)) return 1; - /* Check rights on tables of subselect (if exists) */ + /* Check rights on tables of subselects and implictly opened tables */ TABLE_LIST *subselects_tables; if ((subselects_tables= tables->next)) { @@ -5202,7 +5201,10 @@ int multi_update_precheck(THD *thd, TABLE_LIST *tables) DBUG_PRINT("info",("Checking sub query list")); for (table= tables; table; table= table->next) { - if (table->table_in_update_from_clause) + if (my_tz_check_n_skip_implicit_tables(&table, + lex->time_zone_tables_used)) + continue; + else if (table->table_in_update_from_clause) { /* If we check table by local TABLE_LIST copy then we should copy diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 637bb48b2cf..bcb9d18d827 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -68,7 +68,6 @@ Long data handling: ***********************************************************************/ #include "mysql_priv.h" -#include "sql_acl.h" #include "sql_select.h" // for JOIN #include <m_ctype.h> // for isspace() #ifdef EMBEDDED_LIBRARY diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index bbcea537ff1..6854cb24ee9 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -18,7 +18,6 @@ #ifdef HAVE_REPLICATION #include "sql_repl.h" -#include "sql_acl.h" #include "log_event.h" #include <my_dir.h> diff --git a/sql/sql_show.cc b/sql/sql_show.cc index ff0d943a717..ba13dd1ff04 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -19,7 +19,6 @@ #include "mysql_priv.h" #include "sql_select.h" // For select_describe -#include "sql_acl.h" #include "repl_failsafe.h" #include <my_dir.h> diff --git a/sql/sql_update.cc b/sql/sql_update.cc index a52da469d9d..6fc68142a12 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -21,7 +21,6 @@ */ #include "mysql_priv.h" -#include "sql_acl.h" #include "sql_select.h" static bool safe_update_on_fly(JOIN_TAB *join_tab, List<Item> *fields); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index e525fb2478a..1b629e72ecc 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -32,7 +32,6 @@ #define Select Lex->current_select #include "mysql_priv.h" #include "slave.h" -#include "sql_acl.h" #include "lex_symbol.h" #include "item_create.h" #include <myisam.h> diff --git a/sql/tztime.h b/sql/tztime.h index 9f969639bd0..2214c1b29d6 100644 --- a/sql/tztime.h +++ b/sql/tztime.h @@ -66,8 +66,8 @@ extern void my_tz_free(); /* - Check if we have pointer to the beggining of list of implictly used - time zone tables and fast-forward to its end. + Check if we have pointer to the begining of list of implicitly used time + zone tables, set SELECT_ACL for them and fast-forward to its end. SYNOPSIS my_tz_check_n_skip_implicit_tables() @@ -87,6 +87,8 @@ inline bool my_tz_check_n_skip_implicit_tables(TABLE_LIST **table, { if (*table == tz_tables) { + for (int i= 0; i < 4; i++) + (*table)[i].grant.privilege= SELECT_ACL; (*table)+= 3; return TRUE; } |