Ticket #80 (closed defect: fixed)
Incomplete DELETE SQL
|Reported by:||mloskot||Owned by:||haris|
According to my knowledge about Oracle SQL syntax, I'm inclined to judge there is a bug in the implementation of FdoIDelete command in the King Oracle.
In file c_KgOraDelete.cpp, line 60, the SQL command is built as follows:
sqlstr.AppendString("DELETE "); sqlstr.AppendString(fultablename); sqlstr.AppendString(" "); sqlstr.AppendString(table_alias);
IMO, there is missing FROM token.
It's possible to use
syntax but only if all rows are being deleted, as equivalent to
DELETE FROM <table>;
But, in the provider, it's possible to have filter, so the syntax should always use FROM token, to make the SQL working with deletions of both, all and selected rows.
Summarizing, IMO the code should look as follows:
sqlstr.AppendString("DELETE FROM "); sqlstr.AppendString(fultablename); sqlstr.AppendString(" "); sqlstr.AppendString(table_alias);