Reproduced on Microsoft Windows and Debian GNU/Linux amd64.
LIbreOffice version 4.1 uses MySQL Connector/C++ 1.1.2 (statically) linked with libmariadb.
Reproduced when connecting to 5.6.12-enterprise-commercial-advanced-log and when connecting to 5.1.66-0+squeeze1 (Debian).
Reproduced with bzr revision 40 and bzr revision 101 (current tip of trunk) of libmariadb.
Reproduced on Microsoft Windows and Debian GNU/Linux amd64.
LIbreOffice version 4.1 uses MySQL Connector/C++ 1.1.2 (statically) linked with libmariadb.
Reproduced when connecting to 5.6.12-enterprise-commercial-advanced-log and when connecting to 5.1.66-0+squeeze1 (Debian).
Reproduced with bzr revision 40 and bzr revision 101 (current tip of trunk) of libmariadb.
When LibreOffice executes 'SELECT * FROM agendas' (via MySQL Connector/C++ 1.1.2) through a prepared statement (with no parameters), it leads to a segfault in libmariadb. When MySQL Connector/C++ is linked against libmysqlclient18 5.5.31+dfsg-0+wheezy1, the segfault does not happen.
The full original reproduction database can be downloaded from zip file in directory mysqldumps from
FTP server ftp://pmg.pmgroup.be
Login: algemeen
Password: loginftppmg
but I'm also attaching a smaller example.
Backtrace & other gdb information:
#0 net_field_length (packet=0x7fff57edd758)
at /home/master/src/libreoffice/workdirs/master/workdir/unxlngx6/UnpackedTarball/mariadb/libmariadb/libmariadb.c:466
#1 0x00007f82b282b990 in mthd_stmt_read_all_rows (stmt=0x291ce50)
at /home/master/src/libreoffice/workdirs/master/workdir/unxlngx6/UnpackedTarball/mariadb/libmariadb/my_stmt.c:206
#2 0x00007f82b282ff3a in mysql_stmt_store_result (stmt=0x291ce50)
at /home/master/src/libreoffice/workdirs/master/workdir/unxlngx6/UnpackedTarball/mariadb/libmariadb/my_stmt.c:1307
#3 0x00007f82b281e962 in sql::mysql::NativeAPI::LibmysqlStaticProxy::stmt_store_result (this=0x273e060, stmt=0x291ce50)
at /home/master/src/libreoffice/workdirs/master/workdir/unxlngx6/UnpackedTarball/mysqlcppconn/driver/nativeapi/libmysql_static_proxy.cpp:548
#4 0x00007f82b2820fc7 in sql::mysql::NativeAPI::MySQL_NativeStatementWrapper::store_result (this=0x291daf0)
at /home/master/src/libreoffice/workdirs/master/workdir/unxlngx6/UnpackedTarball/mysqlcppconn/driver/nativeapi/mysql_native_statement_wrapper.cpp:233
#5 0x00007f82b27fd0c9 in sql::mysql::MySQL_Prepared_Statement::executeQuery (this=0x2917de0)
at /home/master/src/libreoffice/workdirs/master/workdir/unxlngx6/UnpackedTarball/mysqlcppconn/driver/mysql_prepared_statement.cpp:494
#6 0x00007f82b2d1fbc8 in connectivity::mysqlc::OPreparedStatement::executeQuery (this=0x291c120)
at /home/master/src/libreoffice/workdirs/master/mysqlc/source/mysqlc_preparedstatement.cxx:282
(gdb) frame
#2 0x00007f82b282ff3a in mysql_stmt_store_result (stmt=0x291ce50)
at /home/master/src/libreoffice/workdirs/master/workdir/unxlngx6/UnpackedTarball/mariadb/libmariadb/my_stmt.c:1307
1307 if (stmt->mysql->methods->db_stmt_read_all_rows(stmt))
(gdb) print *stmt
$5 = {
mem_root =
Can you please retest with latest revision (104). I did some rework on prepared statements (max_length for double was not set correctly).
If the problem persiists, can you please activate the debug log and attach it to the bugreport? (export MYSQL_DEBUG=d:t:O,/pathto/debug.log)
Georg Richter
added a comment - Can you please retest with latest revision (104). I did some rework on prepared statements (max_length for double was not set correctly).
If the problem persiists, can you please activate the debug log and attach it to the bugreport? (export MYSQL_DEBUG=d:t:O,/pathto/debug.log)
Reproduced with revision 105, with much the same backtrace:
#0 net_field_length (packet=packet@entry=0x7ffff78e3818)
at /home/master/src/libreoffice/mariadb/mariadb-native-client.trunk/libmariadb/libmariadb.c:466
466 if (*pos < 251)
(gdb) bt
#0 net_field_length (packet=packet@entry=0x7ffff78e3818)
at /home/master/src/libreoffice/mariadb/mariadb-native-client.trunk/libmariadb/libmariadb.c:466
#1 0x00007f30d9d28e93 in mthd_stmt_read_all_rows (stmt=0x32fe5d0)
at /home/master/src/libreoffice/mariadb/mariadb-native-client.trunk/libmariadb/my_stmt.c:210
#2 0x00007f30d9d2aba1 in mysql_stmt_store_result (stmt=0x32fe5d0)
at /home/master/src/libreoffice/mariadb/mariadb-native-client.trunk/libmariadb/my_stmt.c:1339
#3 0x00007f30d9d1f332 in sql::mysql::NativeAPI::LibmysqlStaticProxy::stmt_store_result (this=0x31313b0, stmt=
0x32fe5d0)
at /home/master/src/libreoffice/workdirs/master/workdir/unxlngx6/UnpackedTarball/mysqlcppconn/driver/nativeapi/libmysql_static_proxy.cpp:548
Lionel Elie Mamane
added a comment - Reproduced with revision 105, with much the same backtrace:
#0 net_field_length (packet=packet@entry=0x7ffff78e3818)
at /home/master/src/libreoffice/mariadb/mariadb-native-client.trunk/libmariadb/libmariadb.c:466
466 if (*pos < 251)
(gdb) bt
#0 net_field_length (packet=packet@entry=0x7ffff78e3818)
at /home/master/src/libreoffice/mariadb/mariadb-native-client.trunk/libmariadb/libmariadb.c:466
#1 0x00007f30d9d28e93 in mthd_stmt_read_all_rows (stmt=0x32fe5d0)
at /home/master/src/libreoffice/mariadb/mariadb-native-client.trunk/libmariadb/my_stmt.c:210
#2 0x00007f30d9d2aba1 in mysql_stmt_store_result (stmt=0x32fe5d0)
at /home/master/src/libreoffice/mariadb/mariadb-native-client.trunk/libmariadb/my_stmt.c:1339
#3 0x00007f30d9d1f332 in sql::mysql::NativeAPI::LibmysqlStaticProxy::stmt_store_result (this=0x31313b0, stmt=
0x32fe5d0)
at /home/master/src/libreoffice/workdirs/master/workdir/unxlngx6/UnpackedTarball/mysqlcppconn/driver/nativeapi/libmysql_static_proxy.cpp:548
unfortunately I wasn't able to build LibreOffice. Would it be possible to get access to your machine or to install it on one of our test machines?
You can reach me usually on irc (freenode channel #maria, nickname georg(with some underscores)) or via mail my firstname@mariadb dot com. Since we want to publish the next release before end of the year I like to close/fix this bug asap.
Thanks for your help!
Georg Richter
added a comment - Hi,
unfortunately I wasn't able to build LibreOffice. Would it be possible to get access to your machine or to install it on one of our test machines?
You can reach me usually on irc (freenode channel #maria, nickname georg(with some underscores)) or via mail my firstname@mariadb dot com. Since we want to publish the next release before end of the year I like to close/fix this bug asap.
Thanks for your help!
Anyway, here is what happens before the mysql_stmt_store_result