summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sql_sequence
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-10-05 22:10:38 +0200
committerSergei Golubchik <serg@mariadb.org>2017-10-06 12:28:56 +0200
commit2d2f857fb371ada237bad3fb2f470c613cdf5da2 (patch)
treeb4771169e7266360a28e994cf15b0097310050bc /mysql-test/suite/sql_sequence
parente59d080ffa233edeffdfe860444874e748289563 (diff)
downloadmariadb-git-2d2f857fb371ada237bad3fb2f470c613cdf5da2.tar.gz
fixes for --embeddedmariadb-10.3.2
Diffstat (limited to 'mysql-test/suite/sql_sequence')
-rw-r--r--mysql-test/suite/sql_sequence/alter.result38
-rw-r--r--mysql-test/suite/sql_sequence/alter.test34
-rw-r--r--mysql-test/suite/sql_sequence/alter_notembedded.result38
-rw-r--r--mysql-test/suite/sql_sequence/alter_notembedded.test37
4 files changed, 75 insertions, 72 deletions
diff --git a/mysql-test/suite/sql_sequence/alter.result b/mysql-test/suite/sql_sequence/alter.result
index 0fca8b7c02b..0400843c98a 100644
--- a/mysql-test/suite/sql_sequence/alter.result
+++ b/mysql-test/suite/sql_sequence/alter.result
@@ -238,41 +238,3 @@ select next value for t1;
next value for t1
90
drop sequence t1;
-
-GRANT
-
-create database s_db;
-create sequence s_db.s1;
-grant select on s_db.s1 to normal_1@'%' identified by 'pass';
-connect m_normal_1, localhost, normal_1, pass, s_db;
-select * from s1;
-next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
-1 1 9223372036854775806 1 1 1000 0 0
-select nextval(s1);
-ERROR 42000: INSERT command denied to user 'normal_1'@'localhost' for table 's1'
-show create sequence s1;
-Table Create Table
-s1 CREATE SEQUENCE `s1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=MyISAM
-alter sequence s1 restart 50;
-ERROR 42000: ALTER command denied to user 'normal_1'@'localhost' for table 's1'
-connection default;
-grant insert on s_db.s1 to normal_1@'%';
-connection m_normal_1;
-select nextval(s1);
-nextval(s1)
-1
-alter sequence s1 restart 50;
-ERROR 42000: ALTER command denied to user 'normal_1'@'localhost' for table 's1'
-connection default;
-grant alter on s_db.s1 to normal_1@'%';
-connection m_normal_1;
-alter sequence s1 restart 50;
-select nextval(s1);
-nextval(s1)
-50
-drop sequence s1;
-ERROR 42000: DROP command denied to user 'normal_1'@'localhost' for table 's1'
-connection default;
-disconnect m_normal_1;
-drop database s_db;
-drop user normal_1@'%';
diff --git a/mysql-test/suite/sql_sequence/alter.test b/mysql-test/suite/sql_sequence/alter.test
index a05a3e2e78b..fd1809ccd2f 100644
--- a/mysql-test/suite/sql_sequence/alter.test
+++ b/mysql-test/suite/sql_sequence/alter.test
@@ -139,37 +139,3 @@ select next value for t1;
alter sequence t1 restart with 90;
select next value for t1;
drop sequence t1;
-
---echo
---echo GRANT
---echo
-
-create database s_db;
-create sequence s_db.s1;
-grant select on s_db.s1 to normal_1@'%' identified by 'pass';
-
-connect(m_normal_1, localhost, normal_1, pass, s_db);
-select * from s1;
---error ER_TABLEACCESS_DENIED_ERROR
-select nextval(s1);
-show create sequence s1;
---error ER_TABLEACCESS_DENIED_ERROR
-alter sequence s1 restart 50;
-connection default;
-grant insert on s_db.s1 to normal_1@'%';
-connection m_normal_1;
-select nextval(s1);
---error ER_TABLEACCESS_DENIED_ERROR
-alter sequence s1 restart 50;
-connection default;
-grant alter on s_db.s1 to normal_1@'%';
-connection m_normal_1;
-alter sequence s1 restart 50;
-select nextval(s1);
---error ER_TABLEACCESS_DENIED_ERROR
-drop sequence s1;
-
-connection default;
-disconnect m_normal_1;
-drop database s_db;
-drop user normal_1@'%';
diff --git a/mysql-test/suite/sql_sequence/alter_notembedded.result b/mysql-test/suite/sql_sequence/alter_notembedded.result
new file mode 100644
index 00000000000..25b33dd742b
--- /dev/null
+++ b/mysql-test/suite/sql_sequence/alter_notembedded.result
@@ -0,0 +1,38 @@
+#
+# GRANT
+#
+create database s_db;
+create sequence s_db.s1;
+grant select on s_db.s1 to normal_1@'%' identified by 'pass';
+connect m_normal_1, localhost, normal_1, pass, s_db;
+select * from s1;
+next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
+1 1 9223372036854775806 1 1 1000 0 0
+select nextval(s1);
+ERROR 42000: INSERT command denied to user 'normal_1'@'localhost' for table 's1'
+show create sequence s1;
+Table Create Table
+s1 CREATE SEQUENCE `s1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=MyISAM
+alter sequence s1 restart 50;
+ERROR 42000: ALTER command denied to user 'normal_1'@'localhost' for table 's1'
+connection default;
+grant insert on s_db.s1 to normal_1@'%';
+connection m_normal_1;
+select nextval(s1);
+nextval(s1)
+1
+alter sequence s1 restart 50;
+ERROR 42000: ALTER command denied to user 'normal_1'@'localhost' for table 's1'
+connection default;
+grant alter on s_db.s1 to normal_1@'%';
+connection m_normal_1;
+alter sequence s1 restart 50;
+select nextval(s1);
+nextval(s1)
+50
+drop sequence s1;
+ERROR 42000: DROP command denied to user 'normal_1'@'localhost' for table 's1'
+connection default;
+disconnect m_normal_1;
+drop database s_db;
+drop user normal_1@'%';
diff --git a/mysql-test/suite/sql_sequence/alter_notembedded.test b/mysql-test/suite/sql_sequence/alter_notembedded.test
new file mode 100644
index 00000000000..a7c37b53473
--- /dev/null
+++ b/mysql-test/suite/sql_sequence/alter_notembedded.test
@@ -0,0 +1,37 @@
+--source include/have_sequence.inc
+--source include/have_innodb.inc
+--source include/not_embedded.inc
+
+--echo #
+--echo # GRANT
+--echo #
+
+create database s_db;
+create sequence s_db.s1;
+grant select on s_db.s1 to normal_1@'%' identified by 'pass';
+
+connect(m_normal_1, localhost, normal_1, pass, s_db);
+select * from s1;
+--error ER_TABLEACCESS_DENIED_ERROR
+select nextval(s1);
+show create sequence s1;
+--error ER_TABLEACCESS_DENIED_ERROR
+alter sequence s1 restart 50;
+connection default;
+grant insert on s_db.s1 to normal_1@'%';
+connection m_normal_1;
+select nextval(s1);
+--error ER_TABLEACCESS_DENIED_ERROR
+alter sequence s1 restart 50;
+connection default;
+grant alter on s_db.s1 to normal_1@'%';
+connection m_normal_1;
+alter sequence s1 restart 50;
+select nextval(s1);
+--error ER_TABLEACCESS_DENIED_ERROR
+drop sequence s1;
+
+connection default;
+disconnect m_normal_1;
+drop database s_db;
+drop user normal_1@'%';