Below is the list of changes that have just been committed into a local
5.0 repository of bell. When bell does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1954 05/09/14 13:37:40 bell@stripped +2 -0
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-owner2-5.0
sql/share/errmsg.txt
1.44 05/09/14 13:37:36 bell@stripped +2 -2
merge
sql/sql_yacc.yy
1.425 05/09/14 13:34:43 bell@stripped +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: bell
# Host: sanja.is.com.ua
# Root: /home/bell/mysql/bk/work-owner2-5.0/RESYNC
--- 1.424/sql/sql_yacc.yy 2005-09-14 11:53:55 +03:00
+++ 1.425/sql/sql_yacc.yy 2005-09-14 13:34:43 +03:00
@@ -826,10 +826,11 @@
precision subselect_start opt_and charset
subselect_end select_var_list select_var_list_init help opt_len
opt_extended_describe
- prepare prepare_src execute deallocate
+ prepare prepare_src execute deallocate
statement sp_suid opt_view_list view_list or_replace algorithm
sp_c_chistics sp_a_chistics sp_chistic sp_c_chistic xa
load_data opt_field_or_var_spec fields_or_vars opt_load_data_set_spec
+ view_user view_suid
END_OF_INPUT
%type <NONE> call sp_proc_stmts sp_proc_stmts1 sp_proc_stmt
@@ -1257,16 +1258,16 @@
YYTHD->client_capabilities |= CLIENT_MULTI_QUERIES;
sp->restore_thd_mem_root(YYTHD);
}
- | CREATE or_replace algorithm VIEW_SYM table_ident
+ | CREATE or_replace algorithm view_user view_suid VIEW_SYM table_ident
{
THD *thd= YYTHD;
LEX *lex= thd->lex;
lex->sql_command= SQLCOM_CREATE_VIEW;
/* first table in list is target VIEW name */
- if (!lex->select_lex.add_table_to_list(thd, $5, NULL, 0))
+ if (!lex->select_lex.add_table_to_list(thd, $7, NULL, 0))
YYABORT;
}
- opt_view_list AS select_init check_option
+ opt_view_list AS select_view_init check_option
{}
| CREATE TRIGGER_SYM sp_name trg_action_time trg_event
ON table_ident FOR_SYM EACH_SYM ROW_SYM
@@ -3419,16 +3420,16 @@
lex->sql_command= SQLCOM_ALTER_FUNCTION;
lex->spname= $3;
}
- | ALTER algorithm VIEW_SYM table_ident
+ | ALTER algorithm view_user view_suid VIEW_SYM table_ident
{
THD *thd= YYTHD;
LEX *lex= thd->lex;
lex->sql_command= SQLCOM_CREATE_VIEW;
lex->create_view_mode= VIEW_ALTER;
/* first table in list is target VIEW name */
- lex->select_lex.add_table_to_list(thd, $4, NULL, 0);
+ lex->select_lex.add_table_to_list(thd, $6, NULL, 0);
}
- opt_view_list AS select_init check_option
+ opt_view_list AS select_view_init check_option
{}
;
@@ -3996,6 +3997,18 @@
|
'(' select_paren ')' union_opt;
+select_view_init:
+ SELECT_SYM remember_name select_init2
+ {
+ Lex->create_view_select_start= $2;
+ }
+ |
+ '(' remember_name select_paren ')' union_opt
+ {
+ Lex->create_view_select_start= $2;
+ }
+ ;
+
select_paren:
SELECT_SYM select_part2
{
@@ -8898,6 +8911,53 @@
| ALGORITHM_SYM EQ TEMPTABLE_SYM
{ Lex->create_view_algorithm= VIEW_ALGORITHM_TMPTABLE; }
;
+
+view_user:
+ /* empty */
+ {
+ THD *thd= YYTHD;
+ if (!(thd->lex->create_view_definer=
+ (LEX_USER*) thd->alloc(sizeof(st_lex_user))))
+ YYABORT;
+ if (default_view_definer(thd, thd->lex->create_view_definer))
+ YYABORT;
+ }
+ | CURRENT_USER optional_braces
+ {
+ THD *thd= YYTHD;
+ if (!(thd->lex->create_view_definer=
+ (LEX_USER*) thd->alloc(sizeof(st_lex_user))))
+ YYABORT;
+ if (default_view_definer(thd, thd->lex->create_view_definer))
+ YYABORT;
+ }
+ | DEFINER_SYM EQ ident_or_text '@' ident_or_text
+ {
+ THD *thd= YYTHD;
+ st_lex_user *view_user;
+ if (!(thd->lex->create_view_definer= view_user=
+ (LEX_USER*) thd->alloc(sizeof(st_lex_user))))
+ YYABORT;
+ view_user->user = $3; view_user->host=$5;
+ if (strchr(view_user->host.str, wild_many) ||
+ strchr(view_user->host.str, wild_one))
+ {
+ my_error(ER_NO_VIEW_USER, MYF(0));
+ YYABORT;
+ }
+ }
+ ;
+
+view_suid:
+ /* empty */
+ { Lex->create_view_suid= TRUE; }
+ |
+ SQL_SYM SECURITY_SYM DEFINER_SYM
+ { Lex->create_view_suid= TRUE; }
+ | SQL_SYM SECURITY_SYM INVOKER_SYM
+ { Lex->create_view_suid= FALSE; }
+ ;
+
check_option:
/* empty */
{ Lex->create_view_check= VIEW_CHECK_NONE; }
--- 1.43/sql/share/errmsg.txt 2005-09-13 18:16:05 +03:00
+++ 1.44/sql/share/errmsg.txt 2005-09-14 13:37:36 +03:00
@@ -5405,3 +5405,11 @@
eng "The prepared statement contains a stored routine call that refers to that same statement. It's not allowed to execute a prepared statement in such a recursive manner"
ER_SP_CANT_SET_AUTOCOMMIT
eng "Not allowed to set autocommit from a stored function or trigger"
+ER_NO_VIEW_USER
+ eng "View definer is not fully qualified"
+ER_VIEW_FRM_NO_USER
+ eng "View %-.64s.%-.64s has not definer information (old table format). Current user is used as definer. Please recreate view!"
+ER_VIEW_OTHER_USER
+ eng "You need the SUPER privilege for creation view with %-.64s@%-.64s definer"
+ER_NO_SUCH_USER
+ eng "There is not %-.64s@%-.64s registered"
| Thread |
|---|
| • bk commit into 5.0 tree (bell:1.1954) | sanja | 14 Sep |