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

No error when no index is created #5526

Closed
pgulutzan opened this issue Nov 16, 2020 · 0 comments · Fixed by #7889
Closed

No error when no index is created #5526

pgulutzan opened this issue Nov 16, 2020 · 0 comments · Fixed by #7889
Assignees
Labels
2.10 Target is 2.10 and all newer release/master branches bug Something isn't working sql

Comments

@pgulutzan
Copy link
Contributor

I have Ubuntu 18.04.
I have Tarantool 2.5, pulled from source today.
I execute these requests:

box.execute([[DROP TABLE add;]])
s=""
s = "CREATE TABLE add (c0 INT PRIMARY KEY"
for i=1,128 do
s = s .. ", c" .. i .. " INT UNIQUE"
end
s = s .. ");"
box.execute(s)
box.execute([[SELECT COUNT(*) FROM "_vindex" WHERE "id" = (SELECT "id" FROM "_vspace" WHERE "name" = 'ADD');]])
box.execute([[INSERT INTO add (c0, c127) VALUES (1, 1);]])
box.execute([[INSERT INTO add (c0, c127) VALUES (2, 1);]])
box.execute([[INSERT INTO add (c0, c128) VALUES (3, 1);]])
box.execute([[INSERT INTO add (c0, c128) VALUES (4, 1);]])

The result of box.execute(s) is: okay.
The result of the SELECT is: 128.
The result of the INSERTs shows: c128 does not have a unique index.
In other words: I create a table with BOX_INDEX_MAX+1 unique columns.
There is no ER_MODIFY_INDEX error but no unique index on c128.

@pgulutzan pgulutzan added the sql label Nov 16, 2020
@kyukhin kyukhin added the bug Something isn't working label Jul 13, 2021
@kyukhin kyukhin added this to the wishlist milestone Jul 13, 2021
@kyukhin kyukhin removed this from the wishlist milestone Sep 20, 2022
@ImeevMA ImeevMA self-assigned this Nov 3, 2022
ImeevMA added a commit to ImeevMA/tarantool that referenced this issue Nov 3, 2022
Prior to this patch, there was no error of creating too many indexes in
SQL. This led to a situation where indexes with IDs greater than
BOX_INDEX_MAX were not created, but no error was thrown. For example, in
the case of CREATE TABLE, only indexes with an ID less than
BOX_INDEX_MAX were created. Now an error is thrown when creating too
many indexes.

Closes tarantool#5526

NO_DOC=bugfix
ImeevMA added a commit to ImeevMA/tarantool that referenced this issue Nov 3, 2022
Prior to this patch, there was no error of creating too many indexes in
SQL. This led to a situation where indexes with IDs greater than
BOX_INDEX_MAX were not created, but no error was thrown. For example, in
the case of CREATE TABLE, only indexes with an ID less than
BOX_INDEX_MAX were created. Now an error is thrown when creating too
many indexes.

Closes tarantool#5526

NO_DOC=bugfix
ImeevMA added a commit to ImeevMA/tarantool that referenced this issue Nov 7, 2022
Prior to this patch, there was no error of creating too many indexes in
SQL. This led to a situation where indexes with IDs greater than
BOX_INDEX_MAX were not created, but no error was thrown. For example, in
the case of CREATE TABLE, only indexes with an ID less than
BOX_INDEX_MAX were created. Now an error is thrown when creating too
many indexes.

Closes tarantool#5526

NO_DOC=bugfix
@locker locker added the 2.10 Target is 2.10 and all newer release/master branches label Nov 7, 2022
ImeevMA added a commit to ImeevMA/tarantool that referenced this issue Nov 7, 2022
Prior to this patch, there was no error of creating too many indexes in
SQL. This led to a situation where indexes with IDs greater than
BOX_INDEX_MAX were not created, but no error was thrown. For example, in
the case of CREATE TABLE, only indexes with an ID less than
BOX_INDEX_MAX were created. Now an error is thrown when creating too
many indexes.

Closes tarantool#5526

NO_DOC=bugfix
locker pushed a commit that referenced this issue Nov 7, 2022
Prior to this patch, there was no error of creating too many indexes in
SQL. This led to a situation where indexes with IDs greater than
BOX_INDEX_MAX were not created, but no error was thrown. For example, in
the case of CREATE TABLE, only indexes with an ID less than
BOX_INDEX_MAX were created. Now an error is thrown when creating too
many indexes.

Closes #5526

NO_DOC=bugfix
locker pushed a commit that referenced this issue Nov 7, 2022
Prior to this patch, there was no error of creating too many indexes in
SQL. This led to a situation where indexes with IDs greater than
BOX_INDEX_MAX were not created, but no error was thrown. For example, in
the case of CREATE TABLE, only indexes with an ID less than
BOX_INDEX_MAX were created. Now an error is thrown when creating too
many indexes.

Closes #5526

NO_DOC=bugfix

(cherry picked from commit 2705e22)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.10 Target is 2.10 and all newer release/master branches bug Something isn't working sql
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants