Skip to content
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

Add column and select in same transaction #2919

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Add column and select in same transaction #2919

monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2011-10-30 12:58:10 +0100
From: taowen
To: SQL devs <>
Version: 11.5.7 (Aug2011-SP2) [obsolete]
CC: @njnes

Last updated: 2011-11-22 13:55:55 +0100

Comment 16501

Date: 2011-10-30 12:58:10 +0100
From: taowen

User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.2 (KHTML, like Gecko) Ubuntu/10.04 Chromium/15.0.874.102 Chrome/15.0.874.102 Safari/535.2
Build Identifier:

If in same transaction, new column being added to a existing table. Then you try to select the new column, exception will be raised. Is DDL and DML in same transaction supported, or I should always separate them in two transactions?

Reproducible: Always

Steps to Reproduce:

  1. Create table

START TRANSACTION;
CREATE TABLE a(b INTEGER);
COMMIT;

  1. Add column and select

START TRANSACTION;
ALTER TABLE a ADD COLUMN c INTEGER;
INSERT INTO a(b) VALUES(1);
SELECT c FROM a;

Actual Results:

auto commit mode: off
operation successful
1 affected row
SQLException:sql.bind:unable to find sys.a(c)

Expected Results:

No exception raised

This bug does not use SAVEPOINT feature, just normal transaction.

Comment 16532

Date: 2011-11-08 10:25:42 +0100
From: @njnes

fixed. The storage layer didn't create the update bat in this case.
Added test alter_table_add_column.Bug-2919.sql

Comment 16536

Date: 2011-11-08 13:20:58 +0100
From: @njnes

Changeset 063cb8dc1fca made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=063cb8dc1fca

Changeset description:

fixed bug #2919. We create all required bats for persistent tables again.

Comment 16566

Date: 2011-11-22 13:55:55 +0100
From: @grobian

Fixed in Aug2011-SP3

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

Successfully merging a pull request may close this issue.

None yet
1 participant