#29544: Django 2.0.7 broke regex lookup on MariaDB -------------------------------------+------------------------------------- Reporter: Michal Čihař | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: 2.0 (models, ORM) | Severity: Release blocker | Resolution: Keywords: | Triage Stage: Ready for | checkin Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Description changed by Tim Graham:
Old description: > Since Django 2.0.7 it fails to do regexp lookups on MariaDB. The problem > is in code introduced for https://code.djangoproject.com/ticket/29451 - > it assumes that MariaDB 10.3 has REGEXP_LIKE what is not true. > > The exception is: > > {{{ > Traceback (most recent call last): > File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- > packages/django/db/backends/utils.py", line 85, in _execute > return self.cursor.execute(sql, params) > File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- > packages/django/db/backends/mysql/base.py", line 71, in execute > return self.cursor.execute(query, args) > File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- > packages/MySQLdb/cursors.py", line 250, in execute > self.errorhandler(self, exc, value) > File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- > packages/MySQLdb/connections.py", line 50, in defaulterrorhandler > raise errorvalue > File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- > packages/MySQLdb/cursors.py", line 247, in execute > res = self._query(query) > File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- > packages/MySQLdb/cursors.py", line 412, in _query > rowcount = self._do_query(q) > File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- > packages/MySQLdb/cursors.py", line 375, in _do_query > db.query(q) > File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- > packages/MySQLdb/connections.py", line 276, in query > _mysql.connection.query(self, query) > _mysql_exceptions.OperationalError: (1305, 'FUNCTION > test_weblate.REGEXP_LIKE does not exist') > }}} New description: Since Django 2.0.7 it fails to do regex lookups on MariaDB. The problem is in code introduced for #29451 - it assumes that MariaDB 10.3 has REGEXP_LIKE what is not true. The exception is: {{{ Traceback (most recent call last): File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- packages/django/db/backends/utils.py", line 85, in _execute return self.cursor.execute(sql, params) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- packages/django/db/backends/mysql/base.py", line 71, in execute return self.cursor.execute(query, args) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- packages/MySQLdb/cursors.py", line 250, in execute self.errorhandler(self, exc, value) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- packages/MySQLdb/connections.py", line 50, in defaulterrorhandler raise errorvalue File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- packages/MySQLdb/cursors.py", line 247, in execute res = self._query(query) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- packages/MySQLdb/cursors.py", line 412, in _query rowcount = self._do_query(q) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- packages/MySQLdb/cursors.py", line 375, in _do_query db.query(q) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site- packages/MySQLdb/connections.py", line 276, in query _mysql.connection.query(self, query) _mysql_exceptions.OperationalError: (1305, 'FUNCTION test_weblate.REGEXP_LIKE does not exist') }}} -- -- Ticket URL: <https://code.djangoproject.com/ticket/29544#comment:7> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/063.1891167058686e207e196279adeffc42%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.