* Crashed tables were mistaken for views. Fixes issue #650.

* Add separate node type for crashed tables, so that some sort of a graphic can be associated with those.
This commit is contained in:
rosenfield.albert
2008-08-07 23:17:28 +00:00
parent ad9ebc4161
commit bf24403596
5 changed files with 37 additions and 12 deletions

View File

@ -2092,12 +2092,20 @@ begin
"Views bla references invalid..."
}
Result := NODETYPE_TABLE;
if (TableStatus.Count>=3) // Result from SHOW TABLE STATUS
and TableStatus[1].IsNull // Engine column is NULL for views
and TableStatus[2].IsNull then
Result := NODETYPE_VIEW
else if (TableStatus.Count=2) // Result from SHOW FULL TABLES
and (UpperCase(TableStatus[1].AsString) = 'VIEW') then
if (TableStatus.Count>=3) then begin
// Result from SHOW TABLE STATUS
if
TableStatus[1].IsNull and // Engine column is NULL for views
TableStatus[2].IsNull and
(Pos('VIEW', UpperCase(TableStatus.FieldByName('Comment').AsWideString)) > 0)
then Result := NODETYPE_VIEW;
if
TableStatus[1].IsNull and
TableStatus[2].IsNull and
(Pos('MARKED AS CRASHED', UpperCase(TableStatus.FieldByName('Comment').AsWideString)) > 0)
then Result := NODETYPE_CRASHED_TABLE;
end else if (TableStatus.Count=2) // Result from SHOW FULL TABLES
and (UpperCase(TableStatus[1].AsWideString) = 'VIEW') then
Result := NODETYPE_VIEW;
end;