Bug 548489
| Summary: | Perl-DBD-Oracle INSERT/UPDATE to BLOBs via synonym fails | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite 5 | Reporter: | Sebastian Skracic <sskracic> | ||||
| Component: | Server | Assignee: | Justin Sherrill <jsherril> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Milan Zázrivec <mzazrivec> | ||||
| Severity: | urgent | Docs Contact: | |||||
| Priority: | urgent | ||||||
| Version: | 530 | CC: | cperry, gkhachik, jhutar, jkastner, jpazdziora | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| URL: | https://rhn.qa.redhat.com/network/systems/details/proxy.pxt | ||||||
| Whiteboard: | Fixed in the 5.4.0 Release - GA'd 2010-10-27 | ||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2010-10-28 15:03:36 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 487678 | ||||||
| Attachments: |
|
||||||
|
Description
Sebastian Skracic
2009-12-17 15:57:43 UTC
Set to Urgent/Urgent because it's a *showstopper* for RHN PHX2 migration. Was this opened against satellite intentionally? -Justin Created attachment 379034 [details]
A proposed patch to char buffer allocation problem
(In reply to comment #2) > Was this opened against satellite intentionally? > > -Justin Yes, absolutely. As I said, it's a *showstopper* for RHN PHX2 migration, rendering the Perl part of the RHN Hosted unusable in new environment. With the proposed patch above, the DBI trace shows different (and correct) output, and the LOB updates no longer fail:
lob refetch using a synonym named=rhnActionScript for RHN.RHNACTIONSCRIPT
lob refetch from table RHN.RHNACTIONSCRIPT, 8 columns:
lob refetch table col 1: 'ID' otype 2
lob refetch table col 2: 'ACTION_ID' otype 2
lob refetch table col 3: 'USERNAME' otype 1
lob refetch table col 4: 'GROUPNAME' otype 1
lob refetch table col 5: 'SCRIPT' otype 113
lob refetch table col 6: 'TIMEOUT' otype 2
lob refetch table col 7: 'CREATED' otype 12
lob refetch table col 8: 'MODIFIED' otype 12
lob refetch :script param: otype 113, matched field 'SCRIPT' by name (SCRIPT "script")
lob refetch sql: select SCRIPT "script" from RHN.RHNACTIONSCRIPT where rowid = :rid for update
Patch applied and packages built here: https://brewweb.devel.redhat.com/brew/taskinfo?taskID=2158395 I've done some minimal testing to ensure that the perl pages work. hi Justin, as a testing scenario (for bug verification): do you have in mind some concrete cases or I can just take random actions on perl pages there? thanks. The relevant cases would be triggering the Perl code to update BLOB/CLOBs in DB. In Hosted, it can be achieved throughout the process of Proxy activation. I don't know whether it's true for Satellite as well. Hey Garik, I believe proxy activation is in java in Satellite and I honestly can't find any instances of blob manipulation in perl. I would activate a proxy just to test, and try a few perl pages in different areas to verify they still work. If all that checks out, i think we're good. -Justin VERIFIED w/ Satellite-5.4.0-RHEL5-re20101001.1 / perl-DBD-Oracle-1.24a-3
* the patch mentioned in the bug report has been applied & used
* .pxt pages work without any problem
* blob manipulation works ok, used following script to verify:
#!/usr/bin/perl
use DBI;
use DBD::Oracle 'SQLT_BIN';
use strict;
use warnings;
my $dbh = DBI->connect("dbi:Oracle:rhnsat", "rhnsat", "rhnsat");
$dbh->{LongReadLen} = 20*1024*1024;
my $blob = "0101" for 1 .. 1000000;
my $sql = "insert into temporary_table_syn values (?)";
my $sth = $dbh->prepare($sql);
$sth->bind_param(1, $blob, { ora_type => SQLT_BIN });
$sth->execute();
$dbh->disconnect();
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332 RHEA-2010:0803 - RHN Tools enhancement update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333 RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334 RHEA-2010:0800 - RHN Satellite Server 5.4.0 https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335 Docs are available: http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html Regards, Clifford patch included and applied in spec file, pxt pages works, manipulating with blobs from synonyms works. The patch will go to DBD::Oracle 1.28: http://svn.perl.org/viewvc/modules?view=revision&revision=14590 |