Migration 031_remove_duplicated_locations.py fails with DB2

Bug #1287087 reported by Ma Wen Cheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Ma Wen Cheng

Bug Description

glance-manage db_sync

2014-03-03 03:09:03.899 18584 CRITICAL glance [-] ProgrammingError: (ProgrammingError) ibm_db_dbi::ProgrammingError: SQLNumResultCols failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0104N An unexpected token "AND" was found following ".meta_data) AND true". Expected tokens may include: "<interval_qualifier>". SQLSTATE=42601 SQLCODE=-104 'SELECT image_locations_1.id \nFROM image_locations AS image_locations_1 \nWHERE image_locations_1.id > (SELECT min(image_locations.id) AS min_1 \nFROM image_locations \nWHERE image_locations.image_id = image_locations_1.image_id AND image_locations."value" = image_locations_1."value" AND image_locations.meta_data = image_locations_1.meta_data) AND true AND image_locations_1.deleted = ?' ('0',)

Tags: db2
Ma Wen Cheng (mars914)
Changed in glance:
assignee: nobody → Ma Wen Cheng (mars914)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/77546

Matt Riedemann (mriedem)
tags: added: db2
summary: - glance-manage db_sync failed in X bvt
+ Migration 031_remove_duplicated_locations.py fails with DB2
Zhi Yan Liu (lzy-dev)
Changed in glance:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/77546
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=e687098cf14e7e83e2c7c4252c895324e6735e24
Submitter: Jenkins
Branch: master

commit e687098cf14e7e83e2c7c4252c895324e6735e24
Author: Wen Cheng Ma <email address hidden>
Date: Mon Mar 3 17:49:15 2014 +0800

    Fix glance db migration failed on 031

    In fact, the first where expression has filtered the duplicated locations,
    and the second filters the locations which have more than 1 rows, so the
    second result set is included in the first.
    In DB2, if the boolean of where expression is true, it will throw error.
    So remove the second where expression to fix glance db migration failed on 031.

    Fixes bug #1287087

    Change-Id: Id485b6d20696e989d10f3759011387137543918a

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → icehouse-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: icehouse-rc1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.