Commit aa95f0d4 authored by unknown's avatar unknown
Browse files

Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0

into  sanja.is.com.ua:/home/bell/mysql/bk/work-owner5-5.0


sql/ha_innodb.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/item_func.cc:
  merge
parents 92e2dbb6 3fe752f5
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -532,10 +532,9 @@ void *create_embedded_thd(int client_flag, char *db)
int check_embedded_connection(MYSQL *mysql)
{
  THD *thd= (THD*)mysql->thd;
  thd->host= (char*)my_localhost;
  thd->host_or_ip= thd->host;
  thd->user= my_strdup(mysql->user, MYF(0));
  thd->priv_user= thd->user;
  st_security_context *sctx= thd->security_ctx;
  sctx->host_or_ip= sctx->host= (char*)my_localhost;
  sctx->priv_user= sctx->user= my_strdup(mysql->user, MYF(0));
  return check_user(thd, COM_CONNECT, NULL, 0, thd->db, true);
}

+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ call foo4();
Got one of the listed errors
show warnings;
Level	Code	Message
Error	1142	INSERT command denied to user 'zedjzlcsjhd'@'localhost' for table 't1'
Error	1142	INSERT command denied to user 'zedjzlcsjhd'@'127.0.0.1' for table 't1'
Warning	1417	A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes
alter procedure foo4 sql security invoker;
call foo4();
+10 −6
Original line number Diff line number Diff line
@@ -563,25 +563,29 @@ innobase_mysql_print_thd(
				   use the default max length */
{
	const THD*	thd;
        const Security_context *sctx;
	const char*	s;

        thd = (const THD*) input_thd;
        /* We probably want to have original user as part of debug output. */
        sctx = &thd->main_security_ctx;


  	fprintf(f, "MySQL thread id %lu, query id %lu",
		thd->thread_id, (ulong) thd->query_id);
	if (thd->host) {
	if (sctx->host) {
		putc(' ', f);
		fputs(thd->host, f);
		fputs(sctx->host, f);
	}

	if (thd->ip) {
	if (sctx->ip) {
		putc(' ', f);
		fputs(thd->ip, f);
		fputs(sctx->ip, f);
	}

  	if (thd->user) {
        if (sctx->user) {
		putc(' ', f);
		fputs(thd->user, f);
		fputs(sctx->user, f);
  	}

	if ((s = thd->proc_info)) {
+2 −2
Original line number Diff line number Diff line
@@ -3443,8 +3443,8 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
                            VIEW_ANY_ACL)))
    {
      my_error(ER_COLUMNACCESS_DENIED_ERROR, MYF(0),
               "ANY", thd->priv_user, thd->host_or_ip,
               field_name, tab);
               "ANY", thd->security_ctx->priv_user,
               thd->security_ctx->host_or_ip, field_name, tab);
      goto error;
    }
  }
+2 −2
Original line number Diff line number Diff line
@@ -4713,7 +4713,7 @@ Item_func_sp::execute(Item **itp)
  Sub_statement_state statement_state;

#ifndef NO_EMBEDDED_ACCESS_CHECKS
  st_sp_security_context save_ctx;
  Security_context *save_ctx;
#endif

  if (! m_sp && ! (m_sp= sp_find_function(thd, m_name, TRUE)))
@@ -4743,7 +4743,7 @@ Item_func_sp::execute(Item **itp)
		 ER(ER_FAILED_ROUTINE_BREAK_BINLOG));

#ifndef NO_EMBEDDED_ACCESS_CHECKS
  sp_restore_security_context(thd, m_sp, &save_ctx);
  sp_restore_security_context(thd, save_ctx);
#endif

error:
Loading