Loading config/ac-macros/ha_ndbcluster.m4 +2 −1 Original line number Diff line number Diff line Loading @@ -128,8 +128,9 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [ ndb_mgmclient_libs= case "$ndbcluster" in yes ) AC_MSG_RESULT([Using NDB Cluster]) AC_MSG_RESULT([Using NDB Cluster and Partitioning]) AC_DEFINE([HAVE_NDBCLUSTER_DB], [1], [Using Ndb Cluster DB]) AC_DEFINE([HAVE_PARTITION_DB], [1], [Builds Partition DB]) have_ndbcluster="yes" ndbcluster_includes="-I\$(top_builddir)/storage/ndb/include -I\$(top_builddir)/storage/ndb/include/ndbapi" ndbcluster_libs="\$(top_builddir)/storage/ndb/src/.libs/libndbclient.a" Loading config/ac-macros/ha_partition.m4 0 → 100644 +30 −0 Original line number Diff line number Diff line dnl --------------------------------------------------------------------------- dnl Macro: MYSQL_CHECK_PARTITIONDB dnl Sets HAVE_PARTITION_DB if --with-partition is used dnl --------------------------------------------------------------------------- AC_DEFUN([MYSQL_CHECK_PARTITIONDB], [ AC_ARG_WITH([partition], [ --with-partition Enable the Partition Storage Engine], [partitiondb="$withval"], [partitiondb=no]) AC_MSG_CHECKING([for partition]) case "$partitiondb" in yes ) AC_DEFINE([HAVE_PARTITION_DB], [1], [Builds Partition DB]) AC_MSG_RESULT([yes]) [partitiondb=yes] ;; * ) AC_MSG_RESULT([no]) [partitiondb=no] ;; esac ]) dnl --------------------------------------------------------------------------- dnl END OF MYSQL_CHECK_PARTITION SECTION dnl --------------------------------------------------------------------------- configure.in +1 −0 Original line number Diff line number Diff line Loading @@ -2437,6 +2437,7 @@ MYSQL_CHECK_CSVDB MYSQL_CHECK_BLACKHOLEDB MYSQL_CHECK_NDBCLUSTER MYSQL_CHECK_FEDERATED MYSQL_CHECK_PARTITIONDB # If we have threads generate some library functions and test programs sql_server_dirs= Loading include/my_base.h +1 −0 Original line number Diff line number Diff line Loading @@ -388,6 +388,7 @@ enum data_file_type { #define EQ_RANGE 32 #define NULL_RANGE 64 #define GEOM_FLAG 128 #define SKIP_RANGE 256 typedef struct st_key_range { Loading include/my_global.h +88 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,94 @@ #define unlikely(x) __builtin_expect((x),0) /* The macros below are useful in optimising places where it has been discovered that cache misses stall the process and where a prefetch of the cache line can improve matters. This is available in GCC 3.1.1 and later versions. PREFETCH_READ says that addr is going to be used for reading and that it is to be kept in caches if possible for a while PREFETCH_WRITE also says that the item to be cached is likely to be updated. The *LOCALITY scripts are also available for experimentation purposes mostly and should only be used if they are verified to improve matters. For more input see GCC manual (available in GCC 3.1.1 and later) */ #if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR > 10) #define PREFETCH_READ(addr) __builtin_prefetch(addr, 0, 3) #define PREFETCH_WRITE(addr) \ __builtin_prefetch(addr, 1, 3) #define PREFETCH_READ_LOCALITY(addr, locality) \ __builtin_prefetch(addr, 0, locality) #define PREFETCH_WRITE_LOCALITY(addr, locality) \ __builtin_prefetch(addr, 1, locality) #else #define PREFETCH_READ(addr) #define PREFETCH_READ_LOCALITY(addr, locality) #define PREFETCH_WRITE(addr) #define PREFETCH_WRITE_LOCALITY(addr, locality) #endif /* The following macro is used to ensure that code often used in most SQL statements and definitely for parts of the SQL processing are kept in a code segment by itself. This has the advantage that the risk of common code being overlapping in caches of the CPU is less. This can be a cause of big performance problems. Routines should be put in this category with care and when they are put there one should also strive to make as much of the error handling as possible (or uncommon code of the routine) to execute in a separate method to avoid moving to much code to this code segment. It is very easy to use, simply add HOT_METHOD at the end of the function declaration. For more input see GCC manual (available in GCC 2.95 and later) */ #if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR > 94) #define HOT_METHOD \ __attribute__ ((section ("hot_code_section"))) #else #define HOT_METHOD #endif /* The following macro is used to ensure that popular global variables are located next to each other to avoid that they contend for the same cache lines. It is very easy to use, simply add HOT_DATA at the end of the declaration of the variable, the variable must be initialised because of the way that linker works so a declaration using HOT_DATA should look like: uint global_hot_data HOT_DATA = 0; For more input see GCC manual (available in GCC 2.95 and later) */ #if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR > 94) #define HOT_DATA \ __attribute__ ((section ("hot_data_section"))) #else #define HOT_DATA #endif /* The following macros are used to control inlining a bit more than usual. These macros are used to ensure that inlining always or never occurs (independent of compilation mode). For more input see GCC manual (available in GCC 3.1.1 and later) */ #if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR > 10) #define ALWAYS_INLINE __attribute__ ((always_inline)) #define NEVER_INLINE __attribute__ ((noinline)) #else #define ALWAYS_INLINE #define NEVER_INLINE #endif /* Fix problem with S_ISLNK() on Linux */ #if defined(TARGET_OS_LINUX) #undef _GNU_SOURCE Loading Loading
config/ac-macros/ha_ndbcluster.m4 +2 −1 Original line number Diff line number Diff line Loading @@ -128,8 +128,9 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [ ndb_mgmclient_libs= case "$ndbcluster" in yes ) AC_MSG_RESULT([Using NDB Cluster]) AC_MSG_RESULT([Using NDB Cluster and Partitioning]) AC_DEFINE([HAVE_NDBCLUSTER_DB], [1], [Using Ndb Cluster DB]) AC_DEFINE([HAVE_PARTITION_DB], [1], [Builds Partition DB]) have_ndbcluster="yes" ndbcluster_includes="-I\$(top_builddir)/storage/ndb/include -I\$(top_builddir)/storage/ndb/include/ndbapi" ndbcluster_libs="\$(top_builddir)/storage/ndb/src/.libs/libndbclient.a" Loading
config/ac-macros/ha_partition.m4 0 → 100644 +30 −0 Original line number Diff line number Diff line dnl --------------------------------------------------------------------------- dnl Macro: MYSQL_CHECK_PARTITIONDB dnl Sets HAVE_PARTITION_DB if --with-partition is used dnl --------------------------------------------------------------------------- AC_DEFUN([MYSQL_CHECK_PARTITIONDB], [ AC_ARG_WITH([partition], [ --with-partition Enable the Partition Storage Engine], [partitiondb="$withval"], [partitiondb=no]) AC_MSG_CHECKING([for partition]) case "$partitiondb" in yes ) AC_DEFINE([HAVE_PARTITION_DB], [1], [Builds Partition DB]) AC_MSG_RESULT([yes]) [partitiondb=yes] ;; * ) AC_MSG_RESULT([no]) [partitiondb=no] ;; esac ]) dnl --------------------------------------------------------------------------- dnl END OF MYSQL_CHECK_PARTITION SECTION dnl ---------------------------------------------------------------------------
configure.in +1 −0 Original line number Diff line number Diff line Loading @@ -2437,6 +2437,7 @@ MYSQL_CHECK_CSVDB MYSQL_CHECK_BLACKHOLEDB MYSQL_CHECK_NDBCLUSTER MYSQL_CHECK_FEDERATED MYSQL_CHECK_PARTITIONDB # If we have threads generate some library functions and test programs sql_server_dirs= Loading
include/my_base.h +1 −0 Original line number Diff line number Diff line Loading @@ -388,6 +388,7 @@ enum data_file_type { #define EQ_RANGE 32 #define NULL_RANGE 64 #define GEOM_FLAG 128 #define SKIP_RANGE 256 typedef struct st_key_range { Loading
include/my_global.h +88 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,94 @@ #define unlikely(x) __builtin_expect((x),0) /* The macros below are useful in optimising places where it has been discovered that cache misses stall the process and where a prefetch of the cache line can improve matters. This is available in GCC 3.1.1 and later versions. PREFETCH_READ says that addr is going to be used for reading and that it is to be kept in caches if possible for a while PREFETCH_WRITE also says that the item to be cached is likely to be updated. The *LOCALITY scripts are also available for experimentation purposes mostly and should only be used if they are verified to improve matters. For more input see GCC manual (available in GCC 3.1.1 and later) */ #if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR > 10) #define PREFETCH_READ(addr) __builtin_prefetch(addr, 0, 3) #define PREFETCH_WRITE(addr) \ __builtin_prefetch(addr, 1, 3) #define PREFETCH_READ_LOCALITY(addr, locality) \ __builtin_prefetch(addr, 0, locality) #define PREFETCH_WRITE_LOCALITY(addr, locality) \ __builtin_prefetch(addr, 1, locality) #else #define PREFETCH_READ(addr) #define PREFETCH_READ_LOCALITY(addr, locality) #define PREFETCH_WRITE(addr) #define PREFETCH_WRITE_LOCALITY(addr, locality) #endif /* The following macro is used to ensure that code often used in most SQL statements and definitely for parts of the SQL processing are kept in a code segment by itself. This has the advantage that the risk of common code being overlapping in caches of the CPU is less. This can be a cause of big performance problems. Routines should be put in this category with care and when they are put there one should also strive to make as much of the error handling as possible (or uncommon code of the routine) to execute in a separate method to avoid moving to much code to this code segment. It is very easy to use, simply add HOT_METHOD at the end of the function declaration. For more input see GCC manual (available in GCC 2.95 and later) */ #if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR > 94) #define HOT_METHOD \ __attribute__ ((section ("hot_code_section"))) #else #define HOT_METHOD #endif /* The following macro is used to ensure that popular global variables are located next to each other to avoid that they contend for the same cache lines. It is very easy to use, simply add HOT_DATA at the end of the declaration of the variable, the variable must be initialised because of the way that linker works so a declaration using HOT_DATA should look like: uint global_hot_data HOT_DATA = 0; For more input see GCC manual (available in GCC 2.95 and later) */ #if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR > 94) #define HOT_DATA \ __attribute__ ((section ("hot_data_section"))) #else #define HOT_DATA #endif /* The following macros are used to control inlining a bit more than usual. These macros are used to ensure that inlining always or never occurs (independent of compilation mode). For more input see GCC manual (available in GCC 3.1.1 and later) */ #if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR > 10) #define ALWAYS_INLINE __attribute__ ((always_inline)) #define NEVER_INLINE __attribute__ ((noinline)) #else #define ALWAYS_INLINE #define NEVER_INLINE #endif /* Fix problem with S_ISLNK() on Linux */ #if defined(TARGET_OS_LINUX) #undef _GNU_SOURCE Loading