DELETE Without Predicate is Not Supported

Bug #1020324 reported by Padraig O'Sullivan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Akiban SQL Parser
Fix Released
Medium
Mike McMahon

Bug Description

server revision: 1824

employees=> create table t1(id int not null primary key);
CREATE TABLE
employees=> insert into t1 values (1), (2), (3);
INSERT 0 3
employees=> select * from t1;
 id
----
  1
  2
  3
(3 rows)

employees=> delete from t1;
ERROR: Encountered " ";" "; "" at line 1, column 15.
Was expecting one of:
    "as" ...
    <IDENTIFIER> ...
    <BACKQUOTED_IDENTIFIER> ...
    <DOUBLEQUOTED_IDENTIFIER> ...

LINE 1: delete from t1;
                      ^
employees=> delete from t1 where 1=1;
DELETE 3
employees=> select * from t1;
 id
----
(0 rows)

employees=>

Since TRUNCATE is not supported would be nice to able to easily delete all data from the table (unless we want to add support for TRUNCATE which would be nicer).

Tags: indiedb
Revision history for this message
Timothy Wegner (timmwegner) wrote :

Proserv feels this is not an urgent requirement so set the priority to moderate and marked for a future release.

Changed in akiban-server:
importance: Undecided → Medium
milestone: none → future
Changed in akiban-server:
assignee: nobody → Mike McMahon (mmcm)
Revision history for this message
Nathan Williams (nwilliams) wrote :

Note: TRUNCATE is now supported.

Changed in akiban-server:
status: New → Triaged
Mike McMahon (mmcm)
affects: akiban-server → akiban-sql-parser
Changed in akiban-sql-parser:
milestone: future → none
Changed in akiban-sql-parser:
milestone: none → 1.0.4
status: Triaged → Fix Committed
Changed in akiban-sql-parser:
status: Fix Committed → Fix Released
Changed in akiban-sql-parser:
milestone: 1.0.4 → 1.3.2
Mike McMahon (mmcm)
Changed in akiban-server:
status: New → Fix Released
information type: Private → Public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.