sql: throw duplicate column error for a view#12197
Conversation
e85da96 to
d93b4e7
Compare
This patch fixes the bug: No duplicate column error for a view tarantool#4545. Now box.execute([[CREATE VIEW v as VIEW AS SELECT 1 AS a, 1 AS a;]]) returns an error: Space field 'a' is duplicate. This patch results in box.execute([[SELECT * FROM (SELECT 1 as a, 2 as a);]]) behaving as follows: Earler: - metadata: - name: a type: integer - name: a_1 type: integer rows: - [1, 2] Now: - metadata: - name: a type: integer - name: a type: integer rows: - [1, 1] Part of tarantool#12197 Closes tarantool#4545
c39a1de to
c239a8d
Compare
This patch fixes the bug: No duplicate column error for a view tarantool#4545. Now box.execute([[CREATE VIEW v as VIEW AS SELECT 1 AS a, 1 AS a;]]) returns an error: Space field 'a' is duplicate. This patch results in box.execute([[SELECT * FROM (SELECT 1 as a, 2 as a);]]) behaving as follows: Earler: - metadata: - name: a type: integer - name: a_1 type: integer rows: - [1, 2] Now: - metadata: - name: a type: integer - name: a type: integer rows: - [1, 1] Part of tarantool#12197 Closes tarantool#4545
ImeevMA
left a comment
There was a problem hiding this comment.
Hi! Thank you for the patch! I have a few comment, please fix them.
c239a8d to
ccfaf99
Compare
ccfaf99 to
305b8f0
Compare
ae3116d to
f39c72a
Compare
ImeevMA
left a comment
There was a problem hiding this comment.
Thank you for the fixes! I just have a few minor comments.
f39c72a to
0e438b7
Compare
4370021 to
02ca0c5
Compare
ImeevMA
left a comment
There was a problem hiding this comment.
Thank you for the fixes!
|
Please note that this fix actually allows to reproduce another bug: tarantool> box.execute([[SELECT * FROM (SELECT 1 AS a, 2 AS a);]])
---
- metadata:
- name: a
type: integer
- name: a
type: integer
rows:
- [1, 1]
...This bug will be fixed in #12263 |
This patch fixes the bug: instruction box.execute([[CREATE TABLE t (a INTEGER PRIMARY KEY, a INTEGER);]]) and instruction box.execute([[CREATE VIEW v AS SELECT 1 AS a, 1 AS a;]]) have different behaviors. Now box.execute([[CREATE VIEW v as VIEW AS SELECT 1 AS a, 1 AS a;]]) returns an error: Space field 'a' is duplicate. Closes tarantool#4545 NO_DOC=bugfix
02ca0c5 to
7c7d9df
Compare
Gerold103
left a comment
There was a problem hiding this comment.
Oh nice, it is always lovely to see so much code removed.
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/3.2
git worktree add -d .worktree/backport/release/3.2/12197 origin/release/3.2
cd .worktree/backport/release/3.2/12197
git switch --create backport/release/3.2/12197
git cherry-pick -x c704f81c24a683ef5559ac042cd36703f9fefe7c |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/3.3
git worktree add -d .worktree/backport/release/3.3/12197 origin/release/3.3
cd .worktree/backport/release/3.3/12197
git switch --create backport/release/3.3/12197
git cherry-pick -x c704f81c24a683ef5559ac042cd36703f9fefe7c |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/3.5
git worktree add -d .worktree/backport/release/3.5/12197 origin/release/3.5
cd .worktree/backport/release/3.5/12197
git switch --create backport/release/3.5/12197
git cherry-pick -x c704f81c24a683ef5559ac042cd36703f9fefe7c |
|
Successfully created backport PR for |
Backport summary
|
sql: throw duplicate column error for a view
This patch fixes the bug: instruction
box.execute([[CREATE TABLE t (a INTEGER PRIMARY KEY, a INTEGER);]])
and instruction
box.execute([[CREATE VIEW v AS SELECT 1 AS a, 1 AS a;]])
had different behaviors.
Now box.execute([[CREATE VIEW v as VIEW AS SELECT 1 AS a, 1 AS a;]])
returns an error: Space field 'a' is duplicate.
Closes #4545
NO_DOC=bugfix