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

Two Sprint tasks and two behaviour changes.

sql/sql_acl.cc:
  Fix for a grant bug.
  If there is a table privilege, for which no column privileges 
  are defined , and the same privilege is granted for a column, 
  new code prevents that table privilege is reduced to a column
  privilege.
  
  To accomplish that, now a REVOKE command has to be used first.
sql/sql_parse.cc:
  SCRUM TASK No 1.
  
  Adding support for INSERT .. SELECT with a table in the join
  that is to be inserted into.
  
  test case pending.
sql/sql_union.cc:
  Changing behaviour for SQL_OPTION_FOUND_ROWS in unins.
sql/sql_yacc.yy:
  SCRUM TASK no 2.
  
  Making CREATE and INSERT to work with any UNION>
This commit is contained in:
unknown
2003-06-17 16:20:07 +03:00
parent c9505d8fc1
commit 231b0ff8dd
4 changed files with 66 additions and 28 deletions

View File

@ -1959,11 +1959,6 @@ mysql_execute_command(void)
if (thd->select_limit < select_lex->select_limit)
thd->select_limit= HA_POS_ERROR; // No limit
if (check_dup(tables->db, tables->real_name, tables->next))
{
net_printf(&thd->net,ER_INSERT_TABLE_USED,tables->real_name);
DBUG_VOID_RETURN;
}
{
/* TODO: Delete the following loop when locks is set by sql_yacc */
TABLE_LIST *table;
@ -3361,8 +3356,16 @@ TABLE_LIST *add_table_to_list(Table_ident *table, LEX_STRING *alias,
{
if (!strcmp(alias_str,tables->alias) && !strcmp(ptr->db, tables->db))
{
net_printf(&thd->net,ER_NONUNIQ_TABLE,alias_str); /* purecov: tested */
DBUG_RETURN(0); /* purecov: tested */
if ((thd->lex.sql_command & (SQLCOM_INSERT_SELECT | SQLCOM_REPLACE_SELECT))
&& (tables->lock_type & (TL_WRITE_CONCURRENT_INSERT |
TL_WRITE_LOW_PRIORITY | TL_WRITE_DELAYED |
TL_WRITE)))
thd->lex.select->options |= OPTION_BUFFER_RESULT;
else
{
net_printf(&thd->net,ER_NONUNIQ_TABLE,alias_str); /* purecov: tested */
DBUG_RETURN(0); /* purecov: tested */
}
}
}
}