5.7 home/laurynas/mysql-server/sql/sql_class.h:2309:8: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations] std::auto_ptr<Transaction_ctx> m_transaction;

Description

On some systems TokuDB build produces

[ 31%] Building CXX object storage/tokudb/CMakeFiles/tokudb.dir/ha_tokudb.cc.o
In file included from
/home/laurynas/mysql-server/storage/tokudb/hatoku_defines.h:36:0,
from
/home/laurynas/mysql-server/storage/tokudb/hatoku_hton.h:29,
from
/home/laurynas/mysql-server/storage/tokudb/ha_tokudb.cc:26:
/home/laurynas/mysql-server/sql/sql_class.h:2309:8: warning:
'template<class> class std::auto_ptr' is deprecated
[-Wdeprecated-declarations]
std::auto_ptr<Transaction_ctx> m_transaction;

which should be disabled: C+11 TokuDB code has no control over C+03
server code, so the warning is non-actionable. There should be either
-Wno-deprecated-declarations, either server headers paths included
through -isystem not -I compiler option, if that works, so that
-Wdeprecated-declarations is still active for Toku code.

Environment

None

Activity

Show:
Laurynas Biveinis
April 8, 2016, 4:03 PM

Isn't TokuDB adding C++ 11 flags itself because it uses its features?

George Lorch
April 8, 2016, 4:23 PM

Yes, TokuDB (and PerconaFT) now requires C++11 due to the use of std::atomic and a few other bits of syntactical candy.

The issue is, TokuDB #includes the needed bits of server code for the plugin interface and mysql types and stuff. These are only C+03 compliant and use things like std::auto_ptr that is deprecated in c+11, thus the warning and the bug report.

If we are not seeing the warning, perhaps someone already fixed it? sql_class.h still has :

Laurynas Biveinis
April 11, 2016, 10:35 AM

Grepping for Wdeprecated.declarations returns only include/violite.h, which is not related.

George Lorch
May 3, 2016, 3:11 PM

Assignee

George Lorch

Reporter

George Lorch

Labels

External issue ID

None

Freshdesk Tickets

None

Affects versions

Priority

Major
Configure