Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQLdb.NotSupportedError #456

Open
autoantwort opened this issue Dec 12, 2023 · 0 comments
Open

MySQLdb.NotSupportedError #456

autoantwort opened this issue Dec 12, 2023 · 0 comments

Comments

@autoantwort
Copy link

autoantwort commented Dec 12, 2023

With mariadb and version 3.7.1 and version 3.8 I get the following error:

Details

Traceback (most recent call last):
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute
   return self.cursor.execute(sql, params)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/backends/mysql/base.py", line 73, in execute
   return self.cursor.execute(query, args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/MySQLdb/cursors.py", line 179, in execute
   res = self._query(mogrified_query)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/MySQLdb/cursors.py", line 330, in _query
   db.query(q)
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/MySQLdb/connections.py", line 255, in query
   _mysql.connection.query(self, query)
MySQLdb.NotSupportedError: (1235, "This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
 File "/home/verwaltung/HiltonAdmin/manage.py", line 22, in <module>
   execute_from_command_line(sys.argv)
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
   utility.execute()
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 413, in execute
   self.fetch_command(subcommand).run_from_argv(self.argv)
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/core/management/base.py", line 354, in run_from_argv
   self.execute(*args, **cmd_options)
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/core/management/base.py", line 398, in execute
   output = self.handle(*args, **options)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/post_office/management/commands/cleanup_mail.py", line 25, in handle
   num_emails, num_attachments = cleanup_expired_mails(cutoff_date, delete_attachments, batch_size)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/post_office/utils.py", line 156, in cleanup_expired_mails
   _, deleted_data = Email.objects.filter(id__in=email_ids).delete()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/models/query.py", line 745, in delete
   collector.collect(del_query)
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/models/deletion.py", line 243, in collect
   new_objs = self.add(objs, source, nullable,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/models/deletion.py", line 107, in add
   if not objs:
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/models/query.py", line 284, in __bool__
   self._fetch_all()
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/models/query.py", line 1324, in _fetch_all
   self._result_cache = list(self._iterable_class(self))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/models/query.py", line 51, in __iter__
   results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
   cursor.execute(sql, params)
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 66, in execute
   return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
   return executor(sql, params, many, context)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 79, in _execute
   with self.db.wrap_database_errors:
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/utils.py", line 90, in __exit__
   raise dj_exc_value.with_traceback(traceback) from exc_value
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute
   return self.cursor.execute(sql, params)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/django/db/backends/mysql/base.py", line 73, in execute
   return self.cursor.execute(query, args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/MySQLdb/cursors.py", line 179, in execute
   res = self._query(mogrified_query)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/MySQLdb/cursors.py", line 330, in _query
   db.query(q)
 File "/home/verwaltung/HiltonAdmin/venv/lib/python3.11/site-packages/MySQLdb/connections.py", line 255, in query
   _mysql.connection.query(self, query)
django.db.utils.NotSupportedError: (1235, "This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'")

Which seems to be coming from #449

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant