summaryrefslogtreecommitdiff
path: root/sql/sql_sequence.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-06-02 16:51:13 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-06-02 16:51:13 +0300
commit4b3c3e526e7067da921d0aef8451b6e2736a5fe0 (patch)
tree40a6d851d7c39c443c587e29a725afda85c65929 /sql/sql_sequence.cc
parente7de50a82187cbaaa192c2065d64c0041cd9a6a1 (diff)
parent96f4b4a55b449a29af7e4b70bebf0ff238ae7f80 (diff)
downloadmariadb-git-4b3c3e526e7067da921d0aef8451b6e2736a5fe0.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_sequence.cc')
-rw-r--r--sql/sql_sequence.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc
index 7ef30641888..07571c3bbac 100644
--- a/sql/sql_sequence.cc
+++ b/sql/sql_sequence.cc
@@ -309,6 +309,11 @@ bool sequence_insert(THD *thd, LEX *lex, TABLE_LIST *org_table_list)
DBUG_RETURN(TRUE);
}
+#ifdef WITH_WSREP
+ if (WSREP_ON && seq->cache != 0)
+ WSREP_WARN("CREATE SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
+#endif
+
/* If not temporary table */
if (!temporary_table)
{
@@ -901,12 +906,18 @@ bool Sql_cmd_alter_sequence::execute(THD *thd)
No_such_table_error_handler no_such_table_handler;
DBUG_ENTER("Sql_cmd_alter_sequence::execute");
+
if (check_access(thd, ALTER_ACL, first_table->db.str,
&first_table->grant.privilege,
&first_table->grant.m_internal,
0, 0))
DBUG_RETURN(TRUE); /* purecov: inspected */
+#ifdef WITH_WSREP
+ if (WSREP_ON && new_seq->cache != 0)
+ WSREP_WARN("ALTER SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
+#endif
+
if (check_grant(thd, ALTER_ACL, first_table, FALSE, 1, FALSE))
DBUG_RETURN(TRUE); /* purecov: inspected */