mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Corrected a test case.
This commit is contained in:
parent
eea7dd0a77
commit
2efac22463
2 changed files with 11 additions and 7 deletions
|
@ -571,11 +571,11 @@ CREATE USER evtest1@localhost;
|
|||
SET PASSWORD FOR evtest1@localhost = password('ev1');
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM evtest1@localhost;
|
||||
GRANT create, insert, select, event ON events_test.* TO evtest1@localhost;
|
||||
GRANT select,insert ON TEST.* TO evtest1@localhost;
|
||||
GRANT select,insert ON test.* TO evtest1@localhost;
|
||||
SHOW GRANTS FOR evtest1@localhost;
|
||||
Grants for evtest1@localhost
|
||||
GRANT USAGE ON *.* TO 'evtest1'@'localhost' IDENTIFIED BY PASSWORD '*3170F3644E31580C25DE4A08F4C07CC9A2D40C32'
|
||||
GRANT SELECT, INSERT ON `TEST`.* TO 'evtest1'@'localhost'
|
||||
GRANT SELECT, INSERT ON `test`.* TO 'evtest1'@'localhost'
|
||||
GRANT SELECT, INSERT, CREATE, EVENT ON `events_test`.* TO 'evtest1'@'localhost'
|
||||
connection e1;
|
||||
USE events_test;
|
||||
|
@ -585,13 +585,15 @@ SET AUTOCOMMIT = 0;
|
|||
SET @evname = 'ev_sched_1823';
|
||||
SET @cnt = 0;
|
||||
SELECT COUNT(*) INTO @cnt FROM test.event_log WHERE ev_nm = @evname;
|
||||
IF @cnt <= 6 THEN
|
||||
IF @cnt < 6 THEN
|
||||
INSERT INTO test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp());
|
||||
COMMIT;
|
||||
END IF;
|
||||
SELECT COUNT(*) INTO @cnt FROM test.event_log WHERE ev_nm = @evname;
|
||||
IF @cnt < 6 THEN
|
||||
INSERT INTO test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp());
|
||||
ROLLBACK;
|
||||
END IF;
|
||||
END;|
|
||||
connection default;
|
||||
DROP EVENT ev_sched_1823;
|
||||
|
|
|
@ -668,7 +668,7 @@ CREATE USER evtest1@localhost;
|
|||
SET PASSWORD FOR evtest1@localhost = password('ev1');
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM evtest1@localhost;
|
||||
GRANT create, insert, select, event ON events_test.* TO evtest1@localhost;
|
||||
GRANT select,insert ON TEST.* TO evtest1@localhost;
|
||||
GRANT select,insert ON test.* TO evtest1@localhost;
|
||||
SHOW GRANTS FOR evtest1@localhost;
|
||||
|
||||
--echo connection e1;
|
||||
|
@ -683,13 +683,15 @@ DO BEGIN
|
|||
SET @evname = 'ev_sched_1823';
|
||||
SET @cnt = 0;
|
||||
SELECT COUNT(*) INTO @cnt FROM test.event_log WHERE ev_nm = @evname;
|
||||
IF @cnt <= 6 THEN
|
||||
IF @cnt < 6 THEN
|
||||
INSERT INTO test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp());
|
||||
COMMIT;
|
||||
END IF;
|
||||
SELECT COUNT(*) INTO @cnt FROM test.event_log WHERE ev_nm = @evname;
|
||||
INSERT INTO test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp());
|
||||
ROLLBACK;
|
||||
IF @cnt < 6 THEN
|
||||
INSERT INTO test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp());
|
||||
ROLLBACK;
|
||||
END IF;
|
||||
END;|
|
||||
DELIMITER ;|
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue