Bug #102553 call connect(ConnectOptionsMap & options)
Submitted: 10 Feb 2021 8:57 Modified: 10 Feb 2021 16:35
Reporter: davie yan Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / C++ Severity:S3 (Non-critical)
Version:8.0.23-1.el8.x86_64 OS:CentOS (8.2)
Assigned to: CPU Architecture:x86 (-64)

[10 Feb 2021 8:57] davie yan
Description:
gdb info:
#0  0x00007fe18db057ff in raise () from /lib64/libc.so.6
#1  0x00007fe18daefc35 in abort () from /lib64/libc.so.6
#2  0x00007fe18e4c606b in __gnu_cxx::__verbose_terminate_handler() [clone .cold.1] () from /lib64/libstdc++.so.6
#3  0x00007fe18e4cc50c in __cxxabiv1::__terminate(void (*)()) () from /lib64/libstdc++.so.6
#4  0x00007fe18e4cc567 in std::terminate() () from /lib64/libstdc++.so.6
#5  0x00007fe18e4cc81d in __cxa_rethrow () from /lib64/libstdc++.so.6
#6  0x00007fe19043242d in sql::mysql::MySQL_Connection::init (this=0x1b70bf0, properties=...)
    at /usr/src/debug/mysql-connector-c++-8.0.23-1.el8.x86_64/jdbc/driver/mysql_connection.cpp:1242
#7  0x00007fe19044cb36 in sql::mysql::MySQL_Connection::MySQL_Connection (this=0x1b70bf0, _driver=<optimized out>, _proxy=..., properties=std::map with 6 elements = {...})
    at /usr/src/debug/mysql-connector-c++-8.0.23-1.el8.x86_64/jdbc/driver/mysql_connection.cpp:174
#8  0x00007fe190452b80 in sql::mysql::MySQL_Driver::connect (this=0x1b65870, properties=std::map with 6 elements = {...})
    at /opt/rh/gcc-toolset-9/root/usr/include/c++/9/bits/unique_ptr.h:352

How to repeat:
my code:
CMySQL_Api::CMySQL_Api(vector<string> dbstr)
{

  ConnectOptionsMap connection_properties;
  connection_properties["hostName"] = dbstr[1];
  connection_properties["userName"] = dbstr[2];
  connection_properties["password"] = dbstr[3];
  connection_properties["schema"] = dbstr[4];
  connection_properties["port"] = 3306;
  connection_properties["OPT_RECONNECT"] = true;

  dbpmx.lock();
  mydriver = get_driver_instance();
  dbpmx.unlock();
  myconn = mydriver->connect(connection_properties);
  mystmt = myconn->createStatement();
}

compile:
g++ -std=c++11  -m64 -g -I/usr/include -I/usr/include/mysql-cppconn -ldl -lssl3 -lcrypto  -lmysqlcppconn  *.cpp -o mysqltest
[10 Feb 2021 9:50] davie yan
run message:
[root@yscentos build]# ./ctptddeb 
terminate called after throwing an instance of 'sql::SQLException'
  what():  SSL connection error: error:00000000:lib(0):func(0):reason(0)

mysql server is 8.0.22
[10 Feb 2021 10:10] davie yan
sorry ,I just found this problem is an third lib with mysql-connecter-c++ lib conflict. that is not your problem
[10 Feb 2021 16:35] MySQL Verification Team
Thank you for the feedback.