1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

New multi-table-update code

New (simpler) internal timestamp handling.
More debuging to heap tables.
Small cleanups to multi-table-delete
false -> 0 and true -> 1  (We should use TRUE and FALSE)
This commit is contained in:
monty@mashka.mysql.fi
2002-11-29 16:40:18 +02:00
parent fa7798596d
commit 6603d75213
29 changed files with 776 additions and 636 deletions

View File

@ -1942,8 +1942,8 @@ static key_map get_key_map_from_key_list(TABLE *table,
}
/****************************************************************************
** This just drops in all fields instead of current '*' field
** Returns pointer to last inserted field if ok
This just drops in all fields instead of current '*' field
Returns pointer to last inserted field if ok
****************************************************************************/
bool
@ -1957,21 +1957,26 @@ insert_fields(THD *thd,TABLE_LIST *tables, const char *db_name,
for (; tables ; tables=tables->next)
{
TABLE *table=tables->table;
if (grant_option && !thd->master_access &&
check_grant_all_columns(thd,SELECT_ACL,table) )
DBUG_RETURN(-1);
if (!table_name || (!strcmp(table_name,tables->alias) &&
(!db_name || !strcmp(tables->db,db_name))))
{
/* Ensure that we have access right to all columns */
if (grant_option && !thd->master_access &&
check_grant_all_columns(thd,SELECT_ACL,table) )
DBUG_RETURN(-1);
Field **ptr=table->field,*field;
thd->used_tables|=table->map;
while ((field = *ptr++))
{
Item_field *item= new Item_field(field);
if (!found++)
(void) it->replace(item);
(void) it->replace(item); // Replace '*'
else
it->after(item);
/*
Mark if field used before in this select.
Used by 'insert' to verify if a field name is used twice
*/
if (field->query_id == thd->query_id)
thd->dupp_field=field;
field->query_id=thd->query_id;