diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-03 14:49:17 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-03 14:49:17 +0200 |
commit | 533a13af069d8c9e6c5f4e1a72851497185ade03 (patch) | |
tree | 4623752e0c114e582fbbc0afcc02b67dede26b50 /sql/opt_split.cc | |
parent | 4b3690b50433a169d9feed5dc45044a8934b5582 (diff) | |
parent | e6290a8270daf884f551230307225b358939bfab (diff) | |
download | mariadb-git-533a13af069d8c9e6c5f4e1a72851497185ade03.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'sql/opt_split.cc')
-rw-r--r-- | sql/opt_split.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/opt_split.cc b/sql/opt_split.cc index c70fac49930..6807a623b73 100644 --- a/sql/opt_split.cc +++ b/sql/opt_split.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2017 MariaDB + Copyright (c) 2017, 2020, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -751,13 +751,13 @@ void JOIN::add_keyuses_for_splitting() added_keyuse_count)) goto err; - memcpy(keyuse.buffer, - save_qep->keyuse.buffer, - (size_t) save_qep->keyuse.elements * keyuse.size_of_element); - keyuse.elements= save_qep->keyuse.elements; + idx= keyuse.elements= save_qep->keyuse.elements; + if (keyuse.elements) + memcpy(keyuse.buffer, + save_qep->keyuse.buffer, + (size_t) keyuse.elements * keyuse.size_of_element); keyuse_ext= &ext_keyuses_for_splitting->at(0); - idx= save_qep->keyuse.elements; for (i=0; i < added_keyuse_count; i++, keyuse_ext++, idx++) { set_dynamic(&keyuse, (KEYUSE *) keyuse_ext, idx); |