Skip to content

Commit

Permalink
Bug #30473261: CONVERT THE INDEX SUBQUERY ENGINES INTO USING THE ITER…
Browse files Browse the repository at this point in the history
…ATOR EXECUTOR

Post-push fix: Fix hash-based engine lookups on big-endian platforms.

Change-Id: If2773779742e23c95aba29362763e758e6f4bc8b
  • Loading branch information
Steinar H. Gunderson committed Jan 2, 2020
1 parent 4c01ca3 commit cb4116e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sql/sql_select.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
Expand Down Expand Up @@ -2281,7 +2281,13 @@ store_key::store_key_result store_key::copy() {

enum store_key::store_key_result store_key_hash_item::copy_inner() {
enum store_key_result res = store_key_item::copy_inner();
if (res != STORE_KEY_FATAL) *hash = unique_hash(to_field, hash);
if (res != STORE_KEY_FATAL) {
// Convert to and from little endian, since that is what gets
// stored in the hash field we are lookup up against.
ulonglong h = uint8korr(pointer_cast<char *>(hash));
h = unique_hash(to_field, &h);
int8store(pointer_cast<char *>(hash), h);
}
return res;
}

Expand Down

0 comments on commit cb4116e

Please sign in to comment.