0

团队,

我正在尝试使用 mysqlclient 版本 16 和 Mysql c++ 连接器连接到 Mysql 数据库并执行一些 DB 操作。我们的产品依赖于这些库的代码已经编写好了。Mysql 服务器版本 5.1.56。我可以看到它在各种场合都崩溃了。

下面是几个崩溃转储。知道为什么会发生这些吗?通常在关闭连接和创建连接期间。

  1. 对于关闭连接,我使用 mSqlCon->close()
  2. 对于使用以下内容创建连接 iam:

    驱动程序 = get_driver_instance(); mSqlCon = driver->connect(connection_properties);

mSqlCon 的类型为 sql::Connection *。任何帮助表示赞赏!

#0 0x00007f82b4f064ff 在?? () 来自 /usr/local/lib64/mysql/libmysqlclient.so.16
#1 0x00007f82b4f06758 in net_real_write () from /usr/local/lib64/mysql/libmysqlclient.so.16
#2 0x00007f82b4f06c3b in net_flush() from /usr/local/lib64/mysql/libmysqlclient.so.16
#3 0x00007f82b4f03279 in mysql_real_connect () from /usr/local/lib64/mysql/libmysqlclient.so.16
#4 0x00007f82b4a630d7 在 sql::mysql::NativeAPI::LibmysqlStaticProxy::real_connect (this=, mysql=0x7f82ac041680,
    主机=0x7f82ac053d80 "K",用户=0x4f,密码=0x0,db=0x35a5d367fc14006c,
    端口=3306,unix_socket=0x7f82ac041680“\a”,client_flag=140199208425088)
    在/export/home2/tmp/cteam/bs/connector-c++-64bit/src/mysql-connector-c++-1.1.1/driver/nativeapi/libmysql_static_proxy.cpp:316
#5 0x00007f82b4a649a9 in sql::mysql::NativeAPI::MySQL_NativeConnectionWrapper::connect (this=0x7f82ac0d22d0, host=,
    user=, passwd=, db=, port=, socket_or_pipe=...,
    client_flag=140199208425088) 在 /build/cteam/bs/linux-x86_64/connector-common-alt-64bit/boost/include/boost-1_39/boost/smart_ptr/shared_ptr.hpp:408
#6 0x00007f82b49f8ebe in sql::mysql::MySQL_Connection::init (this=0x7f82ac0d3740, properties=...)
    在/export/home2/tmp/cteam/bs/connector-c++-64bit/src/mysql-connector-c++-1.1.1/driver/mysql_uri.h:51
#7 0x00007f82b49f57b3 in MySQL_Connection (this=0x7f82ac0d3740, _driver=, _proxy=, properties=...)
    在/export/home2/tmp/cteam/bs/connector-c++-64bit/src/mysql-connector-c++-1.1.1/driver/mysql_connection.cpp:141
#8 0x00007f82b4a062cd in sql::mysql::MySQL_Driver::connect (this=0x7f82ac0466e0, properties=...)
    在/build/cteam/bs/linux-x86_64/connector-common-alt-64bit/boost/include/boost-1_39/boost/smart_ptr/scoped_ptr.hpp:96
#0 0x00007fbf785e7745 in free () from /lib64/libc.so.6
#1 0x00007fbf79b49224 in __gnu_cxx::new_allocator::deallocate (this=,
    __nstart=0x7fbf740dbc76, __nfinish=0x7fbf740dbc80) 在 /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/ext/new_allocator。小时:86
#2 std::_Deque_base >::_M_deallocate_node (
    这=,__nstart=0x7fbf740dbc76,__nfinish=0x7fbf740dbc80)
    在/export/home2/tmp/cteam/bs/connector-c++-64bit/src/mysql-connector-c++-1.1.1/driver/mysql_debug.cpp:401
#3 std::_Deque_base >::_M_destroy_nodes (
    这=,__nstart=0x7fbf740dbc76,__nfinish=0x7fbf740dbc80)
    在/export/home2/tmp/cteam/bs/connector-c++-64bit/src/mysql-connector-c++-1.1.1/driver/mysql_debug.cpp:497
#4 0x00007fbf79b491d0 in ~_Deque_base (this=0x7fbf74049db00000, __in_chrg=)
    在/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_deque.h:425
#5 0x00007fbf79b48def in ~MySQL_DebugLogger (this=0x7fbf740444d0, __in_chrg=)
    在/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_deque.h:703
#6 0x00007fbf79b4829f in checked_delete (this=)
    在/build/cteam/bs/linux-x86_64/connector-common-alt-64bit/boost/include/boost-1_39/boost/checked_delete.hpp:34
#7 boost::detail::sp_counted_impl_p::dispose (this=)
    在/build/cteam/bs/linux-x86_64/connector-common-alt-64bit/boost/include/boost-1_39/boost/smart_ptr/detail/sp_counted_impl.hpp:78
#8 0x00007fbf79b3ae22 in ~MySQL_ConnectionData (this=0x7fbf740d6140, __in_chrg=)
    在/build/cteam/bs/linux-x86_64/connector-common-alt-64bit/boost/include/boost-1_39/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:145
#9 ~MySQL_Connection (this=0x7fbf740d6140, __in_chrg=)
    在/export/home2/tmp/cteam/bs/connector-c++-64bit/src/mysql-connector-c++-1.1.1/driver/mysql_connection.cpp:162
4

0 回答 0