Commit 183200ab authored by unknown's avatar unknown

after-merging fix


mysql-test/r/events_trans.result:
  result fixed
mysql-test/r/windows.result:
  merging fix
mysql-test/t/events_trans.test:
  moved to events_trans_notembedded.test
mysql-test/r/events_trans_notembedded.result:
  New BitKeeper file ``mysql-test/r/events_trans_notembedded.result''
mysql-test/t/events_trans_notembedded.test:
  New BitKeeper file ``mysql-test/t/events_trans_notembedded.test''
parent 746ffa83
drop database if exists events_test;
drop database if exists mysqltest_db2;
drop database if exists mysqltest_no_such_database;
create database events_test;
use events_test;
......@@ -116,44 +115,4 @@ a
OK: create event: database does not exist
delete from t1;
commit work;
grant create, insert, select, delete on mysqltest_db2.*
to mysqltest_user1@localhost;
create database mysqltest_db2;
set autocommit=off;
select @@autocommit;
@@autocommit
0
create table t1 (a varchar(255)) engine=innodb;
begin work;
insert into t1 (a) values ("OK: create event: insufficient privileges");
create event e1 on schedule every 1 day do select 1;
ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2'
rollback work;
select * from t1;
a
OK: create event: insufficient privileges
delete from t1;
commit work;
begin work;
insert into t1 (a) values ("OK: alter event: insufficient privileges");
alter event e1 on schedule every 1 day do select 1;
ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2'
rollback work;
select * from t1;
a
OK: alter event: insufficient privileges
delete from t1;
commit work;
begin work;
insert into t1 (a) values ("OK: drop event: insufficient privileges");
drop event e1;
ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2'
rollback work;
select * from t1;
a
OK: drop event: insufficient privileges
delete from t1;
commit work;
drop user mysqltest_user1@localhost;
drop database mysqltest_db2;
drop database events_test;
drop database if exists events_test;
drop database if exists mysqltest_db2;
create database events_test;
use events_test;
grant create, insert, select, delete on mysqltest_db2.*
to mysqltest_user1@localhost;
create database mysqltest_db2;
set autocommit=off;
select @@autocommit;
@@autocommit
0
create table t1 (a varchar(255)) engine=innodb;
begin work;
insert into t1 (a) values ("OK: create event: insufficient privileges");
create event e1 on schedule every 1 day do select 1;
ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2'
rollback work;
select * from t1;
a
OK: create event: insufficient privileges
delete from t1;
commit work;
begin work;
insert into t1 (a) values ("OK: alter event: insufficient privileges");
alter event e1 on schedule every 1 day do select 1;
ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2'
rollback work;
select * from t1;
a
OK: alter event: insufficient privileges
delete from t1;
commit work;
begin work;
insert into t1 (a) values ("OK: drop event: insufficient privileges");
drop event e1;
ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2'
rollback work;
select * from t1;
a
OK: drop event: insufficient privileges
delete from t1;
commit work;
drop user mysqltest_user1@localhost;
drop database mysqltest_db2;
drop database events_test;
......@@ -35,9 +35,9 @@ PARTITION BY RANGE (MONTH(SALES_DATE))
(
PARTITION p0 VALUES LESS THAN (2) ENGINE=INNODB
data DIRECTORY='c:/tmp/'
index DIRECTORY = 'c:/tmp/',
index DIRECTORY = 'c:/tmp/',
PARTITION p1 VALUES LESS THAN (3) ENGINE=INNODB
data DIRECTORY='c:/tmp/'
index DIRECTORY = 'c:/tmp/'
index DIRECTORY = 'c:/tmp/'
);
drop table t1;
......@@ -4,7 +4,6 @@
-- source include/have_innodb.inc
--disable_warnings
drop database if exists events_test;
drop database if exists mysqltest_db2;
drop database if exists mysqltest_no_such_database;
--enable_warnings
create database events_test;
......@@ -108,49 +107,6 @@ rollback work;
select * from t1;
delete from t1;
commit work;
#
# Privilege checks
#
grant create, insert, select, delete on mysqltest_db2.*
to mysqltest_user1@localhost;
create database mysqltest_db2;
connect (conn1,localhost,mysqltest_user1,,mysqltest_db2);
set autocommit=off;
# Sanity check
select @@autocommit;
create table t1 (a varchar(255)) engine=innodb;
# Not enough privileges to CREATE EVENT
begin work;
insert into t1 (a) values ("OK: create event: insufficient privileges");
--error ER_DBACCESS_DENIED_ERROR
create event e1 on schedule every 1 day do select 1;
rollback work;
select * from t1;
delete from t1;
commit work;
# Not enough privileges to ALTER EVENT
begin work;
insert into t1 (a) values ("OK: alter event: insufficient privileges");
--error ER_DBACCESS_DENIED_ERROR
alter event e1 on schedule every 1 day do select 1;
rollback work;
select * from t1;
delete from t1;
commit work;
# Not enough privileges to DROP EVENT
begin work;
insert into t1 (a) values ("OK: drop event: insufficient privileges");
--error ER_DBACCESS_DENIED_ERROR
drop event e1;
rollback work;
select * from t1;
delete from t1;
commit work;
# Cleanup
disconnect conn1;
connection default;
drop user mysqltest_user1@localhost;
drop database mysqltest_db2;
#
# Cleanup
......
#
# Tests that require transactions
#
-- source include/not_embedded.inc
-- source include/have_innodb.inc
--disable_warnings
drop database if exists events_test;
drop database if exists mysqltest_db2;
--enable_warnings
create database events_test;
use events_test;
#
# Privilege checks
#
grant create, insert, select, delete on mysqltest_db2.*
to mysqltest_user1@localhost;
create database mysqltest_db2;
connect (conn1,localhost,mysqltest_user1,,mysqltest_db2);
set autocommit=off;
# Sanity check
select @@autocommit;
create table t1 (a varchar(255)) engine=innodb;
# Not enough privileges to CREATE EVENT
begin work;
insert into t1 (a) values ("OK: create event: insufficient privileges");
--error ER_DBACCESS_DENIED_ERROR
create event e1 on schedule every 1 day do select 1;
rollback work;
select * from t1;
delete from t1;
commit work;
# Not enough privileges to ALTER EVENT
begin work;
insert into t1 (a) values ("OK: alter event: insufficient privileges");
--error ER_DBACCESS_DENIED_ERROR
alter event e1 on schedule every 1 day do select 1;
rollback work;
select * from t1;
delete from t1;
commit work;
# Not enough privileges to DROP EVENT
begin work;
insert into t1 (a) values ("OK: drop event: insufficient privileges");
--error ER_DBACCESS_DENIED_ERROR
drop event e1;
rollback work;
select * from t1;
delete from t1;
commit work;
# Cleanup
disconnect conn1;
connection default;
drop user mysqltest_user1@localhost;
drop database mysqltest_db2;
#
# Cleanup
#
drop database events_test;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment