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
TARGET_LINK_LIBRARIES(mysql mysqlclient)
IF(UNIX)
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)
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test)
......
......@@ -305,16 +305,27 @@ FUNCTION(GET_DEPENDEND_OS_LIBS target result)
ENDFUNCTION()
MACRO(RESTRICT_SYMBOL_EXPORTS target)
SET(VISIBILITY_HIDDEN_FLAG)
IF(CMAKE_COMPILER_IS_GNUCXX AND UNIX)
CHECK_C_COMPILER_FLAG("-fvisibility=hidden" 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)
IF(NOT COMPILE_FLAGS)
# Avoid COMPILE_FLAGS-NOTFOUND
SET(COMPILE_FLAGS)
ENDIF()
SET_TARGET_PROPERTIES(${target} PROPERTIES
COMPILE_FLAGS "${COMPILE_FLAGS} -fvisibility=hidden")
ENDIF()
COMPILE_FLAGS "${COMPILE_FLAGS} ${VISIBILITY_HIDDEN_FLAG}")
ENDIF()
ENDMACRO()
......@@ -93,3 +93,8 @@ IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SIZEOF_VOID_P EQUAL 4
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)
SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_DEFINITONS "MYSQL_SERVER")
DTRACE_INSTRUMENT(${target})
ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDENCIES})
RESTRICT_SYMBOL_EXPORTS(${target})
IF(WITH_EMBEDDED_SERVER)
# Embedded library should contain PIC code and be linkable
# to shared libraries (on systems that need PIC)
......
......@@ -116,7 +116,6 @@ MACRO (MYSQL_USE_BUNDLED_READLINE)
SET(HAVE_HIST_ENTRY)
SET(READLINE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/cmd-line-utils)
SET(READLINE_LIBRARY readline)
FIND_CURSES()
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/cmd-line-utils/readline)
ENDMACRO()
......@@ -126,10 +125,10 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE)
FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
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)
SET(CMAKE_REQUIRED_LIBRARIES ${READLINE_LIBRARY})
SET(CMAKE_REQUIRED_LIBRARIES ${READLINE_LIBRARY} ${CURSES_LIBRARY})
CHECK_CXX_SOURCE_COMPILES("
#include <stdio.h>
#include <readline/readline.h>
......@@ -175,6 +174,7 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE)
ENDIF(READLINE_V5)
ENDIF(NEW_READLINE_INTERFACE)
ENDIF()
SET(CMAKE_REQUIRES_LIBRARIES )
ENDMACRO()
MACRO (MYSQL_FIND_SYSTEM_LIBEDIT)
......@@ -197,6 +197,7 @@ MACRO (MYSQL_FIND_SYSTEM_LIBEDIT)
LIBEDIT_INTERFACE)
SET(USE_LIBEDIT_INTERFACE ${LIBEDIT_INTERFACE})
ENDIF()
SET(CMAKE_REQUIRES_LIBRARIES)
ENDMACRO()
......@@ -204,6 +205,7 @@ MACRO (MYSQL_CHECK_READLINE)
IF (NOT WIN32)
MYSQL_CHECK_MULTIBYTE()
SET(WITH_READLINE OFF CACHE BOOL "Use bundled readline")
FIND_CURSES()
IF(WITH_READLINE)
MYSQL_USE_BUNDLED_READLINE()
......@@ -217,7 +219,7 @@ MACRO (MYSQL_CHECK_READLINE)
ENDIF()
ENDIF()
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)
ENDMACRO()
......@@ -100,14 +100,14 @@ my_bool my_gethwaddr(uchar *to)
uint i;
for (i= 0; res && i < ifc.ifc_len / sizeof(ifr[0]); i++)
{
#ifdef SIOCGIFHWADDR
#ifdef __linux__
if (ioctl(fd, SIOCGIFHWADDR, &ifr[i]) >= 0)
res= memcpy_and_test(to, (uchar *)&ifr[i].ifr_hwaddr.sa_data,
ETHER_ADDR_LEN);
#else
/*
A bug in OpenSolaris prevents non-root from getting a mac address:
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4720634
A bug in OpenSolaris used to prevent non-root from getting a mac address:
{no url. Oracle killed the old OpenSolaris bug database}
Thus, we'll use an alternative method and extract the address from the
arp table.
......
......@@ -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,
POSITION *loose_scan_pos);
void restore_prev_sj_state(const table_map remaining_tables,
......
......@@ -550,7 +550,7 @@ public:
BNL_JOIN_ALG, /* Block Nested Loop Join algorithm */
BNLH_JOIN_ALG, /* Block Nested Loop Hash 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,
double *outer_rec_count, double *reopt_cost);
Item_equal *find_item_equal(COND_EQUAL *cond_equal, Field *field,
bool *inherited_fl);
bool test_if_ref(COND *root_cond,
extern bool test_if_ref(Item *,
Item_field *left_item,Item *right_item);
inline bool optimizer_flag(THD *thd, uint flag)
......
......@@ -252,7 +252,18 @@ IF(WITH_INNODB)
SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
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
MODULE_ONLY
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
/* prototypes for new functions added to ha_innodb.cc */
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_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