diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2003-06-17 16:20:07 +0300 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2003-06-17 16:20:07 +0300 |
commit | 231b0ff8dd13dc39a1ab94ed7c24b4a2d40e9c1c (patch) | |
tree | ca9c79a3f741e378a3b6085b4189b4cfa23f140d /sql/sql_parse.cc | |
parent | c9505d8fc1d82d4af9240e394ee7a7c8105b426b (diff) | |
download | mariadb-git-231b0ff8dd13dc39a1ab94ed7c24b4a2d40e9c1c.tar.gz |
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>
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 2f9a7db5ef4..392b4ae4235 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -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 */ + } } } } |