Opened 17 years ago
Closed 14 years ago
#80 closed defect (fixed)
Incomplete DELETE SQL
Reported by: | mloskot | Owned by: | haris |
---|---|---|---|
Priority: | major | Milestone: | 3.4.0 |
Component: | KingOracle Provider | Version: | 3.2.0 |
Severity: | 3 | Keywords: | |
Cc: | External ID: |
Description
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
DELETE <table>;
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);
Change History (2)
comment:1 by , 16 years ago
Milestone: | 3.3.0 → 3.3.1 |
---|
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.