Skip to content

Commit

Permalink
PS-8164: Fix merge errors
Browse files Browse the repository at this point in the history
Fix misc errors done when merging upstream MySQL.
  • Loading branch information
inikep committed Sep 26, 2022
1 parent a7baf2d commit a15a94d
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 48 deletions.
4 changes: 2 additions & 2 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ ADD_WSHADOW_WARNING()
# We are not interesting in profiling clients.
DISABLE_MISSING_PROFILE_WARNING()

## Subdirectory with common client code.

INCLUDE_DIRECTORIES(SYSTEM ${READLINE_INCLUDE_DIR})

## Subdirectory with common client code.

ADD_SUBDIRECTORY(base)
## Subdirectory for mysqlpump code.
ADD_SUBDIRECTORY(dump)
Expand Down
5 changes: 0 additions & 5 deletions include/my_bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ extern bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2);
extern bool bitmap_is_overlapping(const MY_BITMAP *map1, const MY_BITMAP *map2);
extern bool bitmap_is_valid(const MY_BITMAP *map);
extern bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit);
extern bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit);
extern bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit);
extern uint bitmap_set_next(MY_BITMAP *map);
extern uint bitmap_get_first(const MY_BITMAP *map);
extern uint bitmap_get_first_set(const MY_BITMAP *map);
Expand All @@ -82,9 +80,6 @@ extern void bitmap_copy(MY_BITMAP *map, const MY_BITMAP *map2);
extern uint bitmap_n_copy(MY_BITMAP *dst, const MY_BITMAP *src,
uint max_bits_to_copy = UINT_MAX);

extern uint bitmap_lock_set_next(MY_BITMAP *map);
extern void bitmap_lock_clear_bit(MY_BITMAP *map, uint bitmap_bit);
/* Fast, not thread safe, bitmap functions */
#define bitmap_buffer_size(bits) (((bits) + 31) / 32) * 4
#define no_bytes_in_map(map) (((map)->n_bits + 7) / 8)
#define no_words_in_map(map) (((map)->n_bits + 31) / 32)
Expand Down
2 changes: 0 additions & 2 deletions mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,6 @@ sub main {
mtr_report("Collecting tests");
my $tests = collect_test_cases($opt_reorder, $opt_suites,
\@opt_cases, $opt_skip_test_list);
my $all_tests;
@$all_tests = @$tests;
mark_time_used('collect');
# A copy of the tests list, that will not be modified even after the tests
# are executed.
Expand Down
2 changes: 1 addition & 1 deletion scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ ELSE()
SET(TARGET_LINUX "false")
ENDIF()

# Use cmake variables to inspect dependencies for
# Use cmake variables to inspect dependencies for
# perconaserverclient library (add -l stuff)
SET(CLIENT_LIBS "")
SET(LIBS "")
Expand Down
12 changes: 6 additions & 6 deletions share/messages_to_error_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11672,10 +11672,10 @@ ER_XB_MSG_1
ER_COMPRESSION_DICTIONARY_NO_CREATE
eng "Cannot create compression dictionary tables in %s%sread-only mode."

ER_XB_MSG_2
ER_XB_UNUSED_1
eng "%s"

ER_XB_MSG_3
ER_XB_UNUSED_2
eng "%s"

ER_XB_MSG_4
Expand All @@ -11687,14 +11687,14 @@ ER_XB_MSG_5
ER_XB_MSG_WAIT_FOR_KEYRING_ENCRYPT_THREAD
eng "Waiting for keyring encryption threads to exit"

ER_PARALLEL_DOUBLEWRITE_WRITE_ERROR
eng "Parallel doublewrite buffer write failed, crashing the server to avoid data loss"
ER_XB_UNUSED_3
eng "%s"

ER_XB_MSG_6
eng "Key rotation of encrypted session temporary tablespace %s failed"

ER_XB_UNDO_DELETE_FAILURE
eng "Deletion of 5.7 undo tablespace %s failed"
ER_XB_UNUSED_4
eng "%s"

ER_UPGRADE_KEYRING_UNSUPPORTED_VERSION_ENCRYPTION
eng "Upgrade is not possible as there are tables that are KERYING encrypted. KEYRING encryption is still experimental feature in the version you are upgrading from. To upgrade please decrypt the tables encrypted with KEYRING encryption."
Expand Down
2 changes: 1 addition & 1 deletion sql/mdl.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ struct MDL_key {
*/
enum enum_mdl_namespace {
GLOBAL = 0,
BACKUP_LOCK,
BACKUP_LOCK, /* Oracle LOCK INSTANCE FOR BACKUP */
TABLESPACE,
SCHEMA,
TABLE,
Expand Down
1 change: 0 additions & 1 deletion sql/sql_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14623,7 +14623,6 @@ bool prepare_fields_and_keys(THD *thd, const dd::Table *src_table, TABLE *table,

/* List with secondary keys which should be created after copying the data */
Mem_root_array<const Key_spec *> delayed_key_list(thd->mem_root);
/* Foreign key list returned by handler::get_foreign_key_list() */
/*
Alter_info::alter_list is used by fill_alter_inplace_info() call as well.
So this function works on its copy rather than original list.
Expand Down
28 changes: 14 additions & 14 deletions storage/innobase/buf/buf0buf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5660,22 +5660,22 @@ bool buf_page_io_complete(buf_page_t *bpage, bool evict) {
}

#ifdef UNIV_LINUX
/* A crash during extending file might cause the inconsistent contents.
No problem for the cases. Just fills with zero for them.
- The next log record to apply is initializing
- No redo log record for the page yet (brand new page) */
if (recv_recovery_is_on() && (is_corrupted || is_wrong_page_id) &&
recv_page_is_brand_new((buf_block_t *)bpage)) {
memset(frame, 0, bpage->size.logical());
is_corrupted = false;
}
/* A crash during extending file might cause the inconsistent contents.
No problem for the cases. Just fills with zero for them.
- The next log record to apply is initializing
- No redo log record for the page yet (brand new page) */
if (recv_recovery_is_on() && (is_corrupted || is_wrong_page_id) &&
recv_page_is_brand_new((buf_block_t *)bpage)) {
memset(frame, 0, bpage->size.logical());
is_corrupted = false;
}
#endif /* UNIV_LINUX */

if (compressed_page || is_corrupted) {
/* Not a real corruption if it was triggered by
error injection */
DBUG_EXECUTE_IF("buf_page_import_corrupt_failure",
goto page_not_corrupt;);
if (compressed_page || is_corrupted) {
/* Not a real corruption if it was triggered by
error injection */
DBUG_EXECUTE_IF("buf_page_import_corrupt_failure",
goto page_not_corrupt;);

corrupt:
/* Compressed pages are basically gibberish avoid
Expand Down
7 changes: 2 additions & 5 deletions storage/innobase/buf/buf0flu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,15 @@ struct page_cleaner_slot_t {
protected by page_cleaner_t::mutex
if the worker thread got the slot and
set to PAGE_CLEANER_STATE_FLUSHING,
n_flushed_lru and n_flushed_list can be
updated only by the worker thread */
n_flushed_list can be updated only by
the worker thread */
/* This value is set during state==PAGE_CLEANER_STATE_NONE */
ulint n_pages_requested;
/*!< number of requested pages
for the slot */
/* These values are updated during state==PAGE_CLEANER_STATE_FLUSHING,
and commited with state==PAGE_CLEANER_STATE_FINISHED.
The consistency is protected by the 'state' */
ulint n_flushed_lru;
/*!< number of flushed pages
by LRU scan flushing */
ulint n_flushed_list;
/*!< number of flushed pages
by flush_list flushing */
Expand Down
6 changes: 0 additions & 6 deletions storage/innobase/include/dict0dict.h
Original file line number Diff line number Diff line change
Expand Up @@ -1679,12 +1679,6 @@ void dict_table_change_id_sys_tables();
void dict_table_set_corrupt_by_space(space_id_t space_id,
bool need_mutex) noexcept;

/** Flag a table with specified space_id encrypted in the data dictionary
cache
@param[in] space_id Tablespace id */
void dict_table_set_encrypted_by_space(space_id_t space_id,
bool need_mutex) noexcept;

/** SYS_ZIP_DICT and SYS_ZIP_DICT_COLS will be missing when upgrading
mysql-5.7 to PS-8.0 */
extern bool dict_upgrade_zip_dict_missing;
Expand Down
5 changes: 3 additions & 2 deletions storage/innobase/include/row0mysql.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ const byte *row_decompress_column(const byte *data, ulint *len,
@param[in] lenlen bytes used to store the length of data
@param[in] dict_data optional dictionary data used for compression
@param[in] dict_data_len optional dictionary data length
@param[in] prebuilt use prebuilt->compress_heap only
@param[in] compress_heap
@return pointer to the compressed data */
MY_NODISCARD
byte *row_compress_column(const byte *data, ulint *len, ulint lenlen,
const byte *dict_data, ulint dict_data_len,
row_prebuilt_t *prebuilt);
mem_heap_t **compress_heap);

/** Stores a >= 5.0.3 format true VARCHAR length to dest, in the MySQL row
format.
Expand Down Expand Up @@ -1027,6 +1027,7 @@ dfield_t *innobase_get_computed_value(
mem_heap_t **local_heap, mem_heap_t *heap, const dict_field_t *ifield,
THD *thd, TABLE *mysql_table, const dict_table_t *old_table,
upd_t *parent_update, dict_foreign_t *foreign, mem_heap_t **compress_heap);

/** Parse out multi-values from a MySQL record
@param[in] mysql_table MySQL table structure
@param[in] f_idx field index of the multi-value column
Expand Down
1 change: 1 addition & 0 deletions storage/innobase/srv/srv0srv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1803,6 +1803,7 @@ void srv_export_innodb_status(void) {
export_vars.innodb_master_thread_active_loops = srv_main_active_loops;
export_vars.innodb_master_thread_idle_loops = srv_main_idle_loops;
export_vars.innodb_max_trx_id = trx_sys_get_next_trx_id_or_no();

mutex_enter(&trx_sys->mutex);
auto *const oldest_view_for_low_limit_trx_id =
trx_sys->mvcc->get_oldest_view();
Expand Down
4 changes: 2 additions & 2 deletions unittest/gunit/mdl-t.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3864,11 +3864,11 @@ TEST_F(MDLHtonNotifyTest, NotifyNamespaces) {
false, // LOCKING_SERVICE
false, // SRID
false, // ACL_CACHE
false, //
false, // COLUMN_STATISTICS
false, // RESOURCE_GROUPS
false, // FOREIGN_KEY
false // CHECK_CONSTRAINT
false, // CHECK_CONSTRAINT
false, // BACKUP_TABLES
};
static_assert(
sizeof(notify_or_not) == MDL_key::NAMESPACE_END,
Expand Down
1 change: 0 additions & 1 deletion vio/viopipe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ size_t vio_write_pipe(Vio *vio, const uchar *buf, size_t count) {

enable_iocp_notification(&vio->pipe_overlapped);

DBUG_RETURN(ret);
return ret;
}

Expand Down

0 comments on commit a15a94d

Please sign in to comment.