From c70320a5bae8fdbcdd823b42eac5926f12f84637 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Thu, 4 Sep 2014 16:11:16 +0000 Subject: [PATCH] Restrict regular expression in TDBConnection.GetDatatypeByName to very left characters, so it does not detect "ENUM('text','...') DEFAULT 'text'" columns as TEXT type. See http://www.heidisql.com/forum.php?t=16271 --- source/dbconnection.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 7315aa09..edcbc2ad 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -1433,7 +1433,7 @@ begin Types := FDatatypes[i].Name; if FDatatypes[i].Names <> '' then Types := Types + '|' + FDatatypes[i].Names; - rx.Expression := '\b('+Types+')\b'; + rx.Expression := '^('+Types+')\b'; Match := rx.Exec(Datatype); if Match then begin if DeleteFromSource then