Migrating localized page relations fails with SQL error

RESOLVED FIXED

Status

RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: lorchard, Unassigned)

Tracking

Details

(Whiteboard: u=developer c=wiki s=2012-05-08 p=1)

(Reporter)

Description

7 years ago
Just saw this error after running migration on my laptop, and I think nmaul has seen this happening on staging in the cronjob:

Traceback (most recent call last):
  File "./manage.py", line 51, in <module>
    execute_manager(settings)
  File "/vagrant/vendor/src/django/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/vagrant/vendor/src/django/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/vagrant/vendor/src/django/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/vagrant/vendor/src/django/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/vagrant/apps/dekicompat/management/commands/migrate_to_kuma_wiki.py", line 207, in handle
    rows = self.gather_pages()
  File "/vagrant/apps/dekicompat/management/commands/migrate_to_kuma_wiki.py", line 438, in gather_pages
    self.cur.execute("SELECT count(*) FROM pages %s" % where)
  File "/vagrant/vendor/src/django/django/db/backends/util.py", line 15, in execute
    return self.cursor.execute(sql, params)
  File "/vagrant/vendor/src/django/django/db/backends/mysql/base.py", line 86, in execute
    return self.cursor.execute(query, args)  File "/home/vagrant/kuma-venv/lib/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
    self.errorhandler(self, exc, value)
  File "/home/vagrant/kuma-venv/lib/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler    raise errorclass, errorvalue
django.db.utils.DatabaseError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n                ORDER BY page_timestamp DESC' at line 2")
Whiteboard: u=developer c=wiki s=2012-05-08 p=1
(Reporter)

Comment 1

7 years ago
Progress: https://github.com/mozilla/kuma/pull/190

Once I got past that first SQL error, I found a series of further errors and I think squashed them all. I don't think there's a whole lot to be done for fixing those particular pages without manual edits, though.

Comment 2

7 years ago
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/bdd95a4a147e9a7eddd006210a43f850db8e9932
bug 750880: Error and perf tweaks for locale migration

https://github.com/mozilla/kuma/commit/d7cf67541fc3835031894d30a9aadb858a1aa25e
Merge pull request #190 from lmorchard/bug-750880-locale-migration-errors

bug 750880: Error and perf tweaks for locale migration
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Version: Kuma → unspecified
Component: Docs Platform → Editing
Product: Mozilla Developer Network → Mozilla Developer Network
You need to log in before you can comment on or make changes to this bug.