[MDEV-6507] tokudb release builds compiled with debug code on Created: 2014-07-30 Updated: 2014-08-05 Resolved: 2014-08-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.38, 10.0.12 |
| Fix Version/s: | 5.5.39, 10.0.13 |
| Type: | Bug | Priority: | Major |
| Reporter: | Rich Prohaska | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
ubuntu 14.04 (and probably others) |
||
| Description |
|
TokuDB (ft-index) uses the TOKU_DEBUG_PARANOID cmake variable (default ON) to control whether or not debug code is compiled into TokuDB. Release builds should build with this variable OFF. One way is to change the default in TokuDB's CMakeLists.txt file. |
| Comments |
| Comment by Sergei Golubchik [ 2014-07-30 ] |
|
I could switch it to off when CMAKE_BUILD_TYPE is not Debug, but generally it's not a good idea. With VS and Xcode one can configure once and then compile for different configurations, that's why one should normally use, say, CMAKE_CXX_FLAGS_DEBUG, etc instead of adding options to CMAKE_CXX_FLAGS when CMAKE_BUILD_TYPE is Debug. While TokuDB doesn't compile on Windows, it can be compiled on Mac OS X, right? I'd suggest the following fix: rename the option (in cmakefiles) to, say, TOKUDB_DEBUG_PARANOID. And if it's set, add -DTOKU_DEBUG_PARANOID (old name) to CMAKE_CXX_FLAGS_DEBUG. This way you won't need to change source files, and cmake will automatically enable debug flag in the correct configuration. In the server we use a somewhat more complex approach. For safemalloc, for example, the values are ON, OFF, AUTO, meaning "always enable", "always disable", "enable in debug builds only". And -DSAFEMALLOC is added, respectively, to CMAKE_CXX_FLAGS, nowhere, to CMAKE_CXX_FLAGS_DEBUG. |
| Comment by Sergei Golubchik [ 2014-08-03 ] |
|
I've simply forced TOKU_PARANOID_ASSERT to be OFF |