From 9ab4da7018eae8fc86430c24a38f8ffb0a5951ab Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Sat, 22 Aug 2020 00:30:44 +0200 Subject: Updates for MariaDB sequences MariaDB should not run a Sequence if it has optional=True. Additionally, rework the rules in crud.py to accommodate the new combination MariaDB brings us, which is a dialect that supports both cursor.lastrowid, explicit sequences, *and* no support for returning. Co-authored-by: Mike Bayer Fixes: #5528 Change-Id: I9a8ea69a34983affa95dfd22186e2908fdf0d58c --- lib/sqlalchemy/dialects/postgresql/base.py | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/sqlalchemy/dialects/postgresql/base.py') diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 53c54ab65..07405e6d1 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -2526,7 +2526,6 @@ class PGExecutionContext(default.DefaultExecutionContext): elif column.default is None or ( column.default.is_sequence and column.default.optional ): - # execute the sequence associated with a SERIAL primary # key column. for non-primary-key SERIAL, the ID just # generates server side. -- cgit v1.2.1