16 lines
586 B
Plaintext
16 lines
586 B
Plaintext
CREATE SCHEMA s1;
|
|
CREATE TABLE s1.t1(c1 INTEGER, c2 INTEGER, KEY k1(c1), KEY k2(c2));
|
|
INSERT INTO s1.t1 VALUES (1,10), (2,20), (3,30);
|
|
CREATE USER u1@localhost;
|
|
HANDLER s1.t1 OPEN;
|
|
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table 't1'
|
|
GRANT SELECT(c1) ON s1.t1 TO u1@localhost;
|
|
HANDLER s1.t1 OPEN AS t1;
|
|
HANDLER t1 READ k1 FIRST;
|
|
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table 't1'
|
|
HANDLER t1 READ k1=(1,10);
|
|
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table 't1'
|
|
DROP USER u1@localhost;
|
|
DROP TABLE s1.t1;
|
|
DROP SCHEMA s1;
|