Skip to content

Fix Returning support #2854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

bmalrat
Copy link
Contributor

@bmalrat bmalrat commented Oct 4, 2021

Hello

This will fix #2720
I tested it with the sample https://www.sqlite.org/lang_returning.html

CREATE TABLE t0(
  a INTEGER PRIMARY KEY,
  b DATE DEFAULT CURRENT_TIMESTAMP,
  c INTEGER
);
INSERT INTO t0(c) VALUES(random()) RETURNING *;

and with row:

INSERT INTO t0(c) VALUES(random()),(random()),(random()),(random()),(random()) RETURNING *;

The bug was in the row loader that try to append "LIMIT 49999 OFFSET 0" but it's not a SELECT

@bmalrat bmalrat changed the title Fix Returning support Draft: Fix Returning support Oct 4, 2021
@bmalrat
Copy link
Contributor Author

bmalrat commented Oct 4, 2021

I spotted some other bug with DELETE that didn't commit the change and the change buttons are not affected.
I will try to rework it.

@bmalrat bmalrat changed the title Draft: Fix Returning support Fix Returning support Oct 4, 2021
@bmalrat
Copy link
Contributor Author

bmalrat commented Oct 4, 2021

My rework fixed the
DELETE FROM t0 RETURNING *;

@justinclift
Copy link
Member

@MKleusberg Should this be merged? 😄

@lucydodo lucydodo force-pushed the master branch 3 times, most recently from 4bc0c36 to e0a000c Compare July 2, 2023 13:12
mgrojo pushed a commit that referenced this pull request Sep 6, 2023
@mgrojo
Copy link
Member

mgrojo commented Sep 6, 2023

I've finally included this in 299666d, but it hasn't been detected by GitHub as a merge of this pull request, because it was cherry-picked, squashed and modified to remove compilation problems due to incompatibility to current code. I'll close this as finished, then. Thanks, @bmalrat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RETURNING keyword not implemented?
3 participants