summaryrefslogtreecommitdiff
path: root/mysql-test/t/flush-innodb-notembedded.test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-02-02 10:00:36 +0100
committerSergei Golubchik <sergii@pisem.net>2014-02-02 10:00:36 +0100
commitd929342b0f8d5a85aac4e76486b0ff2aff7ca54f (patch)
treee14f3a61137bf5d0adc190262c26fa62d2c02ec0 /mysql-test/t/flush-innodb-notembedded.test
parent65121806da41ba0354c53b0b8ea22445c71ea33b (diff)
downloadmariadb-git-d929342b0f8d5a85aac4e76486b0ff2aff7ca54f.tar.gz
Merge the server part of MySQL WL#5522 - InnoDB transportable tablespaces.
Syntax. Server support. Test cases. InnoDB bugfixes: * don't mess around with system sprintf's, always use my_error() for errors. * don't use InnoDB internal error codes where OS error codes are expected. * don't say "file not found", when it was.
Diffstat (limited to 'mysql-test/t/flush-innodb-notembedded.test')
-rw-r--r--mysql-test/t/flush-innodb-notembedded.test69
1 files changed, 69 insertions, 0 deletions
diff --git a/mysql-test/t/flush-innodb-notembedded.test b/mysql-test/t/flush-innodb-notembedded.test
new file mode 100644
index 00000000000..d08a0647ff5
--- /dev/null
+++ b/mysql-test/t/flush-innodb-notembedded.test
@@ -0,0 +1,69 @@
+--source include/have_innodb.inc
+--source include/not_embedded.inc
+
+--echo # Test 7: Check privileges required.
+--echo #
+
+CREATE DATABASE db1;
+CREATE TABLE db1.t1 (a INT) engine= InnoDB;
+GRANT RELOAD, SELECT, LOCK TABLES ON *.* TO user1@localhost;
+GRANT CREATE, DROP ON *.* TO user2@localhost;
+GRANT RELOAD, SELECT ON *.* TO user3@localhost;
+GRANT SELECT, LOCK TABLES ON *.* TO user4@localhost;
+GRANT RELOAD, LOCK TABLES ON *.* TO user5@localhost;
+
+--echo # Connection con1 as user1
+--connect(con1, localhost, user1)
+FLUSH TABLE db1.t1 FOR EXPORT;
+UNLOCK TABLES;
+--disconnect con1
+--source include/wait_until_disconnected.inc
+
+--echo # Connection default
+--connection default
+
+--echo # Connection con1 as user2
+--connect(con1, localhost, user2)
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+FLUSH TABLE db1.t1 FOR EXPORT;
+--disconnect con1
+--source include/wait_until_disconnected.inc
+
+--echo # Connection default
+--connection default
+
+--echo # Connection con1 as user3
+--connect(con1, localhost, user3)
+--error ER_DBACCESS_DENIED_ERROR
+FLUSH TABLE db1.t1 FOR EXPORT;
+--disconnect con1
+--source include/wait_until_disconnected.inc
+
+--echo # Connection default
+--connection default
+
+--echo # Connection con1 as user4
+--connect(con1, localhost, user4)
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+FLUSH TABLE db1.t1 FOR EXPORT;
+--disconnect con1
+--source include/wait_until_disconnected.inc
+
+--echo # Connection default
+--connection default
+
+--echo # Connection con1 as user5
+--connect(con1, localhost, user5)
+--error ER_TABLEACCESS_DENIED_ERROR
+FLUSH TABLE db1.t1 FOR EXPORT;
+--disconnect con1
+--source include/wait_until_disconnected.inc
+
+--echo # Connection default
+--connection default
+DROP USER user1@localhost, user2@localhost, user3@localhost,
+ user4@localhost, user5@localhost;
+DROP TABLE db1.t1;
+DROP DATABASE db1;
+
+--echo # End of 5.6 tests