You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check for entries with "Unknown storage engine" in I_S.TABLES,
930
+
try to load plugins for these tables if available (MDEV-11942)
931
+
*/
932
+
staticintrun_mysqlcheck_engines(void)
933
+
{
934
+
DYNAMIC_STRINGds_query;
935
+
DYNAMIC_STRINGds_result;
936
+
937
+
/* Trying to identify existing tables with unknown storage engine
938
+
Does not work with all engine types yet, and doesn't produce
939
+
results for BLACKHOLE without the dummy "WHERE row_format IS NULL"
940
+
condition yet. See MDEV-11943 */
941
+
constchar*query="SELECT DISTINCT LOWER(REPLACE(REPLACE(table_comment, 'Unknown storage engine ', ''), '\\'', '')) AS engine FROM information_schema.tables WHERE row_format IS NULL AND table_comment LIKE 'Unknown storage engine%'";
942
+
943
+
if (init_dynamic_string(&ds_query, "", 512, 512))
944
+
die("Out of memory");
945
+
946
+
if (init_dynamic_string(&ds_result, "", 512, 512))
947
+
die("Out of memory");
948
+
949
+
verbose("Checking for tables with unknown storage engine");
950
+
951
+
run_query(query, &ds_result, TRUE);
952
+
953
+
{
954
+
char*line=ds_result.str;
955
+
if (line&&*line) {
956
+
do
957
+
{
958
+
line[strlen(line)-1]='\0';
959
+
verbose("installing missing plugin for '%s' storage engine", line);
960
+
961
+
dynstr_set(&ds_query, "INSTALL SONAME 'ha_");
962
+
dynstr_append(&ds_query, line); // we simply assume SONAME=ha_ENGINENAME
0 commit comments