Sergei, I forgot to say hello in the last email 😇 so, hello;) On Thu, 9 Jan 2025 at 21:52, Nikita Malyavin <nikitamalyavin@gmail.com> wrote:
On Wed, 1 Jan 2025 at 18:22, Sergei Golubchik <serg@mariadb.org> wrote:
+ KEY_CREATE_INFO *key_cinfo= &key.key_create_info; + + if (is_hash_field_needed) + { + if (key_cinfo->algorithm == HA_KEY_ALG_UNDEF) + key_cinfo->algorithm= HA_KEY_ALG_LONG_HASH;
Perhaps you shouldn't set key algorithm in add_hash_field() then? or, rather replace the assignment with an assert?
No, it still could be set from HA_KEY_ALG_HASH for some cases. However, I have made some refactoring to is_hash_field_needed. Can you please take a look at it as well?
https://github.com/MariaDB/server/commit/b92c73320ac14b2aa0ad6cb423f37db4622... Thank you! Nikita.