Export-Funktion

[expired user #255]'s profile image [expired user #255] posted 17 years ago in Import/Export Permalink
Hallo,

folgende Probleme:

Beim Export von Tabellen werden im Zielsystem alle Datenbanken des Servers angezeigt, obwohl im anderen Fenster der Login nur mit einem einzigen User erfolgt ist. DB ist 4.0.14 (ich weiss geht nicht neuer). Hat dazu gef
ansgar's profile image ansgar posted 17 years ago Permalink
Ok, nochmal zum Mitschreiben: Du m
ansgar's profile image ansgar posted 17 years ago Permalink
Ah ich nehme an du hast dann statt direktem Export eine SQL Datei erzeugt, die du dann auf dem anderen Server wieder einlesen wolltest. Bei diesem Weg ist es immens wichtig, f
[expired user #255]'s profile image [expired user #255] posted 17 years ago Permalink
Ich habe nicht in eine Datei exportiert, sondern direkt. Target-Kompatibilit
ansgar's profile image ansgar posted 17 years ago Permalink
"4.x" gibt es in HS 3.0 als target-version nicht. Entweder war es 4.0 oder 4.1 ?

So oder so gibt es wohl hier einen kleinen Bug in HS wie ich gerade sehe:

if target_version < 40000 then
begin
sql := stringreplace(sql, 'ENGINE=', 'TYPE=', [rfReplaceAll]);
end
else if target_version >= 51000 then
begin
sql := stringreplace(sql, 'TYPE=', 'ENGINE=', [rfReplaceAll]);
end;


Hier wird das ENGINE nur dann durch TYPE ersetzt, sofern du als target-version kleiner als 4.0 ausgew
ansgar's profile image ansgar posted 17 years ago Permalink
ansgar's profile image ansgar posted 17 years ago Permalink
Here's the commit which tried to fix the ENGINE/TYPE problem:
http://fisheye3.cenqua.com/changelog/heidisql/?cs=362

I should change these lines
if target_version < 40000 then
begin
sql := stringreplace(sql, 'ENGINE=', 'TYPE=', [rfReplaceAll]);
end
else if target_version >= 51000 then
begin
sql := stringreplace(sql, 'TYPE=', 'ENGINE=', [rfReplaceAll]);
end;

to
if target_version < 40102 then
begin
sql := stringreplace(sql, 'ENGINE=', 'TYPE=', [rfReplaceAll]);
else
begin
sql := stringreplace(sql, 'TYPE=', 'ENGINE=', [rfReplaceAll]);
end;


That would ensure we replace ENGINE by TYPE for versions below 4.1.2 and replace TYPE by ENGINE for versions 4.1.2 and above. Theoretically we could do more fancy version comparing because even 4.0.18 understands ENGINE, but it also understands KEYWORD and the above change keeps the version struggling readable.
[expired user #255]'s profile image [expired user #255] posted 17 years ago Permalink
macht ihr denn bitte was daran, dass man ohne anmeldung andere datenbanken
ansgar's profile image ansgar posted 17 years ago Permalink
Pleas post in english so everybody can read this.

So the pulldown which holds the source-databases does not select the database you have just been using? If yes, that's odd.
[expired user #255]'s profile image [expired user #255] posted 17 years ago Permalink
exactly. that is another source for mistakes, because of the missing security check.
ansgar's profile image ansgar posted 17 years ago Permalink
ENGINE/TYPE confusion is fixed:
http://fisheye3.cenqua.com/changelog/heidisql/?cs=804

Please login to leave a reply, or register at first.