The following patch allows glance to create its database. It seems
subsequent queries must be quoted correctly as the service functions
once the DB is created.


https://paste.ubuntu.com/p/yZ7yJwHsqQ/
Index: glance/glance/db/sqlalchemy/alembic_migrations/add_images_tables.py
===================================================================
--- glance.orig/glance/db/sqlalchemy/alembic_migrations/add_images_tables.py
+++ glance/glance/db/sqlalchemy/alembic_migrations/add_images_tables.py
@@ -134,7 +134,7 @@ def _add_image_members_table():
     op.create_table('image_members',
                     Column('id', Integer(), nullable=False),
                     Column('image_id', String(length=36), nullable=False),
-                    Column('member', String(length=255), nullable=False),
+                    Column('`member`', String(length=255), nullable=False),
                     Column('can_share', Boolean(), nullable=False),
                     Column('created_at', DateTime(), nullable=False),
                     Column('updated_at', DateTime(), nullable=True),
@@ -147,7 +147,7 @@ def _add_image_members_table():
                     ForeignKeyConstraint(['image_id'], ['images.id'], ),
                     PrimaryKeyConstraint('id'),
                     UniqueConstraint('image_id',
-                                     'member',
+                                     '`member`',
                                      'deleted_at',
                                      name=deleted_member_constraint),
                     mysql_engine='InnoDB',
@@ -164,7 +164,7 @@ def _add_image_members_table():
                     unique=False)
     op.create_index('ix_image_members_image_id_member',
                     'image_members',
-                    ['image_id', 'member'],
+                    ['image_id', '`member`'],
                     unique=False)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1846548

Title:
  Glance manage db_sync fails with MySQL 8

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glance/+bug/1846548/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to