RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1561400 - Test case failure: /CoreOS/unixODBC/mysql-simple
Summary: Test case failure: /CoreOS/unixODBC/mysql-simple
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: mysql-connector-odbc
Version: 7.5-Alt
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: pre-dev-freeze
: ---
Assignee: Michal Schorm
QA Contact: Karel Volný
URL:
Whiteboard:
: 1550611 (view as bug list)
Depends On:
Blocks: 1534323
TreeView+ depends on / blocked
 
Reported: 2018-03-28 09:29 UTC by Karel Volný
Modified: 2020-07-15 06:07 UTC (History)
7 users (show)

Fixed In Version: mysql-connector-odbc-5.2.5-8.el7
Doc Type: Bug Fix
Doc Text:
Cause: Unnecessary linking of odbc library to the driver. Consequence: On architecture s390x running a trivial query using isql leads to unexpected error: Could not SQLConnect Fix: Drops the linking of odbc library to the driver. Result: Command finish successfully.
Clone Of:
Environment:
Last Closed: 2018-10-30 10:11:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to fix the problem in s390x arch (1.73 KB, patch)
2018-04-11 16:18 UTC, Augusto Caringi
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1550611 0 medium CLOSED Test case failure: /CoreOS/unixODBC/mariadb-simple 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2018:3116 0 None None None 2018-10-30 10:11:17 UTC

Internal Links: 1550611

Description Karel Volný 2018-03-28 09:29:37 UTC
Filed from caserun https://tcms.engineering.redhat.com/run/328473/#caserun_17084424

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

Steps to Reproduce: 
run the test /CoreOS/unixODBC/mysql-simple


Actual results: 
:: [ 12:13:18 ] :: [  BEGIN   ] :: Run a trivial query using isql :: actually running '/usr/bin/isql MySQL root -v &> test.out <<EOF
select 123 * 456;
quit
EOF'
:: [ 12:13:18 ] :: [   FAIL   ] :: Run a trivial query using isql (Expected 0, got 1)
[ISQL]ERROR: Could not SQLConnect



running the test manually, pausing around the isql command and trying to connect via mysql client, there is no problem, the server is running, database 'test' exists ...



putting

Setup           = /usr/lib64/libodbcmyS.so

explicitly to odbcinst.ini doesn't help


note that this issue is observed on s390x and aarch64 only (not expressed in the Hardware filed of Bugzilla as it doesn't allow to specify multiple choices)

Comment 3 Karel Volný 2018-04-10 07:10:48 UTC
switching to mysql-connector-odbc as per acaringi's email which I quote below:


    In the end, the root cause is the same as described by Pavel here:

    https://bugzilla.redhat.com/show_bug.cgi?id=1029454

    A difference in behavior of s390x dynamic linker compared with other
architectures.

    I'll give a simplified example:

    The Driver Manager (unixODBC) has 3 different SQLConnect functions:

    $ nm -D /usr/lib64/libodbc.so|grep SQLConnect
    00000000000103e0 T SQLConnect
    0000000000011210 T SQLConnectA
    000000000002cfe0 T SQLConnectW

    And the driver (mysql connector odbc) has only one (this is not a
problem):

    $ nm -D /usr/lib64/libmyodbc5w.so|grep SQLConnect
    0000000000057780 T SQLConnectW

    In x86_64, when the driver manager dlopen the driver, it sets some
pointers like that:

    sqlConnect = NULL
    sqlConnectA = NULL
    sqlConnectW = SQLConnectW

    The driver manager uses a blacklist table, as explained by Pavel, to
not point the pointers to their own functions (with same names as the
driver functions).

    But this is not working on s390x due to differences in linker behavior
(related to the addresses of functions).

    So, the result was:

    sqlConnect = SQLConnect (wrongly, from Driver Manager)
    sqlConnectA = SQLConnectA (wrongly, from Driver Manager)
    sqlConnectW = SQLConnectW (from driver)

    This was happening also because the driver was being linked
against libodbc.so (which is not needed).

    So, the simplest way to fix the problem is just drop the linking with
this library from mysql connector odbc.

    In upstream and in version of mysql connector odbc in Fedora 27
(5.3.10), this is already fixed.

Comment 5 Augusto Caringi 2018-04-11 16:18:39 UTC
Created attachment 1420467 [details]
Patch to fix the problem in s390x arch

Comment 10 errata-xmlrpc 2018-10-30 10:11:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3116

Comment 11 Honza Horak 2020-07-15 06:07:38 UTC
*** Bug 1550611 has been marked as a duplicate of this bug. ***


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