Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
N/A
-
None
Description
The test compares access to VECTOR_INDEXES vs STATISTICS and TABLE_CONSTRAINTS: in each case a user has access to a column in the table, but not to the indexed column. The data in STATISTICS and TABLE_CONSTRAINTS remains invisible to the user, but VECTOR_INDEXES shows the info.
create database db; |
create table db.t( |
a int not null, |
b int not null, |
c int not null, |
v vector(1) not null, |
key(b), |
unique(c), |
vector(v)
|
);
|
create user u; |
grant select(a) on db.t to u; |
|
|
--connect(con1,localhost,u,,)
|
select a from db.t; |
--error ER_COLUMNACCESS_DENIED_ERROR
|
select b from db.t; |
--error ER_COLUMNACCESS_DENIED_ERROR
|
select c from db.t; |
--error ER_COLUMNACCESS_DENIED_ERROR
|
select v from db.t; |
select table_name, index_name from information_schema.statistics |
where table_schema = 'db'; |
select table_name, constraint_name from information_schema.table_constraints |
where table_schema = 'db'; |
select table_name, index_name from information_schema.vector_indexes |
where table_schema = 'db'; |
|
|
--disconnect con1
|
--connection default
|
drop database db; |
drop user u; |
|
PR 4955 7a32192edb0a2a48815f2161254d7d282aeece38 |
create database db; |
create table db.t( |
a int not null, |
b int not null, |
c int not null, |
v vector(1) not null, |
key(b), |
unique(c), |
vector(v)
|
);
|
create user u; |
grant select(a) on db.t to u; |
connect con1,localhost,u,,; |
select a from db.t; |
a
|
select b from db.t; |
ERROR 42000: SELECT command denied to user 'u'@'localhost' for column 'b' in table 't' |
select c from db.t; |
ERROR 42000: SELECT command denied to user 'u'@'localhost' for column 'c' in table 't' |
select v from db.t; |
ERROR 42000: SELECT command denied to user 'u'@'localhost' for column 'v' in table 't' |
select table_name, index_name from information_schema.statistics |
where table_schema = 'db'; |
table_name index_name
|
select table_name, constraint_name from information_schema.table_constraints |
where table_schema = 'db'; |
table_name constraint_name
|
select table_name, index_name from information_schema.vector_indexes |
where table_schema = 'db'; |
table_name index_name
|
t v
|
disconnect con1;
|
connection default; |
drop database db; |
drop user u; |
Attachments
Issue Links
- is caused by
-
MDEV-34805 provide various information about vector indexes
-
- In Testing
-