The 3 procedures Parse(Table|View|Routine)Structure() already do some connection specific stuff, and now even more, so they're moved to TMySQLConnection now. In order to display the right collation even if only the character set was found in a CREATE TABLE code, the default collation per charset is detected via CollationTable. See http://www.heidisql.com/forum.php?t=6348 .

This commit is contained in:
Ansgar Becker
2010-10-08 20:16:53 +00:00
parent 61855c4e8b
commit 5d13d0677b
9 changed files with 422 additions and 404 deletions

View File

@ -556,8 +556,8 @@ begin
ResultSQL := '';
Columns := TTableColumnList.Create(True);
case DBObj.NodeType of
lntTable: ParseTableStructure(DBObj.CreateCode, Columns, nil, nil);
lntView: ParseViewStructure(DBObj.CreateCode, DBObj.Name, Columns, Dummy, Dummy, Dummy);
lntTable: DBObj.Connection.ParseTableStructure(DBObj.CreateCode, Columns, nil, nil);
lntView: DBObj.Connection.ParseViewStructure(DBObj.CreateCode, DBObj.Name, Columns, Dummy, Dummy, Dummy);
else AddNotes(DBObj.Database, DBObj.Name, STRSKIPPED+'a '+LowerCase(DBObj.ObjType)+' does not contain rows.', '');
end;
if Columns.Count > 0 then begin
@ -1109,7 +1109,7 @@ begin
if not FSecondExportPass then begin
// Create temporary VIEW replacement
ColumnList := TTableColumnList.Create(True);
ParseViewStructure(DBObj.CreateCode, DBObj.Name, ColumnList, Dummy, Dummy, Dummy);
DBObj.Connection.ParseViewStructure(DBObj.CreateCode, DBObj.Name, ColumnList, Dummy, Dummy, Dummy);
Struc := '# Creating temporary table to overcome VIEW dependency errors'+CRLF+
'CREATE TABLE ';
if ToDb then