mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
ft-index: restore a chunk that was lost in the merge
and other fixes for gcc-4.9.1 on sid
This commit is contained in:
parent
77a0c9b161
commit
e3deed438a
4 changed files with 32 additions and 7 deletions
|
@ -6,6 +6,31 @@ project(TokuDB)
|
|||
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||
|
||||
## Versions of gcc >= 4.9.0 require special version of 'ar' and 'ranlib' for
|
||||
## link-time optimizations to work properly.
|
||||
##
|
||||
## From https://gcc.gnu.org/gcc-4.9/changes.html:
|
||||
##
|
||||
## When using a linker plugin, compiling with the -flto option now
|
||||
## generates slim objects files (.o) which only contain intermediate
|
||||
## language representation for LTO. Use -ffat-lto-objects to create
|
||||
## files which contain additionally the object code. To generate
|
||||
## static libraries suitable for LTO processing, use gcc-ar and
|
||||
## gcc-ranlib; to list symbols from a slim object file use
|
||||
## gcc-nm. (Requires that ar, ranlib and nm have been compiled with
|
||||
## plugin support.)
|
||||
if ((CMAKE_CXX_COMPILER_ID STREQUAL GNU) AND
|
||||
NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.0"))
|
||||
find_program(gcc_ar "gcc-ar")
|
||||
if (gcc_ar)
|
||||
set(CMAKE_AR "${gcc_ar}")
|
||||
endif ()
|
||||
find_program(gcc_ranlib "gcc-ranlib")
|
||||
if (gcc_ranlib)
|
||||
set(CMAKE_RANLIB "${gcc_ranlib}")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
include(TokuFeatureDetection)
|
||||
include(TokuSetupCompiler)
|
||||
include(TokuSetupCTest)
|
||||
|
|
|
@ -341,7 +341,7 @@ void bn_data::move_leafentries_to(
|
|||
|
||||
uint32_t i = 0;
|
||||
for (i = lbi; i < ube; i++) {
|
||||
KLPAIR curr_kl;
|
||||
KLPAIR curr_kl= 0;
|
||||
m_buffer.fetch(i, &curr_kl);
|
||||
|
||||
size_t kl_size = klpair_size(curr_kl);
|
||||
|
|
|
@ -321,7 +321,7 @@ toku_maybe_upgrade_log(const char *env_dir, const char *log_dir, LSN * lsn_of_cl
|
|||
r = 0; //Logs are up to date
|
||||
else {
|
||||
FOOTPRINT(4);
|
||||
LSN last_lsn;
|
||||
LSN last_lsn= ZERO_LSN;
|
||||
TXNID last_xid;
|
||||
r = verify_clean_shutdown_of_log_version(log_dir, version_of_logs_on_disk, &last_lsn, &last_xid);
|
||||
if (r != 0) {
|
||||
|
|
|
@ -151,8 +151,8 @@ static bool is_a_logfile_any_version (const char *name, uint64_t *number_result,
|
|||
// added for #2424, improved for #2521
|
||||
static bool is_a_logfile (const char *name, long long *number_result) {
|
||||
bool rval;
|
||||
uint64_t result;
|
||||
uint32_t version;
|
||||
uint64_t result= 0;
|
||||
uint32_t version= 0;
|
||||
rval = is_a_logfile_any_version(name, &result, &version);
|
||||
if (rval && version != TOKU_LOG_VERSION)
|
||||
rval = false;
|
||||
|
@ -234,7 +234,7 @@ toku_logger_open_with_last_xid(const char *directory, TOKULOGGER logger, TXNID l
|
|||
if (logger->is_open) return EINVAL;
|
||||
|
||||
int r;
|
||||
TXNID last_xid_if_clean_shutdown;
|
||||
TXNID last_xid_if_clean_shutdown= TXNID_NONE;
|
||||
r = toku_logfilemgr_init(logger->logfilemgr, directory, &last_xid_if_clean_shutdown);
|
||||
if ( r!=0 )
|
||||
return r;
|
||||
|
@ -1011,8 +1011,8 @@ int toku_fread_TXNID (FILE *f, TXNID *txnid, struct x1764 *checksum, uint32_t
|
|||
}
|
||||
|
||||
int toku_fread_TXNID_PAIR (FILE *f, TXNID_PAIR *txnid, struct x1764 *checksum, uint32_t *len) {
|
||||
TXNID parent;
|
||||
TXNID child;
|
||||
TXNID parent= TXNID_NONE;
|
||||
TXNID child= TXNID_NONE;
|
||||
int r;
|
||||
r = toku_fread_TXNID(f, &parent, checksum, len); if (r != 0) { return r; }
|
||||
r = toku_fread_TXNID(f, &child, checksum, len); if (r != 0) { return r; }
|
||||
|
|
Loading…
Reference in a new issue