diff options
Diffstat (limited to 'storage/xtradb')
-rw-r--r-- | storage/xtradb/btr/btr0scrub.cc | 2 | ||||
-rw-r--r-- | storage/xtradb/buf/buf0buf.cc | 2 | ||||
-rw-r--r-- | storage/xtradb/fil/fil0crypt.cc | 2 | ||||
-rw-r--r-- | storage/xtradb/handler/ha_innodb.cc | 41 | ||||
-rw-r--r-- | storage/xtradb/handler/handler0alter.cc | 20 | ||||
-rw-r--r-- | storage/xtradb/include/univ.i | 3 | ||||
-rw-r--r-- | storage/xtradb/row/row0mysql.cc | 4 |
7 files changed, 32 insertions, 42 deletions
diff --git a/storage/xtradb/btr/btr0scrub.cc b/storage/xtradb/btr/btr0scrub.cc index 1b10b79838d..2e667e64d0b 100644 --- a/storage/xtradb/btr/btr0scrub.cc +++ b/storage/xtradb/btr/btr0scrub.cc @@ -145,7 +145,7 @@ btr_scrub_lock_dict_func(ulint space_id, bool lock_to_close_table, time_t now = time(0); if (now >= last + 30) { fprintf(stderr, - "WARNING: %s:%u waited %ld seconds for" + "WARNING: %s:%u waited " TIMETPF " seconds for" " dict_sys lock, space: %lu" " lock_to_close_table: %d\n", file, line, now - start, space_id, diff --git a/storage/xtradb/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc index 2da74950cc7..a6b0dabe110 100644 --- a/storage/xtradb/buf/buf0buf.cc +++ b/storage/xtradb/buf/buf0buf.cc @@ -5047,7 +5047,7 @@ database_corrupted: && fil_page_get_type(frame) == FIL_PAGE_INDEX && page_is_leaf(frame)) { - if (bpage && bpage->encrypted) { + if (bpage->encrypted) { ib_logf(IB_LOG_LEVEL_WARN, "Table in tablespace " ULINTPF " encrypted." "However key management plugin or used " diff --git a/storage/xtradb/fil/fil0crypt.cc b/storage/xtradb/fil/fil0crypt.cc index bf7c24ecaae..02ed4f677e5 100644 --- a/storage/xtradb/fil/fil0crypt.cc +++ b/storage/xtradb/fil/fil0crypt.cc @@ -2449,7 +2449,7 @@ fil_space_crypt_close_tablespace( if (now >= last + 30) { ib_logf(IB_LOG_LEVEL_WARN, - "Waited %ld seconds to drop space: %s (" ULINTPF + "Waited " TIMETPF " seconds to drop space: %s (" ULINTPF ") active threads %u flushing=%d.", now - start, space->name, space->id, cnt, flushing); last = now; diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index 988b10522a4..eb860ef4d62 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -4041,6 +4041,11 @@ innobase_init( srv_data_home = (innobase_data_home_dir ? innobase_data_home_dir : default_path); +#ifdef WITH_WSREP + /* If we use the wsrep API, then we need to tell the server + the path to the data files (for passing it to the SST scripts): */ + wsrep_set_data_home_dir(innobase_data_home_dir); +#endif /* WITH_WSREP */ /* Set default InnoDB data file size to 12 MB and let it be auto-extending. Thus users can use InnoDB in >= 4.0 without having @@ -15014,7 +15019,7 @@ get_foreign_key_info( /* Referenced (parent) table name */ ptr = dict_remove_db_name(foreign->referenced_table_name); - len = filename_to_tablename(ptr, name_buff, sizeof(name_buff)); + len = filename_to_tablename(ptr, name_buff, sizeof(name_buff), 1); f_key_info.referenced_table = thd_make_lex_string( thd, 0, name_buff, static_cast<unsigned int>(len), 1); @@ -15030,7 +15035,7 @@ get_foreign_key_info( /* Dependent (child) table name */ ptr = dict_remove_db_name(foreign->foreign_table_name); - len = filename_to_tablename(ptr, name_buff, sizeof(name_buff)); + len = filename_to_tablename(ptr, name_buff, sizeof(name_buff), 1); f_key_info.foreign_table = thd_make_lex_string( thd, 0, name_buff, static_cast<unsigned int>(len), 1); @@ -15046,41 +15051,25 @@ get_foreign_key_info( } while (++i < foreign->n_fields); if (foreign->type & DICT_FOREIGN_ON_DELETE_CASCADE) { - len = 7; - ptr = "CASCADE"; + f_key_info.delete_method = FK_OPTION_CASCADE; } else if (foreign->type & DICT_FOREIGN_ON_DELETE_SET_NULL) { - len = 8; - ptr = "SET NULL"; + f_key_info.delete_method = FK_OPTION_SET_NULL; } else if (foreign->type & DICT_FOREIGN_ON_DELETE_NO_ACTION) { - len = 9; - ptr = "NO ACTION"; + f_key_info.delete_method = FK_OPTION_NO_ACTION; } else { - len = 8; - ptr = "RESTRICT"; + f_key_info.delete_method = FK_OPTION_RESTRICT; } - f_key_info.delete_method = thd_make_lex_string( - thd, f_key_info.delete_method, ptr, - static_cast<unsigned int>(len), 1); - if (foreign->type & DICT_FOREIGN_ON_UPDATE_CASCADE) { - len = 7; - ptr = "CASCADE"; + f_key_info.update_method = FK_OPTION_CASCADE; } else if (foreign->type & DICT_FOREIGN_ON_UPDATE_SET_NULL) { - len = 8; - ptr = "SET NULL"; + f_key_info.update_method = FK_OPTION_SET_NULL; } else if (foreign->type & DICT_FOREIGN_ON_UPDATE_NO_ACTION) { - len = 9; - ptr = "NO ACTION"; + f_key_info.update_method = FK_OPTION_NO_ACTION; } else { - len = 8; - ptr = "RESTRICT"; + f_key_info.update_method = FK_OPTION_RESTRICT; } - f_key_info.update_method = thd_make_lex_string( - thd, f_key_info.update_method, ptr, - static_cast<unsigned int>(len), 1); - if (foreign->referenced_index && foreign->referenced_index->name) { referenced_key_name = thd_make_lex_string(thd, f_key_info.referenced_key_name, diff --git a/storage/xtradb/handler/handler0alter.cc b/storage/xtradb/handler/handler0alter.cc index 136d7ae7527..81077758bae 100644 --- a/storage/xtradb/handler/handler0alter.cc +++ b/storage/xtradb/handler/handler0alter.cc @@ -757,29 +757,29 @@ innobase_set_foreign_key_option( ut_ad(!foreign->type); switch (fk_key->delete_opt) { - case Foreign_key::FK_OPTION_NO_ACTION: - case Foreign_key::FK_OPTION_RESTRICT: - case Foreign_key::FK_OPTION_DEFAULT: + case FK_OPTION_NO_ACTION: + case FK_OPTION_RESTRICT: + case FK_OPTION_SET_DEFAULT: foreign->type = DICT_FOREIGN_ON_DELETE_NO_ACTION; break; - case Foreign_key::FK_OPTION_CASCADE: + case FK_OPTION_CASCADE: foreign->type = DICT_FOREIGN_ON_DELETE_CASCADE; break; - case Foreign_key::FK_OPTION_SET_NULL: + case FK_OPTION_SET_NULL: foreign->type = DICT_FOREIGN_ON_DELETE_SET_NULL; break; } switch (fk_key->update_opt) { - case Foreign_key::FK_OPTION_NO_ACTION: - case Foreign_key::FK_OPTION_RESTRICT: - case Foreign_key::FK_OPTION_DEFAULT: + case FK_OPTION_NO_ACTION: + case FK_OPTION_RESTRICT: + case FK_OPTION_SET_DEFAULT: foreign->type |= DICT_FOREIGN_ON_UPDATE_NO_ACTION; break; - case Foreign_key::FK_OPTION_CASCADE: + case FK_OPTION_CASCADE: foreign->type |= DICT_FOREIGN_ON_UPDATE_CASCADE; break; - case Foreign_key::FK_OPTION_SET_NULL: + case FK_OPTION_SET_NULL: foreign->type |= DICT_FOREIGN_ON_UPDATE_SET_NULL; break; } diff --git a/storage/xtradb/include/univ.i b/storage/xtradb/include/univ.i index 7e1a6b0eeac..9aafb88522f 100644 --- a/storage/xtradb/include/univ.i +++ b/storage/xtradb/include/univ.i @@ -140,7 +140,6 @@ Sun Studio */ #endif /* #if (defined(WIN32) || ... */ #ifndef __WIN__ -#define __STDC_FORMAT_MACROS /* Enable C99 printf format macros */ #include <inttypes.h> #endif /* !__WIN__ */ @@ -472,6 +471,7 @@ macro ULINTPF. */ # define INT64PF "%lld" # define UINT64PF "%llu" # define UINT64PFx "%016llx" +# define TIMETPF "%ld" typedef __int64 ib_int64_t; typedef unsigned __int64 ib_uint64_t; typedef unsigned __int32 ib_uint32_t; @@ -481,6 +481,7 @@ typedef unsigned __int32 ib_uint32_t; # define INT64PF "%" PRId64 # define UINT64PF "%" PRIu64 # define UINT64PFx "%016" PRIx64 +# define TIMETPF "%" PRIdFAST32 typedef int64_t ib_int64_t; typedef uint64_t ib_uint64_t; typedef uint32_t ib_uint32_t; diff --git a/storage/xtradb/row/row0mysql.cc b/storage/xtradb/row/row0mysql.cc index e4a6cd39699..804d55af965 100644 --- a/storage/xtradb/row/row0mysql.cc +++ b/storage/xtradb/row/row0mysql.cc @@ -3319,7 +3319,7 @@ fil_wait_crypt_bg_threads( time_t now = time(0); if (now >= last + 30) { fprintf(stderr, - "WARNING: waited %ld seconds " + "WARNING: waited " TIMETPF " seconds " "for ref-count on table: %s space: %u\n", now - start, table->name, table->space); last = now; @@ -3327,7 +3327,7 @@ fil_wait_crypt_bg_threads( if (now >= start + 300) { fprintf(stderr, - "WARNING: after %ld seconds, gave up waiting " + "WARNING: after " TIMETPF " seconds, gave up waiting " "for ref-count on table: %s space: %u\n", now - start, table->name, table->space); break; |