Bug #60743 typo in cmake/dtrace.cmake
Submitted: 3 Apr 2011 18:28 Modified: 25 Jun 2013 18:23
Reporter: Takashi Ichii Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.5.10 OS:Solaris
Assigned to: CPU Architecture:Any
Tags: DTrace, solaris

[3 Apr 2011 18:28] Takashi Ichii
Description:
Can't enable dtrace because of this typo:

--- mysql-5.5.10/cmake/dtrace.cmake 2011-04-04 02:41:39.700304831 +0900
+++ mysql-5.5.10-orig/cmake/dtrace.cmake 2011-03-10 00:11:38.000000000 +0900
@@ -158,7 +158,7 @@
   FOREACH(lib ${libs})
     GET_TARGET_PROPERTY(libtype ${lib} TYPE)
     IF(libtype MATCHES STATIC_LIBRARY)
-      SET(static_libs ${static_libs} ${lib})
+      SET(static_libs ${static_lics} ${lib})
     ENDIF()
   ENDFOREACH()

How to repeat:
built as this:
% /opt/SUNWspro/bin/CC -V
CC: Sun C++ 5.9 SunOS_i386 Patch 124864-01 2007/07/25
% cmake . \
> -DCMAKE_CC_COMPILER=/opt/SUNWspro/bin/cc \
> -DCMAKE_CXX_COMPILER=/opt/SUNWspro/bin/CC \
> -DENABLE_DTRACE=on
% make

original:
% sudo dtrace -l -P 'mysql*'
   ID   PROVIDER            MODULE                          FUNCTION NAME
dtrace: failed to match mysql*:::: No probe matches description

fixed typo:
% sudo dtrace -l -P 'mysql*' | head -n 5
   ID   PROVIDER            MODULE                          FUNCTION NAME
47246 mysql17847            mysqld __1cQdispatch_command6FnTenum_server_command_pnDTHD_pcI_b_ command-done
47247 mysql17847            mysqld __1cQdispatch_command6FnTenum_server_command_pnDTHD_pcI_b_ command-start
47248 mysql17847            mysqld __1cQclose_connection6FpnDTHD_I_v_ connection-done
47249 mysql17847            mysqld __1cYdo_handle_one_connection6FpnDTHD__v_ connection-start

Suggested fix:
See Description.
[3 Apr 2011 18:32] Valeriy Kravchuk
Thank you for the bug report. Verified by code review.
[25 Jun 2013 18:23] Paul DuBois
Noted 5.5.33, 5.6.13, 5.7.2 changelogs.

A typo in cmake/dtrace.cmake prevented DTrace support from being
enabled by -DENABLE_DTRACE-on.