-
John David Duncan authored
Remove the old infrastructure for creation of ndbinfo tables and views, replacing it with a data dictionary bootstrap routine modeled after the performance_schema bootstrap from wl#7900. Remove all the generated text supporting ndbinfo tables from scripts/mysql_system_tables.sql, along with the CMake code in scripts/ that ensured that it was present, and the patch_file.cc utility program that was used to maintain it. Remove the ndbinfo_sql utility program, but move its source file to storage/ndb/plugin/ha_ndbinfo_sql.cc and compile it as a part of the ndbinfo storage engine. This results in some NDB kernel code (kernel/vm/NdbInfoTables.cpp) being built as part of mysqld, requiring some minor code changes under storage/ndb/kernel/ to meet the compilation requirements there. Add a new DD property, NDBINFO_VERSION, to store the version number of the currently installed ndbinfo schema. Re-use the MySQL server version number to represent the ndbinfo version. If the stored NDBINFO_VERSION is less than the current version (or the server was started with --upgrade=FORCE), all ndbinfo tables and views will be dropped and recreated. In sql/dd/ndbinfo_schema/init.cc implement a new bootstrap routine dd::ndbinfo::init_schema_and_tables(), which is called from mysqld.cc during server startup, and then calls in to the ndbinfo handlerton to fetch the current table and view definitions. The ndbinfo plugin supplies both base tables and views, so in sql/plugin_table.h extend class Plugin_table with a derived class Plugin_view. Testing for the work in mtr is accomlished by scanning the server log file for "upgrading" or "not upgrading" messages, as appropriate, in the existing tests ndb.ndbinfo and ndb.ndbinfo_upgrade. Also in test ndb.ndbinfo, the query "SHOW CREATE TABLE processes" is replaced with a "SELECT view_definition from information_schema.views" query, to filter out the client character set and connection information from view creation time. Change-Id: I5b85128093e2eea592c4bb28ffb2d7dc08fd21d1
John David Duncan authoredRemove the old infrastructure for creation of ndbinfo tables and views, replacing it with a data dictionary bootstrap routine modeled after the performance_schema bootstrap from wl#7900. Remove all the generated text supporting ndbinfo tables from scripts/mysql_system_tables.sql, along with the CMake code in scripts/ that ensured that it was present, and the patch_file.cc utility program that was used to maintain it. Remove the ndbinfo_sql utility program, but move its source file to storage/ndb/plugin/ha_ndbinfo_sql.cc and compile it as a part of the ndbinfo storage engine. This results in some NDB kernel code (kernel/vm/NdbInfoTables.cpp) being built as part of mysqld, requiring some minor code changes under storage/ndb/kernel/ to meet the compilation requirements there. Add a new DD property, NDBINFO_VERSION, to store the version number of the currently installed ndbinfo schema. Re-use the MySQL server version number to represent the ndbinfo version. If the stored NDBINFO_VERSION is less than the current version (or the server was started with --upgrade=FORCE), all ndbinfo tables and views will be dropped and recreated. In sql/dd/ndbinfo_schema/init.cc implement a new bootstrap routine dd::ndbinfo::init_schema_and_tables(), which is called from mysqld.cc during server startup, and then calls in to the ndbinfo handlerton to fetch the current table and view definitions. The ndbinfo plugin supplies both base tables and views, so in sql/plugin_table.h extend class Plugin_table with a derived class Plugin_view. Testing for the work in mtr is accomlished by scanning the server log file for "upgrading" or "not upgrading" messages, as appropriate, in the existing tests ndb.ndbinfo and ndb.ndbinfo_upgrade. Also in test ndb.ndbinfo, the query "SHOW CREATE TABLE processes" is replaced with a "SELECT view_definition from information_schema.views" query, to filter out the client character set and connection information from view creation time. Change-Id: I5b85128093e2eea592c4bb28ffb2d7dc08fd21d1
Loading