Commit 5d3efeba authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

merge

parents 892cd369 24e7faa5
...@@ -31,7 +31,7 @@ MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc ...@@ -31,7 +31,7 @@ MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc
TARGET_LINK_LIBRARIES(mysql mysqlclient) TARGET_LINK_LIBRARIES(mysql mysqlclient)
IF(UNIX) IF(UNIX)
TARGET_LINK_LIBRARIES(mysql ${MY_READLINE_LIBRARY}) TARGET_LINK_LIBRARIES(mysql ${MY_READLINE_LIBRARY})
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic") SET_TARGET_PROPERTIES(mysql PROPERTIES ENABLE_EXPORTS TRUE)
ENDIF(UNIX) ENDIF(UNIX)
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test) MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test)
......
...@@ -305,16 +305,27 @@ FUNCTION(GET_DEPENDEND_OS_LIBS target result) ...@@ -305,16 +305,27 @@ FUNCTION(GET_DEPENDEND_OS_LIBS target result)
ENDFUNCTION() ENDFUNCTION()
MACRO(RESTRICT_SYMBOL_EXPORTS target) MACRO(RESTRICT_SYMBOL_EXPORTS target)
SET(VISIBILITY_HIDDEN_FLAG)
IF(CMAKE_COMPILER_IS_GNUCXX AND UNIX) IF(CMAKE_COMPILER_IS_GNUCXX AND UNIX)
CHECK_C_COMPILER_FLAG("-fvisibility=hidden" HAVE_VISIBILITY_HIDDEN) CHECK_C_COMPILER_FLAG("-fvisibility=hidden" HAVE_VISIBILITY_HIDDEN)
IF(HAVE_VISIBILITY_HIDDEN) IF(HAVE_VISIBILITY_HIDDEN)
SET(VISIBILITY_HIDDEN_FLAG "-fvisibility=hidden")
ENDIF()
ENDIF()
IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
SET(VISIBILITY_HIDDEN_FLAG "-xldscope=hidden")
ENDIF()
IF(VISIBILITY_HIDDEN_FLAG)
GET_TARGET_PROPERTY(COMPILE_FLAGS ${target} COMPILE_FLAGS) GET_TARGET_PROPERTY(COMPILE_FLAGS ${target} COMPILE_FLAGS)
IF(NOT COMPILE_FLAGS) IF(NOT COMPILE_FLAGS)
# Avoid COMPILE_FLAGS-NOTFOUND # Avoid COMPILE_FLAGS-NOTFOUND
SET(COMPILE_FLAGS) SET(COMPILE_FLAGS)
ENDIF() ENDIF()
SET_TARGET_PROPERTIES(${target} PROPERTIES SET_TARGET_PROPERTIES(${target} PROPERTIES
COMPILE_FLAGS "${COMPILE_FLAGS} -fvisibility=hidden") COMPILE_FLAGS "${COMPILE_FLAGS} ${VISIBILITY_HIDDEN_FLAG}")
ENDIF()
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
...@@ -93,3 +93,8 @@ IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SIZEOF_VOID_P EQUAL 4 ...@@ -93,3 +93,8 @@ IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SIZEOF_VOID_P EQUAL 4
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(CMAKE_CXX_COMPILER_ID MATCHES "SunPro")
# Unnamed structs and unions
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -features=extensions")
ENDIF()
...@@ -136,6 +136,7 @@ MACRO(MYSQL_ADD_PLUGIN) ...@@ -136,6 +136,7 @@ MACRO(MYSQL_ADD_PLUGIN)
SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_DEFINITONS "MYSQL_SERVER") SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_DEFINITONS "MYSQL_SERVER")
DTRACE_INSTRUMENT(${target}) DTRACE_INSTRUMENT(${target})
ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDENCIES}) ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDENCIES})
RESTRICT_SYMBOL_EXPORTS(${target})
IF(WITH_EMBEDDED_SERVER) IF(WITH_EMBEDDED_SERVER)
# Embedded library should contain PIC code and be linkable # Embedded library should contain PIC code and be linkable
# to shared libraries (on systems that need PIC) # to shared libraries (on systems that need PIC)
......
...@@ -116,7 +116,6 @@ MACRO (MYSQL_USE_BUNDLED_READLINE) ...@@ -116,7 +116,6 @@ MACRO (MYSQL_USE_BUNDLED_READLINE)
SET(HAVE_HIST_ENTRY) SET(HAVE_HIST_ENTRY)
SET(READLINE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/cmd-line-utils) SET(READLINE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/cmd-line-utils)
SET(READLINE_LIBRARY readline) SET(READLINE_LIBRARY readline)
FIND_CURSES()
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/cmd-line-utils/readline) ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/cmd-line-utils/readline)
ENDMACRO() ENDMACRO()
...@@ -126,10 +125,10 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE) ...@@ -126,10 +125,10 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE)
FIND_LIBRARY(READLINE_LIBRARY NAMES readline) FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
MARK_AS_ADVANCED(READLINE_INCLUDE_DIR READLINE_LIBRARY) MARK_AS_ADVANCED(READLINE_INCLUDE_DIR READLINE_LIBRARY)
SET(CMAKE_REQUIRES_LIBRARIES ${READLINE_LIBRARY}) SET(CMAKE_REQUIRES_LIBRARIES ${READLINE_LIBRARY} ${CURSES_LIBRARY})
IF(READLINE_LIBRARY AND READLINE_INCLUDE_DIR) IF(READLINE_LIBRARY AND READLINE_INCLUDE_DIR)
SET(CMAKE_REQUIRED_LIBRARIES ${READLINE_LIBRARY}) SET(CMAKE_REQUIRED_LIBRARIES ${READLINE_LIBRARY} ${CURSES_LIBRARY})
CHECK_CXX_SOURCE_COMPILES(" CHECK_CXX_SOURCE_COMPILES("
#include <stdio.h> #include <stdio.h>
#include <readline/readline.h> #include <readline/readline.h>
...@@ -175,6 +174,7 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE) ...@@ -175,6 +174,7 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE)
ENDIF(READLINE_V5) ENDIF(READLINE_V5)
ENDIF(NEW_READLINE_INTERFACE) ENDIF(NEW_READLINE_INTERFACE)
ENDIF() ENDIF()
SET(CMAKE_REQUIRES_LIBRARIES )
ENDMACRO() ENDMACRO()
MACRO (MYSQL_FIND_SYSTEM_LIBEDIT) MACRO (MYSQL_FIND_SYSTEM_LIBEDIT)
...@@ -197,6 +197,7 @@ MACRO (MYSQL_FIND_SYSTEM_LIBEDIT) ...@@ -197,6 +197,7 @@ MACRO (MYSQL_FIND_SYSTEM_LIBEDIT)
LIBEDIT_INTERFACE) LIBEDIT_INTERFACE)
SET(USE_LIBEDIT_INTERFACE ${LIBEDIT_INTERFACE}) SET(USE_LIBEDIT_INTERFACE ${LIBEDIT_INTERFACE})
ENDIF() ENDIF()
SET(CMAKE_REQUIRES_LIBRARIES)
ENDMACRO() ENDMACRO()
...@@ -204,6 +205,7 @@ MACRO (MYSQL_CHECK_READLINE) ...@@ -204,6 +205,7 @@ MACRO (MYSQL_CHECK_READLINE)
IF (NOT WIN32) IF (NOT WIN32)
MYSQL_CHECK_MULTIBYTE() MYSQL_CHECK_MULTIBYTE()
SET(WITH_READLINE OFF CACHE BOOL "Use bundled readline") SET(WITH_READLINE OFF CACHE BOOL "Use bundled readline")
FIND_CURSES()
IF(WITH_READLINE) IF(WITH_READLINE)
MYSQL_USE_BUNDLED_READLINE() MYSQL_USE_BUNDLED_READLINE()
...@@ -217,7 +219,7 @@ MACRO (MYSQL_CHECK_READLINE) ...@@ -217,7 +219,7 @@ MACRO (MYSQL_CHECK_READLINE)
ENDIF() ENDIF()
ENDIF() ENDIF()
SET(MY_READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR}) SET(MY_READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR})
SET(MY_READLINE_LIBRARY ${READLINE_LIBRARY}) SET(MY_READLINE_LIBRARY ${READLINE_LIBRARY} ${CURSES_LIBRARY})
ENDIF(NOT WIN32) ENDIF(NOT WIN32)
ENDMACRO() ENDMACRO()
...@@ -100,14 +100,14 @@ my_bool my_gethwaddr(uchar *to) ...@@ -100,14 +100,14 @@ my_bool my_gethwaddr(uchar *to)
uint i; uint i;
for (i= 0; res && i < ifc.ifc_len / sizeof(ifr[0]); i++) for (i= 0; res && i < ifc.ifc_len / sizeof(ifr[0]); i++)
{ {
#ifdef SIOCGIFHWADDR #ifdef __linux__
if (ioctl(fd, SIOCGIFHWADDR, &ifr[i]) >= 0) if (ioctl(fd, SIOCGIFHWADDR, &ifr[i]) >= 0)
res= memcpy_and_test(to, (uchar *)&ifr[i].ifr_hwaddr.sa_data, res= memcpy_and_test(to, (uchar *)&ifr[i].ifr_hwaddr.sa_data,
ETHER_ADDR_LEN); ETHER_ADDR_LEN);
#else #else
/* /*
A bug in OpenSolaris prevents non-root from getting a mac address: A bug in OpenSolaris used to prevent non-root from getting a mac address:
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4720634 {no url. Oracle killed the old OpenSolaris bug database}
Thus, we'll use an alternative method and extract the address from the Thus, we'll use an alternative method and extract the address from the
arp table. arp table.
......
...@@ -279,7 +279,7 @@ public: ...@@ -279,7 +279,7 @@ public:
}; };
void advance_sj_state(JOIN *join, const table_map remaining_tables, uint idx, extern void advance_sj_state(JOIN *join, table_map remaining_tables, uint idx,
double *current_record_count, double *current_read_time, double *current_record_count, double *current_read_time,
POSITION *loose_scan_pos); POSITION *loose_scan_pos);
void restore_prev_sj_state(const table_map remaining_tables, void restore_prev_sj_state(const table_map remaining_tables,
......
...@@ -550,7 +550,7 @@ public: ...@@ -550,7 +550,7 @@ public:
BNL_JOIN_ALG, /* Block Nested Loop Join algorithm */ BNL_JOIN_ALG, /* Block Nested Loop Join algorithm */
BNLH_JOIN_ALG, /* Block Nested Loop Hash Join algorithm */ BNLH_JOIN_ALG, /* Block Nested Loop Hash Join algorithm */
BKA_JOIN_ALG, /* Batched Key Access Join algorithm */ BKA_JOIN_ALG, /* Batched Key Access Join algorithm */
BKAH_JOIN_ALG, /* Batched Key Access with Hash Table Join Algorithm */ BKAH_JOIN_ALG /* Batched Key Access with Hash Table Join Algorithm */
}; };
/* /*
......
...@@ -1688,7 +1688,7 @@ void optimize_wo_join_buffering(JOIN *join, uint first_tab, uint last_tab, ...@@ -1688,7 +1688,7 @@ void optimize_wo_join_buffering(JOIN *join, uint first_tab, uint last_tab,
double *outer_rec_count, double *reopt_cost); double *outer_rec_count, double *reopt_cost);
Item_equal *find_item_equal(COND_EQUAL *cond_equal, Field *field, Item_equal *find_item_equal(COND_EQUAL *cond_equal, Field *field,
bool *inherited_fl); bool *inherited_fl);
bool test_if_ref(COND *root_cond, extern bool test_if_ref(Item *,
Item_field *left_item,Item *right_item); Item_field *left_item,Item *right_item);
inline bool optimizer_flag(THD *thd, uint flag) inline bool optimizer_flag(THD *thd, uint flag)
......
...@@ -252,7 +252,18 @@ IF(WITH_INNODB) ...@@ -252,7 +252,18 @@ IF(WITH_INNODB)
SET(WITH_INNOBASE_STORAGE_ENGINE TRUE) SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
ENDIF() ENDIF()
# On solaris, reduce symbol visibility, so loader does not mix
# the same symbols from builtin innodb and from shared one.
# Only required for old GCC (3.4.3) that does not support hidden visibility
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_COMPILER_IS_GNUCC
AND NOT HAVE_VISIBILITY_HIDDEN)
SET(LINKER_SCRIPT "-Wl,-M${CMAKE_CURRENT_SOURCE_DIR}/plugin_exports")
ELSE()
SET(LINKER_SCRIPT)
ENDIF()
MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE
MODULE_ONLY MODULE_ONLY
MODULE_OUTPUT_NAME ha_innodb MODULE_OUTPUT_NAME ha_innodb
LINK_LIBRARIES ${ZLIB_LIBRARY}) LINK_LIBRARIES ${ZLIB_LIBRARY} ${LINKER_SCRIPT})
{
global:
_mysql_plugin_interface_version_;
_mysql_sizeof_struct_st_plugin_;
_mysql_plugin_declarations_;
thd_wait_service;
my_snprintf_service;
thd_alloc_service;
local:
*;
};
...@@ -57,7 +57,7 @@ Created 11/5/1995 Heikki Tuuri ...@@ -57,7 +57,7 @@ Created 11/5/1995 Heikki Tuuri
/* prototypes for new functions added to ha_innodb.cc */ /* prototypes for new functions added to ha_innodb.cc */
trx_t* innobase_get_trx(); trx_t* innobase_get_trx();
inline void _increment_page_get_statistics(buf_block_t* block, trx_t* trx) static inline void _increment_page_get_statistics(buf_block_t* block, trx_t* trx)
{ {
ulint block_hash; ulint block_hash;
ulint block_hash_byte; ulint block_hash_byte;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment