1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Patch for netBSD

Added warning for tables where the auto_increment key is 0
Fixed DELETE ... LIMIT 0
Fixed UPDATE ..LIMIT 0
This commit is contained in:
monty@tik.mysql.fi
2001-07-16 03:04:30 +03:00
parent cc35643e1c
commit bf9876a195
16 changed files with 128 additions and 24 deletions

View File

@@ -170,12 +170,13 @@ int mysql_delete(THD *thd,TABLE_LIST *table_list,COND *conds,ha_rows limit,
select=make_select(table,0,0,conds,&error);
if (error)
DBUG_RETURN(-1);
if (select && select->check_quick(test(thd->options & SQL_SAFE_UPDATES),
limit))
if ((select && select->check_quick(test(thd->options & SQL_SAFE_UPDATES),
limit)) ||
!limit)
{
delete select;
send_ok(&thd->net,0L);
DBUG_RETURN(0);
DBUG_RETURN(0); // Nothing to delete
}
/* If running in safe sql mode, don't allow updates without keys */