From e14ee2ada586ddfe44919caa1c13988e3f0f194b Mon Sep 17 00:00:00 2001 From: John David Duncan Date: Fri, 7 Jan 2022 10:35:33 -0800 Subject: [PATCH] WL#11968 Patch 1(b), post-push fixes for patch #1. Patch #1 caused several problems in mysql-trunk related to ndbinfo initialization and upgrade, including the failure of the test ndb_76_inplace_upgrade and the failure of all NDB MTR tests in Pushbuild on Windows. This patch fixes these issues, including fixes for bug#33726826 and bug#33730799. In ndbinfo, revert the removal of ndb$blocks and ndb$index_stats and the change of blocks and index_stats from views to tables. Improve the ndbinfo schema upgrade & initialization logic to better handle such a change in the future. This logic now runs in two passes: first it drops the known tables and views from current and previous versions, then it creates the tables and views for the current version. Add a new class method NdbDictionary::printColumnTypeDescription(). This is needed for the ndbinfo.columns table in patch #2 but was missing from patch #1. Add boilerplate index lookup initialization code that was also missing. Fix ndbinfo prefix determination on Windows. Change-Id: I422856bcad4baf5ae9b14c1e3a1f2871bd6c5f59 --- mysql-test/suite/ndb/r/ndbinfo_plans.result | 22 +-- sql/dd/ndbinfo_schema/init.cc | 24 +-- storage/ndb/include/ndbapi/NdbDictionary.hpp | 4 +- storage/ndb/plugin/ha_ndbinfo.cc | 10 +- storage/ndb/plugin/ha_ndbinfo_sql.cc | 153 +++++++++++------- storage/ndb/src/ndbapi/NdbDictionary.cpp | 17 +- storage/ndb/src/ndbapi/NdbInfo.cpp | 5 +- storage/ndb/src/ndbapi/NdbInfoScanNodes.hpp | 3 +- .../ndb/src/ndbapi/NdbInfoScanOperation.hpp | 3 +- storage/ndb/src/ndbapi/NdbInfoScanVirtual.cpp | 8 +- storage/ndb/src/ndbapi/NdbInfoScanVirtual.hpp | 3 +- 11 files changed, 151 insertions(+), 101 deletions(-) diff --git a/mysql-test/suite/ndb/r/ndbinfo_plans.result b/mysql-test/suite/ndb/r/ndbinfo_plans.result index d1cea362d66b..aeae0aba4f2b 100644 --- a/mysql-test/suite/ndb/r/ndbinfo_plans.result +++ b/mysql-test/suite/ndb/r/ndbinfo_plans.result @@ -53,10 +53,9 @@ SELECT table_name, table_rows, avg_row_length AND table_name not like '%cpu%' ORDER BY table_name; TABLE_NAME TABLE_ROWS AVG_ROW_LENGTH -blocks 29 20 -index_stats 64 12 ndb$acc_operations 15 64 ndb$backup_id 1 20 +ndb$blocks 29 20 ndb$columns 530 44 ndb$config_nodes 34 28 ndb$config_params 167 120 @@ -76,6 +75,7 @@ ndb$frag_locks 344 96 ndb$frag_mem_use 344 100 ndb$frag_operations 344 192 ndb$hwinfo 2 44 +ndb$index_stats 64 12 ndb$logbuffers 8 40 ndb$logspaces 8 40 ndb$membership 2 88 @@ -110,8 +110,8 @@ count(*) SELECT table_name from rowcounts WHERE est_rows = actual_rows ORDER BY table_name; table_name -blocks ndb$backup_id +ndb$blocks ndb$columns ndb$config_nodes ndb$config_params @@ -153,7 +153,7 @@ SELECT table_name, constraint_name, column_name, ordinal_position WHERE table_schema = 'ndbinfo' ORDER BY table_name; TABLE_NAME CONSTRAINT_NAME COLUMN_NAME ORDINAL_POSITION -blocks PRIMARY block_number 1 +ndb$blocks PRIMARY block_number 1 ndb$config_params PRIMARY param_number 1 ndb$dblqh_tcconnect_state PRIMARY state_int_value 1 ndb$dbtc_apiconnect_state PRIMARY state_int_value 1 @@ -205,21 +205,21 @@ block_number 251 block_name NDBCNTR explain format=tree select * from blocks where block_number in (250,251); -EXPLAIN -> Filter: (blocks.block_number in (250,251)) (cost=1.41 rows=2) - -> Index range scan on blocks using PRIMARY over (block_number = 250) OR (block_number = 251) (cost=1.41 rows=2) +EXPLAIN -> Filter: (ndb$blocks.block_number in (250,251)) (cost=1.41 rows=2) + -> Index range scan on ndb$blocks using PRIMARY over (block_number = 250) OR (block_number = 251) (cost=1.41 rows=2) explain format=tree select * from blocks order by block_number; -EXPLAIN -> Index scan on blocks using PRIMARY (cost=3.40 rows=29) +EXPLAIN -> Index scan on ndb$blocks using PRIMARY (cost=3.40 rows=29) explain format=tree select * from blocks where block_number < 250; -EXPLAIN -> Filter: (blocks.block_number < 250) (cost=4.76 rows=10) - -> Index range scan on blocks using PRIMARY over (block_number < 250) (cost=4.76 rows=10) +EXPLAIN -> Filter: (ndb$blocks.block_number < 250) (cost=4.76 rows=10) + -> Index range scan on ndb$blocks using PRIMARY over (block_number < 250) (cost=4.76 rows=10) ## Can scan backwards: explain format=tree select * from blocks where block_number > 250 order by block_number desc; -EXPLAIN -> Filter: (blocks.block_number > 250) (cost=4.76 rows=10) - -> Index range scan on blocks using PRIMARY over (250 < block_number) (reverse) (cost=4.76 rows=10) +EXPLAIN -> Filter: (ndb$blocks.block_number > 250) (cost=4.76 rows=10) + -> Index range scan on ndb$blocks using PRIMARY over (250 < block_number) (reverse) (cost=4.76 rows=10) select * from dict_obj_types where type_id = 6; diff --git a/sql/dd/ndbinfo_schema/init.cc b/sql/dd/ndbinfo_schema/init.cc index b5c8fc65d5bc..fc16a6851de2 100644 --- a/sql/dd/ndbinfo_schema/init.cc +++ b/sql/dd/ndbinfo_schema/init.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2019, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2019, 2022, Oracle and/or its affiliates. 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, @@ -78,21 +78,18 @@ static bool check_ndbinfo_schema_has_correct_version(THD *thd) { return tag_exists ? (version == MYSQL_VERSION_ID) : false; } -static bool drop_and_create_table(THD *thd, const Plugin_table &table) { +static bool drop_object(THD *thd, const Plugin_table &table) { dd::String_type drop_sql("DROP "); drop_sql.append(table.get_object_type()); // TABLE or VIEW drop_sql.append(" IF EXISTS ").append(table.get_qualified_name()); - if (dd::execute_query(thd, drop_sql)) return true; + return dd::execute_query(thd, drop_sql); +} +static bool create_object(THD *thd, const Plugin_table &table) { if (table.get_table_definition()) { - /* Create schema if needed */ - if (create_schema(thd, table.get_schema_name())) return true; - - /* Create table */ if (dd::execute_query(thd, table.get_ddl())) return true; } - return false; // success } @@ -145,11 +142,18 @@ static bool initialize_ndbinfo(THD *thd) { // Create the ndbinfo schema if (create_schema(thd, "ndbinfo")) return true; - // Create each table or view defined in the list + // Drop all known tables & views (current version and previous versions) bool failed = false; for (const Plugin_table &table : ndbinfo_tables) { if (!failed) { - failed = drop_and_create_table(thd, table); + failed = drop_object(thd, table); + } + } + + // Create the current set of tables and views + for (const Plugin_table &table : ndbinfo_tables) { + if (!failed) { + failed = create_object(thd, table); } } diff --git a/storage/ndb/include/ndbapi/NdbDictionary.hpp b/storage/ndb/include/ndbapi/NdbDictionary.hpp index 7741162d30d8..7bb4cb674e14 100644 --- a/storage/ndb/include/ndbapi/NdbDictionary.hpp +++ b/storage/ndb/include/ndbapi/NdbDictionary.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2003, 2021, Oracle and/or its affiliates. + Copyright (c) 2003, 2022, Oracle and/or its affiliates. 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, @@ -2971,6 +2971,8 @@ class NdbDictionary { const NdbDataPrintFormat& format, const NdbDictionary::Column* c, const void* val); + static + class NdbOut& printColumnTypeDescription(class NdbOut &, const Column &); }; // class NdbDictionary diff --git a/storage/ndb/plugin/ha_ndbinfo.cc b/storage/ndb/plugin/ha_ndbinfo.cc index 5f784e179f1d..3b15532b81b4 100644 --- a/storage/ndb/plugin/ha_ndbinfo.cc +++ b/storage/ndb/plugin/ha_ndbinfo.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2009, 2021, Oracle and/or its affiliates. + Copyright (c) 2009, 2022, Oracle and/or its affiliates. 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, @@ -354,6 +354,7 @@ int ha_ndbinfo::open(const char *name, int mode, uint, const dd::Table *) { int err = g_ndbinfo->openTable(name, &m_impl.m_table); if (err) { assert(m_impl.m_table == 0); + ndb_log_info("NdbInfo::openTable failed for %s", name); if (err == NdbInfo::ERR_NoSuchTable) { if (g_ndb_cluster_connection->get_min_db_version() < NDB_VERSION_D) { // The table does not exist but there is a data node from a lower @@ -763,7 +764,10 @@ ulong ha_ndbinfo::index_flags(uint, uint, bool) const { int ha_ndbinfo::index_init(uint index, bool) { assert(index == 0); active_index = index; // required - return rnd_init(true); + int err = rnd_init(true); + if (err != 0) return err; + m_impl.m_scan_op->initIndex(index); + return 0; } int ha_ndbinfo::index_end() { return rnd_end(); } @@ -903,7 +907,7 @@ static int ndbinfo_init(void *plugin) { char prefix[FN_REFLEN]; build_table_filename(prefix, sizeof(prefix) - 1, opt_ndbinfo_dbname, opt_ndbinfo_table_prefix, "", 0); - DBUG_PRINT("info", ("prefix: '%s'", prefix)); + ndb_log_info("ndbinfo prefix: '%s'", prefix); assert(g_ndb_cluster_connection); g_ndbinfo = new (std::nothrow) NdbInfo(g_ndb_cluster_connection, prefix); if (!g_ndbinfo) { diff --git a/storage/ndb/plugin/ha_ndbinfo_sql.cc b/storage/ndb/plugin/ha_ndbinfo_sql.cc index 9251dfbf066c..5f739c501139 100644 --- a/storage/ndb/plugin/ha_ndbinfo_sql.cc +++ b/storage/ndb/plugin/ha_ndbinfo_sql.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2009, 2021, Oracle and/or its affiliates. + Copyright (c) 2009, 2022, Oracle and/or its affiliates. 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, @@ -83,6 +83,9 @@ static struct view { "FROM `ndbinfo`.`ndb$membership` " "GROUP BY arbitrator, arb_ticket, arb_connected"}, {"ndbinfo", "backup_id", "SELECT id FROM `ndbinfo`.`ndb$backup_id`"}, + {"ndbinfo", "blocks", + "SELECT block_number, block_name " + "FROM `ndbinfo`.`ndb$blocks`"}, {"ndbinfo", "cluster_locks", "SELECT " "`ndbinfo`.`ndb$acc_operations`.`node_id` AS `node_id`," @@ -222,7 +225,7 @@ static struct view { " END AS counter_name, " "val " "FROM `ndbinfo`.`ndb$counters` c " - "LEFT JOIN `ndbinfo`.`blocks` b " + "LEFT JOIN `ndbinfo`.`ndb$blocks` b " "ON c.block_number = b.block_number"}, {"ndbinfo", "cpudata", "SELECT * " @@ -316,6 +319,9 @@ static struct view { {"ndbinfo", "hwinfo", "SELECT * " "FROM `ndbinfo`.`ndb$hwinfo`"}, + {"ndbinfo", "index_stats", + "SELECT * " + "FROM `ndbinfo`.`ndb$index_stats`"}, {"ndbinfo", "locks_per_fragment", "SELECT name.fq_name, parent_name.fq_name AS parent_fq_name, " "types.type_name AS type, table_id, node_id, block_instance, " @@ -619,7 +625,7 @@ static struct view { {"ndbinfo", "threadblocks", "SELECT t.node_id, t.thr_no, b.block_name, t.block_instance " "FROM `ndbinfo`.`ndb$threadblocks` t " - "LEFT JOIN `ndbinfo`.`blocks` b " + "LEFT JOIN `ndbinfo`.`ndb$blocks` b " "ON t.block_number = b.block_number"}, {"ndbinfo", "threads", "SELECT * " @@ -647,68 +653,81 @@ static struct lookup { const char *schema_name; const char *lookup_table_name; const char *columns; -} lookups[] = { - { - "ndbinfo", - "blocks", - "block_number INT UNSIGNED NOT NULL PRIMARY KEY, " - "block_name VARCHAR(512)", - }, - { - "ndbinfo", - "index_stats", - "index_id INT UNSIGNED, " - "index_version INT UNSIGNED, " - "sample_version INT UNSIGNED", - }, - {"ndbinfo", "ndb$backup_id", - "id BIGINT UNSIGNED, " - "fragment INT UNSIGNED, " - "row_id BIGINT UNSIGNED"}, - {"ndbinfo", "ndb$config_params", - "param_number INT UNSIGNED NOT NULL PRIMARY KEY, " - "param_name VARCHAR(512), " - "param_description VARCHAR(512), " - "param_type VARCHAR(512), " - "param_default VARCHAR(512), " - "param_min VARCHAR(512), " - "param_max VARCHAR(512), " - "param_mandatory INT UNSIGNED, " - "param_status VARCHAR(512)"}, - { - "ndbinfo", - "ndb$dblqh_tcconnect_state", - "state_int_value INT UNSIGNED NOT NULL PRIMARY KEY, " - "state_name VARCHAR(256), " - "state_friendly_name VARCHAR(256), " - "state_description VARCHAR(256)", - }, - { - "ndbinfo", - "ndb$dbtc_apiconnect_state", - "state_int_value INT UNSIGNED NOT NULL PRIMARY KEY, " - "state_name VARCHAR(256), " - "state_friendly_name VARCHAR(256), " - "state_description VARCHAR(256)", - }, - { - "ndbinfo", - "ndb$dict_obj_types", - "type_id INT UNSIGNED NOT NULL PRIMARY KEY, " - "type_name VARCHAR(512)", - }, - { - "ndbinfo", - "ndb$error_messages", - "error_code INT UNSIGNED, " - "error_description VARCHAR(512), " - "error_status VARCHAR(512), " - "error_classification VARCHAR(512)", - }, -}; +} lookups[] = {{"ndbinfo", "ndb$backup_id", + "id BIGINT UNSIGNED, " + "fragment INT UNSIGNED, " + "row_id BIGINT UNSIGNED"}, + { + "ndbinfo", + "ndb$blocks", + "block_number INT UNSIGNED NOT NULL PRIMARY KEY, " + "block_name VARCHAR(512)", + }, + {"ndbinfo", "ndb$config_params", + "param_number INT UNSIGNED NOT NULL PRIMARY KEY, " + "param_name VARCHAR(512), " + "param_description VARCHAR(512), " + "param_type VARCHAR(512), " + "param_default VARCHAR(512), " + "param_min VARCHAR(512), " + "param_max VARCHAR(512), " + "param_mandatory INT UNSIGNED, " + "param_status VARCHAR(512)"}, + { + "ndbinfo", + "ndb$dblqh_tcconnect_state", + "state_int_value INT UNSIGNED NOT NULL PRIMARY KEY, " + "state_name VARCHAR(256), " + "state_friendly_name VARCHAR(256), " + "state_description VARCHAR(256)", + }, + { + "ndbinfo", + "ndb$dbtc_apiconnect_state", + "state_int_value INT UNSIGNED NOT NULL PRIMARY KEY, " + "state_name VARCHAR(256), " + "state_friendly_name VARCHAR(256), " + "state_description VARCHAR(256)", + }, + { + "ndbinfo", + "ndb$dict_obj_types", + "type_id INT UNSIGNED NOT NULL PRIMARY KEY, " + "type_name VARCHAR(512)", + }, + { + "ndbinfo", + "ndb$error_messages", + "error_code INT UNSIGNED, " + "error_description VARCHAR(512), " + "error_status VARCHAR(512), " + "error_classification VARCHAR(512)", + }, + { + "ndbinfo", + "ndb$index_stats", + "index_id INT UNSIGNED, " + "index_version INT UNSIGNED, " + "sample_version INT UNSIGNED", + }}; static constexpr size_t num_lookups = sizeof(lookups) / sizeof(lookups[0]); +struct obsolete_object { + const char *schema_name; + const char *name; +}; + +/* Views that were present in previous versions */ +static struct obsolete_object obsolete_views[] = { + {"ndbinfo", "dummy_view"} // replace this with an actual deleted view +}; + +/* Base tables that were present in previous versions */ +static struct obsolete_object obsolete_tables[] = { + {"ndbinfo", "dummy_table"} // replace this with an actual deleted table +}; + static int compare_names(const void *px, const void *py) { const Ndbinfo::Table *const *x = static_cast(px); @@ -759,6 +778,16 @@ static Plugin_table *ndbinfo_define_table(const Ndbinfo::Table &table) { } bool ndbinfo_define_dd_tables(List *plugin_tables) { + /* Drop views from previous versions */ + for (const obsolete_object &v : obsolete_views) + plugin_tables->push_back( + new Plugin_view(v.schema_name, v.name, nullptr, nullptr)); + + /* Drop base tables from previous versions */ + for (const obsolete_object &t : obsolete_tables) + plugin_tables->push_back( + new Plugin_table(t.schema_name, t.name, nullptr, nullptr, nullptr)); + /* Sort Ndbinfo tables; define Ndbinfo tables as tables in DD */ const Ndbinfo::Table **tables = new const Ndbinfo::Table *[Ndbinfo::getNumTables()]; diff --git a/storage/ndb/src/ndbapi/NdbDictionary.cpp b/storage/ndb/src/ndbapi/NdbDictionary.cpp index eed96cf4124e..773542c4da81 100644 --- a/storage/ndb/src/ndbapi/NdbDictionary.cpp +++ b/storage/ndb/src/ndbapi/NdbDictionary.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2003, 2021, Oracle and/or its affiliates. + Copyright (c) 2003, 2022, Oracle and/or its affiliates. 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, @@ -3796,13 +3796,13 @@ NdbDictionary::NdbDataPrintFormat::NdbDataPrintFormat() } NdbDictionary::NdbDataPrintFormat::~NdbDataPrintFormat() {} - NdbOut& -operator<<(NdbOut& out, const NdbDictionary::Column& col) +NdbDictionary::printColumnTypeDescription(NdbOut& out, + const NdbDictionary::Column& col) { const CHARSET_INFO *cs = col.getCharset(); const char *csname = cs ? cs->name : "?"; - out << col.getName() << " "; + switch (col.getType()) { case NdbDictionary::Column::Tinyint: out << "Tinyint"; @@ -3930,6 +3930,15 @@ operator<<(NdbOut& out, const NdbDictionary::Column& col) break; } } + return out; +} + +NdbOut& +operator<<(NdbOut& out, const NdbDictionary::Column& col) +{ + out << col.getName() << " "; + + NdbDictionary::printColumnTypeDescription(out, col); if (col.getPrimaryKey()) out << " PRIMARY KEY"; diff --git a/storage/ndb/src/ndbapi/NdbInfo.cpp b/storage/ndb/src/ndbapi/NdbInfo.cpp index 9b8c9381ed28..3eaacc612023 100644 --- a/storage/ndb/src/ndbapi/NdbInfo.cpp +++ b/storage/ndb/src/ndbapi/NdbInfo.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2009, 2021, Oracle and/or its affiliates. + Copyright (c) 2009, 2022, Oracle and/or its affiliates. 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, @@ -37,7 +37,8 @@ NdbInfo::NdbInfo(class Ndb_cluster_connection* connection, const char* prefix) : m_full_prefix(prefix), m_id_counter(0) { - m_short_prefix.assign(m_full_prefix, m_full_prefix.lastIndexOf('/') + 1); + m_short_prefix.assign(m_full_prefix, + m_full_prefix.lastIndexOf(DIR_SEPARATOR[0]) + 1); } bool NdbInfo::init(void) diff --git a/storage/ndb/src/ndbapi/NdbInfoScanNodes.hpp b/storage/ndb/src/ndbapi/NdbInfoScanNodes.hpp index 505039878b8f..418c131af71e 100644 --- a/storage/ndb/src/ndbapi/NdbInfoScanNodes.hpp +++ b/storage/ndb/src/ndbapi/NdbInfoScanNodes.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2009, 2021, Oracle and/or its affiliates. + Copyright (c) 2009, 2022, Oracle and/or its affiliates. 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, @@ -40,6 +40,7 @@ class NdbInfoScanNodes : public NdbInfoScanOperation { const class NdbInfoRecAttr* getValue(Uint32 anAttrId) override; int execute() override; int nextResult() override; + void initIndex(Uint32) override { } bool seek(NdbInfoScanOperation::Seek, int) override; NdbInfoScanNodes(class Ndb_cluster_connection*, diff --git a/storage/ndb/src/ndbapi/NdbInfoScanOperation.hpp b/storage/ndb/src/ndbapi/NdbInfoScanOperation.hpp index 280e874d44c1..d2d4aa1ef0fc 100644 --- a/storage/ndb/src/ndbapi/NdbInfoScanOperation.hpp +++ b/storage/ndb/src/ndbapi/NdbInfoScanOperation.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2009, 2021, Oracle and/or its affiliates. + Copyright (c) 2009, 2022, Oracle and/or its affiliates. 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, @@ -44,6 +44,7 @@ class NdbInfoScanOperation { virtual const NdbInfoRecAttr* getValue(Uint32 anAttrId) = 0; virtual int execute() = 0; virtual int nextResult() = 0; + virtual void initIndex(Uint32) = 0; virtual bool seek(Seek, int value=0) = 0; virtual ~NdbInfoScanOperation() {} }; diff --git a/storage/ndb/src/ndbapi/NdbInfoScanVirtual.cpp b/storage/ndb/src/ndbapi/NdbInfoScanVirtual.cpp index bc0c9d330753..22346df0c281 100644 --- a/storage/ndb/src/ndbapi/NdbInfoScanVirtual.cpp +++ b/storage/ndb/src/ndbapi/NdbInfoScanVirtual.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2015, 2022, Oracle and/or its affiliates. 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, @@ -516,8 +516,7 @@ class BlocksTable : public VirtualTable NdbInfo::Table* get_instance() const override { NdbInfo::Table* tab = new NdbInfo::Table("blocks", this, - NO_OF_BLOCK_NAMES, true, - NdbInfo::TableName::NoPrefix); + NO_OF_BLOCK_NAMES); if (!tab) return NULL; if (!tab->addColumn(NdbInfo::Column("block_number", 0, @@ -1167,8 +1166,7 @@ class IndexStatsTable : public VirtualTable { NdbInfo::Table* get_instance() const override { NdbInfo::Table *tab = new NdbInfo::Table("index_stats", this, 64, // Hard-coded estimate - false, - NdbInfo::TableName::NoPrefix); + false); if (!tab) return NULL; if (!tab->addColumn(NdbInfo::Column("index_id", 0, diff --git a/storage/ndb/src/ndbapi/NdbInfoScanVirtual.hpp b/storage/ndb/src/ndbapi/NdbInfoScanVirtual.hpp index b0cad0056ea5..98ae72515344 100644 --- a/storage/ndb/src/ndbapi/NdbInfoScanVirtual.hpp +++ b/storage/ndb/src/ndbapi/NdbInfoScanVirtual.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2015, 2022, Oracle and/or its affiliates. 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, @@ -48,6 +48,7 @@ class NdbInfoScanVirtual : public NdbInfoScanOperation { const NdbInfo::Table *table, const class VirtualTable *virt); int init(); + void initIndex(Uint32) override { } bool seek(NdbInfoScanOperation::Seek, int) override; static bool create_virtual_tables(Vector &list);