| 6999 | } |
| 7000 | |
| 7001 | int ha_discover_table(THD *thd, TABLE_SHARE *share) |
| 7002 | { |
| 7003 | DBUG_ENTER("ha_discover_table"); |
| 7004 | int found; |
| 7005 | |
| 7006 | DBUG_ASSERT(share->error == OPEN_FRM_OPEN_ERROR); // share is not OK yet |
| 7007 | |
| 7008 | if (!engines_with_discover) |
| 7009 | found= FALSE; |
| 7010 | else if (share->db_plugin) |
| 7011 | found= discover_handlerton(thd, share->db_plugin, share); |
| 7012 | else |
| 7013 | found= plugin_foreach(thd, discover_handlerton, |
| 7014 | MYSQL_STORAGE_ENGINE_PLUGIN, share); |
| 7015 | |
| 7016 | if (thd->lex->query_tables && thd->lex->query_tables->sequence && !found) |
| 7017 | my_error(ER_UNKNOWN_SEQUENCES, MYF(0),share->table_name.str); |
| 7018 | if (!found) |
| 7019 | open_table_error(share, OPEN_FRM_OPEN_ERROR, ENOENT); // not found |
| 7020 | |
| 7021 | DBUG_RETURN(share->error != OPEN_FRM_OK); |
| 7022 | } |
| 7023 | |
| 7024 | static my_bool file_ext_exists(char *path, size_t path_len, const char *ext) |
| 7025 | { |
no test coverage detected