MDEV-36737 postfix - fix compilation and packaging on Windows

* Compile error
  GCCism - unportable use of __PRETTY_FUNCTION__

* Compile warning
  ha_rows to ulong cast missing

* Link error
  Due to unnecessary use of _dig_vec_lower
  _dig_vec_lower would have to be marked MYSQL_PLUGIN_IMPORT if we
  really wanted it.

* Packaging error (MSI)
  Newly introduced component videx-engine needs a place in
  MSI Feature tree
This commit is contained in:
Vladislav Vaintroub 2026-01-19 12:44:06 +01:00
commit f100bf3ec8
3 changed files with 17 additions and 6 deletions

View file

@ -33,6 +33,16 @@
#include <replication.h>
#include <curl/curl.h>
#if defined(__GNUC__)
#define PRETTY_FUNCTION __PRETTY_FUNCTION__
#elif defined(_MSC_VER)
#define PRETTY_FUNCTION __FUNCSIG__
#else
#define PRETTY_FUNCTION __func__
#endif
/** Shared state used by all open VIDEX handlers. */
class videx_share : public Handler_share
{
@ -652,7 +662,7 @@ ha_rows ha_videx::records_in_range(uint keynr, const key_range *min_key,
key= table->key_info + active_index;
VidexJsonItem request_item= construct_request(
table->s->db.str, table->s->table_name.str, __PRETTY_FUNCTION__);
table->s->db.str, table->s->table_name.str, PRETTY_FUNCTION);
serializeKeyRangeToJson(min_key, max_key, key, &request_item);
std::string n_rows_str;
@ -795,7 +805,7 @@ int ha_videx::info_low(uint flag, bool is_analyze)
// construct request
VidexStringMap res_json;
VidexJsonItem request_item= construct_request(
table->s->db.str, table->s->table_name.str, __PRETTY_FUNCTION__);
table->s->db.str, table->s->table_name.str, PRETTY_FUNCTION);
for (uint i= 0; i < table->s->keys; i++)
{
KEY *key= &table->key_info[i];
@ -899,7 +909,7 @@ int ha_videx::info_low(uint flag, bool is_analyze)
}
else
{
rec_per_key_int= stats.records;
rec_per_key_int= (ulong)stats.records;
}
if (rec_per_key_int == 0)
{

View file

@ -259,6 +259,7 @@ const char *get_field_name_or_expression(const Field *field)
@param[in] key_part Index components description
@param[in] key Key tuple
*/
constexpr const char hex_digits[]= "0123456789abcdef";
void videx_print_key_value(String *out, const KEY_PART_INFO *key_part,
const uchar *uchar_key)
@ -315,8 +316,8 @@ void videx_print_key_value(String *out, const KEY_PART_INFO *key_part,
out->append(STRING_WITH_LEN("0x"));
for (uint i= 0; i < store_length; i++)
{
out->append(_dig_vec_lower[*(uchar_key + i) >> 4]);
out->append(_dig_vec_lower[*(uchar_key + i) & 0x0F]);
out->append(hex_digits[*(uchar_key + i) >> 4]);
out->append(hex_digits[*(uchar_key + i) & 0x0F]);
}
return;
}

View file

@ -54,7 +54,7 @@ add_component(Backup
#Miscellaneous hidden components, part of server / or client programs
foreach(comp connect-engine connect-engine-jdbc ClientPlugins aws-key-management rocksdb-engine
hashicorp-key-management)
hashicorp-key-management videx-engine)
add_component(${comp} GROUP MySQLServer HIDDEN)
endforeach()