1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge zippy.(none):/home/cmiller/work/mysql/merge/tmp_merge

into  zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1


libmysqld/lib_sql.cc:
  Auto merged
libmysqld/libmysqld.c:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/gis.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/sp-security.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/gis.test:
  Auto merged
mysql-test/t/sp-security.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_geofunc.h:
  Auto merged
sql-common/client.c:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
storage/ndb/include/kernel/GlobalSignalNumbers.h:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  Auto merged
mysql-test/t/mysqldump.test:
  Manual merge.  (Seems to need null-merging.)
sql/mysqld.cc:
  Manual merge + formatting change.
sql/sql_show.cc:
  Manual merge
This commit is contained in:
unknown
2006-07-10 17:20:39 -04:00
13 changed files with 221 additions and 36 deletions

View File

@ -71,6 +71,10 @@ static TYPELIB grant_types = { sizeof(grant_names)/sizeof(char **),
static void store_key_options(THD *thd, String *packet, TABLE *table,
KEY *key_info);
static void
append_algorithm(TABLE_LIST *table, String *buff);
/***************************************************************************
** List all table types supported
***************************************************************************/
@ -1422,6 +1426,28 @@ static void store_key_options(THD *thd, String *packet, TABLE *table,
void
view_store_options(THD *thd, TABLE_LIST *table, String *buff)
{
append_algorithm(table, buff);
append_definer(thd, buff, &table->definer.user, &table->definer.host);
if (table->view_suid)
buff->append(STRING_WITH_LEN("SQL SECURITY DEFINER "));
else
buff->append(STRING_WITH_LEN("SQL SECURITY INVOKER "));
}
/*
Append DEFINER clause to the given buffer.
SYNOPSIS
append_definer()
thd [in] thread handle
buffer [inout] buffer to hold DEFINER clause
definer_user [in] user name part of definer
definer_host [in] host name part of definer
*/
static void append_algorithm(TABLE_LIST *table, String *buff)
{
buff->append(STRING_WITH_LEN("ALGORITHM="));
switch ((int8)table->algorithm) {
@ -1437,11 +1463,6 @@ view_store_options(THD *thd, TABLE_LIST *table, String *buff)
default:
DBUG_ASSERT(0); // never should happen
}
append_definer(thd, buff, &table->definer.user, &table->definer.host);
if (table->view_suid)
buff->append(STRING_WITH_LEN("SQL SECURITY DEFINER "));
else
buff->append(STRING_WITH_LEN("SQL SECURITY INVOKER "));
}
/*
@ -3517,7 +3538,16 @@ static int get_schema_views_record(THD *thd, struct st_table_list *tables,
table->field[1]->store(tables->view_db.str, tables->view_db.length, cs);
table->field[2]->store(tables->view_name.str, tables->view_name.length, cs);
if (grant & SHOW_VIEW_ACL)
table->field[3]->store(tables->query.str, tables->query.length, cs);
{
char buff[2048];
String qwe_str(buff, sizeof(buff), cs);
qwe_str.length(0);
qwe_str.append(STRING_WITH_LEN("/* "));
append_algorithm(tables, &qwe_str);
qwe_str.append(STRING_WITH_LEN("*/ "));
qwe_str.append(tables->query.str, tables->query.length);
table->field[3]->store(qwe_str.ptr(), qwe_str.length(), cs);
}
if (tables->with_check != VIEW_CHECK_NONE)
{