mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge bk-internal.mysql.com:/data0/bk/tmp_reg
into bk-internal.mysql.com:/data0/bk/mysql-5.1
This commit is contained in:
@ -3070,9 +3070,7 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables,
|
||||
table->field[5]->store("",0, cs);
|
||||
table->field[5]->set_notnull();
|
||||
}
|
||||
pos=(byte*) ((flags & NOT_NULL_FLAG) &&
|
||||
field->type() != FIELD_TYPE_TIMESTAMP ?
|
||||
"NO" : "YES");
|
||||
pos=(byte*) ((flags & NOT_NULL_FLAG) ? "NO" : "YES");
|
||||
table->field[6]->store((const char*) pos,
|
||||
strlen((const char*) pos), cs);
|
||||
is_blob= (field->type() == FIELD_TYPE_BLOB);
|
||||
@ -3549,31 +3547,18 @@ static int get_schema_views_record(THD *thd, struct st_table_list *tables,
|
||||
if (tables->view)
|
||||
{
|
||||
Security_context *sctx= thd->security_ctx;
|
||||
ulong grant= SHOW_VIEW_ACL;
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
char *save_table_name= tables->table_name;
|
||||
if (!my_strcasecmp(system_charset_info, tables->definer.user.str,
|
||||
sctx->priv_user) &&
|
||||
!my_strcasecmp(system_charset_info, tables->definer.host.str,
|
||||
sctx->priv_host))
|
||||
grant= SHOW_VIEW_ACL;
|
||||
else
|
||||
if (!tables->allowed_show)
|
||||
{
|
||||
tables->table_name= tables->view_name.str;
|
||||
if (check_access(thd, SHOW_VIEW_ACL , base_name,
|
||||
&tables->grant.privilege, 0, 1,
|
||||
test(tables->schema_table)))
|
||||
grant= get_table_grant(thd, tables);
|
||||
else
|
||||
grant= tables->grant.privilege;
|
||||
if (!my_strcasecmp(system_charset_info, tables->definer.user.str,
|
||||
sctx->priv_user) &&
|
||||
!my_strcasecmp(system_charset_info, tables->definer.host.str,
|
||||
sctx->priv_host))
|
||||
tables->allowed_show= TRUE;
|
||||
}
|
||||
tables->table_name= save_table_name;
|
||||
#endif
|
||||
|
||||
restore_record(table, s->default_values);
|
||||
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)
|
||||
if (tables->allowed_show)
|
||||
{
|
||||
char buff[2048];
|
||||
String qwe_str(buff, sizeof(buff), cs);
|
||||
|
Reference in New Issue
Block a user