From 38cfdd0595af84cec7c86b62feb59e894ccdeb58 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sat, 1 Apr 2017 06:52:04 +0000 Subject: [PATCH] Fix detection of column types with DEFAULT CURRENT_TIMESTAMP(123). See https://www.heidisql.com/forum.php?t=17585 --- source/dbconnection.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 5ac4eb77..429a2f76 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -4969,9 +4969,9 @@ begin if rxCol.Match[3] <> '' then Col.DefaultType := cdtNullUpdateTS; Delete(ColSpec, 1, rxCol.MatchLen[0]); - end else if rxCol.Match[1] = 'CURRENT_TIMESTAMP' then begin + end else if StartsText('CURRENT_TIMESTAMP', rxCol.Match[1]) then begin Col.DefaultType := cdtCurTS; - Col.DefaultText := 'CURRENT_TIMESTAMP'; + Col.DefaultText := rxCol.Match[1]; if rxCol.Match[3] <> '' then Col.DefaultType := cdtCurTSUpdateTS; Delete(ColSpec, 1, rxCol.MatchLen[0]);