Bug 568293 - ORA-01422: exact fetch returns more than requested number of rows
Summary: ORA-01422: exact fetch returns more than requested number of rows
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 0.8
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Garik Khachikyan
URL:
Whiteboard:
Depends On:
Blocks: space10 613996
TreeView+ depends on / blocked
 
Reported: 2010-02-25 10:20 UTC by Michael Mráka
Modified: 2015-01-04 21:57 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
: 613996 (view as bug list)
Environment:
Last Closed: 2010-05-10 14:52:26 UTC
Embargoed:


Attachments (Terms of Use)
bz568293-fix.sql (3.60 KB, text/plain)
2010-03-02 11:01 UTC, Michael Mráka
no flags Details
bz568293-fix.sql (3.96 KB, text/plain)
2010-03-02 13:19 UTC, Michael Mráka
no flags Details

Description Michael Mráka 2010-02-25 10:20:23 UTC
Description of problem:
After 0.7 -> 0.8 upgrade spacewalk-repo-sync ends up with ORA-01422: exact fetch returns more than requested number of rows.
Actually it's a bug in schema upgrade script which created duplicated entries in rhnChecksum table.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. install spacewalk 0.7 + create a channel
2. push spacewalk-pxt-0.7.8-1.el5.noarch.rpm and spacewalk-base-minimal-0.7.8-1.el5.noarch.rpm to the channel
3. perform upgrade to 0.8
4. push spacewalk-pxt-0.8.17-1.el5.noarch to the channel
  
Actual results:
Traceback and ORA-01422: exact fetch returns more than requested number of rows

Expected results:
no error, package pushed

Additional info:

Comment 1 Michael Mráka 2010-03-01 23:13:29 UTC
The bug is not present in sql upgrade scripts but update-packages script and it applies to sha256 packages only.

New steps to reproduce:
1. install spacewalk 0.7 + create a channel
2. push spacewalk-pxt-0.7.8-1.fc12.noarch.rpm and
spacewalk-base-minimal-0.7.8-1.fc12.noarch.rpm to the channel
3. perform upgrade to 0.8
4. push spacewalk-pxt-0.8.17-1.fc12.noarch to the channel

Comment 3 Michael Mráka 2010-03-02 11:01:18 UTC
Created attachment 397296 [details]
bz568293-fix.sql

This is an sql script to fix duplicates in database.

As root run
# sqlplus $(spacewalk-cfg-get default_db) @bz568293-fix.sql

Comment 4 Michael Mráka 2010-03-02 13:19:19 UTC
Created attachment 397321 [details]
bz568293-fix.sql

New version which also creates unique constraint.

Comment 5 Michael Mráka 2010-03-03 15:32:32 UTC
spacewalk-schema-0.8.15-1  contains fixed schema.

Test plan:

1) see comment #1 for steps to reproduce
make sure you have spacewalk-schema-0.8.12-1.el5.noarch installed to reproduce the error
after applying bz568293-fix.sql rhnpush and/or spacewalk-repo-sync have to work again

2) when installed spacewalk-schema-0.8.15-1 error should be never raised while
doing comment #1 for steps to reproduce

Comment 7 Garik Khachikyan 2010-03-09 11:03:02 UTC
# REOPEN

Hi Michael,

Going through the second scenario (yum install spacewalk-oracle-0.8.1-1.el5; rpm -Uvh http://koji.rhndev.redhat.com/mnt/koji/packages/spacewalk-schema/0.8.15/1.el5/noarch/spacewalk-schema-0.8.15-1.el5.noarch.rpm; spacewalk-setup) there seems the issue not fixed still...

I'll keep the current SW 0.8 installation for your reproducer/investigations. Contact me for details to get access to that server. Thanks.

Comment 15 Michael Mráka 2010-05-10 14:52:26 UTC
This bug has been fixed in Spacewalk 1.0.


Note You need to log in before you can comment on or make changes to this bug.