Bug #106872 mysql-connector-odbc-8.0.28-1.el7.i686 on Linux 7 not able to make odbc connecti
Submitted: 30 Mar 2022 11:49 Modified: 8 Sep 2022 6:35
Reporter: Sunil Kumar Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version: OS:Red Hat
Assigned to: MySQL Verification Team CPU Architecture:x86

[30 Mar 2022 11:49] Sunil Kumar
Description:
I have written one test program and compiled it with both the versions of unixodbc2.25 and unixodbc latest version 2.3.9 and it was getting connected properly on with mysql-connector-odbc-8.0.28-1.el6.i686 version on both Linux7 and Linux 6.

Linux6 -indev-rhel6-3
/home/sunil.kumar/NX-10525> hn
indev-rhel6-3
/home/sunil.kumar/NX-10525> ./test1
Connected !
/home/sunil.kumar/NX-10525> ./test2
Connected !
/home/sunil.kumar/NX-10525>
Linux7 -inqa-rhel7-3
inqa-rhel7-3% ./test4
Connected !
inqa-rhel7-3% ./test5
Connected !
inqa-rhel7-3%
But when I write the same program and compile it with both the versions of unixodbc2.25 and unixodbc 2.3 version.
I installed mysql-connector-odbc-8.0.28-1.el7.i686 on Linux 7 it is not getting connected and core is dumped.

Linux7 -inqa-rhel7-4
/home/sunil.kumar/NX-10525> ./test3
Segmentation fault (core dumped)
/home/sunil.kumar/NX-10525/25Mar> ./test
Segmentation fault (core dumped)
/home/sunil.kumar/NX-10525/25Mar

How to repeat:
I have written one test program and compiled it with both the versions of unixodbc2.25 and unixodbc latest version 2.3.9 and it was getting connected properly on with mysql-connector-odbc-8.0.28-1.el6.i686 version on both Linux7 and Linux 6.

Linux6 -indev-rhel6-3
/home/sunil.kumar/NX-10525> hn
indev-rhel6-3
/home/sunil.kumar/NX-10525> ./test1
Connected !
/home/sunil.kumar/NX-10525> ./test2
Connected !
/home/sunil.kumar/NX-10525>
Linux7 -inqa-rhel7-3
inqa-rhel7-3% ./test4
Connected !
inqa-rhel7-3% ./test5
Connected !
inqa-rhel7-3%
But when I write the same program and compile it with both the versions of unixodbc2.25 and unixodbc 2.3 version.
I installed mysql-connector-odbc-8.0.28-1.el7.i686 on Linux 7 it is not getting connected and core is dumped.

Linux7 -inqa-rhel7-4
/home/sunil.kumar/NX-10525> ./test3
Segmentation fault (core dumped)
/home/sunil.kumar/NX-10525/25Mar> ./test
Segmentation fault (core dumped)
/home/sunil.kumar/NX-10525/25Mar
[30 Mar 2022 12:00] Sunil Kumar
inqa-rhel7-3 has mysql-connector-odbc-8.0.28-1.el6.i686 version connector.
inqa-rhel7-3% pwd
/usr/share/doc
inqa-rhel7-3% isql -v "myodbc8a"
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> ^C
inqa-rhel7-3% odbcinst -j
unixODBC 2.3.1
DRIVERS............: /opt/NetExpert2/options/odbcinst.ini
SYSTEM DATA SOURCES: /opt/NetExpert2/options/odbc.ini
FILE DATA SOURCES..: /opt/NetExpert2/options/ODBCDataSources
USER DATA SOURCES..: /home/sqanetx1/.odbc.ini
SQLULEN Size.......: 4
SQLLEN Size........: 4
SQLSETPOSIROW Size.: 2
inqa-rhel7-3% 

inqa-rhel7-4 has mysql-connector-odbc-8.0.28-1.el7.i686 version connector.
/net/tcsnas01/vol/nxdev/osihomes/sunil_rhel_11.2> odbcinst -j
unixODBC 2.3.1
DRIVERS............: /net/tcsnas01/vol/nxdev/osihomes/sunil_rhel_11.2//options/odbcinst.ini
SYSTEM DATA SOURCES: /net/tcsnas01/vol/nxdev/osihomes/sunil_rhel_11.2//options/odbc.ini
FILE DATA SOURCES..: /net/tcsnas01/vol/nxdev/osihomes/sunil_rhel_11.2//options/ODBCDataSources
USER DATA SOURCES..: /home/sunil.kumar/.odbc.ini
SQLULEN Size.......: 4
SQLLEN Size........: 4
SQLSETPOSIROW Size.: 2
/net/tcsnas01/vol/nxdev/osihomes/sunil_rhel_11.2> isql -v "myodbc8a"
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> ^C
/net/tcsnas01/vol/nxdev/osihomes/sunil_rhel_11.2>
[31 Mar 2022 9:55] Sunil Kumar
We need to implemet a requirement .Can ou please look into this on high priority
[8 Aug 2022 6:35] Bogdan Degtyariov
Hi Sunil,

A few things are not very clear in your description of the issue.
Can you please clarify?

 - unixodbc2.25 - this version does not exist. Did you mean 2.2.5? If yes, then it is not supported because it was released 19 years ago.

 - You mentioned using UnixODBC 2.3.9, but the output shows UnixODBC 2.3.1:

   odbcinst -j
   unixODBC 2.3.1
   ...

   Did you try running it with UnixODBC 2.3.9?

 - In your second message I can see that both versions of ODBC connector were able to connect.
  I do not see any crashes here.
  What changes did you make to allow it to connect with the package for el7?

 ....
inqa-rhel7-3 has mysql-connector-odbc-8.0.28-1.el6.i686 version connector.
 ....
| Connected!                            |
 ....
inqa-rhel7-4 has mysql-connector-odbc-8.0.28-1.el7.i686 version connector.
 ....
| Connected!                            |
 ....
[9 Sep 2022 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".