'Empty table' use Delete instead Truncate

[expired user #5071]'s profile image [expired user #5071] posted 14 years ago in General Permalink
'Empty table' use Delete instead Truncate, its a bug?
ansgar's profile image ansgar posted 14 years ago Permalink
On old servers, yes. This is the code snippet:
if Connection.ServerVersionInt < 50003 then
sql_pattern := 'DELETE FROM '
else
sql_pattern := 'TRUNCATE ';
[expired user #5071]'s profile image [expired user #5071] posted 14 years ago Permalink
hmm, I use 'truncate' command in this server (4.1.18) and I havent any issue, why is restriction 50003? :)
Code modification/commit from ansgar.becker, 14 years ago, revision 5.1.0.3483
Display progress bar when deleting rows in 1 or more tables via action "Empty table(s)". Also, use TRUNCATE on all server versions. Don't know why I did that per DELETE FROM on servers below 5.0.3. See http://www.heidisql.com/forum.php?t=6285
ansgar's profile image ansgar posted 14 years ago Permalink
Hm you're right. Just changed that in r3483.

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