mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Enable C++11
This commit is contained in:
@@ -77,6 +77,14 @@ ELSE()
|
||||
ENDIF()
|
||||
PROJECT(${MYSQL_PROJECT_NAME})
|
||||
|
||||
IF(CMAKE_VERSION VERSION_LESS "3.1")
|
||||
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(CMAKE_CXX_STANDARD 11)
|
||||
ENDIF()
|
||||
|
||||
SET(CPACK_PACKAGE_NAME "MariaDB")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MariaDB: a very fast and robust SQL database server")
|
||||
SET(CPACK_PACKAGE_URL "http://mariadb.org")
|
||||
|
@@ -99,7 +99,7 @@ extern char *strmake(char *dst,const char *src,size_t length);
|
||||
#define strmake_buf(D,S) strmake(D, S, sizeof(D) - 1)
|
||||
#else
|
||||
#define strmake_buf(D,S) ({ \
|
||||
typeof (D) __x __attribute__((unused)) = { 2 }; \
|
||||
__typeof__ (D) __x __attribute__((unused)) = { 2 }; \
|
||||
strmake(D, S, sizeof(D) - 1); \
|
||||
})
|
||||
#endif
|
||||
|
@@ -44,6 +44,7 @@
|
||||
#include "sql_cte.h"
|
||||
#include "ha_sequence.h"
|
||||
#include "sql_show.h"
|
||||
#include <atomic>
|
||||
|
||||
/* For MySQL 5.7 virtual fields */
|
||||
#define MYSQL57_GENERATED_FIELD 128
|
||||
@@ -79,7 +80,7 @@ LEX_CSTRING MYSQL_PROC_NAME= {STRING_WITH_LEN("proc")};
|
||||
*/
|
||||
static LEX_CSTRING parse_vcol_keyword= { STRING_WITH_LEN("PARSE_VCOL_EXPR ") };
|
||||
|
||||
static int64 last_table_id;
|
||||
static std::atomic<ulong> last_table_id;
|
||||
|
||||
/* Functions defined in this file */
|
||||
|
||||
@@ -343,8 +344,8 @@ TABLE_SHARE *alloc_table_share(const char *db, const char *table_name,
|
||||
*/
|
||||
do
|
||||
{
|
||||
share->table_map_id=(ulong) my_atomic_add64_explicit(&last_table_id, 1,
|
||||
MY_MEMORY_ORDER_RELAXED);
|
||||
share->table_map_id=
|
||||
last_table_id.fetch_add(1, std::memory_order_relaxed);
|
||||
} while (unlikely(share->table_map_id == ~0UL));
|
||||
}
|
||||
DBUG_RETURN(share);
|
||||
|
@@ -70,7 +70,7 @@ run_gdb(pid_t parent_pid, const char *gdb_path) {
|
||||
"-ex", "thread apply all bt",
|
||||
"-ex", "thread apply all bt full",
|
||||
exe_buf, pid_buf,
|
||||
NULL);
|
||||
(char*) NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user