Bug 1561400
| Summary: | Test case failure: /CoreOS/unixODBC/mysql-simple | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Karel Volný <kvolny> | ||||
| Component: | mysql-connector-odbc | Assignee: | Michal Schorm <mschorm> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Karel Volný <kvolny> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.5-Alt | CC: | acaringi, databases-maint, hhorak, jjanco, mmuzila, praiskup, vdanek | ||||
| Target Milestone: | pre-dev-freeze | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| 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.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-10-30 10:11:14 UTC | Type: | Bug | ||||
| 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: | 1534323 | ||||||
| Attachments: |
|
||||||
|
Description
Karel Volný
2018-03-28 09:29:37 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.
Created attachment 1420467 [details]
Patch to fix the problem in s390x arch
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 *** Bug 1550611 has been marked as a duplicate of this bug. *** |